3 #include "test_common.h"
9 int gbDebugEnabled = 0;
10 jmp_buf gTest_FailJump;
13 int main(int argc, char *argv[])
16 for( int i = 0; i < giNumTests; i ++ )
18 tTEST *test = &gaTests[i];
19 fprintf(stderr, "Test [%i] \"%s\": ", i, test->Name);
20 if( test->Setup && test->Setup() != 0 ) {
21 fprintf(stderr, "ERROR\n");
24 int res = setjmp(gTest_FailJump);
31 fprintf(stderr, "PASS\n");
39 void TestFailure(const char *ReasonFmt, ...)
42 va_start(args, ReasonFmt);
43 fprintf(stderr, "FAILURE: ");
44 vfprintf(stderr, ReasonFmt, args);
45 fprintf(stderr, "\n");
47 longjmp(gTest_FailJump, 1);
50 void _SysDebug(const char *Format, ...)
55 va_start(args, Format);
56 printf("_SysDebug: ");
57 vprintf(Format, args);