diff options
| author | Martin Hořeňovský | 2019-12-05 16:00:20 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2019-12-05 16:00:20 +0100 |
| commit | 0fea081ad1a678b379182930a3ec22a3e275dbf0 (patch) | |
| tree | 3afa04ce6805d7a86e9c59f87ac68cb1d21eb8b2 /tests/SelfTest | |
| parent | 90e2549cecc2e886d563b7a88e752c9b4104f798 (diff) | |
| download | catch3-0fea081ad1a678b379182930a3ec22a3e275dbf0.tar.gz | |
Move tests from projects/ to tests/
Diffstat (limited to 'tests/SelfTest')
59 files changed, 42517 insertions, 0 deletions
diff --git a/tests/SelfTest/Baselines/automake.std.approved.txt b/tests/SelfTest/Baselines/automake.std.approved.txt new file mode 100644 index 00000000..057be069 --- /dev/null +++ b/tests/SelfTest/Baselines/automake.std.approved.txt @@ -0,0 +1,168 @@ +:test-result: PASS # A test name that starts with a # +:test-result: PASS #542 +:test-result: PASS #809 +:test-result: FAIL 'Not' checks that should fail +:test-result: PASS 'Not' checks that should succeed +:test-result: PASS (unimplemented) static bools can be evaluated +:test-result: FAIL A METHOD_AS_TEST_CASE based test run that fails +:test-result: PASS A METHOD_AS_TEST_CASE based test run that succeeds +:test-result: FAIL A TEST_CASE_METHOD based test run that fails +:test-result: PASS A TEST_CASE_METHOD based test run that succeeds +:test-result: FAIL A couple of nested sections followed by a failure +:test-result: FAIL A failing expression with a non streamable type is still captured +:test-result: PASS AllOf matcher +:test-result: PASS An empty test with no assertions +:test-result: PASS An expression with side-effects should only be evaluated once +:test-result: FAIL An unchecked exception reports the line of the last assertion +:test-result: PASS Anonymous test case 1 +:test-result: PASS AnyOf matcher +:test-result: PASS Approximate PI +:test-result: PASS Approximate comparisons with different epsilons +:test-result: PASS Approximate comparisons with floats +:test-result: PASS Approximate comparisons with ints +:test-result: PASS Approximate comparisons with mixed numeric types +:test-result: PASS Assertions then sections +:test-result: PASS Character pretty printing +:test-result: PASS Comparing function pointers +:test-result: PASS Comparing member function pointers +:test-result: PASS Comparisons between ints where one side is computed +:test-result: PASS Comparisons between unsigned ints and negative signed ints match c++ standard behaviour +:test-result: PASS Comparisons with int literals don't warn when mixing signed/ unsigned +:test-result: FAIL Contains string matcher +:test-result: FAIL Custom exceptions can be translated when testing for nothrow +:test-result: FAIL Custom exceptions can be translated when testing for throwing as something else +:test-result: FAIL Custom std-exceptions can be custom translated +:test-result: PASS Demonstrate that a non-const == is not used +:test-result: FAIL EndsWith string matcher +:test-result: XFAIL Equality checks that should fail +:test-result: PASS Equality checks that should succeed +:test-result: PASS Equals +:test-result: FAIL Equals string matcher +:test-result: PASS Exception messages can be tested for +:test-result: FAIL Expected exceptions that don't throw or unexpected exceptions fail the test +:test-result: FAIL FAIL aborts the test +:test-result: FAIL FAIL does not require an argument +:test-result: PASS Factorials are computed +:test-result: PASS Generator over a range of pairs +:test-result: PASS Generators over two ranges +:test-result: PASS Greater-than inequalities with different epsilons +:test-result: PASS INFO and WARN do not abort tests +:test-result: FAIL INFO gets logged on failure +:test-result: FAIL INFO gets logged on failure, even if captured before successful assertions +:test-result: XFAIL Inequality checks that should fail +:test-result: PASS Inequality checks that should succeed +:test-result: PASS Less-than inequalities with different epsilons +:test-result: PASS Long strings can be wrapped +:test-result: PASS Long text is truncated +:test-result: PASS ManuallyRegistered +:test-result: PASS Matchers can be (AllOf) composed with the && operator +:test-result: PASS Matchers can be (AnyOf) composed with the || operator +:test-result: PASS Matchers can be composed with both && and || +:test-result: FAIL Matchers can be composed with both && and || - failing +:test-result: PASS Matchers can be negated (Not) with the ! operator +:test-result: FAIL Matchers can be negated (Not) with the ! operator - failing +:test-result: FAIL Mismatching exception messages failing the test +:test-result: PASS Nice descriptive name +:test-result: FAIL Non-std exceptions can be translated +:test-result: PASS NotImplemented exception +:test-result: PASS Objects that evaluated in boolean contexts can be checked +:test-result: PASS Operators at different namespace levels not hijacked by Koenig lookup +:test-result: FAIL Ordering comparison checks that should fail +:test-result: PASS Ordering comparison checks that should succeed +:test-result: FAIL Output from all sections is reported +:test-result: PASS Parse test names and tags +:test-result: PASS Parsing a std::pair +:test-result: PASS Pointers can be compared to null +:test-result: PASS Pointers can be converted to strings +:test-result: PASS Process can be configured on command line +:test-result: FAIL SCOPED_INFO is reset for each loop +:test-result: PASS SUCCEED counts as a test pass +:test-result: PASS SUCCESS does not require an argument +:test-result: PASS Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or methods +:test-result: PASS Scenario: Do that thing with the thing +:test-result: PASS Scenario: This is a really long scenario name to see how the list command deals with wrapping +:test-result: PASS Scenario: Vector resizing affects size and capacity +A string sent directly to stdout +A string sent directly to stderr +:test-result: PASS Sends stuff to stdout and stderr +:test-result: PASS Some simple comparisons between doubles +Message from section one +Message from section two +:test-result: PASS Standard output from all sections is reported +:test-result: FAIL StartsWith string matcher +:test-result: PASS String matchers +hello +hello +:test-result: PASS Strings can be rendered with colour +:test-result: FAIL Tabs and newlines show in output +:test-result: PASS Tag alias can be registered against tag patterns +:test-result: PASS Test case with one argument +:test-result: PASS Test enum bit values +:test-result: PASS Text can be formatted using the Text class +:test-result: PASS The NO_FAIL macro reports a failure but does not fail the test +:test-result: FAIL This test 'should' fail but doesn't +:test-result: PASS Tracker +:test-result: FAIL Unexpected exceptions can be translated +:test-result: PASS Use a custom approx +:test-result: PASS Variadic macros +:test-result: PASS When checked exceptions are thrown they can be expected or unexpected +:test-result: FAIL When unchecked exceptions are thrown directly they are always failures +:test-result: FAIL When unchecked exceptions are thrown during a CHECK the test should continue +:test-result: FAIL When unchecked exceptions are thrown during a REQUIRE the test should abort fail +:test-result: FAIL When unchecked exceptions are thrown from functions they are always failures +:test-result: FAIL When unchecked exceptions are thrown from sections they are always failures +:test-result: PASS When unchecked exceptions are thrown, but caught, they do not affect the test +:test-result: PASS Where the LHS is not a simple value +:test-result: PASS Where there is more to the expression after the RHS +:test-result: PASS X/level/0/a +:test-result: PASS X/level/0/b +:test-result: PASS X/level/1/a +:test-result: PASS X/level/1/b +:test-result: PASS XmlEncode +:test-result: PASS atomic if +:test-result: PASS boolean member +:test-result: PASS checkedElse +:test-result: FAIL checkedElse, failing +:test-result: PASS checkedIf +:test-result: FAIL checkedIf, failing +:test-result: PASS comparisons between const int variables +:test-result: PASS comparisons between int variables +:test-result: PASS even more nested SECTION tests +:test-result: PASS first tag +spanner:test-result: PASS has printf +:test-result: FAIL just failure +:test-result: PASS just info +:test-result: FAIL looped SECTION tests +:test-result: FAIL looped tests +:test-result: FAIL more nested SECTION tests +:test-result: PASS nested SECTION tests +:test-result: PASS non streamable - with conv. op +:test-result: PASS not allowed +:test-result: PASS null strings +:test-result: PASS pair<pair<int,const char *,pair<std::string,int> > -> toString +:test-result: PASS pointer to class +:test-result: PASS random SECTION tests +:test-result: PASS replaceInPlace +:test-result: PASS second tag +:test-result: FAIL send a single char to INFO +:test-result: FAIL sends information to INFO +:test-result: PASS std::pair<int,const std::string> -> toString +:test-result: PASS std::pair<int,std::string> -> toString +:test-result: PASS std::vector<std::pair<std::string,int> > -> toString +:test-result: FAIL string literals of different sizes can be compared +:test-result: PASS toString on const wchar_t const pointer returns the string contents +:test-result: PASS toString on const wchar_t pointer returns the string contents +:test-result: PASS toString on wchar_t const pointer returns the string contents +:test-result: PASS toString on wchar_t returns the string contents +:test-result: PASS toString( has_maker ) +:test-result: PASS toString( has_maker_and_toString ) +:test-result: PASS toString( has_toString ) +:test-result: PASS toString( vectors<has_maker ) +:test-result: SKIP toString( vectors<has_maker_and_toString ) +:test-result: SKIP toString( vectors<has_toString ) +:test-result: PASS toString(enum w/operator<<) +:test-result: PASS toString(enum) +:test-result: PASS vector<int> -> toString +:test-result: PASS vector<string> -> toString +:test-result: PASS vectors can be sized and resized +:test-result: PASS xmlentitycheck diff --git a/tests/SelfTest/Baselines/compact.sw.approved.txt b/tests/SelfTest/Baselines/compact.sw.approved.txt new file mode 100644 index 00000000..0b2436ce --- /dev/null +++ b/tests/SelfTest/Baselines/compact.sw.approved.txt @@ -0,0 +1,1794 @@ +Misc.tests.cpp:<line number>: passed: with 1 message: 'yay' +Decomposition.tests.cpp:<line number>: passed: fptr == 0 for: 0 == 0 +Decomposition.tests.cpp:<line number>: passed: fptr == 0l for: 0 == 0 +Compilation.tests.cpp:<line number>: passed: y.v == 0 for: 0 == 0 +Compilation.tests.cpp:<line number>: passed: 0 == y.v for: 0 == 0 +Compilation.tests.cpp:<line number>: passed: y.v == 0 for: 0 == 0 +Compilation.tests.cpp:<line number>: passed: 0 == y.v for: 0 == 0 +Compilation.tests.cpp:<line number>: passed: t1 == t2 for: {?} == {?} +Compilation.tests.cpp:<line number>: passed: t1 != t2 for: {?} != {?} +Compilation.tests.cpp:<line number>: passed: t1 < t2 for: {?} < {?} +Compilation.tests.cpp:<line number>: passed: t1 > t2 for: {?} > {?} +Compilation.tests.cpp:<line number>: passed: t1 <= t2 for: {?} <= {?} +Compilation.tests.cpp:<line number>: passed: t1 >= t2 for: {?} >= {?} +Misc.tests.cpp:<line number>: passed: +Compilation.tests.cpp:<line number>: passed: std::memcmp(uarr, "123", sizeof(uarr)) == 0 for: 0 == 0 with 2 messages: 'uarr := "123"' and 'sarr := "456"' +Compilation.tests.cpp:<line number>: passed: std::memcmp(sarr, "456", sizeof(sarr)) == 0 for: 0 == 0 with 2 messages: 'uarr := "123"' and 'sarr := "456"' +Compilation.tests.cpp:<line number>: passed: +Compilation.tests.cpp:<line number>: passed: +Compilation.tests.cpp:<line number>: passed: h1 == h2 for: [1403 helper] == [1403 helper] +Message.tests.cpp:<line number>: warning: ' +This info message starts with a linebreak' with 1 message: ' +This warning message starts with a linebreak' +This would not be caught previously +Nor would this +Tricky.tests.cpp:<line number>: failed: explicitly with 1 message: '1514' +Compilation.tests.cpp:<line number>: passed: std::is_same<TypeList<int>, TypeList<int>>::value for: true +Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'answer := 42' with 1 message: 'expected exception' +Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'answer := 42'; expression was: thisThrows() with 1 message: 'expected exception' +Exception.tests.cpp:<line number>: passed: thisThrows() with 1 message: 'answer := 42' +Compilation.tests.cpp:<line number>: passed: 42 == f for: 42 == {?} +Compilation.tests.cpp:<line number>: passed: a == t for: 3 == 3 +Compilation.tests.cpp:<line number>: passed: a == t for: 3 == 3 +Compilation.tests.cpp:<line number>: passed: throws_int(true) +Compilation.tests.cpp:<line number>: passed: throws_int(true), int +Compilation.tests.cpp:<line number>: passed: throws_int(false) +Compilation.tests.cpp:<line number>: passed: "aaa", Catch::EndsWith("aaa") for: "aaa" ends with: "aaa" +Compilation.tests.cpp:<line number>: passed: templated_tests<int>(3) for: true +Misc.tests.cpp:<line number>: failed: f() == 0 for: 1 == 0 +Misc.tests.cpp:<line number>: passed: errno == 1 for: 1 == 1 +Compilation.tests.cpp:<line number>: passed: x == 4 for: {?} == 4 with 1 message: 'dummy := 0' +Misc.tests.cpp:<line number>: passed: with 1 message: 'Everything is OK' +Misc.tests.cpp:<line number>: passed: with 1 message: 'Everything is OK' +Misc.tests.cpp:<line number>: passed: with 1 message: 'Everything is OK' +Misc.tests.cpp:<line number>: passed: with 1 message: 'Everything is OK' +Misc.tests.cpp:<line number>: passed: with 1 message: 'Everything is OK' +Condition.tests.cpp:<line number>: failed: false != false +Condition.tests.cpp:<line number>: failed: true != true +Condition.tests.cpp:<line number>: failed: !true for: false +Condition.tests.cpp:<line number>: failed: !(true) for: !true +Condition.tests.cpp:<line number>: failed: !trueValue for: false +Condition.tests.cpp:<line number>: failed: !(trueValue) for: !true +Condition.tests.cpp:<line number>: failed: !(1 == 1) for: false +Condition.tests.cpp:<line number>: failed: !(1 == 1) +Condition.tests.cpp:<line number>: passed: false == false +Condition.tests.cpp:<line number>: passed: true == true +Condition.tests.cpp:<line number>: passed: !false for: true +Condition.tests.cpp:<line number>: passed: !(false) for: !false +Condition.tests.cpp:<line number>: passed: !falseValue for: true +Condition.tests.cpp:<line number>: passed: !(falseValue) for: !false +Condition.tests.cpp:<line number>: passed: !(1 == 2) for: true +Condition.tests.cpp:<line number>: passed: !(1 == 2) +Tricky.tests.cpp:<line number>: passed: is_true<true>::value == true for: true == true +Tricky.tests.cpp:<line number>: passed: true == is_true<true>::value for: true == true +Tricky.tests.cpp:<line number>: passed: is_true<false>::value == false for: false == false +Tricky.tests.cpp:<line number>: passed: false == is_true<false>::value for: false == false +Tricky.tests.cpp:<line number>: passed: !is_true<false>::value for: true +Tricky.tests.cpp:<line number>: passed: !!is_true<true>::value for: true +Tricky.tests.cpp:<line number>: passed: is_true<true>::value for: true +Tricky.tests.cpp:<line number>: passed: !(is_true<false>::value) for: !false +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 4 +Generators.tests.cpp:<line number>: passed: y < z for: 4 < 7 +Generators.tests.cpp:<line number>: passed: x < z for: 1 < 7 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 4 +Generators.tests.cpp:<line number>: passed: y < z for: 4 < 8 +Generators.tests.cpp:<line number>: passed: x < z for: 1 < 8 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 4 +Generators.tests.cpp:<line number>: passed: y < z for: 4 < 9 +Generators.tests.cpp:<line number>: passed: x < z for: 1 < 9 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 5 +Generators.tests.cpp:<line number>: passed: y < z for: 5 < 7 +Generators.tests.cpp:<line number>: passed: x < z for: 1 < 7 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 5 +Generators.tests.cpp:<line number>: passed: y < z for: 5 < 8 +Generators.tests.cpp:<line number>: passed: x < z for: 1 < 8 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 5 +Generators.tests.cpp:<line number>: passed: y < z for: 5 < 9 +Generators.tests.cpp:<line number>: passed: x < z for: 1 < 9 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 6 +Generators.tests.cpp:<line number>: passed: y < z for: 6 < 7 +Generators.tests.cpp:<line number>: passed: x < z for: 1 < 7 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 6 +Generators.tests.cpp:<line number>: passed: y < z for: 6 < 8 +Generators.tests.cpp:<line number>: passed: x < z for: 1 < 8 +Generators.tests.cpp:<line number>: passed: x < y for: 1 < 6 +Generators.tests.cpp:<line number>: passed: y < z for: 6 < 9 +Generators.tests.cpp:<line number>: passed: x < z for: 1 < 9 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 4 +Generators.tests.cpp:<line number>: passed: y < z for: 4 < 7 +Generators.tests.cpp:<line number>: passed: x < z for: 2 < 7 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 4 +Generators.tests.cpp:<line number>: passed: y < z for: 4 < 8 +Generators.tests.cpp:<line number>: passed: x < z for: 2 < 8 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 4 +Generators.tests.cpp:<line number>: passed: y < z for: 4 < 9 +Generators.tests.cpp:<line number>: passed: x < z for: 2 < 9 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 5 +Generators.tests.cpp:<line number>: passed: y < z for: 5 < 7 +Generators.tests.cpp:<line number>: passed: x < z for: 2 < 7 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 5 +Generators.tests.cpp:<line number>: passed: y < z for: 5 < 8 +Generators.tests.cpp:<line number>: passed: x < z for: 2 < 8 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 5 +Generators.tests.cpp:<line number>: passed: y < z for: 5 < 9 +Generators.tests.cpp:<line number>: passed: x < z for: 2 < 9 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 6 +Generators.tests.cpp:<line number>: passed: y < z for: 6 < 7 +Generators.tests.cpp:<line number>: passed: x < z for: 2 < 7 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 6 +Generators.tests.cpp:<line number>: passed: y < z for: 6 < 8 +Generators.tests.cpp:<line number>: passed: x < z for: 2 < 8 +Generators.tests.cpp:<line number>: passed: x < y for: 2 < 6 +Generators.tests.cpp:<line number>: passed: y < z for: 6 < 9 +Generators.tests.cpp:<line number>: passed: x < z for: 2 < 9 +Generators.tests.cpp:<line number>: passed: x < y for: 3 < 4 +Generators.tests.cpp:<line number>: passed: y < z for: 4 < 7 +Generators.tests.cpp:<line number>: passed: x < z for: 3 < 7 +Generators.tests.cpp:<line number>: passed: x < y for: 3 < 4 +Generators.tests.cpp:<line number>: passed: y < z for: 4 < 8 +Gene |