Improved unit test framework

- Added init/cleanup calls before after test
- Added ut_compare macro with better failure reporting
This commit is contained in:
Don Gagne
2014-09-02 15:33:43 -07:00
parent 6f0160bb5d
commit 1969c9ccf6
2 changed files with 23 additions and 0 deletions
+5
View File
@@ -56,3 +56,8 @@ void UnitTest::printAssert(const char* msg, const char* test, const char* file,
{
warnx("Assertion failed: %s - %s (%s:%d)", msg, test, file, line);
}
void UnitTest::printCompare(const char* msg, const char *v1_text, int v1, const char *v2_text, int v2, const char* file, int line)
{
warnx("Compare failed: %s - (%s:%d) (%s:%d) (%s:%d)", msg, v1_text, v1, v2_text, v2, file, line);
}