void TEST_Fail(string cond)
{
- printf("Assertion failed: ", cond);
+ LOG_INFOF("Assertion failed: ", cond);
//backtrace();
++TEST_failed;
}
}
if(f)
{
- printf("%d tests failed\n", f);
+ LOG_INFOF("%d tests failed\n", f);
return 1;
}
else
{
- printf("All tests OK\n", f);
+ LOG_INFOF("All tests OK\n", f);
return 0;
}
}
float TEST_Run(string s)
{
- printf("%s: testing...\n", s);
+ LOG_INFOF("%s: testing...\n", s);
TEST_failed = TEST_ok = 0;
callfunction(strcat("_TEST_", s));
if(TEST_failed > 0)
{
- printf("%s: %d items failed.\n", s, TEST_failed);
+ LOG_INFOF("%s: %d items failed.\n", s, TEST_failed);
return 0;
}
else if(!TEST_ok)
{
- printf("%s: did not complete.\n", s);
+ LOG_INFOF("%s: did not complete.\n", s);
return 0;
}
return 1;