diff options
author | Chris Wilson <chris+github@qwirx.com> | 2014-09-04 01:36:08 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2014-09-04 01:36:08 +0000 |
commit | 426a506afd1ffb3bd67e61b4693ee9bb968097a1 (patch) | |
tree | a6a726552411a781e692de657e3a630fa8d65d65 /lib/common/Test.h | |
parent | 75ad60bcc4d33589bb5afb307a87fd19b220a9e8 (diff) |
Simplify code with macros, update comments and fix whitespace.
Hopefully all of these changes are inconsequential.
Merged back changes from the test refactor branch to reduce diffs.
Diffstat (limited to 'lib/common/Test.h')
-rw-r--r-- | lib/common/Test.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/common/Test.h b/lib/common/Test.h index dbe1e979..146fafae 100644 --- a/lib/common/Test.h +++ b/lib/common/Test.h @@ -157,6 +157,9 @@ extern std::list<std::string> run_only_named_tests; printf("Test failed on <%s>\n", _line_str.c_str()); \ } +#define TEST_STARTSWITH(expected, actual) \ + TEST_EQUAL_LINE(expected, actual.substr(0, std::string(expected).size()), actual); + bool TestFileExists(const char *Filename); bool TestDirExists(const char *Filename); |