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++; \
|
2021-09-30 14:59:14 +02:00
|
|
|
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 );
|
2021-09-30 14:59:14 +02:00
|
|
|
void Test_RunCommon( void );
|
2021-11-19 03:14:50 +01:00
|
|
|
void Test_RunCmd( void );
|
|
|
|
void Test_RunCvar( void );
|
2021-06-20 18:55:31 +02:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* TESTS_H */
|