diff options
author | Chris Wilson <chris+github@qwirx.com> | 2011-04-23 10:16:13 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2011-04-23 10:16:13 +0000 |
commit | 3bbafeb3963a3a243628454c286fda2cd203ed5e (patch) | |
tree | 232c5b4d97f1534b6fcb6314b0722b71a1ee1327 /test/common | |
parent | 74f1980e503327372af0bdeb10b8e7b59c000c64 (diff) |
Log the expected and actual values when comparison failed.
Diffstat (limited to 'test/common')
-rw-r--r-- | test/common/testcommon.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/common/testcommon.cpp b/test/common/testcommon.cpp index e633969b..782d149f 100644 --- a/test/common/testcommon.cpp +++ b/test/common/testcommon.cpp @@ -404,8 +404,10 @@ int test(int argc, const char *argv[]) { TEST_THAT(!getline.IsEOF()); std::string line = getline.GetLine(true); - //printf("expected |%s| got |%s|\n", lines[l], line.c_str()); - TEST_THAT(strcmp(testfilelines[l], line.c_str()) == 0); + printf("expected |%s| got |%s|\n", testfilelines[l], + line.c_str()); + TEST_LINE(strcmp(testfilelines[l], line.c_str()) == 0, + line); l++; } TEST_THAT(getline.IsEOF()); @@ -455,8 +457,10 @@ int test(int argc, const char *argv[]) std::string line; while(!getline.GetLine(line, true)) ; - //printf("expected |%s| got |%s|\n", lines[l], line.c_str()); - TEST_THAT(strcmp(testfilelines[l], line.c_str()) == 0); + printf("expected |%s| got |%s|\n", testfilelines[l], + line.c_str()); + TEST_LINE(strcmp(testfilelines[l], line.c_str()) == 0, + line); l++; } TEST_THAT(getline.IsEOF()); |