xash3d-fwgs/engine/common/tests.h

33 lines
549 B
C
Raw Normal View History

2021-06-20 18:55:31 +02:00
#ifndef TESTS_H
#define TESTS_H
#if XASH_ENGINE_TESTS
struct tests_stats_s
{
uint passed;
uint failed;
};
extern struct tests_stats_s tests_stats;
#define TRUN( x ) Msg( "Running " #x "\n" ); x
#define TASSERT( exp ) \
if(!( exp )) \
{ \
tests_stats.failed++; \
Msg( S_ERROR "assert failed at %s:%i\n", __FILE__, __LINE__ ); \
2021-06-20 18:55:31 +02:00
} \
else tests_stats.passed++;
2021-06-20 19:24:20 +02:00
void Test_RunImagelib( void );
2021-06-20 18:55:31 +02:00
void Test_RunLibCommon( void );
void Test_RunCommon( void );
void Test_RunCmd( void );
void Test_RunCvar( void );
2021-06-20 18:55:31 +02:00
#endif
#endif /* TESTS_H */