From bc524d70253a4ab2fe40c3ca3e5666e267c0a4d1 Mon Sep 17 00:00:00 2001 From: Lexi Winter Date: Sun, 29 Jun 2025 19:25:29 +0100 Subject: import catch2 3.8.1 --- tests/SelfTest/Baselines/automake.std.approved.txt | 168 + tests/SelfTest/Baselines/automake.sw.approved.txt | 430 + .../Baselines/automake.sw.multi.approved.txt | 419 + tests/SelfTest/Baselines/compact.sw.approved.txt | 2860 +++ .../Baselines/compact.sw.multi.approved.txt | 2849 +++ tests/SelfTest/Baselines/console.std.approved.txt | 1615 ++ tests/SelfTest/Baselines/console.sw.approved.txt | 19017 ++++++++++++++++ .../Baselines/console.sw.multi.approved.txt | 19006 ++++++++++++++++ tests/SelfTest/Baselines/console.swa4.approved.txt | 956 + .../Baselines/default.sw.multi.approved.txt | 11 + tests/SelfTest/Baselines/junit.sw.approved.txt | 2305 ++ .../SelfTest/Baselines/junit.sw.multi.approved.txt | 2304 ++ tests/SelfTest/Baselines/sonarqube.sw.approved.txt | 2317 ++ .../Baselines/sonarqube.sw.multi.approved.txt | 2316 ++ tests/SelfTest/Baselines/tap.sw.approved.txt | 4571 ++++ tests/SelfTest/Baselines/tap.sw.multi.approved.txt | 4560 ++++ tests/SelfTest/Baselines/teamcity.sw.approved.txt | 1024 + .../Baselines/teamcity.sw.multi.approved.txt | 1023 + tests/SelfTest/Baselines/xml.sw.approved.txt | 21976 +++++++++++++++++++ tests/SelfTest/Baselines/xml.sw.multi.approved.txt | 21975 ++++++++++++++++++ .../IntrospectiveTests/Algorithms.tests.cpp | 94 + .../IntrospectiveTests/AssertionHandler.tests.cpp | 17 + tests/SelfTest/IntrospectiveTests/Clara.tests.cpp | 88 + .../SelfTest/IntrospectiveTests/CmdLine.tests.cpp | 467 + .../IntrospectiveTests/CmdLineHelpers.tests.cpp | 111 + .../IntrospectiveTests/ColourImpl.tests.cpp | 64 + .../SelfTest/IntrospectiveTests/Details.tests.cpp | 172 + .../IntrospectiveTests/FloatingPoint.tests.cpp | 139 + .../IntrospectiveTests/GeneratorsImpl.tests.cpp | 575 + .../SelfTest/IntrospectiveTests/Integer.tests.cpp | 224 + .../IntrospectiveTests/InternalBenchmark.tests.cpp | 455 + tests/SelfTest/IntrospectiveTests/Json.tests.cpp | 152 + tests/SelfTest/IntrospectiveTests/Parse.tests.cpp | 38 + .../IntrospectiveTests/PartTracker.tests.cpp | 254 + .../RandomNumberGeneration.tests.cpp | 609 + .../IntrospectiveTests/Reporters.tests.cpp | 330 + .../SelfTest/IntrospectiveTests/Sharding.tests.cpp | 45 + tests/SelfTest/IntrospectiveTests/Stream.tests.cpp | 32 + tests/SelfTest/IntrospectiveTests/String.tests.cpp | 212 + .../IntrospectiveTests/StringManip.tests.cpp | 94 + tests/SelfTest/IntrospectiveTests/Tag.tests.cpp | 117 + .../TestCaseInfoHasher.tests.cpp | 72 + .../SelfTest/IntrospectiveTests/TestSpec.tests.cpp | 365 + .../IntrospectiveTests/TestSpecParser.tests.cpp | 55 + .../SelfTest/IntrospectiveTests/TextFlow.tests.cpp | 400 + .../SelfTest/IntrospectiveTests/ToString.tests.cpp | 120 + tests/SelfTest/IntrospectiveTests/Traits.tests.cpp | 45 + .../IntrospectiveTests/UniquePtr.tests.cpp | 141 + tests/SelfTest/IntrospectiveTests/Xml.tests.cpp | 183 + tests/SelfTest/Misc/invalid-test-names.input | 1 + tests/SelfTest/Misc/plain-old-tests.input | 2 + .../SelfTest/Misc/special-characters-in-file.input | 1 + tests/SelfTest/TestRegistrations.cpp | 180 + tests/SelfTest/TimingTests/Sleep.tests.cpp | 24 + tests/SelfTest/UsageTests/Approx.tests.cpp | 218 + tests/SelfTest/UsageTests/BDD.tests.cpp | 106 + tests/SelfTest/UsageTests/Benchmark.tests.cpp | 173 + tests/SelfTest/UsageTests/Class.tests.cpp | 159 + tests/SelfTest/UsageTests/Compilation.tests.cpp | 525 + tests/SelfTest/UsageTests/Condition.tests.cpp | 334 + tests/SelfTest/UsageTests/Decomposition.tests.cpp | 41 + tests/SelfTest/UsageTests/EnumToString.tests.cpp | 108 + tests/SelfTest/UsageTests/Exception.tests.cpp | 204 + tests/SelfTest/UsageTests/Generators.tests.cpp | 323 + tests/SelfTest/UsageTests/Matchers.tests.cpp | 1144 + tests/SelfTest/UsageTests/MatchersRanges.tests.cpp | 936 + tests/SelfTest/UsageTests/Message.tests.cpp | 312 + tests/SelfTest/UsageTests/Misc.tests.cpp | 560 + tests/SelfTest/UsageTests/Skip.tests.cpp | 100 + tests/SelfTest/UsageTests/ToStringByte.tests.cpp | 23 + tests/SelfTest/UsageTests/ToStringChrono.tests.cpp | 51 + .../SelfTest/UsageTests/ToStringGeneral.tests.cpp | 200 + .../SelfTest/UsageTests/ToStringOptional.tests.cpp | 35 + tests/SelfTest/UsageTests/ToStringPair.tests.cpp | 38 + tests/SelfTest/UsageTests/ToStringTuple.tests.cpp | 54 + .../SelfTest/UsageTests/ToStringVariant.tests.cpp | 99 + tests/SelfTest/UsageTests/ToStringVector.tests.cpp | 94 + tests/SelfTest/UsageTests/ToStringWhich.tests.cpp | 186 + tests/SelfTest/UsageTests/Tricky.tests.cpp | 380 + tests/SelfTest/UsageTests/VariadicMacros.tests.cpp | 29 + tests/SelfTest/helpers/parse_test_spec.cpp | 22 + tests/SelfTest/helpers/parse_test_spec.hpp | 20 + tests/SelfTest/helpers/range_test_helpers.hpp | 210 + .../helpers/type_with_lit_0_comparisons.hpp | 55 + 84 files changed, 124319 insertions(+) create mode 100644 tests/SelfTest/Baselines/automake.std.approved.txt create mode 100644 tests/SelfTest/Baselines/automake.sw.approved.txt create mode 100644 tests/SelfTest/Baselines/automake.sw.multi.approved.txt create mode 100644 tests/SelfTest/Baselines/compact.sw.approved.txt create mode 100644 tests/SelfTest/Baselines/compact.sw.multi.approved.txt create mode 100644 tests/SelfTest/Baselines/console.std.approved.txt create mode 100644 tests/SelfTest/Baselines/console.sw.approved.txt create mode 100644 tests/SelfTest/Baselines/console.sw.multi.approved.txt create mode 100644 tests/SelfTest/Baselines/console.swa4.approved.txt create mode 100644 tests/SelfTest/Baselines/default.sw.multi.approved.txt create mode 100644 tests/SelfTest/Baselines/junit.sw.approved.txt create mode 100644 tests/SelfTest/Baselines/junit.sw.multi.approved.txt create mode 100644 tests/SelfTest/Baselines/sonarqube.sw.approved.txt create mode 100644 tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt create mode 100644 tests/SelfTest/Baselines/tap.sw.approved.txt create mode 100644 tests/SelfTest/Baselines/tap.sw.multi.approved.txt create mode 100644 tests/SelfTest/Baselines/teamcity.sw.approved.txt create mode 100644 tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt create mode 100644 tests/SelfTest/Baselines/xml.sw.approved.txt create mode 100644 tests/SelfTest/Baselines/xml.sw.multi.approved.txt create mode 100644 tests/SelfTest/IntrospectiveTests/Algorithms.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/AssertionHandler.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/Clara.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/CmdLineHelpers.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/ColourImpl.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/Details.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/FloatingPoint.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/Integer.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/Json.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/Parse.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/PartTracker.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/Sharding.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/Stream.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/String.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/Tag.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/TestCaseInfoHasher.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/TestSpec.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/TestSpecParser.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/TextFlow.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/ToString.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/Traits.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/UniquePtr.tests.cpp create mode 100644 tests/SelfTest/IntrospectiveTests/Xml.tests.cpp create mode 100644 tests/SelfTest/Misc/invalid-test-names.input create mode 100644 tests/SelfTest/Misc/plain-old-tests.input create mode 100644 tests/SelfTest/Misc/special-characters-in-file.input create mode 100644 tests/SelfTest/TestRegistrations.cpp create mode 100644 tests/SelfTest/TimingTests/Sleep.tests.cpp create mode 100644 tests/SelfTest/UsageTests/Approx.tests.cpp create mode 100644 tests/SelfTest/UsageTests/BDD.tests.cpp create mode 100644 tests/SelfTest/UsageTests/Benchmark.tests.cpp create mode 100644 tests/SelfTest/UsageTests/Class.tests.cpp create mode 100644 tests/SelfTest/UsageTests/Compilation.tests.cpp create mode 100644 tests/SelfTest/UsageTests/Condition.tests.cpp create mode 100644 tests/SelfTest/UsageTests/Decomposition.tests.cpp create mode 100644 tests/SelfTest/UsageTests/EnumToString.tests.cpp create mode 100644 tests/SelfTest/UsageTests/Exception.tests.cpp create mode 100644 tests/SelfTest/UsageTests/Generators.tests.cpp create mode 100644 tests/SelfTest/UsageTests/Matchers.tests.cpp create mode 100644 tests/SelfTest/UsageTests/MatchersRanges.tests.cpp create mode 100644 tests/SelfTest/UsageTests/Message.tests.cpp create mode 100644 tests/SelfTest/UsageTests/Misc.tests.cpp create mode 100644 tests/SelfTest/UsageTests/Skip.tests.cpp create mode 100644 tests/SelfTest/UsageTests/ToStringByte.tests.cpp create mode 100644 tests/SelfTest/UsageTests/ToStringChrono.tests.cpp create mode 100644 tests/SelfTest/UsageTests/ToStringGeneral.tests.cpp create mode 100644 tests/SelfTest/UsageTests/ToStringOptional.tests.cpp create mode 100644 tests/SelfTest/UsageTests/ToStringPair.tests.cpp create mode 100644 tests/SelfTest/UsageTests/ToStringTuple.tests.cpp create mode 100644 tests/SelfTest/UsageTests/ToStringVariant.tests.cpp create mode 100644 tests/SelfTest/UsageTests/ToStringVector.tests.cpp create mode 100644 tests/SelfTest/UsageTests/ToStringWhich.tests.cpp create mode 100644 tests/SelfTest/UsageTests/Tricky.tests.cpp create mode 100644 tests/SelfTest/UsageTests/VariadicMacros.tests.cpp create mode 100644 tests/SelfTest/helpers/parse_test_spec.cpp create mode 100644 tests/SelfTest/helpers/parse_test_spec.hpp create mode 100644 tests/SelfTest/helpers/range_test_helpers.hpp create mode 100644 tests/SelfTest/helpers/type_with_lit_0_comparisons.hpp (limited to 'tests/SelfTest') diff --git a/tests/SelfTest/Baselines/automake.std.approved.txt b/tests/SelfTest/Baselines/automake.std.approved.txt new file mode 100644 index 0000000..057be06 --- /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 > -> 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 -> toString +:test-result: PASS std::pair -> toString +:test-result: PASS std::vector > -> 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 -> toString +:test-result: PASS vector -> toString +:test-result: PASS vectors can be sized and resized +:test-result: PASS xmlentitycheck diff --git a/tests/SelfTest/Baselines/automake.sw.approved.txt b/tests/SelfTest/Baselines/automake.sw.approved.txt new file mode 100644 index 0000000..7be343a --- /dev/null +++ b/tests/SelfTest/Baselines/automake.sw.approved.txt @@ -0,0 +1,430 @@ +:test-result: PASS # A test name that starts with a # +:test-result: PASS #1027: Bitfields can be captured +:test-result: PASS #1147 +:test-result: PASS #1175 - Hidden Test +:test-result: PASS #1238 +:test-result: PASS #1245 +:test-result: PASS #1319: Sections can have description (even if it is not saved +:test-result: PASS #1403 +:test-result: FAIL #1455 - INFO and WARN can start with a linebreak +This would not be caught previously +Nor would this +:test-result: FAIL #1514: stderr/stdout is not captured in tests aborted by an exception +:test-result: PASS #1548 +:test-result: PASS #1905 -- test spec parser properly clears internal state between compound tests +:test-result: PASS #1912 -- test spec parser handles escaping +:test-result: PASS #1913 - GENERATE inside a for loop should not keep recreating the generator +:test-result: PASS #1913 - GENERATEs can share a line +:test-result: PASS #1938 - GENERATE after a section +:test-result: PASS #1938 - Section followed by flat generate +:test-result: PASS #1938 - flat generate +:test-result: PASS #1938 - mixed sections and generates +:test-result: PASS #1938 - nested generate +:test-result: PASS #1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0 +:test-result: PASS #1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0 +:test-result: PASS #1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0 +:test-result: PASS #2152 - ULP checks between differently signed values were wrong - double +:test-result: PASS #2152 - ULP checks between differently signed values were wrong - float +:test-result: XFAIL #2615 - Throwing in constructor generator fails test case but does not abort +:test-result: XFAIL #748 - captures with unexpected exceptions +:test-result: PASS #809 +:test-result: PASS #833 +:test-result: XFAIL #835 -- errno should not be touched by Catch2 +:test-result: PASS #872 +:test-result: PASS #961 -- Dynamically created sections should all be reported +: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: PASS 3x3x3 ints +: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 TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo +:test-result: FAIL A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo +:test-result: FAIL A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector +:test-result: FAIL A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector +:test-result: FAIL A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2 +:test-result: FAIL A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2 +:test-result: FAIL A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array +:test-result: FAIL A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2 +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2 +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array +:test-result: FAIL A TEMPLATE_TEST_CASE_METHOD based test run that fails - double +:test-result: FAIL A TEMPLATE_TEST_CASE_METHOD based test run that fails - float +:test-result: FAIL A TEMPLATE_TEST_CASE_METHOD based test run that fails - int +:test-result: PASS A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - double +:test-result: PASS A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - float +:test-result: PASS A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - int +:test-result: FAIL A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1 +:test-result: FAIL A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3 +:test-result: FAIL A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6 +:test-result: PASS A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1 +:test-result: PASS A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 3 +:test-result: PASS A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 6 +: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 TEST_CASE_PERSISTENT_FIXTURE based test run that fails +:test-result: PASS A TEST_CASE_PERSISTENT_FIXTURE based test run that succeeds +:test-result: PASS A Template product test case - Foo +:test-result: PASS A Template product test case - Foo +:test-result: PASS A Template product test case - std::vector +:test-result: PASS A Template product test case - std::vector +:test-result: PASS A Template product test case with array signature - Bar +:test-result: PASS A Template product test case with array signature - Bar +:test-result: PASS A Template product test case with array signature - std::array +:test-result: PASS A Template product test case with array signature - std::array +:test-result: PASS A comparison that uses literals instead of the normal constructor +: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 Absolute margin +:test-result: FAIL 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 Approx setters validate their arguments +:test-result: PASS Approx with exactly-representable margin +: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 Arbitrary predicate matcher +:test-result: PASS Assertion macros support bit operators and bool conversions +:test-result: PASS Assertions then sections +:test-result: PASS Basic use of the Contains range matcher +:test-result: PASS Basic use of the Empty range matcher +:test-result: PASS CAPTURE can deal with complex expressions +:test-result: PASS CAPTURE can deal with complex expressions involving commas +:test-result: PASS CAPTURE parses string and character constants +:test-result: PASS Capture and info messages +:test-result: PASS CaseInsensitiveEqualsTo is case insensitive +:test-result: PASS CaseInsensitiveLess is case insensitive +:test-result: PASS Character pretty printing +:test-result: PASS Clara::Arg does not crash on incomplete input +:test-result: PASS Clara::Arg supports single-arg parse the way Opt does +:test-result: PASS Clara::Opt supports accept-many lambdas +:test-result: PASS ColourGuard behaviour +:test-result: PASS Combining MatchAllOfGeneric does not nest +:test-result: PASS Combining MatchAnyOfGeneric does not nest +:test-result: PASS Combining MatchNotOfGeneric does not nest +:test-result: PASS Combining concrete matchers does not use templated matchers +:test-result: PASS Combining only templated matchers +:test-result: PASS Combining templated and concrete matchers +:test-result: PASS Combining templated matchers +:test-result: PASS Commas in various macros are allowed +:test-result: PASS Comparing function pointers +:test-result: PASS Comparison ops +:test-result: PASS Comparison with explicitly convertible types +: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: PASS Composed generic matchers shortcircuit +:test-result: PASS Composed matchers shortcircuit +:test-result: FAIL Contains string matcher +:test-result: PASS Copy and then generate a range +:test-result: PASS Cout stream properly declares it writes to stdout +: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 Default scale is invisible to comparison +:test-result: PASS Directly creating an EnumInfo +:test-result: SKIP Empty generators can SKIP in constructor +:test-result: PASS Empty stream name opens cout stream +:test-result: FAIL EndsWith string matcher +:test-result: PASS Enums can quickly have stringification enabled using CATCH_REGISTER_ENUM +:test-result: PASS Enums in namespaces can quickly have stringification enabled using CATCH_REGISTER_ENUM +:test-result: PASS Epsilon only applies to Approx's value +: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 as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified +:test-result: FAIL Exception matchers that fail +:test-result: PASS Exception matchers that succeed +:test-result: PASS Exception message can be matched +:test-result: PASS Exception messages can be tested for +:test-result: PASS Exceptions matchers +: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: FAIL FAIL_CHECK does not abort the test +:test-result: PASS Factorials are computed +:test-result: PASS Filter generator throws exception for empty generator +:test-result: PASS Floating point matchers: double +:test-result: PASS Floating point matchers: float +:test-result: PASS GENERATE can combine literals and generators +:test-result: PASS Generators -- adapters +:test-result: PASS Generators -- simple +:test-result: PASS Generators internals +:test-result: PASS Greater-than inequalities with different epsilons +:test-result: PASS Hashers with different seed produce different hash with same test case +:test-result: PASS Hashers with same seed produce same hash +:test-result: PASS Hashing different test cases produces different result +:test-result: PASS Hashing test case produces same hash across multiple calls +:test-result: FAIL INFO and UNSCOPED_INFO can stream multiple arguments +:test-result: FAIL 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: FAIL INFO is reset for each loop +:test-result: XFAIL Incomplete AssertionHandler +:test-result: XFAIL Inequality checks that should fail +:test-result: PASS Inequality checks that should succeed +:test-result: PASS JsonWriter +:test-result: PASS JsonWriter escapes charaters in strings properly +:test-result: PASS Lambdas in assertions +:test-result: PASS Less-than inequalities with different epsilons +: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: XFAIL Mayfail test case with nested sections +:test-result: FAIL Mismatching exception messages failing the test +:test-result: PASS Multireporter calls reporters and listeners in correct order +:test-result: PASS Multireporter updates ReporterPreferences properly +:test-result: PASS Nested generators and captured variables +:test-result: FAIL Nice descriptive name +:test-result: FAIL Non-std exceptions can be translated +:test-result: PASS Objects that evaluated in boolean contexts can be checked +:test-result: PASS Optionally static assertions +:test-result: FAIL Ordering comparison checks that should fail +:test-result: PASS Ordering comparison checks that should succeed +:test-result: PASS Our PCG implementation provides expected results for known seeds +:test-result: FAIL Output from all sections is reported +:test-result: PASS Overloaded comma or address-of operators are not used +:test-result: PASS Parse uints +:test-result: PASS Parsed tags are matched case insensitive +:test-result: PASS Parsing sharding-related cli flags +:test-result: PASS Parsing tags with non-alphabetical characters is pass-through +:test-result: PASS Parsing warnings +:test-result: PASS Pointers can be compared to null +:test-result: PASS Precision of floating point stringification can be set +:test-result: PASS Predicate matcher can accept const char* +:test-result: PASS Process can be configured on command line +:test-result: PASS Product with differing arities - std::tuple +:test-result: PASS Product with differing arities - std::tuple +:test-result: PASS Product with differing arities - std::tuple +:test-result: PASS Random seed generation accepts known methods +:test-result: PASS Random seed generation reports unknown methods +:test-result: PASS Range type with sentinel +:test-result: FAIL Reconstruction should be based on stringification: #914 +:test-result: FAIL Regex string matcher +:test-result: PASS Registering reporter with '::' in name fails +:test-result: PASS Regression test #1 +:test-result: PASS Reporter's write listings to provided stream +:test-result: PASS Reproducer for #2309 - a very long description past 80 chars (default console width) with a late colon : blablabla +:test-result: PASS SUCCEED counts as a test pass +:test-result: PASS SUCCEED 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 +A string sent to stderr via clog +:test-result: FAIL Sends stuff to stdout and stderr +:test-result: PASS Some simple comparisons between doubles +Message from section one +Message from section two +:test-result: FAIL Standard output from all sections is reported +:test-result: FAIL StartsWith string matcher +:test-result: PASS Static arrays are convertible to string +:test-result: PASS String matchers +:test-result: PASS StringRef +:test-result: PASS StringRef at compilation time +:test-result: PASS Stringifying char arrays with statically known sizes - char +:test-result: PASS Stringifying char arrays with statically known sizes - signed char +:test-result: PASS Stringifying char arrays with statically known sizes - unsigned char +:test-result: PASS Stringifying std::chrono::duration helpers +:test-result: PASS Stringifying std::chrono::duration with weird ratios +:test-result: PASS Stringifying std::chrono::time_point +:test-result: FAIL Tabs and newlines show in output +:test-result: PASS Tag alias can be registered against tag patterns +:test-result: PASS Tags with spaces and non-alphanumerical characters are accepted +:test-result: PASS Template test case method with test types specified inside std::tuple - MyTypes - 0 +:test-result: PASS Template test case method with test types specified inside std::tuple - MyTypes - 1 +:test-result: PASS Template test case method with test types specified inside std::tuple - MyTypes - 2 +:test-result: PASS Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 0 +:test-result: PASS Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 1 +:test-result: PASS Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 0 +:test-result: PASS Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 1 +:test-result: PASS Template test case with test types specified inside std::tuple - MyTypes - 0 +:test-result: PASS Template test case with test types specified inside std::tuple - MyTypes - 1 +:test-result: PASS Template test case with test types specified inside std::tuple - MyTypes - 2 +:test-result: PASS TemplateTest: vectors can be sized and resized - float +:test-result: PASS TemplateTest: vectors can be sized and resized - int +:test-result: PASS TemplateTest: vectors can be sized and resized - std::string +:test-result: PASS TemplateTest: vectors can be sized and resized - std::tuple +:test-result: PASS TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +:test-result: PASS TemplateTestSig: vectors can be sized and resized - float,4 +:test-result: PASS TemplateTestSig: vectors can be sized and resized - int,5 +:test-result: PASS TemplateTestSig: vectors can be sized and resized - std::string,15 +:test-result: PASS Test case with identical tags keeps just one +:test-result: PASS Test case with one argument +:test-result: PASS Test enum bit values +:test-result: PASS Test with special, characters "in name +:test-result: PASS Testing checked-if +:test-result: XFAIL Testing checked-if 2 +:test-result: XFAIL Testing checked-if 3 +:test-result: XFAIL Testing checked-if 4 +:test-result: XFAIL Testing checked-if 5 +:test-result: FAIL The NO_FAIL macro reports a failure but does not fail the test +:test-result: PASS The default listing implementation write to provided stream +:test-result: FAIL This test 'should' fail but doesn't +:test-result: FAIL Thrown string literals are translated +:test-result: PASS Tracker +:test-result: PASS Trim strings +:test-result: PASS Type conversions of RangeEquals and similar +:test-result: FAIL Unexpected exceptions can be translated +:test-result: PASS Upcasting special member functions +:test-result: PASS Usage of AllMatch range matcher +:test-result: PASS Usage of AllTrue range matcher +:test-result: PASS Usage of AnyMatch range matcher +:test-result: PASS Usage of AnyTrue range matcher +:test-result: PASS Usage of NoneMatch range matcher +:test-result: PASS Usage of NoneTrue range matcher +:test-result: PASS Usage of RangeEquals range matcher +:test-result: PASS Usage of UnorderedRangeEquals range matcher +:test-result: PASS Usage of the SizeIs range matcher +:test-result: PASS Use a custom approx +:test-result: PASS Variadic macros +:test-result: PASS Vector Approx matcher +:test-result: FAIL Vector Approx matcher -- failing +:test-result: PASS Vector matchers +:test-result: FAIL Vector matchers that fail +: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: FAIL When unchecked exceptions are thrown, but caught, they do not affect the test +: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 XmlWriter writes boolean attributes as true/false +:test-result: SKIP a succeeding test can still be skipped +:test-result: PASS analyse no analysis +:test-result: PASS array -> toString +:test-result: PASS benchmark function call +: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 classify_outliers +:test-result: PASS comparisons between const int variables +:test-result: PASS comparisons between int variables +:test-result: PASS convertToBits +:test-result: SKIP dynamic skipping works with generators +:test-result: PASS empty tags are not allowed +:test-result: PASS erfc_inv +:test-result: PASS estimate_clock_resolution +:test-result: PASS even more nested SECTION tests +:test-result: XFAIL failed assertions before SKIP cause test case to fail +:test-result: XFAIL failing for some generator values causes entire test case to fail +:test-result: XFAIL failing in some unskipped sections causes entire test case to fail +:test-result: FAIL first tag +loose text artifact +:test-result: FAIL has printf +:test-result: PASS is_unary_function +:test-result: FAIL just failure +:test-result: FAIL just failure after unscoped info +:test-result: FAIL just info +:test-result: FAIL just unscoped info +:test-result: PASS long long +:test-result: FAIL looped SECTION tests +:test-result: FAIL looped tests +:test-result: PASS makeStream recognizes %debug stream name +:test-result: PASS make_unique reimplementation +:test-result: PASS mean +:test-result: PASS measure +:test-result: FAIL mix info, unscoped info and warning +:test-result: FAIL more nested SECTION tests +:test-result: PASS nested SECTION tests +a! +b1! +! +:test-result: FAIL nested sections can be skipped dynamically at runtime +:test-result: PASS non streamable - with conv. op +:test-result: PASS non-copyable objects +:test-result: PASS normal_quantile +:test-result: PASS not allowed +:test-result: FAIL not prints unscoped info from previous failures +:test-result: PASS null strings +:test-result: PASS null_ptr +:test-result: PASS pair > -> toString +:test-result: PASS parseEnums +:test-result: PASS pointer to class +:test-result: PASS print unscoped info if passing unscoped info is printed +:test-result: FAIL prints unscoped info on failure +:test-result: FAIL prints unscoped info only for the first assertion +:test-result: PASS random SECTION tests +:test-result: PASS replaceInPlace +:test-result: PASS request an unknown %-starting stream fails +:test-result: PASS resolution +:test-result: PASS run_for_at_least, chronometer +:test-result: PASS run_for_at_least, int +:test-result: FAIL second tag +:test-result: SKIP sections can be skipped dynamically at runtime +:test-result: FAIL send a single char to INFO +:test-result: FAIL sends information to INFO +:test-result: PASS shortened hide tags are split apart +:test-result: SKIP skipped tests can optionally provide a reason +:test-result: PASS splitString +:test-result: FAIL stacks unscoped info in loops +:test-result: PASS startsWith +:test-result: PASS std::map is convertible string +:test-result: PASS std::pair -> toString +:test-result: PASS std::pair -> toString +:test-result: PASS std::set is convertible string +:test-result: PASS std::vector > -> toString +:test-result: PASS stdout and stderr streams have %-starting name +:test-result: PASS stringify ranges +:test-result: PASS stringify( has_maker ) +:test-result: PASS stringify( has_maker_and_operator ) +:test-result: PASS stringify( has_neither ) +:test-result: PASS stringify( has_operator ) +:test-result: PASS stringify( has_template_operator ) +:test-result: PASS stringify( vectors ) +:test-result: PASS stringify( vectors ) +:test-result: PASS stringify( vectors ) +:test-result: PASS strlen3 +:test-result: PASS tables +:test-result: PASS tags with dots in later positions are not parsed as hidden +:test-result: SKIP tests can be skipped dynamically at runtime +:test-result: FAIL thrown std::strings are translated +: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(enum class w/operator<<) +:test-result: PASS toString(enum class) +:test-result: PASS toString(enum w/operator<<) +:test-result: PASS toString(enum) +:test-result: PASS tuple<> +:test-result: PASS tuple +:test-result: PASS tuple +:test-result: PASS tuple +:test-result: PASS tuple,tuple<>,float> +:test-result: PASS uniform samples +:test-result: PASS uniform_integer_distribution can return the bounds +:test-result: PASS unique_ptr reimplementation: basic functionality +:test-result: PASS vec> -> toString +:test-result: PASS vector -> toString +:test-result: PASS vector -> toString +:test-result: PASS vector -> toString +:test-result: PASS vector -> toString +:test-result: PASS vectors can be sized and resized +:test-result: PASS warmup +:test-result: PASS weighted_average_quantile +:test-result: PASS xmlentitycheck diff --git a/tests/SelfTest/Baselines/automake.sw.multi.approved.txt b/tests/SelfTest/Baselines/automake.sw.multi.approved.txt new file mode 100644 index 0000000..0cd24e4 --- /dev/null +++ b/tests/SelfTest/Baselines/automake.sw.multi.approved.txt @@ -0,0 +1,419 @@ +:test-result: PASS # A test name that starts with a # +:test-result: PASS #1027: Bitfields can be captured +:test-result: PASS #1147 +:test-result: PASS #1175 - Hidden Test +:test-result: PASS #1238 +:test-result: PASS #1245 +:test-result: PASS #1319: Sections can have description (even if it is not saved +:test-result: PASS #1403 +:test-result: FAIL #1455 - INFO and WARN can start with a linebreak +:test-result: FAIL #1514: stderr/stdout is not captured in tests aborted by an exception +:test-result: PASS #1548 +:test-result: PASS #1905 -- test spec parser properly clears internal state between compound tests +:test-result: PASS #1912 -- test spec parser handles escaping +:test-result: PASS #1913 - GENERATE inside a for loop should not keep recreating the generator +:test-result: PASS #1913 - GENERATEs can share a line +:test-result: PASS #1938 - GENERATE after a section +:test-result: PASS #1938 - Section followed by flat generate +:test-result: PASS #1938 - flat generate +:test-result: PASS #1938 - mixed sections and generates +:test-result: PASS #1938 - nested generate +:test-result: PASS #1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0 +:test-result: PASS #1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0 +:test-result: PASS #1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0 +:test-result: PASS #2152 - ULP checks between differently signed values were wrong - double +:test-result: PASS #2152 - ULP checks between differently signed values were wrong - float +:test-result: XFAIL #2615 - Throwing in constructor generator fails test case but does not abort +:test-result: XFAIL #748 - captures with unexpected exceptions +:test-result: PASS #809 +:test-result: PASS #833 +:test-result: XFAIL #835 -- errno should not be touched by Catch2 +:test-result: PASS #872 +:test-result: PASS #961 -- Dynamically created sections should all be reported +: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: PASS 3x3x3 ints +: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 TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo +:test-result: FAIL A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo +:test-result: FAIL A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector +:test-result: FAIL A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector +:test-result: FAIL A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2 +:test-result: FAIL A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2 +:test-result: FAIL A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array +:test-result: FAIL A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2 +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2 +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array +:test-result: FAIL A TEMPLATE_TEST_CASE_METHOD based test run that fails - double +:test-result: FAIL A TEMPLATE_TEST_CASE_METHOD based test run that fails - float +:test-result: FAIL A TEMPLATE_TEST_CASE_METHOD based test run that fails - int +:test-result: PASS A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - double +:test-result: PASS A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - float +:test-result: PASS A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - int +:test-result: FAIL A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1 +:test-result: FAIL A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3 +:test-result: FAIL A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6 +:test-result: PASS A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1 +:test-result: PASS A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 3 +:test-result: PASS A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 6 +: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 TEST_CASE_PERSISTENT_FIXTURE based test run that fails +:test-result: PASS A TEST_CASE_PERSISTENT_FIXTURE based test run that succeeds +:test-result: PASS A Template product test case - Foo +:test-result: PASS A Template product test case - Foo +:test-result: PASS A Template product test case - std::vector +:test-result: PASS A Template product test case - std::vector +:test-result: PASS A Template product test case with array signature - Bar +:test-result: PASS A Template product test case with array signature - Bar +:test-result: PASS A Template product test case with array signature - std::array +:test-result: PASS A Template product test case with array signature - std::array +:test-result: PASS A comparison that uses literals instead of the normal constructor +: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 Absolute margin +:test-result: FAIL 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 Approx setters validate their arguments +:test-result: PASS Approx with exactly-representable margin +: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 Arbitrary predicate matcher +:test-result: PASS Assertion macros support bit operators and bool conversions +:test-result: PASS Assertions then sections +:test-result: PASS Basic use of the Contains range matcher +:test-result: PASS Basic use of the Empty range matcher +:test-result: PASS CAPTURE can deal with complex expressions +:test-result: PASS CAPTURE can deal with complex expressions involving commas +:test-result: PASS CAPTURE parses string and character constants +:test-result: PASS Capture and info messages +:test-result: PASS CaseInsensitiveEqualsTo is case insensitive +:test-result: PASS CaseInsensitiveLess is case insensitive +:test-result: PASS Character pretty printing +:test-result: PASS Clara::Arg does not crash on incomplete input +:test-result: PASS Clara::Arg supports single-arg parse the way Opt does +:test-result: PASS Clara::Opt supports accept-many lambdas +:test-result: PASS ColourGuard behaviour +:test-result: PASS Combining MatchAllOfGeneric does not nest +:test-result: PASS Combining MatchAnyOfGeneric does not nest +:test-result: PASS Combining MatchNotOfGeneric does not nest +:test-result: PASS Combining concrete matchers does not use templated matchers +:test-result: PASS Combining only templated matchers +:test-result: PASS Combining templated and concrete matchers +:test-result: PASS Combining templated matchers +:test-result: PASS Commas in various macros are allowed +:test-result: PASS Comparing function pointers +:test-result: PASS Comparison ops +:test-result: PASS Comparison with explicitly convertible types +: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: PASS Composed generic matchers shortcircuit +:test-result: PASS Composed matchers shortcircuit +:test-result: FAIL Contains string matcher +:test-result: PASS Copy and then generate a range +:test-result: PASS Cout stream properly declares it writes to stdout +: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 Default scale is invisible to comparison +:test-result: PASS Directly creating an EnumInfo +:test-result: SKIP Empty generators can SKIP in constructor +:test-result: PASS Empty stream name opens cout stream +:test-result: FAIL EndsWith string matcher +:test-result: PASS Enums can quickly have stringification enabled using CATCH_REGISTER_ENUM +:test-result: PASS Enums in namespaces can quickly have stringification enabled using CATCH_REGISTER_ENUM +:test-result: PASS Epsilon only applies to Approx's value +: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 as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified +:test-result: FAIL Exception matchers that fail +:test-result: PASS Exception matchers that succeed +:test-result: PASS Exception message can be matched +:test-result: PASS Exception messages can be tested for +:test-result: PASS Exceptions matchers +: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: FAIL FAIL_CHECK does not abort the test +:test-result: PASS Factorials are computed +:test-result: PASS Filter generator throws exception for empty generator +:test-result: PASS Floating point matchers: double +:test-result: PASS Floating point matchers: float +:test-result: PASS GENERATE can combine literals and generators +:test-result: PASS Generators -- adapters +:test-result: PASS Generators -- simple +:test-result: PASS Generators internals +:test-result: PASS Greater-than inequalities with different epsilons +:test-result: PASS Hashers with different seed produce different hash with same test case +:test-result: PASS Hashers with same seed produce same hash +:test-result: PASS Hashing different test cases produces different result +:test-result: PASS Hashing test case produces same hash across multiple calls +:test-result: FAIL INFO and UNSCOPED_INFO can stream multiple arguments +:test-result: FAIL 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: FAIL INFO is reset for each loop +:test-result: XFAIL Incomplete AssertionHandler +:test-result: XFAIL Inequality checks that should fail +:test-result: PASS Inequality checks that should succeed +:test-result: PASS JsonWriter +:test-result: PASS JsonWriter escapes charaters in strings properly +:test-result: PASS Lambdas in assertions +:test-result: PASS Less-than inequalities with different epsilons +: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: XFAIL Mayfail test case with nested sections +:test-result: FAIL Mismatching exception messages failing the test +:test-result: PASS Multireporter calls reporters and listeners in correct order +:test-result: PASS Multireporter updates ReporterPreferences properly +:test-result: PASS Nested generators and captured variables +:test-result: FAIL Nice descriptive name +:test-result: FAIL Non-std exceptions can be translated +:test-result: PASS Objects that evaluated in boolean contexts can be checked +:test-result: PASS Optionally static assertions +:test-result: FAIL Ordering comparison checks that should fail +:test-result: PASS Ordering comparison checks that should succeed +:test-result: PASS Our PCG implementation provides expected results for known seeds +:test-result: FAIL Output from all sections is reported +:test-result: PASS Overloaded comma or address-of operators are not used +:test-result: PASS Parse uints +:test-result: PASS Parsed tags are matched case insensitive +:test-result: PASS Parsing sharding-related cli flags +:test-result: PASS Parsing tags with non-alphabetical characters is pass-through +:test-result: PASS Parsing warnings +:test-result: PASS Pointers can be compared to null +:test-result: PASS Precision of floating point stringification can be set +:test-result: PASS Predicate matcher can accept const char* +:test-result: PASS Process can be configured on command line +:test-result: PASS Product with differing arities - std::tuple +:test-result: PASS Product with differing arities - std::tuple +:test-result: PASS Product with differing arities - std::tuple +:test-result: PASS Random seed generation accepts known methods +:test-result: PASS Random seed generation reports unknown methods +:test-result: PASS Range type with sentinel +:test-result: FAIL Reconstruction should be based on stringification: #914 +:test-result: FAIL Regex string matcher +:test-result: PASS Registering reporter with '::' in name fails +:test-result: PASS Regression test #1 +:test-result: PASS Reporter's write listings to provided stream +:test-result: PASS Reproducer for #2309 - a very long description past 80 chars (default console width) with a late colon : blablabla +:test-result: PASS SUCCEED counts as a test pass +:test-result: PASS SUCCEED 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 +:test-result: FAIL Sends stuff to stdout and stderr +:test-result: PASS Some simple comparisons between doubles +:test-result: FAIL Standard output from all sections is reported +:test-result: FAIL StartsWith string matcher +:test-result: PASS Static arrays are convertible to string +:test-result: PASS String matchers +:test-result: PASS StringRef +:test-result: PASS StringRef at compilation time +:test-result: PASS Stringifying char arrays with statically known sizes - char +:test-result: PASS Stringifying char arrays with statically known sizes - signed char +:test-result: PASS Stringifying char arrays with statically known sizes - unsigned char +:test-result: PASS Stringifying std::chrono::duration helpers +:test-result: PASS Stringifying std::chrono::duration with weird ratios +:test-result: PASS Stringifying std::chrono::time_point +:test-result: FAIL Tabs and newlines show in output +:test-result: PASS Tag alias can be registered against tag patterns +:test-result: PASS Tags with spaces and non-alphanumerical characters are accepted +:test-result: PASS Template test case method with test types specified inside std::tuple - MyTypes - 0 +:test-result: PASS Template test case method with test types specified inside std::tuple - MyTypes - 1 +:test-result: PASS Template test case method with test types specified inside std::tuple - MyTypes - 2 +:test-result: PASS Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 0 +:test-result: PASS Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 1 +:test-result: PASS Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 0 +:test-result: PASS Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 1 +:test-result: PASS Template test case with test types specified inside std::tuple - MyTypes - 0 +:test-result: PASS Template test case with test types specified inside std::tuple - MyTypes - 1 +:test-result: PASS Template test case with test types specified inside std::tuple - MyTypes - 2 +:test-result: PASS TemplateTest: vectors can be sized and resized - float +:test-result: PASS TemplateTest: vectors can be sized and resized - int +:test-result: PASS TemplateTest: vectors can be sized and resized - std::string +:test-result: PASS TemplateTest: vectors can be sized and resized - std::tuple +:test-result: PASS TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +:test-result: PASS TemplateTestSig: vectors can be sized and resized - float,4 +:test-result: PASS TemplateTestSig: vectors can be sized and resized - int,5 +:test-result: PASS TemplateTestSig: vectors can be sized and resized - std::string,15 +:test-result: PASS Test case with identical tags keeps just one +:test-result: PASS Test case with one argument +:test-result: PASS Test enum bit values +:test-result: PASS Test with special, characters "in name +:test-result: PASS Testing checked-if +:test-result: XFAIL Testing checked-if 2 +:test-result: XFAIL Testing checked-if 3 +:test-result: XFAIL Testing checked-if 4 +:test-result: XFAIL Testing checked-if 5 +:test-result: FAIL The NO_FAIL macro reports a failure but does not fail the test +:test-result: PASS The default listing implementation write to provided stream +:test-result: FAIL This test 'should' fail but doesn't +:test-result: FAIL Thrown string literals are translated +:test-result: PASS Tracker +:test-result: PASS Trim strings +:test-result: PASS Type conversions of RangeEquals and similar +:test-result: FAIL Unexpected exceptions can be translated +:test-result: PASS Upcasting special member functions +:test-result: PASS Usage of AllMatch range matcher +:test-result: PASS Usage of AllTrue range matcher +:test-result: PASS Usage of AnyMatch range matcher +:test-result: PASS Usage of AnyTrue range matcher +:test-result: PASS Usage of NoneMatch range matcher +:test-result: PASS Usage of NoneTrue range matcher +:test-result: PASS Usage of RangeEquals range matcher +:test-result: PASS Usage of UnorderedRangeEquals range matcher +:test-result: PASS Usage of the SizeIs range matcher +:test-result: PASS Use a custom approx +:test-result: PASS Variadic macros +:test-result: PASS Vector Approx matcher +:test-result: FAIL Vector Approx matcher -- failing +:test-result: PASS Vector matchers +:test-result: FAIL Vector matchers that fail +: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: FAIL When unchecked exceptions are thrown, but caught, they do not affect the test +: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 XmlWriter writes boolean attributes as true/false +:test-result: SKIP a succeeding test can still be skipped +:test-result: PASS analyse no analysis +:test-result: PASS array -> toString +:test-result: PASS benchmark function call +: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 classify_outliers +:test-result: PASS comparisons between const int variables +:test-result: PASS comparisons between int variables +:test-result: PASS convertToBits +:test-result: SKIP dynamic skipping works with generators +:test-result: PASS empty tags are not allowed +:test-result: PASS erfc_inv +:test-result: PASS estimate_clock_resolution +:test-result: PASS even more nested SECTION tests +:test-result: XFAIL failed assertions before SKIP cause test case to fail +:test-result: XFAIL failing for some generator values causes entire test case to fail +:test-result: XFAIL failing in some unskipped sections causes entire test case to fail +:test-result: FAIL first tag +:test-result: FAIL has printf +:test-result: PASS is_unary_function +:test-result: FAIL just failure +:test-result: FAIL just failure after unscoped info +:test-result: FAIL just info +:test-result: FAIL just unscoped info +:test-result: PASS long long +:test-result: FAIL looped SECTION tests +:test-result: FAIL looped tests +:test-result: PASS makeStream recognizes %debug stream name +:test-result: PASS make_unique reimplementation +:test-result: PASS mean +:test-result: PASS measure +:test-result: FAIL mix info, unscoped info and warning +:test-result: FAIL more nested SECTION tests +:test-result: PASS nested SECTION tests +:test-result: FAIL nested sections can be skipped dynamically at runtime +:test-result: PASS non streamable - with conv. op +:test-result: PASS non-copyable objects +:test-result: PASS normal_quantile +:test-result: PASS not allowed +:test-result: FAIL not prints unscoped info from previous failures +:test-result: PASS null strings +:test-result: PASS null_ptr +:test-result: PASS pair > -> toString +:test-result: PASS parseEnums +:test-result: PASS pointer to class +:test-result: PASS print unscoped info if passing unscoped info is printed +:test-result: FAIL prints unscoped info on failure +:test-result: FAIL prints unscoped info only for the first assertion +:test-result: PASS random SECTION tests +:test-result: PASS replaceInPlace +:test-result: PASS request an unknown %-starting stream fails +:test-result: PASS resolution +:test-result: PASS run_for_at_least, chronometer +:test-result: PASS run_for_at_least, int +:test-result: FAIL second tag +:test-result: SKIP sections can be skipped dynamically at runtime +:test-result: FAIL send a single char to INFO +:test-result: FAIL sends information to INFO +:test-result: PASS shortened hide tags are split apart +:test-result: SKIP skipped tests can optionally provide a reason +:test-result: PASS splitString +:test-result: FAIL stacks unscoped info in loops +:test-result: PASS startsWith +:test-result: PASS std::map is convertible string +:test-result: PASS std::pair -> toString +:test-result: PASS std::pair -> toString +:test-result: PASS std::set is convertible string +:test-result: PASS std::vector > -> toString +:test-result: PASS stdout and stderr streams have %-starting name +:test-result: PASS stringify ranges +:test-result: PASS stringify( has_maker ) +:test-result: PASS stringify( has_maker_and_operator ) +:test-result: PASS stringify( has_neither ) +:test-result: PASS stringify( has_operator ) +:test-result: PASS stringify( has_template_operator ) +:test-result: PASS stringify( vectors ) +:test-result: PASS stringify( vectors ) +:test-result: PASS stringify( vectors ) +:test-result: PASS strlen3 +:test-result: PASS tables +:test-result: PASS tags with dots in later positions are not parsed as hidden +:test-result: SKIP tests can be skipped dynamically at runtime +:test-result: FAIL thrown std::strings are translated +: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(enum class w/operator<<) +:test-result: PASS toString(enum class) +:test-result: PASS toString(enum w/operator<<) +:test-result: PASS toString(enum) +:test-result: PASS tuple<> +:test-result: PASS tuple +:test-result: PASS tuple +:test-result: PASS tuple +:test-result: PASS tuple,tuple<>,float> +:test-result: PASS uniform samples +:test-result: PASS uniform_integer_distribution can return the bounds +:test-result: PASS unique_ptr reimplementation: basic functionality +:test-result: PASS vec> -> toString +:test-result: PASS vector -> toString +:test-result: PASS vector -> toString +:test-result: PASS vector -> toString +:test-result: PASS vector -> toString +:test-result: PASS vectors can be sized and resized +:test-result: PASS warmup +:test-result: PASS weighted_average_quantile +: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 0000000..b7f48cb --- /dev/null +++ b/tests/SelfTest/Baselines/compact.sw.approved.txt @@ -0,0 +1,2860 @@ +Filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals] +RNG seed: 1 +Misc.tests.cpp:: passed: with 1 message: 'yay' +Compilation.tests.cpp:: passed: y.v == 0 for: 0 == 0 +Compilation.tests.cpp:: passed: 0 == y.v for: 0 == 0 +Compilation.tests.cpp:: passed: t1 == t2 for: {?} == {?} +Compilation.tests.cpp:: passed: t1 != t2 for: {?} != {?} +Compilation.tests.cpp:: passed: t1 < t2 for: {?} < {?} +Compilation.tests.cpp:: passed: t1 > t2 for: {?} > {?} +Compilation.tests.cpp:: passed: t1 <= t2 for: {?} <= {?} +Compilation.tests.cpp:: passed: t1 >= t2 for: {?} >= {?} +Misc.tests.cpp:: passed: +Compilation.tests.cpp:: passed: std::memcmp(uarr, "123", sizeof(uarr)) == 0 for: 0 == 0 with 2 messages: 'uarr := "123"' and 'sarr := "456"' +Compilation.tests.cpp:: passed: std::memcmp(sarr, "456", sizeof(sarr)) == 0 for: 0 == 0 with 2 messages: 'uarr := "123"' and 'sarr := "456"' +Compilation.tests.cpp:: passed: +Compilation.tests.cpp:: passed: +Compilation.tests.cpp:: passed: h1 == h2 for: [1403 helper] == [1403 helper] +Message.tests.cpp:: 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:: failed: explicitly with 1 message: '1514' +Compilation.tests.cpp:: passed: std::is_same, TypeList>::value for: true +TestSpec.tests.cpp:: passed: spec.matches(*fakeTestCase("spec . char")) for: true +TestSpec.tests.cpp:: passed: spec.matches(*fakeTestCase("spec , char")) for: true +TestSpec.tests.cpp:: passed: !(spec.matches(*fakeTestCase(R"(spec \, char)"))) for: !false +TestSpec.tests.cpp:: passed: spec.matches(*fakeTestCase(R"(spec {a} char)")) for: true +TestSpec.tests.cpp:: passed: spec.matches(*fakeTestCase(R"(spec [a] char)")) for: true +TestSpec.tests.cpp:: passed: !(spec.matches(*fakeTestCase("differs but has similar tag", "[a]"))) for: !false +TestSpec.tests.cpp:: passed: spec.matches(*fakeTestCase(R"(spec \ char)")) for: true +Generators.tests.cpp:: passed: counter < 7 for: 3 < 7 +Generators.tests.cpp:: passed: counter < 7 for: 6 < 7 +Generators.tests.cpp:: passed: i != j for: 1 != 3 +Generators.tests.cpp:: passed: i != j for: 1 != 4 +Generators.tests.cpp:: passed: i != j for: 2 != 3 +Generators.tests.cpp:: passed: i != j for: 2 != 4 +PartTracker.tests.cpp:: passed: with 1 message: 'A' +PartTracker.tests.cpp:: passed: m for: 1 +PartTracker.tests.cpp:: passed: m for: 2 +PartTracker.tests.cpp:: passed: m for: 3 +PartTracker.tests.cpp:: passed: 1 +PartTracker.tests.cpp:: passed: m for: 2 +PartTracker.tests.cpp:: passed: m for: 3 +PartTracker.tests.cpp:: passed: m for: 1 +PartTracker.tests.cpp:: passed: m for: 2 +PartTracker.tests.cpp:: passed: m for: 3 +PartTracker.tests.cpp:: passed: with 1 message: 'A' +PartTracker.tests.cpp:: passed: with 3 messages: 'i := 1' and 'j := 3' and 'k := 5' +PartTracker.tests.cpp:: passed: with 1 message: 'B' +PartTracker.tests.cpp:: passed: with 3 messages: 'i := 1' and 'j := 3' and 'k := 6' +PartTracker.tests.cpp:: passed: with 1 message: 'B' +PartTracker.tests.cpp:: passed: with 3 messages: 'i := 1' and 'j := 4' and 'k := 5' +PartTracker.tests.cpp:: passed: with 3 messages: 'i := 1' and 'j := 4' and 'k := 6' +PartTracker.tests.cpp:: passed: with 1 message: 'A' +PartTracker.tests.cpp:: passed: with 3 messages: 'i := 2' and 'j := 3' and 'k := 5' +PartTracker.tests.cpp:: passed: with 1 message: 'B' +PartTracker.tests.cpp:: passed: with 3 messages: 'i := 2' and 'j := 3' and 'k := 6' +PartTracker.tests.cpp:: passed: with 1 message: 'B' +PartTracker.tests.cpp:: passed: with 3 messages: 'i := 2' and 'j := 4' and 'k := 5' +PartTracker.tests.cpp:: passed: with 3 messages: 'i := 2' and 'j := 4' and 'k := 6' +PartTracker.tests.cpp:: passed: m for: 1 +PartTracker.tests.cpp:: passed: n for: 1 +PartTracker.tests.cpp:: passed: m for: 1 +PartTracker.tests.cpp:: passed: n for: 2 +PartTracker.tests.cpp:: passed: m for: 1 +PartTracker.tests.cpp:: passed: n for: 3 +PartTracker.tests.cpp:: passed: m for: 2 +PartTracker.tests.cpp:: passed: n for: 1 +PartTracker.tests.cpp:: passed: m for: 2 +PartTracker.tests.cpp:: passed: n for: 2 +PartTracker.tests.cpp:: passed: m for: 2 +PartTracker.tests.cpp:: passed: n for: 3 +PartTracker.tests.cpp:: passed: m for: 3 +PartTracker.tests.cpp:: passed: n for: 1 +PartTracker.tests.cpp:: passed: m for: 3 +PartTracker.tests.cpp:: passed: n for: 2 +PartTracker.tests.cpp:: passed: m for: 3 +PartTracker.tests.cpp:: passed: n for: 3 +Misc.tests.cpp:: passed: +Misc.tests.cpp:: passed: +Misc.tests.cpp:: passed: +Matchers.tests.cpp:: passed: smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) for: 0.0 is within 2 ULPs of -4.9406564584124654e-324 ([-1.4821969375237396e-323, 4.9406564584124654e-324]) +Matchers.tests.cpp:: passed: smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) for: 0.0 not is within 1 ULPs of -4.9406564584124654e-324 ([-9.8813129168249309e-324, -0.0000000000000000e+00]) +Matchers.tests.cpp:: passed: smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) for: 0.0f is within 2 ULPs of -1.40129846e-45f ([-4.20389539e-45, 1.40129846e-45]) +Matchers.tests.cpp:: passed: smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) for: 0.0f not is within 1 ULPs of -1.40129846e-45f ([-2.80259693e-45, -0.00000000e+00]) +Generators.tests.cpp:: failed: unexpected exception with message: 'failure to init' +Exception.tests.cpp:: failed: unexpected exception with message: 'answer := 42' with 1 message: 'expected exception' +Exception.tests.cpp:: failed: unexpected exception with message: 'answer := 42'; expression was: thisThrows() with 1 message: 'expected exception' +Exception.tests.cpp:: passed: thisThrows() with 1 message: 'answer := 42' +Compilation.tests.cpp:: passed: 42 == f for: 42 == {?} +Compilation.tests.cpp:: passed: a == t for: 3 == 3 +Compilation.tests.cpp:: passed: a == t for: 3 == 3 +Compilation.tests.cpp:: passed: throws_int(true) +Compilation.tests.cpp:: passed: throws_int(true), int +Compilation.tests.cpp:: passed: throws_int(false) +Compilation.tests.cpp:: passed: "aaa", Catch::Matchers::EndsWith("aaa") for: "aaa" ends with: "aaa" +Compilation.tests.cpp:: passed: templated_tests(3) for: true +Misc.tests.cpp:: failed: f() == 0 for: 1 == 0 +Misc.tests.cpp:: passed: errno_after == 1 for: 1 == 1 +Compilation.tests.cpp:: passed: x == 4 for: {?} == 4 with 1 message: 'dummy := 0' +Misc.tests.cpp:: passed: with 1 message: 'Everything is OK' +Misc.tests.cpp:: passed: with 1 message: 'Everything is OK' +Misc.tests.cpp:: passed: with 1 message: 'Everything is OK' +Misc.tests.cpp:: passed: with 1 message: 'Everything is OK' +Misc.tests.cpp:: passed: with 1 message: 'Everything is OK' +Condition.tests.cpp:: failed: false != false +Condition.tests.cpp:: failed: true != true +Condition.tests.cpp:: failed: !true for: false +Condition.tests.cpp:: failed: !(true) for: !true +Condition.tests.cpp:: failed: !trueValue for: false +Condition.tests.cpp:: failed: !(trueValue) for: !true +Condition.tests.cpp:: failed: !(1 == 1) for: false +Condition.tests.cpp:: failed: !(1 == 1) +Condition.tests.cpp:: passed: false == false +Condition.tests.cpp:: passed: true == true +Condition.tests.cpp:: passed: !false for: true +Condition.tests.cpp:: passed: !(false) for: !false +Condition.tests.cpp:: passed: !falseValue for: true +Condition.tests.cpp:: passed: !(falseValue) for: !false +Condition.tests.cpp:: passed: !(1 == 2) for: true +Condition.tests.cpp:: passed: !(1 == 2) +Tricky.tests.cpp:: passed: is_true::value == true for: true == true +Tricky.tests.cpp:: passed: true == is_true::value for: true == true +Tricky.tests.cpp:: passed: is_true::value == false for: false == false +Tricky.tests.cpp:: passed: false == is_true::value for: false == false +Tricky.tests.cpp:: passed: !is_true::value for: true +Tricky.tests.cpp:: passed: !!is_true::value for: true +Tricky.tests.cpp:: passed: is_true::value for: true +Tricky.tests.cpp:: passed: !(is_true::value) for: !false +Generators.tests.cpp:: passed: x < y for: 1 < 4 +Generators.tests.cpp:: passed: y < z for: 4 < 7 +Generators.tests.cpp:: passed: x < z for: 1 < 7 +Generators.tests.cpp:: passed: x < y for: 1 < 4 +Generators.tests.cpp:: passed: y < z for: 4 < 8 +Generators.tests.cpp:: passed: x < z for: 1 < 8 +Generators.tests.cpp:: passed: x < y for: 1 < 4 +Generators.tests.cpp:: passed: y < z for: 4 < 9 +Generators.tests.cpp:: passed: x < z for: 1 < 9 +Generators.tests.cpp:: passed: x < y for: 1 < 5 +Generators.tests.cpp:: passed: y < z for: 5 < 7 +Generators.tests.cpp:: passed: x < z for: 1 < 7 +Generators.tests.cpp:: passed: x < y for: 1 < 5 +Generators.tests.cpp:: passed: y < z for: 5 < 8 +Generators.tests.cpp:: passed: x < z for: 1 < 8 +Generators.tests.cpp:: passed: x < y for: 1 < 5 +Generators.tests.cpp:: passed: y < z for: 5 < 9 +Generators.tests.cpp:: passed: x < z for: 1 < 9 +Generators.tests.cpp:: passed: x < y for: 1 < 6 +Generators.tests.cpp:: passed: y < z for: 6 < 7 +Generators.tests.cpp:: passed: x < z for: 1 < 7 +Generators.tests.cpp:: passed: x < y for: 1 < 6 +Generators.tests.cpp:: passed: y < z for: 6 < 8 +Generators.tests.cpp:: passed: x < z for: 1 < 8 +Generators.tests.cpp:: passed: x < y for: 1 < 6 +Generators.tests.cpp:: passed: y < z for: 6 < 9 +Generators.tests.cpp:: passed: x < z for: 1 < 9 +Generators.tests.cpp:: passed: x < y for: 2 < 4 +Generators.tests.cpp:: passed: y < z for: 4 < 7 +Generators.tests.cpp:: passed: x < z for: 2 < 7 +Generators.tests.cpp:: passed: x < y for: 2 < 4 +Generators.tests.cpp:: passed: y < z for: 4 < 8 +Generators.tests.cpp:: passed: x < z for: 2 < 8 +Generators.tests.cpp:: passed: x < y for: 2 < 4 +Generators.tests.cpp:: passed: y < z for: 4 < 9 +Generators.tests.cpp:: passed: x < z for: 2 < 9 +Generators.tests.cpp:: passed: x < y for: 2 < 5 +Generators.tests.cpp:: passed: y < z for: 5 < 7 +Generators.tests.cpp:: passed: x < z for: 2 < 7 +Generators.tests.cpp:: passed: x < y for: 2 < 5 +Generators.tests.cpp:: passed: y < z for: 5 < 8 +Generators.tests.cpp:: passed: x < z for: 2 < 8 +Generators.tests.cpp:: passed: x < y for: 2 < 5 +Generators.tests.cpp:: passed: y < z for: 5 < 9 +Generators.tests.cpp:: passed: x < z for: 2 < 9 +Generators.tests.cpp:: passed: x < y for: 2 < 6 +Generators.tests.cpp:: passed: y < z for: 6 < 7 +Generators.tests.cpp:: passed: x < z for: 2 < 7 +Generators.tests.cpp:: passed: x < y for: 2 < 6 +Generators.tests.cpp:: passed: y < z for: 6 < 8 +Generators.tests.cpp:: passed: x < z for: 2 < 8 +Generators.tests.cpp:: passed: x < y for: 2 < 6 +Generators.tests.cpp:: passed: y < z for: 6 < 9 +Generators.tests.cpp:: passed: x < z for: 2 < 9 +Generators.tests.cpp:: passed: x < y for: 3 < 4 +Generators.tests.cpp:: passed: y < z for: 4 < 7 +Generators.tests.cpp:: passed: x < z for: 3 < 7 +Generators.tests.cpp:: passed: x < y for: 3 < 4 +Generators.tests.cpp:: passed: y < z for: 4 < 8 +Generators.tests.cpp:: passed: x < z for: 3 < 8 +Generators.tests.cpp:: passed: x < y for: 3 < 4 +Generators.tests.cpp:: passed: y < z for: 4 < 9 +Generators.tests.cpp:: passed: x < z for: 3 < 9 +Generators.tests.cpp:: passed: x < y for: 3 < 5 +Generators.tests.cpp:: passed: y < z for: 5 < 7 +Generators.tests.cpp:: passed: x < z for: 3 < 7 +Generators.tests.cpp:: passed: x < y for: 3 < 5 +Generators.tests.cpp:: passed: y < z for: 5 < 8 +Generators.tests.cpp:: passed: x < z for: 3 < 8 +Generators.tests.cpp:: passed: x < y for: 3 < 5 +Generators.tests.cpp:: passed: y < z for: 5 < 9 +Generators.tests.cpp:: passed: x < z for: 3 < 9 +Generators.tests.cpp:: passed: x < y for: 3 < 6 +Generators.tests.cpp:: passed: y < z for: 6 < 7 +Generators.tests.cpp:: passed: x < z for: 3 < 7 +Generators.tests.cpp:: passed: x < y for: 3 < 6 +Generators.tests.cpp:: passed: y < z for: 6 < 8 +Generators.tests.cpp:: passed: x < z for: 3 < 8 +Generators.tests.cpp:: passed: x < y for: 3 < 6 +Generators.tests.cpp:: passed: y < z for: 6 < 9 +Generators.tests.cpp:: passed: x < z for: 3 < 9 +Class.tests.cpp:: failed: s == "world" for: "hello" == "world" +Class.tests.cpp:: passed: s == "hello" for: "hello" == "hello" +Class.tests.cpp:: failed: Template_Fixture_2::m_a.size() == 1 for: 0 == 1 +Class.tests.cpp:: failed: Template_Fixture_2::m_a.size() == 1 for: 0 == 1 +Class.tests.cpp:: failed: Template_Fixture_2::m_a.size() == 1 for: 0 == 1 +Class.tests.cpp:: failed: Template_Fixture_2::m_a.size() == 1 for: 0 == 1 +Class.tests.cpp:: passed: Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +Class.tests.cpp:: passed: Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +Class.tests.cpp:: passed: Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +Class.tests.cpp:: passed: Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +Class.tests.cpp:: failed: Template_Fixture_2{}.m_a.size() < 2 for: 6 < 2 +Class.tests.cpp:: failed: Template_Fixture_2{}.m_a.size() < 2 for: 2 < 2 +Class.tests.cpp:: failed: Template_Fixture_2{}.m_a.size() < 2 for: 6 < 2 +Class.tests.cpp:: failed: Template_Fixture_2{}.m_a.size() < 2 for: 2 < 2 +Class.tests.cpp:: passed: Template_Fixture_2{}.m_a.size() >= 2 for: 6 >= 2 +Class.tests.cpp:: passed: Template_Fixture_2{}.m_a.size() >= 2 for: 2 >= 2 +Class.tests.cpp:: passed: Template_Fixture_2{}.m_a.size() >= 2 for: 6 >= 2 +Class.tests.cpp:: passed: Template_Fixture_2{}.m_a.size() >= 2 for: 2 >= 2 +Class.tests.cpp:: failed: Template_Fixture::m_a == 2 for: 1.0 == 2 +Class.tests.cpp:: failed: Template_Fixture::m_a == 2 for: 1.0f == 2 +Class.tests.cpp:: failed: Template_Fixture::m_a == 2 for: 1 == 2 +Class.tests.cpp:: passed: Template_Fixture::m_a == 1 for: 1.0 == 1 +Class.tests.cpp:: passed: Template_Fixture::m_a == 1 for: 1.0f == 1 +Class.tests.cpp:: passed: Template_Fixture::m_a == 1 for: 1 == 1 +Class.tests.cpp:: failed: Nttp_Fixture::value == 0 for: 1 == 0 +Class.tests.cpp:: failed: Nttp_Fixture::value == 0 for: 3 == 0 +Class.tests.cpp:: failed: Nttp_Fixture::value == 0 for: 6 == 0 +Class.tests.cpp:: passed: Nttp_Fixture::value > 0 for: 1 > 0 +Class.tests.cpp:: passed: Nttp_Fixture::value > 0 for: 3 > 0 +Class.tests.cpp:: passed: Nttp_Fixture::value > 0 for: 6 > 0 +Class.tests.cpp:: failed: m_a == 2 for: 1 == 2 +Class.tests.cpp:: passed: m_a == 1 for: 1 == 1 +Class.tests.cpp:: passed: m_a++ == 0 for: 0 == 0 +Class.tests.cpp:: failed: m_a == 0 for: 1 == 0 +Class.tests.cpp:: passed: m_a++ == 0 for: 0 == 0 +Class.tests.cpp:: passed: m_a == 1 for: 1 == 1 +Misc.tests.cpp:: passed: x.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: x.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: x.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: x.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: x.size() > 0 for: 42 > 0 +Misc.tests.cpp:: passed: x.size() > 0 for: 9 > 0 +Misc.tests.cpp:: passed: x.size() > 0 for: 42 > 0 +Misc.tests.cpp:: passed: x.size() > 0 for: 9 > 0 +Approx.tests.cpp:: passed: d == 1.23_a for: 1.22999999999999998 +== +Approx( 1.22999999999999998 ) +Approx.tests.cpp:: passed: d != 1.22_a for: 1.22999999999999998 +!= +Approx( 1.21999999999999997 ) +Approx.tests.cpp:: passed: -d == -1.23_a for: -1.22999999999999998 +== +Approx( -1.22999999999999998 ) +Approx.tests.cpp:: passed: d == 1.2_a .epsilon(.1) for: 1.22999999999999998 +== +Approx( 1.19999999999999996 ) +Approx.tests.cpp:: passed: d != 1.2_a .epsilon(.001) for: 1.22999999999999998 +!= +Approx( 1.19999999999999996 ) +Approx.tests.cpp:: passed: d == 1_a .epsilon(.3) for: 1.22999999999999998 == Approx( 1.0 ) +Misc.tests.cpp:: passed: with 1 message: 'that's not flying - that's failing in style' +Misc.tests.cpp:: failed: explicitly with 1 message: 'to infinity and beyond' +Tricky.tests.cpp:: failed: &o1 == &o2 for: 0x == 0x +Tricky.tests.cpp:: failed: o1 == o2 for: {?} == {?} +Approx.tests.cpp:: passed: 104.0 != Approx(100.0) for: 104.0 != Approx( 100.0 ) +Approx.tests.cpp:: passed: 104.0 == Approx(100.0).margin(5) for: 104.0 == Approx( 100.0 ) +Approx.tests.cpp:: passed: 104.0 == Approx(100.0).margin(4) for: 104.0 == Approx( 100.0 ) +Approx.tests.cpp:: passed: 104.0 != Approx(100.0).margin(3) for: 104.0 != Approx( 100.0 ) +Approx.tests.cpp:: passed: 100.3 != Approx(100.0) for: 100.29999999999999716 != Approx( 100.0 ) +Approx.tests.cpp:: passed: 100.3 == Approx(100.0).margin(0.5) for: 100.29999999999999716 == Approx( 100.0 ) +Tricky.tests.cpp:: passed: i++ == 7 for: 7 == 7 +Tricky.tests.cpp:: passed: i++ == 8 for: 8 == 8 +Exception.tests.cpp:: passed: 1 == 1 +Exception.tests.cpp:: failed: unexpected exception with message: 'unexpected exception'; expression was: {Unknown expression after the reported line} +VariadicMacros.tests.cpp:: passed: with 1 message: 'anonymous test case' +Approx.tests.cpp:: passed: Approx(0).margin(0) +Approx.tests.cpp:: passed: Approx(0).margin(1234656) +Approx.tests.cpp:: passed: Approx(0).margin(-2), std::domain_error +Approx.tests.cpp:: passed: Approx(0).epsilon(0) +Approx.tests.cpp:: passed: Approx(0).epsilon(1) +Approx.tests.cpp:: passed: Approx(0).epsilon(-0.001), std::domain_error +Approx.tests.cpp:: passed: Approx(0).epsilon(1.0001), std::domain_error +Approx.tests.cpp:: passed: 0.25f == Approx(0.0f).margin(0.25f) for: 0.25f == Approx( 0.0 ) +Approx.tests.cpp:: passed: 0.0f == Approx(0.25f).margin(0.25f) for: 0.0f == Approx( 0.25 ) +Approx.tests.cpp:: passed: 0.5f == Approx(0.25f).margin(0.25f) for: 0.5f == Approx( 0.25 ) +Approx.tests.cpp:: passed: 245.0f == Approx(245.25f).margin(0.25f) for: 245.0f == Approx( 245.25 ) +Approx.tests.cpp:: passed: 245.5f == Approx(245.25f).margin(0.25f) for: 245.5f == Approx( 245.25 ) +Approx.tests.cpp:: passed: divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) for: 3.14285714285714279 +== +Approx( 3.14100000000000001 ) +Approx.tests.cpp:: passed: divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) for: 3.14285714285714279 +!= +Approx( 3.14100000000000001 ) +Approx.tests.cpp:: passed: d != Approx( 1.231 ) for: 1.22999999999999998 +!= +Approx( 1.23100000000000009 ) +Approx.tests.cpp:: passed: d == Approx( 1.231 ).epsilon( 0.1 ) for: 1.22999999999999998 +== +Approx( 1.23100000000000009 ) +Approx.tests.cpp:: passed: 1.23f == Approx( 1.23f ) for: 1.230000019f +== +Approx( 1.23000001907348633 ) +Approx.tests.cpp:: passed: 0.0f == Approx( 0.0f ) for: 0.0f == Approx( 0.0 ) +Approx.tests.cpp:: passed: 1 == Approx( 1 ) for: 1 == Approx( 1.0 ) +Approx.tests.cpp:: passed: 0 == Approx( 0 ) for: 0 == Approx( 0.0 ) +Approx.tests.cpp:: passed: 1.0f == Approx( 1 ) for: 1.0f == Approx( 1.0 ) +Approx.tests.cpp:: passed: 0 == Approx( dZero) for: 0 == Approx( 0.0 ) +Approx.tests.cpp:: passed: 0 == Approx( dSmall ).margin( 0.001 ) for: 0 == Approx( 0.00001 ) +Approx.tests.cpp:: passed: 1.234f == Approx( dMedium ) for: 1.233999968f +== +Approx( 1.23399999999999999 ) +Approx.tests.cpp:: passed: dMedium == Approx( 1.234f ) for: 1.23399999999999999 +== +Approx( 1.23399996757507324 ) +Matchers.tests.cpp:: passed: 1, Predicate( alwaysTrue, "always true" ) for: 1 matches predicate: "always true" +Matchers.tests.cpp:: passed: 1, !Predicate( alwaysFalse, "always false" ) for: 1 not matches predicate: "always false" +Matchers.tests.cpp:: passed: "Hello olleH", Predicate( []( std::string const& str ) -> bool { return str.front() == str.back(); }, "First and last character should be equal" ) for: "Hello olleH" matches predicate: "First and last character should be equal" +Matchers.tests.cpp:: passed: "This wouldn't pass", !Predicate( []( std::string const& str ) -> bool { return str.front() == str.back(); } ) for: "This wouldn't pass" not matches undescribed predicate +Compilation.tests.cpp:: passed: lhs | rhs for: Val: 1 | Val: 2 +Compilation.tests.cpp:: passed: !(lhs & rhs) for: !(Val: 1 & Val: 2) +Compilation.tests.cpp:: passed: HasBitOperators{ 1 } & HasBitOperators{ 1 } for: Val: 1 & Val: 1 +Compilation.tests.cpp:: passed: lhs ^ rhs for: Val: 1 ^ Val: 2 +Compilation.tests.cpp:: passed: !(lhs ^ lhs) for: !(Val: 1 ^ Val: 1) +Tricky.tests.cpp:: passed: true +Tricky.tests.cpp:: passed: true +Tricky.tests.cpp:: passed: true +Tricky.tests.cpp:: passed: true +Tricky.tests.cpp:: passed: true +Tricky.tests.cpp:: passed: true +MatchersRanges.tests.cpp:: passed: a, Contains(1) for: { 1, 2, 3 } contains element 1 +MatchersRanges.tests.cpp:: passed: b, Contains(1) for: { 0, 1, 2 } contains element 1 +MatchersRanges.tests.cpp:: passed: c, !Contains(1) for: { 4, 5, 6 } not contains element 1 +MatchersRanges.tests.cpp:: passed: a, Contains(0, close_enough) for: { 1, 2, 3 } contains element 0 +MatchersRanges.tests.cpp:: passed: b, Contains(0, close_enough) for: { 0, 1, 2 } contains element 0 +MatchersRanges.tests.cpp:: passed: c, !Contains(0, close_enough) for: { 4, 5, 6 } not contains element 0 +MatchersRanges.tests.cpp:: passed: a, Contains(4, [](auto&& lhs, size_t sz) { return lhs.size() == sz; }) for: { "abc", "abcd", "abcde" } contains element 4 +MatchersRanges.tests.cpp:: passed: in, Contains(1) for: { 1, 2, 3, 4, 5 } contains element 1 +MatchersRanges.tests.cpp:: passed: in, !Contains(8) for: { 1, 2, 3, 4, 5 } not contains element 8 +MatchersRanges.tests.cpp:: passed: in, Contains(MoveOnlyTestElement{ 2 }) for: { 1, 2, 3 } contains element 2 +MatchersRanges.tests.cpp:: passed: in, !Contains(MoveOnlyTestElement{ 9 }) for: { 1, 2, 3 } not contains element 9 +MatchersRanges.tests.cpp:: passed: in, Contains(Catch::Matchers::WithinAbs(0.5, 0.5)) for: { 1.0, 2.0, 3.0, 0.0 } contains element matching is within 0.5 of 0.5 +MatchersRanges.tests.cpp:: passed: empty_array, IsEmpty() for: { } is empty +MatchersRanges.tests.cpp:: passed: non_empty_array, !IsEmpty() for: { 0.0 } not is empty +MatchersRanges.tests.cpp:: passed: empty_vec, IsEmpty() for: { } is empty +MatchersRanges.tests.cpp:: passed: non_empty_vec, !IsEmpty() for: { 'a', 'b', 'c' } not is empty +MatchersRanges.tests.cpp:: passed: inner_lists_are_empty, !IsEmpty() for: { { } } not is empty +MatchersRanges.tests.cpp:: passed: inner_lists_are_empty.front(), IsEmpty() for: { } is empty +MatchersRanges.tests.cpp:: passed: has_empty{}, !IsEmpty() for: {?} not is empty +MatchersRanges.tests.cpp:: passed: unrelated::ADL_empty{}, IsEmpty() for: {?} is empty +Message.tests.cpp:: passed: with 7 messages: 'a := 1' and 'b := 2' and 'c := 3' and 'a + b := 3' and 'a+b := 3' and 'c > b := true' and 'a == 1 := true' +Message.tests.cpp:: passed: with 7 messages: 'custom_index_op{1, 2, 3}[0, 1, 2] := 0' and 'custom_index_op{1, 2, 3}[(0, 1)] := 0' and 'custom_index_op{1, 2, 3}[0] := 0' and '(helper_1436{12, -12}) := { 12, -12 }' and '(helper_1436(-12, 12)) := { -12, 12 }' and '(1, 2) := 2' and '(2, 3) := 3' +Message.tests.cpp:: passed: with 11 messages: '("comma, in string", "escaped, \", ") := "escaped, ", "' and '"single quote in string,'," := "single quote in string,',"' and '"some escapes, \\,\\\\" := "some escapes, \,\\"' and '"some, ), unmatched, } prenheses {[<" := "some, ), unmatched, } prenheses {[<"' and ''"' := '"'' and ''\'' := '''' and '',' := ','' and ''}' := '}'' and '')' := ')'' and ''(' := '('' and ''{' := '{'' +ToStringGeneral.tests.cpp:: passed: true with 1 message: 'i := 2' +ToStringGeneral.tests.cpp:: passed: true with 1 message: '3' +Details.tests.cpp:: passed: eq( "", "" ) for: true +Details.tests.cpp:: passed: !(eq( "", "a" )) for: !false +Details.tests.cpp:: passed: eq( "a", "a" ) for: true +Details.tests.cpp:: passed: eq( "a", "A" ) for: true +Details.tests.cpp:: passed: eq( "A", "a" ) for: true +Details.tests.cpp:: passed: eq( "A", "A" ) for: true +Details.tests.cpp:: passed: !(eq( "a", "b" )) for: !false +Details.tests.cpp:: passed: !(eq( "a", "B" )) for: !false +Details.tests.cpp:: passed: lt( "", "a" ) for: true +Details.tests.cpp:: passed: !(lt( "a", "a" )) for: !false +Details.tests.cpp:: passed: !(lt( "", "" )) for: !false +Details.tests.cpp:: passed: lt( "a", "b" ) for: true +Details.tests.cpp:: passed: lt( "a", "B" ) for: true +Details.tests.cpp:: passed: lt( "A", "b" ) for: true +Details.tests.cpp:: passed: lt( "A", "B" ) for: true +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify('\t') == "'\\t'" for: "'\t'" == "'\t'" +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify('\n') == "'\\n'" for: "'\n'" == "'\n'" +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify('\r') == "'\\r'" for: "'\r'" == "'\r'" +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify('\f') == "'\\f'" for: "'\f'" == "'\f'" +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify( ' ' ) == "' '" for: "' '" == "' '" +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify( 'A' ) == "'A'" for: "'A'" == "'A'" +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify( 'z' ) == "'z'" for: "'z'" == "'z'" +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify( '\0' ) == "0" for: "0" == "0" +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify( static_cast(2) ) == "2" for: "2" == "2" +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify( static_cast(5) ) == "5" for: "5" == "5" +Clara.tests.cpp:: passed: name.empty() for: true +Clara.tests.cpp:: passed: result for: {?} +Clara.tests.cpp:: passed: result.type() == Catch::Clara::Detail::ResultType::Ok for: 0 == 0 +Clara.tests.cpp:: passed: parsed.type() == Catch::Clara::ParseResultType::NoMatch for: 1 == 1 +Clara.tests.cpp:: passed: parsed.remainingTokens().count() == 2 for: 2 == 2 +Clara.tests.cpp:: passed: name.empty() for: true +Clara.tests.cpp:: passed: name.empty() for: true +Clara.tests.cpp:: passed: name == "foo" for: "foo" == "foo" +Clara.tests.cpp:: passed: !(parse_result) for: !{?} +Clara.tests.cpp:: passed: parse_result for: {?} +Clara.tests.cpp:: passed: res == std::vector{ "aaa", "bbb" } for: { "aaa", "bbb" } == { "aaa", "bbb" } +ColourImpl.tests.cpp:: passed: streamWrapper.str().empty() for: true +ColourImpl.tests.cpp:: passed: streamWrapper.str() == "1\nUsing code: 2\n2\nUsing code: 0\n3\n" for: "1 +Using code: 2 +2 +Using code: 0 +3 +" +== +"1 +Using code: 2 +2 +Using code: 0 +3 +" +ColourImpl.tests.cpp:: passed: streamWrapper.str() == "Using code: 2\nA\nB\nUsing code: 0\nC\n" for: "Using code: 2 +A +B +Using code: 0 +C +" +== +"Using code: 2 +A +B +Using code: 0 +C +" +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same< decltype( ( MatcherA() && MatcherB() ) && MatcherC() ), Catch::Matchers::Detail:: MatchAllOfGeneric>::value' +Matchers.tests.cpp:: passed: 1, ( MatcherA() && MatcherB() ) && MatcherC() for: 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 ) +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same< decltype( MatcherA() && ( MatcherB() && MatcherC() ) ), Catch::Matchers::Detail:: MatchAllOfGeneric>::value' +Matchers.tests.cpp:: passed: 1, MatcherA() && ( MatcherB() && MatcherC() ) for: 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 ) +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same< decltype( ( MatcherA() && MatcherB() ) && ( MatcherC() && MatcherD() ) ), Catch::Matchers::Detail:: MatchAllOfGeneric>:: value' +Matchers.tests.cpp:: passed: 1, ( MatcherA() && MatcherB() ) && ( MatcherC() && MatcherD() ) for: 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 and equals: true ) +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same< decltype( ( MatcherA() || MatcherB() ) || MatcherC() ), Catch::Matchers::Detail:: MatchAnyOfGeneric>::value' +Matchers.tests.cpp:: passed: 1, ( MatcherA() || MatcherB() ) || MatcherC() for: 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 ) +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same< decltype( MatcherA() || ( MatcherB() || MatcherC() ) ), Catch::Matchers::Detail:: MatchAnyOfGeneric>::value' +Matchers.tests.cpp:: passed: 1, MatcherA() || ( MatcherB() || MatcherC() ) for: 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 ) +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same< decltype( ( MatcherA() || MatcherB() ) || ( MatcherC() || MatcherD() ) ), Catch::Matchers::Detail:: MatchAnyOfGeneric>:: value' +Matchers.tests.cpp:: passed: 1, ( MatcherA() || MatcherB() ) || ( MatcherC() || MatcherD() ) for: 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 or equals: true ) +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same< decltype( !MatcherA() ), Catch::Matchers::Detail::MatchNotOfGeneric>::value' +Matchers.tests.cpp:: passed: 0, !MatcherA() for: 0 not equals: (int) 1 or (string) "1" +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same::value' +Matchers.tests.cpp:: passed: 1, !!MatcherA() for: 1 equals: (int) 1 or (string) "1" +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same< decltype( !!!MatcherA() ), Catch::Matchers::Detail::MatchNotOfGeneric>::value' +Matchers.tests.cpp:: passed: 0, !!!MatcherA() for: 0 not equals: (int) 1 or (string) "1" +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same::value' +Matchers.tests.cpp:: passed: 1, !!!!MatcherA() for: 1 equals: (int) 1 or (string) "1" +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same>::value' +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same>::value' +Matchers.tests.cpp:: passed: 1, MatcherA() || MatcherB() for: 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 ) +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same>::value' +Matchers.tests.cpp:: passed: 1, MatcherA() && MatcherB() for: 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 ) +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same< decltype( MatcherA() || !MatcherB() ), Catch::Matchers::Detail::MatchAnyOfGeneric< MatcherA, Catch::Matchers::Detail::MatchNotOfGeneric>>::value' +Matchers.tests.cpp:: passed: 1, MatcherA() || !MatcherB() for: 1 ( equals: (int) 1 or (string) "1" or not equals: (long long) 1 ) +Matchers.tests.cpp:: passed: vec, Predicate>( []( auto const& v ) { return std::all_of( v.begin(), v.end(), []( int elem ) { return elem % 2 == 1; } ); }, "All elements are odd" ) && !EqualsRange( a ) for: { 1, 3, 5 } ( matches predicate: "All elements are odd" and not Equals: { 5, 3, 1 } ) +Matchers.tests.cpp:: passed: str, StartsWith( "foo" ) && EqualsRange( arr ) && EndsWith( "bar" ) for: "foobar" ( starts with: "foo" and Equals: { 'f', 'o', 'o', 'b', 'a', 'r' } and ends with: "bar" ) +Matchers.tests.cpp:: passed: str, StartsWith( "foo" ) && !EqualsRange( bad_arr ) && EndsWith( "bar" ) for: "foobar" ( starts with: "foo" and not Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } and ends with: "bar" ) +Matchers.tests.cpp:: passed: str, EqualsRange( arr ) && StartsWith( "foo" ) && EndsWith( "bar" ) for: "foobar" ( Equals: { 'f', 'o', 'o', 'b', 'a', 'r' } and starts with: "foo" and ends with: "bar" ) +Matchers.tests.cpp:: passed: str, !EqualsRange( bad_arr ) && StartsWith( "foo" ) && EndsWith( "bar" ) for: "foobar" ( not Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } and starts with: "foo" and ends with: "bar" ) +Matchers.tests.cpp:: passed: str, EqualsRange( bad_arr ) || ( StartsWith( "foo" ) && EndsWith( "bar" ) ) for: "foobar" ( Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } or ( starts with: "foo" and ends with: "bar" ) ) +Matchers.tests.cpp:: passed: str, ( StartsWith( "foo" ) && EndsWith( "bar" ) ) || EqualsRange( bad_arr ) for: "foobar" ( ( starts with: "foo" and ends with: "bar" ) or Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } ) +Matchers.tests.cpp:: passed: container, EqualsRange( a ) || EqualsRange( b ) || EqualsRange( c ) for: { 1, 2, 3 } ( Equals: { 1, 2, 3 } or Equals: { 0, 1, 2 } or Equals: { 4, 5, 6 } ) +Tricky.tests.cpp:: passed: std::vector{constructor_throws{}, constructor_throws{}} +Tricky.tests.cpp:: passed: std::vector{constructor_throws{}, constructor_throws{}} +Tricky.tests.cpp:: passed: std::vector{1, 2, 3} == std::vector{1, 2, 3} +Tricky.tests.cpp:: passed: std::vector{1, 2, 3} == std::vector{1, 2, 3} +Tricky.tests.cpp:: passed: std::vector{1, 2} == std::vector{1, 2} for: { 1, 2 } == { 1, 2 } +Tricky.tests.cpp:: passed: std::vector{1, 2} == std::vector{1, 2} for: { 1, 2 } == { 1, 2 } +Tricky.tests.cpp:: passed: !(std::vector{1, 2} == std::vector{1, 2, 3}) for: !({ 1, 2 } == { 1, 2, 3 }) +Tricky.tests.cpp:: passed: !(std::vector{1, 2} == std::vector{1, 2, 3}) for: !({ 1, 2 } == { 1, 2, 3 }) +Tricky.tests.cpp:: passed: std::vector{1, 2} == std::vector{1, 2} for: { 1, 2 } == { 1, 2 } +Tricky.tests.cpp:: passed: std::vector{1, 2} == std::vector{1, 2} for: { 1, 2 } == { 1, 2 } +Tricky.tests.cpp:: passed: true +Tricky.tests.cpp:: passed: std::vector{1, 2} == std::vector{1, 2} for: { 1, 2 } == { 1, 2 } +Tricky.tests.cpp:: passed: a for: 0x +Tricky.tests.cpp:: passed: a == &foo for: 0x == 0x +RandomNumberGeneration.tests.cpp:: passed: SimplePcg32{} == SimplePcg32{} for: {?} == {?} +RandomNumberGeneration.tests.cpp:: passed: SimplePcg32{ 0 } != SimplePcg32{} for: {?} != {?} +RandomNumberGeneration.tests.cpp:: passed: !(SimplePcg32{ 1 } == SimplePcg32{ 2 }) for: !({?} == {?}) +RandomNumberGeneration.tests.cpp:: passed: !(SimplePcg32{ 1 } != SimplePcg32{ 1 }) for: !({?} != {?}) +Approx.tests.cpp:: passed: td == Approx(10.0) for: StrongDoubleTypedef(10) == Approx( 10.0 ) +Approx.tests.cpp:: passed: Approx(10.0) == td for: Approx( 10.0 ) == StrongDoubleTypedef(10) +Approx.tests.cpp:: passed: td != Approx(11.0) for: StrongDoubleTypedef(10) != Approx( 11.0 ) +Approx.tests.cpp:: passed: Approx(11.0) != td for: Approx( 11.0 ) != StrongDoubleTypedef(10) +Approx.tests.cpp:: passed: td <= Approx(10.0) for: StrongDoubleTypedef(10) <= Approx( 10.0 ) +Approx.tests.cpp:: passed: td <= Approx(11.0) for: StrongDoubleTypedef(10) <= Approx( 11.0 ) +Approx.tests.cpp:: passed: Approx(10.0) <= td for: Approx( 10.0 ) <= StrongDoubleTypedef(10) +Approx.tests.cpp:: passed: Approx(9.0) <= td for: Approx( 9.0 ) <= StrongDoubleTypedef(10) +Approx.tests.cpp:: passed: td >= Approx(9.0) for: StrongDoubleTypedef(10) >= Approx( 9.0 ) +Approx.tests.cpp:: passed: td >= Approx(td) for: StrongDoubleTypedef(10) >= Approx( 10.0 ) +Approx.tests.cpp:: passed: Approx(td) >= td for: Approx( 10.0 ) >= StrongDoubleTypedef(10) +Approx.tests.cpp:: passed: Approx(11.0) >= td for: Approx( 11.0 ) >= StrongDoubleTypedef(10) +Condition.tests.cpp:: passed: 54 == 6*9 for: 54 == 54 +Condition.tests.cpp:: passed: ( -1 > 2u ) for: true +Condition.tests.cpp:: passed: -1 > 2u for: -1 > 2 +Condition.tests.cpp:: passed: ( 2u < -1 ) for: true +Condition.tests.cpp:: passed: 2u < -1 for: 2 < -1 +Condition.tests.cpp:: passed: ( minInt > 2u ) for: true +Condition.tests.cpp:: passed: minInt > 2u for: -2147483648 > 2 +Condition.tests.cpp:: passed: i == 1 for: 1 == 1 +Condition.tests.cpp:: passed: ui == 2 for: 2 == 2 +Condition.tests.cpp:: passed: l == 3 for: 3 == 3 +Condition.tests.cpp:: passed: ul == 4 for: 4 == 4 +Condition.tests.cpp:: passed: c == 5 for: 5 == 5 +Condition.tests.cpp:: passed: uc == 6 for: 6 == 6 +Condition.tests.cpp:: passed: 1 == i for: 1 == 1 +Condition.tests.cpp:: passed: 2 == ui for: 2 == 2 +Condition.tests.cpp:: passed: 3 == l for: 3 == 3 +Condition.tests.cpp:: passed: 4 == ul for: 4 == 4 +Condition.tests.cpp:: passed: 5 == c for: 5 == 5 +Condition.tests.cpp:: passed: 6 == uc for: 6 == 6 +Condition.tests.cpp:: passed: (std::numeric_limits::max)() > ul for: 4294967295 (0x) > 4 +Matchers.tests.cpp:: passed: !(matcher.match( 1 )) for: !false +Matchers.tests.cpp:: passed: first.matchCalled for: true +Matchers.tests.cpp:: passed: !second.matchCalled for: true +Matchers.tests.cpp:: passed: matcher.match( 1 ) for: true +Matchers.tests.cpp:: passed: first.matchCalled for: true +Matchers.tests.cpp:: passed: !second.matchCalled for: true +Matchers.tests.cpp:: passed: !(matcher.match( 1 )) for: !false +Matchers.tests.cpp:: passed: first.matchCalled for: true +Matchers.tests.cpp:: passed: !second.matchCalled for: true +Matchers.tests.cpp:: passed: matcher.match( 1 ) for: true +Matchers.tests.cpp:: passed: first.matchCalled for: true +Matchers.tests.cpp:: passed: !second.matchCalled for: true +Matchers.tests.cpp:: failed: testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "not there" (case insensitive) +Matchers.tests.cpp:: failed: testStringForMatching(), ContainsSubstring( "STRING" ) for: "this string contains 'abc' as a substring" contains: "STRING" +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: call_count == 1 for: 1 == 1 +Generators.tests.cpp:: passed: make_data().size() == test_count for: 6 == 6 +Stream.tests.cpp:: passed: Catch::makeStream( "-" )->isConsole() for: true +Exception.tests.cpp:: failed: unexpected exception with message: 'custom exception - not std'; expression was: throwCustom() +Exception.tests.cpp:: failed: unexpected exception with message: 'custom exception - not std'; expression was: throwCustom(), std::exception +Exception.tests.cpp:: failed: unexpected exception with message: 'custom std exception' +Approx.tests.cpp:: passed: 101.000001 != Approx(100).epsilon(0.01) for: 101.00000099999999748 != Approx( 100.0 ) +Approx.tests.cpp:: passed: std::pow(10, -5) != Approx(std::pow(10, -7)) for: 0.00001 != Approx( 0.0000001 ) +ToString.tests.cpp:: passed: enumInfo->lookup(0) == "Value1" for: Value1 == "Value1" +ToString.tests.cpp:: passed: enumInfo->lookup(1) == "Value2" for: Value2 == "Value2" +ToString.tests.cpp:: passed: enumInfo->lookup(3) == "{** unexpected enum value **}" for: {** unexpected enum value **} +== +"{** unexpected enum value **}" +Skip.tests.cpp:: skipped: 'This generator is empty' +Stream.tests.cpp:: passed: Catch::makeStream( "" )->isConsole() for: true +Matchers.tests.cpp:: failed: testStringForMatching(), EndsWith( "Substring" ) for: "this string contains 'abc' as a substring" ends with: "Substring" +Matchers.tests.cpp:: failed: testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" ends with: "this" (case insensitive) +EnumToString.tests.cpp:: passed: stringify( EnumClass3::Value1 ) == "Value1" for: "Value1" == "Value1" +EnumToString.tests.cpp:: passed: stringify( EnumClass3::Value2 ) == "Value2" for: "Value2" == "Value2" +EnumToString.tests.cpp:: passed: stringify( EnumClass3::Value3 ) == "Value3" for: "Value3" == "Value3" +EnumToString.tests.cpp:: passed: stringify( EnumClass3::Value4 ) == "{** unexpected enum value **}" for: "{** unexpected enum value **}" +== +"{** unexpected enum value **}" +EnumToString.tests.cpp:: passed: stringify( ec3 ) == "Value2" for: "Value2" == "Value2" +EnumToString.tests.cpp:: passed: stringify( Bikeshed::Colours::Red ) == "Red" for: "Red" == "Red" +EnumToString.tests.cpp:: passed: stringify( Bikeshed::Colours::Blue ) == "Blue" for: "Blue" == "Blue" +Approx.tests.cpp:: passed: 101.01 != Approx(100).epsilon(0.01) for: 101.01000000000000512 != Approx( 100.0 ) +Condition.tests.cpp:: failed: data.int_seven == 6 for: 7 == 6 +Condition.tests.cpp:: failed: data.int_seven == 8 for: 7 == 8 +Condition.tests.cpp:: failed: data.int_seven == 0 for: 7 == 0 +Condition.tests.cpp:: failed: data.float_nine_point_one == Approx( 9.11f ) for: 9.100000381f +== +Approx( 9.10999965667724609 ) +Condition.tests.cpp:: failed: data.float_nine_point_one == Approx( 9.0f ) for: 9.100000381f == Approx( 9.0 ) +Condition.tests.cpp:: failed: data.float_nine_point_one == Approx( 1 ) for: 9.100000381f == Approx( 1.0 ) +Condition.tests.cpp:: failed: data.float_nine_point_one == Approx( 0 ) for: 9.100000381f == Approx( 0.0 ) +Condition.tests.cpp:: failed: data.double_pi == Approx( 3.1415 ) for: 3.14159265350000005 +== +Approx( 3.14150000000000018 ) +Condition.tests.cpp:: failed: data.str_hello == "goodbye" for: "hello" == "goodbye" +Condition.tests.cpp:: failed: data.str_hello == "hell" for: "hello" == "hell" +Condition.tests.cpp:: failed: data.str_hello == "hello1" for: "hello" == "hello1" +Condition.tests.cpp:: failed: data.str_hello.size() == 6 for: 5 == 6 +Condition.tests.cpp:: failed: x == Approx( 1.301 ) for: 1.30000000000000027 +== +Approx( 1.30099999999999993 ) +Condition.tests.cpp:: passed: data.int_seven == 7 for: 7 == 7 +Condition.tests.cpp:: passed: data.float_nine_point_one == Approx( 9.1f ) for: 9.100000381f +== +Approx( 9.10000038146972656 ) +Condition.tests.cpp:: passed: data.double_pi == Approx( 3.1415926535 ) for: 3.14159265350000005 +== +Approx( 3.14159265350000005 ) +Condition.tests.cpp:: passed: data.str_hello == "hello" for: "hello" == "hello" +Condition.tests.cpp:: passed: "hello" == data.str_hello for: "hello" == "hello" +Condition.tests.cpp:: passed: data.str_hello.size() == 5 for: 5 == 5 +Condition.tests.cpp:: passed: x == Approx( 1.3 ) for: 1.30000000000000027 +== +Approx( 1.30000000000000004 ) +Matchers.tests.cpp:: passed: testStringForMatching(), Equals( "this string contains 'abc' as a substring" ) for: "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" +Matchers.tests.cpp:: passed: testStringForMatching(), Equals( "this string contains 'ABC' as a substring", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" (case insensitive) +Matchers.tests.cpp:: failed: testStringForMatching(), Equals( "this string contains 'ABC' as a substring" ) for: "this string contains 'abc' as a substring" equals: "this string contains 'ABC' as a substring" +Matchers.tests.cpp:: failed: testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" equals: "something else" (case insensitive) +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify(WhatException{}) == "This exception has overridden what() method" for: "This exception has overridden what() method" +== +"This exception has overridden what() method" +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify(OperatorException{}) == "OperatorException" for: "OperatorException" == "OperatorException" +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify(StringMakerException{}) == "StringMakerException" for: "StringMakerException" +== +"StringMakerException" +Matchers.tests.cpp:: failed: expected exception, got none; expression was: doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } +Matchers.tests.cpp:: failed: expected exception, got none; expression was: doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } +Matchers.tests.cpp:: failed: unexpected exception with message: 'Unknown exception'; expression was: throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } +Matchers.tests.cpp:: failed: unexpected exception with message: 'Unknown exception'; expression was: throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } +Matchers.tests.cpp:: failed: throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } for: SpecialException::what special exception has value of 1 +Matchers.tests.cpp:: failed: throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } for: SpecialException::what special exception has value of 1 +Matchers.tests.cpp:: passed: throwsSpecialException( 1 ), SpecialException, ExceptionMatcher{ 1 } for: SpecialException::what special exception has value of 1 +Matchers.tests.cpp:: passed: throwsSpecialException( 2 ), SpecialException, ExceptionMatcher{ 2 } for: SpecialException::what special exception has value of 2 +Matchers.tests.cpp:: passed: throwsDerivedException(), DerivedException, MessageMatches( StartsWith( "Derived" ) ) for: DerivedException::what matches "starts with: "Derived"" +Matchers.tests.cpp:: passed: throwsDerivedException(), DerivedException, MessageMatches( EndsWith( "::what" ) ) for: DerivedException::what matches "ends with: "::what"" +Matchers.tests.cpp:: passed: throwsDerivedException(), DerivedException, MessageMatches( !StartsWith( "::what" ) ) for: DerivedException::what matches "not starts with: "::what"" +Matchers.tests.cpp:: passed: throwsSpecialException( 2 ), SpecialException, MessageMatches( StartsWith( "Special" ) ) for: SpecialException::what matches "starts with: "Special"" +Exception.tests.cpp:: passed: thisThrows(), "expected exception" for: "expected exception" equals: "expected exception" +Exception.tests.cpp:: passed: thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) for: "expected exception" equals: "expected exception" (case insensitive) +Exception.tests.cpp:: passed: thisThrows(), StartsWith( "expected" ) for: "expected exception" starts with: "expected" +Exception.tests.cpp:: passed: thisThrows(), EndsWith( "exception" ) for: "expected exception" ends with: "exception" +Exception.tests.cpp:: passed: thisThrows(), ContainsSubstring( "except" ) for: "expected exception" contains: "except" +Exception.tests.cpp:: passed: thisThrows(), ContainsSubstring( "exCept", Catch::CaseSensitive::No ) for: "expected exception" contains: "except" (case insensitive) +Matchers.tests.cpp:: passed: throwsDerivedException(), DerivedException, Message( "DerivedException::what" ) for: DerivedException::what exception message matches "DerivedException::what" +Matchers.tests.cpp:: passed: throwsDerivedException(), DerivedException, !Message( "derivedexception::what" ) for: DerivedException::what not exception message matches "derivedexception::what" +Matchers.tests.cpp:: passed: throwsSpecialException( 2 ), SpecialException, !Message( "DerivedException::what" ) for: SpecialException::what not exception message matches "DerivedException::what" +Matchers.tests.cpp:: passed: throwsSpecialException( 2 ), SpecialException, Message( "SpecialException::what" ) for: SpecialException::what exception message matches "SpecialException::what" +Exception.tests.cpp:: failed: unexpected exception with message: 'expected exception'; expression was: thisThrows(), std::string +Exception.tests.cpp:: failed: expected exception, got none; expression was: thisDoesntThrow(), std::domain_error +Exception.tests.cpp:: failed: unexpected exception with message: 'expected exception'; expression was: thisThrows() +Message.tests.cpp:: failed: explicitly with 1 message: 'This is a failure' +Message.tests.cpp:: failed: explicitly +Message.tests.cpp:: failed: explicitly with 1 message: 'This is a failure' +Message.tests.cpp:: warning: 'This message appears in the output' +Misc.tests.cpp:: passed: Factorial(0) == 1 for: 1 == 1 +Misc.tests.cpp:: passed: Factorial(1) == 1 for: 1 == 1 +Misc.tests.cpp:: passed: Factorial(2) == 2 for: 2 == 2 +Misc.tests.cpp:: passed: Factorial(3) == 6 for: 6 == 6 +Misc.tests.cpp:: passed: Factorial(10) == 3628800 for: 3628800 (0x) == 3628800 (0x) +GeneratorsImpl.tests.cpp:: passed: filter( []( int ) { return false; }, value( 3 ) ), Catch::GeneratorException +Matchers.tests.cpp:: passed: 10., WithinRel( 11.1, 0.1 ) for: 10.0 and 11.09999999999999964 are within 10% of each other +Matchers.tests.cpp:: passed: 10., !WithinRel( 11.2, 0.1 ) for: 10.0 not and 11.19999999999999929 are within 10% of each other +Matchers.tests.cpp:: passed: 1., !WithinRel( 0., 0.99 ) for: 1.0 not and 0.0 are within 99% of each other +Matchers.tests.cpp:: passed: -0., WithinRel( 0. ) for: -0.0 and 0.0 are within 2.22045e-12% of each other +Matchers.tests.cpp:: passed: v1, WithinRel( v2 ) for: 0.0 and 0.0 are within 2.22045e-12% of each other +Matchers.tests.cpp:: passed: 1., WithinAbs( 1., 0 ) for: 1.0 is within 0.0 of 1.0 +Matchers.tests.cpp:: passed: 0., WithinAbs( 1., 1 ) for: 0.0 is within 1.0 of 1.0 +Matchers.tests.cpp:: passed: 0., !WithinAbs( 1., 0.99 ) for: 0.0 not is within 0.98999999999999999 of 1.0 +Matchers.tests.cpp:: passed: 0., !WithinAbs( 1., 0.99 ) for: 0.0 not is within 0.98999999999999999 of 1.0 +Matchers.tests.cpp:: passed: 11., !WithinAbs( 10., 0.5 ) for: 11.0 not is within 0.5 of 10.0 +Matchers.tests.cpp:: passed: 10., !WithinAbs( 11., 0.5 ) for: 10.0 not is within 0.5 of 11.0 +Matchers.tests.cpp:: passed: -10., WithinAbs( -10., 0.5 ) for: -10.0 is within 0.5 of -10.0 +Matchers.tests.cpp:: passed: -10., WithinAbs( -9.6, 0.5 ) for: -10.0 is within 0.5 of -9.59999999999999964 +Matchers.tests.cpp:: passed: 1., WithinULP( 1., 0 ) for: 1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00]) +Matchers.tests.cpp:: passed: nextafter( 1., 2. ), WithinULP( 1., 1 ) for: 1.00000000000000022 is within 1 ULPs of 1.0000000000000000e+00 ([9.9999999999999989e-01, 1.0000000000000002e+00]) +Matchers.tests.cpp:: passed: 0., WithinULP( nextafter( 0., 1. ), 1 ) for: 0.0 is within 1 ULPs of 4.9406564584124654e-324 ([0.0000000000000000e+00, 9.8813129168249309e-324]) +Matchers.tests.cpp:: passed: 1., WithinULP( nextafter( 1., 0. ), 1 ) for: 1.0 is within 1 ULPs of 9.9999999999999989e-01 ([9.9999999999999978e-01, 1.0000000000000000e+00]) +Matchers.tests.cpp:: passed: 1., !WithinULP( nextafter( 1., 2. ), 0 ) for: 1.0 not is within 0 ULPs of 1.0000000000000002e+00 ([1.0000000000000002e+00, 1.0000000000000002e+00]) +Matchers.tests.cpp:: passed: 1., WithinULP( 1., 0 ) for: 1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00]) +Matchers.tests.cpp:: passed: -0., WithinULP( 0., 0 ) for: -0.0 is within 0 ULPs of 0.0000000000000000e+00 ([0.0000000000000000e+00, 0.0000000000000000e+00]) +Matchers.tests.cpp:: passed: 1., WithinAbs( 1., 0.5 ) || WithinULP( 2., 1 ) for: 1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0000000000000000e+00 ([1.9999999999999998e+00, 2.0000000000000004e+00]) ) +Matchers.tests.cpp:: passed: 1., WithinAbs( 2., 0.5 ) || WithinULP( 1., 0 ) for: 1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00]) ) +Matchers.tests.cpp:: passed: 0.0001, WithinAbs( 0., 0.001 ) || WithinRel( 0., 0.1 ) for: 0.0001 ( is within 0.001 of 0.0 or and 0.0 are within 10% of each other ) +Matchers.tests.cpp:: passed: WithinAbs( 1., 0. ) +Matchers.tests.cpp:: passed: WithinAbs( 1., -1. ), std::domain_error +Matchers.tests.cpp:: passed: WithinULP( 1., 0 ) +Matchers.tests.cpp:: passed: WithinRel( 1., 0. ) +Matchers.tests.cpp:: passed: WithinRel( 1., -0.2 ), std::domain_error +Matchers.tests.cpp:: passed: WithinRel( 1., 1. ), std::domain_error +Matchers.tests.cpp:: passed: 1., !IsNaN() for: 1.0 not is NaN +Matchers.tests.cpp:: passed: 10.f, WithinRel( 11.1f, 0.1f ) for: 10.0f and 11.10000038146972656 are within 10% of each other +Matchers.tests.cpp:: passed: 10.f, !WithinRel( 11.2f, 0.1f ) for: 10.0f not and 11.19999980926513672 are within 10% of each other +Matchers.tests.cpp:: passed: 1.f, !WithinRel( 0.f, 0.99f ) for: 1.0f not and 0.0 are within 99% of each other +Matchers.tests.cpp:: passed: -0.f, WithinRel( 0.f ) for: -0.0f and 0.0 are within 0.00119209% of each other +Matchers.tests.cpp:: passed: v1, WithinRel( v2 ) for: 0.0f and 0.0 are within 0.00119209% of each other +Matchers.tests.cpp:: passed: 1.f, WithinAbs( 1.f, 0 ) for: 1.0f is within 0.0 of 1.0 +Matchers.tests.cpp:: passed: 0.f, WithinAbs( 1.f, 1 ) for: 0.0f is within 1.0 of 1.0 +Matchers.tests.cpp:: passed: 0.f, !WithinAbs( 1.f, 0.99f ) for: 0.0f not is within 0.99000000953674316 of 1.0 +Matchers.tests.cpp:: passed: 0.f, !WithinAbs( 1.f, 0.99f ) for: 0.0f not is within 0.99000000953674316 of 1.0 +Matchers.tests.cpp:: passed: 0.f, WithinAbs( -0.f, 0 ) for: 0.0f is within 0.0 of -0.0 +Matchers.tests.cpp:: passed: 11.f, !WithinAbs( 10.f, 0.5f ) for: 11.0f not is within 0.5 of 10.0 +Matchers.tests.cpp:: passed: 10.f, !WithinAbs( 11.f, 0.5f ) for: 10.0f not is within 0.5 of 11.0 +Matchers.tests.cpp:: passed: -10.f, WithinAbs( -10.f, 0.5f ) for: -10.0f is within 0.5 of -10.0 +Matchers.tests.cpp:: passed: -10.f, WithinAbs( -9.6f, 0.5f ) for: -10.0f is within 0.5 of -9.60000038146972656 +Matchers.tests.cpp:: passed: 1.f, WithinULP( 1.f, 0 ) for: 1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) +Matchers.tests.cpp:: passed: -1.f, WithinULP( -1.f, 0 ) for: -1.0f is within 0 ULPs of -1.00000000e+00f ([-1.00000000e+00, -1.00000000e+00]) +Matchers.tests.cpp:: passed: nextafter( 1.f, 2.f ), WithinULP( 1.f, 1 ) for: 1.000000119f is within 1 ULPs of 1.00000000e+00f ([9.99999940e-01, 1.00000012e+00]) +Matchers.tests.cpp:: passed: 0.f, WithinULP( nextafter( 0.f, 1.f ), 1 ) for: 0.0f is within 1 ULPs of 1.40129846e-45f ([0.00000000e+00, 2.80259693e-45]) +Matchers.tests.cpp:: passed: 1.f, WithinULP( nextafter( 1.f, 0.f ), 1 ) for: 1.0f is within 1 ULPs of 9.99999940e-01f ([9.99999881e-01, 1.00000000e+00]) +Matchers.tests.cpp:: passed: 1.f, !WithinULP( nextafter( 1.f, 2.f ), 0 ) for: 1.0f not is within 0 ULPs of 1.00000012e+00f ([1.00000012e+00, 1.00000012e+00]) +Matchers.tests.cpp:: passed: 1.f, WithinULP( 1.f, 0 ) for: 1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) +Matchers.tests.cpp:: passed: -0.f, WithinULP( 0.f, 0 ) for: -0.0f is within 0 ULPs of 0.00000000e+00f ([0.00000000e+00, 0.00000000e+00]) +Matchers.tests.cpp:: passed: 1.f, WithinAbs( 1.f, 0.5 ) || WithinULP( 1.f, 1 ) for: 1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.00000000e+00f ([9.99999940e-01, 1.00000012e+00]) ) +Matchers.tests.cpp:: passed: 1.f, WithinAbs( 2.f, 0.5 ) || WithinULP( 1.f, 0 ) for: 1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) ) +Matchers.tests.cpp:: passed: 0.0001f, WithinAbs( 0.f, 0.001f ) || WithinRel( 0.f, 0.1f ) for: 0.0001f ( is within 0.00100000004749745 of 0.0 or and 0.0 are within 10% of each other ) +Matchers.tests.cpp:: passed: WithinAbs( 1.f, 0.f ) +Matchers.tests.cpp:: passed: WithinAbs( 1.f, -1.f ), std::domain_error +Matchers.tests.cpp:: passed: WithinULP( 1.f, 0 ) +Matchers.tests.cpp:: passed: WithinULP( 1.f, static_cast( -1 ) ), std::domain_error +Matchers.tests.cpp:: passed: WithinRel( 1.f, 0.f ) +Matchers.tests.cpp:: passed: WithinRel( 1.f, -0.2f ), std::domain_error +Matchers.tests.cpp:: passed: WithinRel( 1.f, 1.f ), std::domain_error +Matchers.tests.cpp:: passed: 1., !IsNaN() for: 1.0 not is NaN +Generators.tests.cpp:: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:: passed: filter([] (int) {return false; }, value(1)), Catch::GeneratorException +Generators.tests.cpp:: passed: i < 4 for: 1 < 4 +Generators.tests.cpp:: passed: i < 4 for: 2 < 4 +Generators.tests.cpp:: passed: i < 4 for: 3 < 4 +Generators.tests.cpp:: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:: passed: i.size() == 1 for: 1 == 1 +Generators.tests.cpp:: passed: i.size() == 1 for: 1 == 1 +Generators.tests.cpp:: passed: i.size() == 1 for: 1 == 1 +Generators.tests.cpp:: passed: i.size() == 1 for: 1 == 1 +Generators.tests.cpp:: passed: i.size() == 1 for: 1 == 1 +Generators.tests.cpp:: passed: i.size() == 1 for: 1 == 1 +Generators.tests.cpp:: passed: j > 0 for: 1 > 0 +Generators.tests.cpp:: passed: j > 0 for: 2 > 0 +Generators.tests.cpp:: passed: j > 0 for: 3 > 0 +Generators.tests.cpp:: passed: j > 0 for: 1 > 0 +Generators.tests.cpp:: passed: j > 0 for: 2 > 0 +Generators.tests.cpp:: passed: j > 0 for: 3 > 0 +Generators.tests.cpp:: passed: chunk2.size() == 2 for: 2 == 2 +Generators.tests.cpp:: passed: chunk2.front() == chunk2.back() for: 1 == 1 +Generators.tests.cpp:: passed: chunk2.size() == 2 for: 2 == 2 +Generators.tests.cpp:: passed: chunk2.front() == chunk2.back() for: 2 == 2 +Generators.tests.cpp:: passed: chunk2.size() == 2 for: 2 == 2 +Generators.tests.cpp:: passed: chunk2.front() == chunk2.back() for: 3 == 3 +Generators.tests.cpp:: passed: chunk2.size() == 2 for: 2 == 2 +Generators.tests.cpp:: passed: chunk2.front() == chunk2.back() for: 1 == 1 +Generators.tests.cpp:: passed: chunk2.front() < 3 for: 1 < 3 +Generators.tests.cpp:: passed: chunk2.size() == 2 for: 2 == 2 +Generators.tests.cpp:: passed: chunk2.front() == chunk2.back() for: 2 == 2 +Generators.tests.cpp:: passed: chunk2.front() < 3 for: 2 < 3 +Generators.tests.cpp:: passed: chunk2.size() == 0 for: 0 == 0 +Generators.tests.cpp:: passed: chunk2.size() == 0 for: 0 == 0 +Generators.tests.cpp:: passed: chunk2.size() == 0 for: 0 == 0 +Generators.tests.cpp:: passed: chunk(2, value(1)), Catch::GeneratorException +Generators.tests.cpp:: passed: j < i for: -3 < 1 +Generators.tests.cpp:: passed: j < i for: -2 < 1 +Generators.tests.cpp:: passed: j < i for: -1 < 1 +Generators.tests.cpp:: passed: 4u * i > str.size() for: 4 > 1 +Generators.tests.cpp:: passed: 4u * i > str.size() for: 4 > 2 +Generators.tests.cpp:: passed: 4u * i > str.size() for: 4 > 3 +Generators.tests.cpp:: passed: j < i for: -3 < 2 +Generators.tests.cpp:: passed: j < i for: -2 < 2 +Generators.tests.cpp:: passed: j < i for: -1 < 2 +Generators.tests.cpp:: passed: 4u * i > str.size() for: 8 > 1 +Generators.tests.cpp:: passed: 4u * i > str.size() for: 8 > 2 +Generators.tests.cpp:: passed: 4u * i > str.size() for: 8 > 3 +Generators.tests.cpp:: passed: j < i for: -3 < 3 +Generators.tests.cpp:: passed: j < i for: -2 < 3 +Generators.tests.cpp:: passed: j < i for: -1 < 3 +Generators.tests.cpp:: passed: 4u * i > str.size() for: 12 > 1 +Generators.tests.cpp:: passed: 4u * i > str.size() for: 12 > 2 +Generators.tests.cpp:: passed: 4u * i > str.size() for: 12 > 3 +GeneratorsImpl.tests.cpp:: passed: gen.get() == 123 for: 123 == 123 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 3 for: 3 == 3 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 5 for: 5 == 5 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 5 for: 5 == 5 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 4 for: 4 == 4 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 0 for: 0 == 0 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get().size() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: gen.get() == "aa" for: "aa" == "aa" +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == "bb" for: "bb" == "bb" +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == "cc" for: "cc" == "cc" +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 3 for: 3 == 3 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 3 for: 3 == 3 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: filter([](int) { return false; }, value(1)), Catch::GeneratorException +GeneratorsImpl.tests.cpp:: passed: filter([](int) { return false; }, values({ 1, 2, 3 })), Catch::GeneratorException +GeneratorsImpl.tests.cpp:: passed: gen.get() == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2.0 for: 2.0 == 2.0 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 4.0 for: 4.0 == 4.0 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 6.0 for: 6.0 == 6.0 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2.0 for: 2.0 == 2.0 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 4.0 for: 4.0 == 4.0 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 6.0 for: 6.0 == 6.0 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 3 for: 3 == 3 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 3 for: 3 == 3 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 3 for: 3 == 3 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == -2 for: -2 == -2 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -1 for: -1 == -1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 0 for: 0 == 0 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 0 for: 0 == 0 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -1 for: -1 == -1 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == -7 for: -7 == -7 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -4 for: -4 == -4 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -1 for: -1 == -1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == -7 for: -7 == -7 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -4 for: -4 == -4 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -1 for: -1 == -1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == -7 for: -7 == -7 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -4 for: -4 == -4 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -1 for: -1 == -1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 5 for: 5 == 5 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -1.0 == Approx( -1.0 ) with 1 message: 'Current expected value is -1' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -1' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.90000000000000002 +== +Approx( -0.90000000000000002 ) with 1 message: 'Current expected value is -0.9' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.9' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.80000000000000004 +== +Approx( -0.80000000000000004 ) with 1 message: 'Current expected value is -0.8' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.8' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.70000000000000007 +== +Approx( -0.70000000000000007 ) with 1 message: 'Current expected value is -0.7' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.7' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.60000000000000009 +== +Approx( -0.60000000000000009 ) with 1 message: 'Current expected value is -0.6' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.6' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.50000000000000011 +== +Approx( -0.50000000000000011 ) with 1 message: 'Current expected value is -0.5' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.5' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.40000000000000013 +== +Approx( -0.40000000000000013 ) with 1 message: 'Current expected value is -0.4' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.4' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.30000000000000016 +== +Approx( -0.30000000000000016 ) with 1 message: 'Current expected value is -0.3' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.3' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.20000000000000015 +== +Approx( -0.20000000000000015 ) with 1 message: 'Current expected value is -0.2' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.2' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.10000000000000014 +== +Approx( -0.10000000000000014 ) with 1 message: 'Current expected value is -0.1' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.1' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.00000000000000014 +== +Approx( -0.00000000000000014 ) with 1 message: 'Current expected value is -1.38778e-16' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -1.38778e-16' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.09999999999999987 +== +Approx( 0.09999999999999987 ) with 1 message: 'Current expected value is 0.1' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.1' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.19999999999999987 +== +Approx( 0.19999999999999987 ) with 1 message: 'Current expected value is 0.2' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.2' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.29999999999999988 +== +Approx( 0.29999999999999988 ) with 1 message: 'Current expected value is 0.3' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.3' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.39999999999999991 +== +Approx( 0.39999999999999991 ) with 1 message: 'Current expected value is 0.4' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.4' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.49999999999999989 +== +Approx( 0.49999999999999989 ) with 1 message: 'Current expected value is 0.5' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.5' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.59999999999999987 +== +Approx( 0.59999999999999987 ) with 1 message: 'Current expected value is 0.6' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.6' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.69999999999999984 +== +Approx( 0.69999999999999984 ) with 1 message: 'Current expected value is 0.7' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.7' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.79999999999999982 +== +Approx( 0.79999999999999982 ) with 1 message: 'Current expected value is 0.8' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.8' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.8999999999999998 +== +Approx( 0.8999999999999998 ) with 1 message: 'Current expected value is 0.9' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.9' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx( rangeEnd ) for: 0.99999999999999978 == Approx( 1.0 ) +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -1.0 == Approx( -1.0 ) with 1 message: 'Current expected value is -1' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -1' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.69999999999999996 +== +Approx( -0.69999999999999996 ) with 1 message: 'Current expected value is -0.7' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.7' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.39999999999999997 +== +Approx( -0.39999999999999997 ) with 1 message: 'Current expected value is -0.4' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.4' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.09999999999999998 +== +Approx( -0.09999999999999998 ) with 1 message: 'Current expected value is -0.1' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.1' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.20000000000000001 +== +Approx( 0.20000000000000001 ) with 1 message: 'Current expected value is 0.2' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.2' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.5 == Approx( 0.5 ) with 1 message: 'Current expected value is 0.5' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.5' +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -1.0 == Approx( -1.0 ) with 1 message: 'Current expected value is -1' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -1' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.69999999999999996 +== +Approx( -0.69999999999999996 ) with 1 message: 'Current expected value is -0.7' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.7' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.39999999999999997 +== +Approx( -0.39999999999999997 ) with 1 message: 'Current expected value is -0.4' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.4' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.09999999999999998 +== +Approx( -0.09999999999999998 ) with 1 message: 'Current expected value is -0.1' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.1' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.20000000000000001 +== +Approx( 0.20000000000000001 ) with 1 message: 'Current expected value is 0.2' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.2' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.5 == Approx( 0.5 ) with 1 message: 'Current expected value is 0.5' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.5' +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 5 for: 5 == 5 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -1 for: -1 == -1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -4 for: -4 == -4 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 5 for: 5 == 5 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -1 for: -1 == -1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -4 for: -4 == -4 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 5 for: 5 == 5 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -1 for: -1 == -1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -4 for: -4 == -4 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -7 for: -7 == -7 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +Approx.tests.cpp:: passed: d >= Approx( 1.22 ) for: 1.22999999999999998 +>= +Approx( 1.21999999999999997 ) +Approx.tests.cpp:: passed: d >= Approx( 1.23 ) for: 1.22999999999999998 +>= +Approx( 1.22999999999999998 ) +Approx.tests.cpp:: passed: !(d >= Approx( 1.24 )) for: !(1.22999999999999998 +>= +Approx( 1.23999999999999999 )) +Approx.tests.cpp:: passed: d >= Approx( 1.24 ).epsilon(0.1) for: 1.22999999999999998 +>= +Approx( 1.23999999999999999 ) +TestCaseInfoHasher.tests.cpp:: passed: h1( dummy ) != h2( dummy ) for: 3422778688 (0x) +!= +130711275 (0x) +TestCaseInfoHasher.tests.cpp:: passed: h1( dummy ) == h2( dummy ) for: 3422778688 (0x) +== +3422778688 (0x) +TestCaseInfoHasher.tests.cpp:: passed: h( dummy1 ) != h( dummy2 ) for: 2903002874 (0x) +!= +2668622104 (0x) +TestCaseInfoHasher.tests.cpp:: passed: h( dummy1 ) != h( dummy2 ) for: 2673152918 (0x) +!= +3916075712 (0x) +TestCaseInfoHasher.tests.cpp:: passed: h( dummy1 ) != h( dummy2 ) for: 2074929312 (0x) +!= +3429949824 (0x) +TestCaseInfoHasher.tests.cpp:: passed: h( dummy ) == h( dummy ) for: 3422778688 (0x) +== +3422778688 (0x) +Message.tests.cpp:: failed: explicitly with 3 messages: 'This info has multiple parts.' and 'This unscoped info has multiple parts.' and 'Show infos!' +Message.tests.cpp:: warning: 'this is a message' with 1 message: 'this is a warning' +Message.tests.cpp:: failed: a == 1 for: 2 == 1 with 2 messages: 'this message should be logged' and 'so should this' +Message.tests.cpp:: passed: a == 2 for: 2 == 2 with 1 message: 'this message may be logged later' +Message.tests.cpp:: failed: a == 1 for: 2 == 1 with 2 messages: 'this message may be logged later' and 'this message should be logged' +Message.tests.cpp:: failed: a == 0 for: 2 == 0 with 3 messages: 'this message may be logged later' and 'this message should be logged' and 'and this, but later' +Message.tests.cpp:: passed: a == 2 for: 2 == 2 with 4 messages: 'this message may be logged later' and 'this message should be logged' and 'and this, but later' and 'but not this' +Message.tests.cpp:: passed: i < 10 for: 0 < 10 with 2 messages: 'current counter 0' and 'i := 0' +Message.tests.cpp:: passed: i < 10 for: 1 < 10 with 2 messages: 'current counter 1' and 'i := 1' +Message.tests.cpp:: passed: i < 10 for: 2 < 10 with 2 messages: 'current counter 2' and 'i := 2' +Message.tests.cpp:: passed: i < 10 for: 3 < 10 with 2 messages: 'current counter 3' and 'i := 3' +Message.tests.cpp:: passed: i < 10 for: 4 < 10 with 2 messages: 'current counter 4' and 'i := 4' +Message.tests.cpp:: passed: i < 10 for: 5 < 10 with 2 messages: 'current counter 5' and 'i := 5' +Message.tests.cpp:: passed: i < 10 for: 6 < 10 with 2 messages: 'current counter 6' and 'i := 6' +Message.tests.cpp:: passed: i < 10 for: 7 < 10 with 2 messages: 'current counter 7' and 'i := 7' +Message.tests.cpp:: passed: i < 10 for: 8 < 10 with 2 messages: 'current counter 8' and 'i := 8' +Message.tests.cpp:: passed: i < 10 for: 9 < 10 with 2 messages: 'current counter 9' and 'i := 9' +Message.tests.cpp:: failed: i < 10 for: 10 < 10 with 2 messages: 'current counter 10' and 'i := 10' +AssertionHandler.tests.cpp:: failed: unexpected exception with message: 'Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE'; expression was: Dummy +Condition.tests.cpp:: failed: data.int_seven != 7 for: 7 != 7 +Condition.tests.cpp:: failed: data.float_nine_point_one != Approx( 9.1f ) for: 9.100000381f +!= +Approx( 9.10000038146972656 ) +Condition.tests.cpp:: failed: data.double_pi != Approx( 3.1415926535 ) for: 3.14159265350000005 +!= +Approx( 3.14159265350000005 ) +Condition.tests.cpp:: failed: data.str_hello != "hello" for: "hello" != "hello" +Condition.tests.cpp:: failed: data.str_hello.size() != 5 for: 5 != 5 +Condition.tests.cpp:: passed: data.int_seven != 6 for: 7 != 6 +Condition.tests.cpp:: passed: data.int_seven != 8 for: 7 != 8 +Condition.tests.cpp:: passed: data.float_nine_point_one != Approx( 9.11f ) for: 9.100000381f +!= +Approx( 9.10999965667724609 ) +Condition.tests.cpp:: passed: data.float_nine_point_one != Approx( 9.0f ) for: 9.100000381f != Approx( 9.0 ) +Condition.tests.cpp:: passed: data.float_nine_point_one != Approx( 1 ) for: 9.100000381f != Approx( 1.0 ) +Condition.tests.cpp:: passed: data.float_nine_point_one != Approx( 0 ) for: 9.100000381f != Approx( 0.0 ) +Condition.tests.cpp:: passed: data.double_pi != Approx( 3.1415 ) for: 3.14159265350000005 +!= +Approx( 3.14150000000000018 ) +Condition.tests.cpp:: passed: data.str_hello != "goodbye" for: "hello" != "goodbye" +Condition.tests.cpp:: passed: data.str_hello != "hell" for: "hello" != "hell" +Condition.tests.cpp:: passed: data.str_hello != "hello1" for: "hello" != "hello1" +Condition.tests.cpp:: passed: data.str_hello.size() != 6 for: 5 != 6 +Json.tests.cpp:: passed: stream.str() == "" for: "" == "" +Json.tests.cpp:: passed: stream.str() == "{\n}" for: "{ +}" +== +"{ +}" +Json.tests.cpp:: passed: stream.str(), ContainsSubstring( "\"int\": 1," ) && ContainsSubstring( "\"double\": 1.5," ) && ContainsSubstring( "\"true\": true," ) && ContainsSubstring( "\"false\": false," ) && ContainsSubstring( "\"string\": \"this is a string\"," ) && ContainsSubstring( "\"array\": [\n 1,\n 2\n ]\n}" ) for: "{ + "int": 1, + "double": 1.5, + "true": true, + "false": false, + "string": "this is a string", + "array": [ + 1, + 2 + ] +}" ( contains: ""int": 1," and contains: ""double": 1.5," and contains: ""true": true," and contains: ""false": false," and contains: ""string": "this is a string"," and contains: ""array": [ + 1, + 2 + ] +}" ) +Json.tests.cpp:: passed: stream.str(), ContainsSubstring( "\"empty_object\": {\n }," ) && ContainsSubstring( "\"fully_object\": {\n \"key\": 1\n }" ) for: "{ + "empty_object": { + }, + "fully_object": { + "key": 1 + } +}" ( contains: ""empty_object": { + }," and contains: ""fully_object": { + "key": 1 + }" ) +Json.tests.cpp:: passed: stream.str() == "[\n]" for: "[ +]" +== +"[ +]" +Json.tests.cpp:: passed: stream.str() == "[\n 1,\n 1.5,\n true,\n false,\n \"this is a string\",\n {\n \"object\": 42\n },\n [\n \"array\",\n 42.5\n ]\n]" for: "[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] +]" +== +"[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] +]" +Json.tests.cpp:: passed: stream.str() == "{\n}" for: "{ +}" +== +"{ +}" +Json.tests.cpp:: passed: stream.str() == "[\n]" for: "[ +]" +== +"[ +]" +Json.tests.cpp:: passed: stream.str() == "\"custom\"" for: ""custom"" == ""custom"" +Json.tests.cpp:: passed: sstream.str() == "\"\\\"\"" for: ""\""" == ""\""" +Json.tests.cpp:: passed: sstream.str() == "\"\\\\\"" for: ""\\"" == ""\\"" +Json.tests.cpp:: passed: sstream.str() == "\"/\"" for: ""/"" == ""/"" +Json.tests.cpp:: passed: sstream.str() == "\"\\b\"" for: ""\b"" == ""\b"" +Json.tests.cpp:: passed: sstream.str() == "\"\\f\"" for: ""\f"" == ""\f"" +Json.tests.cpp:: passed: sstream.str() == "\"\\n\"" for: ""\n"" == ""\n"" +Json.tests.cpp:: passed: sstream.str() == "\"\\r\"" for: ""\r"" == ""\r"" +Json.tests.cpp:: passed: sstream.str() == "\"\\t\"" for: ""\t"" == ""\t"" +Json.tests.cpp:: passed: sstream.str() == "\"\\\\/\\t\\r\\n\"" for: ""\\/\t\r\n"" == ""\\/\t\r\n"" +Compilation.tests.cpp:: passed: []() { return true; }() for: true +Approx.tests.cpp:: passed: d <= Approx( 1.24 ) for: 1.22999999999999998 +<= +Approx( 1.23999999999999999 ) +Approx.tests.cpp:: passed: d <= Approx( 1.23 ) for: 1.22999999999999998 +<= +Approx( 1.22999999999999998 ) +Approx.tests.cpp:: passed: !(d <= Approx( 1.22 )) for: !(1.22999999999999998 +<= +Approx( 1.21999999999999997 )) +Approx.tests.cpp:: passed: d <= Approx( 1.22 ).epsilon(0.1) for: 1.22999999999999998 +<= +Approx( 1.21999999999999997 ) +Misc.tests.cpp:: passed: with 1 message: 'was called' +Matchers.tests.cpp:: passed: testStringForMatching(), ContainsSubstring( "string" ) && ContainsSubstring( "abc" ) && ContainsSubstring( "substring" ) && ContainsSubstring( "contains" ) for: "this string contains 'abc' as a substring" ( contains: "string" and contains: "abc" and contains: "substring" and contains: "contains" ) +Matchers.tests.cpp:: passed: testStringForMatching(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) for: "this string contains 'abc' as a substring" ( contains: "string" or contains: "different" or contains: "random" ) +Matchers.tests.cpp:: passed: testStringForMatching2(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) for: "some completely different text that contains one common word" ( contains: "string" or contains: "different" or contains: "random" ) +Matchers.tests.cpp:: passed: testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "substring" ) for: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "substring" ) +Matchers.tests.cpp:: failed: testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) for: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" ) +Matchers.tests.cpp:: passed: testStringForMatching(), !ContainsSubstring( "different" ) for: "this string contains 'abc' as a substring" not contains: "different" +Matchers.tests.cpp:: failed: testStringForMatching(), !ContainsSubstring( "substring" ) for: "this string contains 'abc' as a substring" not contains: "substring" +Condition.tests.cpp:: failed: explicitly +Condition.tests.cpp:: failed: explicitly +Condition.tests.cpp:: failed: explicitly +Condition.tests.cpp:: failed: explicitly +Exception.tests.cpp:: passed: thisThrows(), "expected exception" for: "expected exception" equals: "expected exception" +Exception.tests.cpp:: failed: thisThrows(), "should fail" for: "expected exception" equals: "should fail" +Reporters.tests.cpp:: passed: records == expected for: { "Hello", "world", "Goodbye", "world" } +== +{ "Hello", "world", "Goodbye", "world" } +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldRedirectStdOut == false for: false == false +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldRedirectStdOut == false for: false == false +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +Generators.tests.cpp:: passed: values > -6 for: 3 > -6 +Generators.tests.cpp:: passed: values > -6 for: 4 > -6 +Generators.tests.cpp:: passed: values > -6 for: 5 > -6 +Generators.tests.cpp:: passed: values > -6 for: 6 > -6 +Generators.tests.cpp:: passed: values > -6 for: -5 > -6 +Generators.tests.cpp:: passed: values > -6 for: -4 > -6 +Generators.tests.cpp:: passed: values > -6 for: 90 > -6 +Generators.tests.cpp:: passed: values > -6 for: 91 > -6 +Generators.tests.cpp:: passed: values > -6 for: 92 > -6 +Generators.tests.cpp:: passed: values > -6 for: 93 > -6 +Generators.tests.cpp:: passed: values > -6 for: 94 > -6 +Generators.tests.cpp:: passed: values > -6 for: 95 > -6 +Generators.tests.cpp:: passed: values > -6 for: 96 > -6 +Generators.tests.cpp:: passed: values > -6 for: 97 > -6 +Generators.tests.cpp:: passed: values > -6 for: 98 > -6 +Generators.tests.cpp:: passed: values > -6 for: 99 > -6 +Misc.tests.cpp:: warning: 'This one ran' +Exception.tests.cpp:: failed: unexpected exception with message: 'custom exception' +Tricky.tests.cpp:: passed: True for: {?} +Tricky.tests.cpp:: passed: !False for: true +Tricky.tests.cpp:: passed: !(False) for: !{?} +Compilation.tests.cpp:: passed: with 1 message: 'std::is_void::value' +Compilation.tests.cpp:: passed: with 1 message: '!(std::is_void::value)' +Compilation.tests.cpp:: passed: with 1 message: 'std::is_void::value' +Compilation.tests.cpp:: passed: with 1 message: '!(std::is_void::value)' +Condition.tests.cpp:: failed: data.int_seven > 7 for: 7 > 7 +Condition.tests.cpp:: failed: data.int_seven < 7 for: 7 < 7 +Condition.tests.cpp:: failed: data.int_seven > 8 for: 7 > 8 +Condition.tests.cpp:: failed: data.int_seven < 6 for: 7 < 6 +Condition.tests.cpp:: failed: data.int_seven < 0 for: 7 < 0 +Condition.tests.cpp:: failed: data.int_seven < -1 for: 7 < -1 +Condition.tests.cpp:: failed: data.int_seven >= 8 for: 7 >= 8 +Condition.tests.cpp:: failed: data.int_seven <= 6 for: 7 <= 6 +Condition.tests.cpp:: failed: data.float_nine_point_one < 9 for: 9.100000381f < 9 +Condition.tests.cpp:: failed: data.float_nine_point_one > 10 for: 9.100000381f > 10 +Condition.tests.cpp:: failed: data.float_nine_point_one > 9.2 for: 9.100000381f > 9.19999999999999929 +Condition.tests.cpp:: failed: data.str_hello > "hello" for: "hello" > "hello" +Condition.tests.cpp:: failed: data.str_hello < "hello" for: "hello" < "hello" +Condition.tests.cpp:: failed: data.str_hello > "hellp" for: "hello" > "hellp" +Condition.tests.cpp:: failed: data.str_hello > "z" for: "hello" > "z" +Condition.tests.cpp:: failed: data.str_hello < "hellm" for: "hello" < "hellm" +Condition.tests.cpp:: failed: data.str_hello < "a" for: "hello" < "a" +Condition.tests.cpp:: failed: data.str_hello >= "z" for: "hello" >= "z" +Condition.tests.cpp:: failed: data.str_hello <= "a" for: "hello" <= "a" +Condition.tests.cpp:: passed: data.int_seven < 8 for: 7 < 8 +Condition.tests.cpp:: passed: data.int_seven > 6 for: 7 > 6 +Condition.tests.cpp:: passed: data.int_seven > 0 for: 7 > 0 +Condition.tests.cpp:: passed: data.int_seven > -1 for: 7 > -1 +Condition.tests.cpp:: passed: data.int_seven >= 7 for: 7 >= 7 +Condition.tests.cpp:: passed: data.int_seven >= 6 for: 7 >= 6 +Condition.tests.cpp:: passed: data.int_seven <= 7 for: 7 <= 7 +Condition.tests.cpp:: passed: data.int_seven <= 8 for: 7 <= 8 +Condition.tests.cpp:: passed: data.float_nine_point_one > 9 for: 9.100000381f > 9 +Condition.tests.cpp:: passed: data.float_nine_point_one < 10 for: 9.100000381f < 10 +Condition.tests.cpp:: passed: data.float_nine_point_one < 9.2 for: 9.100000381f < 9.19999999999999929 +Condition.tests.cpp:: passed: data.str_hello <= "hello" for: "hello" <= "hello" +Condition.tests.cpp:: passed: data.str_hello >= "hello" for: "hello" >= "hello" +Condition.tests.cpp:: passed: data.str_hello < "hellp" for: "hello" < "hellp" +Condition.tests.cpp:: passed: data.str_hello < "zebra" for: "hello" < "zebra" +Condition.tests.cpp:: passed: data.str_hello > "hellm" for: "hello" > "hellm" +Condition.tests.cpp:: passed: data.str_hello > "a" for: "hello" > "a" +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 4242248763 (0x) +== +4242248763 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 1867888929 (0x) +== +1867888929 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 1276619030 (0x) +== +1276619030 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 1911218783 (0x) +== +1911218783 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 1827115164 (0x) +== +1827115164 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 1472234645 (0x) +== +1472234645 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 868832940 (0x) +== +868832940 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 570883446 (0x) +== +570883446 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 889299803 (0x) +== +889299803 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 4261393167 (0x) +== +4261393167 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 1472234645 (0x) +== +1472234645 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 868832940 (0x) +== +868832940 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 570883446 (0x) +== +570883446 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 889299803 (0x) +== +889299803 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 4261393167 (0x) +== +4261393167 (0x) +Message.tests.cpp:: failed: explicitly with 1 message: 'Message from section one' +Message.tests.cpp:: failed: explicitly with 1 message: 'Message from section two' +Matchers.tests.cpp:: passed: ( EvilMatcher(), EvilMatcher() ), EvilCommaOperatorUsed +Matchers.tests.cpp:: passed: &EvilMatcher(), EvilAddressOfOperatorUsed +Matchers.tests.cpp:: passed: EvilMatcher() || ( EvilMatcher() && !EvilMatcher() ) +Matchers.tests.cpp:: passed: ( EvilMatcher() && EvilMatcher() ) || !EvilMatcher() +Parse.tests.cpp:: passed: parseUInt( "0" ) == Optional{ 0 } for: {?} == {?} +Parse.tests.cpp:: passed: parseUInt( "100" ) == Optional{ 100 } for: {?} == {?} +Parse.tests.cpp:: passed: parseUInt( "4294967295" ) == Optional{ 4294967295 } for: {?} == {?} +Parse.tests.cpp:: passed: parseUInt( "0x", 16 ) == Optional{ 255 } for: {?} == {?} +Parse.tests.cpp:: passed: !(parseUInt( "" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "!!KJHF*#" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "-1" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "4294967296" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "42949672964294967296429496729642949672964294967296" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "2 4" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "0x", 10 )) for: !{?} +TestSpecParser.tests.cpp:: passed: spec.hasFilters() for: true +TestSpecParser.tests.cpp:: passed: spec.getInvalidSpecs().empty() for: true +TestSpecParser.tests.cpp:: passed: spec.matches( testCase ) for: true +CmdLine.tests.cpp:: passed: cli.parse({ "test", "--shard-count=8" }) for: {?} +CmdLine.tests.cpp:: passed: config.shardCount == 8 for: 8 == 8 +CmdLine.tests.cpp:: passed: !(result) for: !{?} +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring( "Could not parse '-1' as shard count" ) for: "Could not parse '-1' as shard count" contains: "Could not parse '-1' as shard count" +CmdLine.tests.cpp:: passed: !(result) for: !{?} +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring( "Shard count must be positive" ) for: "Shard count must be positive" contains: "Shard count must be positive" +CmdLine.tests.cpp:: passed: cli.parse({ "test", "--shard-index=2" }) for: {?} +CmdLine.tests.cpp:: passed: config.shardIndex == 2 for: 2 == 2 +CmdLine.tests.cpp:: passed: !(result) for: !{?} +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring( "Could not parse '-12' as shard index" ) for: "Could not parse '-12' as shard index" contains: "Could not parse '-12' as shard index" +CmdLine.tests.cpp:: passed: cli.parse({ "test", "--shard-index=0" }) for: {?} +CmdLine.tests.cpp:: passed: config.shardIndex == 0 for: 0 == 0 +TestSpecParser.tests.cpp:: passed: spec.hasFilters() for: true with 1 message: 'tagString := "[tag with spaces]"' +TestSpecParser.tests.cpp:: passed: spec.getInvalidSpecs().empty() for: true with 1 message: 'tagString := "[tag with spaces]"' +TestSpecParser.tests.cpp:: passed: spec.matches( testCase ) for: true with 1 message: 'tagString := "[tag with spaces]"' +TestSpecParser.tests.cpp:: passed: spec.hasFilters() for: true with 1 message: 'tagString := "[I said "good day" sir!]"' +TestSpecParser.tests.cpp:: passed: spec.getInvalidSpecs().empty() for: true with 1 message: 'tagString := "[I said "good day" sir!]"' +TestSpecParser.tests.cpp:: passed: spec.matches( testCase ) for: true with 1 message: 'tagString := "[I said "good day" sir!]"' +CmdLine.tests.cpp:: passed: cli.parse( { "test", "-w", "NoAssertions" } ) for: {?} +CmdLine.tests.cpp:: passed: config.warnings == WarnAbout::NoAssertions for: 1 == 1 +CmdLine.tests.cpp:: passed: !(cli.parse( { "test", "-w", "NoTests" } )) for: !{?} +CmdLine.tests.cpp:: passed: cli.parse( { "test", "--warn", "NoAssertions", "--warn", "UnmatchedTestSpec" } ) for: {?} +CmdLine.tests.cpp:: passed: config.warnings == ( WarnAbout::NoAssertions | WarnAbout::UnmatchedTestSpec ) for: 3 == 3 +Condition.tests.cpp:: passed: p == 0 for: 0 == 0 +Condition.tests.cpp:: passed: p == pNULL for: 0 == 0 +Condition.tests.cpp:: passed: p != 0 for: 0x != 0 +Condition.tests.cpp:: passed: cp != 0 for: 0x != 0 +Condition.tests.cpp:: passed: cpc != 0 for: 0x != 0 +Condition.tests.cpp:: passed: returnsNull() == 0 for: {null string} == 0 +Condition.tests.cpp:: passed: returnsConstNull() == 0 for: {null string} == 0 +Condition.tests.cpp:: passed: 0 != p for: 0 != 0x +ToStringGeneral.tests.cpp:: passed: str1.size() == 3 + 5 for: 8 == 8 +ToStringGeneral.tests.cpp:: passed: str2.size() == 3 + 10 for: 13 == 13 +ToStringGeneral.tests.cpp:: passed: str1.size() == 2 + 5 for: 7 == 7 +ToStringGeneral.tests.cpp:: passed: str2.size() == 2 + 15 for: 17 == 17 +Matchers.tests.cpp:: passed: "foo", Predicate( []( const char* const& ) { return true; } ) for: "foo" matches undescribed predicate +CmdLine.tests.cpp:: passed: result for: {?} +CmdLine.tests.cpp:: passed: config.processName == "" for: "" == "" +CmdLine.tests.cpp:: passed: result for: {?} +CmdLine.tests.cpp:: passed: config.processName == "test" for: "test" == "test" +CmdLine.tests.cpp:: passed: config.shouldDebugBreak == false for: false == false +CmdLine.tests.cpp:: passed: config.abortAfter == -1 for: -1 == -1 +CmdLine.tests.cpp:: passed: config.noThrow == false for: false == false +CmdLine.tests.cpp:: passed: config.reporterSpecifications.empty() for: true +CmdLine.tests.cpp:: passed: !(cfg.hasTestFilters()) for: !false +CmdLine.tests.cpp:: passed: cfg.getReporterSpecs().size() == 1 for: 1 == 1 +CmdLine.tests.cpp:: passed: cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, {}, {}, {} } for: {?} == {?} +CmdLine.tests.cpp:: passed: cfg.getProcessedReporterSpecs().size() == 1 for: 1 == 1 +CmdLine.tests.cpp:: passed: cfg.getProcessedReporterSpecs()[0] == Catch::ProcessedReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} } for: {?} == {?} +CmdLine.tests.cpp:: passed: result for: {?} +CmdLine.tests.cpp:: passed: cfg.hasTestFilters() for: true +CmdLine.tests.cpp:: passed: cfg.testSpec().matches(*fakeTestCase("notIncluded")) == false for: false == false +CmdLine.tests.cpp:: passed: cfg.testSpec().matches(*fakeTestCase("test1")) for: true +CmdLine.tests.cpp:: passed: result for: {?} +CmdLine.tests.cpp:: passed: cfg.hasTestFilters() for: true +CmdLine.tests.cpp:: passed: cfg.testSpec().matches(*fakeTestCase("test1")) == false for: false == false +CmdLine.tests.cpp:: passed: cfg.testSpec().matches(*fakeTestCase("alwaysIncluded")) for: true +CmdLine.tests.cpp:: passed: result for: {?} +CmdLine.tests.cpp:: passed: cfg.hasTestFilters() for: true +CmdLine.tests.cpp:: passed: cfg.testSpec().matches(*fakeTestCase("test1")) == false for: false == false +CmdLine.tests.cpp:: passed: cfg.testSpec().matches(*fakeTestCase("alwaysIncluded")) for: true +CmdLine.tests.cpp:: passed: result for: {?} with 1 message: 'result.errorMessage() := ""' +CmdLine.tests.cpp:: passed: config.reporterSpecifications == vec_Specs{ { "console", {}, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""' +CmdLine.tests.cpp:: passed: result for: {?} with 1 message: 'result.errorMessage() := ""' +CmdLine.tests.cpp:: passed: config.reporterSpecifications == vec_Specs{ { "xml", {}, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""' +CmdLine.tests.cpp:: passed: result for: {?} with 1 message: 'result.errorMessage() := ""' +CmdLine.tests.cpp:: passed: config.reporterSpecifications == vec_Specs{ { "junit", {}, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""' +CmdLine.tests.cpp:: passed: !result for: true +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring("Unrecognized reporter") for: "Unrecognized reporter, 'unsupported'. Check available with --list-reporters" contains: "Unrecognized reporter" +CmdLine.tests.cpp:: passed: result for: {?} with 1 message: 'result.errorMessage() := ""' +CmdLine.tests.cpp:: passed: config.reporterSpecifications == vec_Specs{ { "console", "out.txt"s, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""' +CmdLine.tests.cpp:: passed: result for: {?} with 1 message: 'result.errorMessage() := ""' +CmdLine.tests.cpp:: passed: config.reporterSpecifications == vec_Specs{ { "console", "C:\\Temp\\out.txt"s, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""' +CmdLine.tests.cpp:: passed: cli.parse({ "test", "-r", "xml::out=output.xml", "-r", "junit::out=output-junit.xml" }) for: {?} +CmdLine.tests.cpp:: passed: config.reporterSpecifications == vec_Specs{ { "xml", "output.xml"s, {}, {} }, { "junit", "output-junit.xml"s, {}, {} } } for: { {?}, {?} } == { {?}, {?} } +CmdLine.tests.cpp:: passed: cli.parse({ "test", "-r", "xml::out=output.xml", "-r", "console" }) for: {?} +CmdLine.tests.cpp:: passed: config.reporterSpecifications == vec_Specs{ { "xml", "output.xml"s, {}, {} }, { "console", {}, {}, {} } } for: { {?}, {?} } == { {?}, {?} } +CmdLine.tests.cpp:: passed: !result for: true +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring("Only one reporter may have unspecified output file.") for: "Only one reporter may have unspecified output file." contains: "Only one reporter may have unspecified output file." +CmdLine.tests.cpp:: passed: cli.parse({"test", "-b"}) for: {?} +CmdLine.tests.cpp:: passed: config.shouldDebugBreak == true for: true == true +CmdLine.tests.cpp:: passed: cli.parse({"test", "--break"}) for: {?} +CmdLine.tests.cpp:: passed: config.shouldDebugBreak for: true +CmdLine.tests.cpp:: passed: cli.parse({"test", "-a"}) for: {?} +CmdLine.tests.cpp:: passed: config.abortAfter == 1 for: 1 == 1 +CmdLine.tests.cpp:: passed: cli.parse({"test", "-x", "2"}) for: {?} +CmdLine.tests.cpp:: passed: config.abortAfter == 2 for: 2 == 2 +CmdLine.tests.cpp:: passed: !result for: true +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring("convert") && ContainsSubstring("oops") for: "Unable to convert 'oops' to destination type" ( contains: "convert" and contains: "oops" ) +CmdLine.tests.cpp:: passed: cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?} +CmdLine.tests.cpp:: passed: config.waitForKeypress == std::get<1>(input) for: 0 == 0 +CmdLine.tests.cpp:: passed: cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?} +CmdLine.tests.cpp:: passed: config.waitForKeypress == std::get<1>(input) for: 1 == 1 +CmdLine.tests.cpp:: passed: cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?} +CmdLine.tests.cpp:: passed: config.waitForKeypress == std::get<1>(input) for: 2 == 2 +CmdLine.tests.cpp:: passed: cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?} +CmdLine.tests.cpp:: passed: config.waitForKeypress == std::get<1>(input) for: 3 == 3 +CmdLine.tests.cpp:: passed: !result for: true +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring("never") && ContainsSubstring("both") for: "keypress argument must be one of: never, start, exit or both. 'sometimes' not recognised" ( contains: "never" and contains: "both" ) +CmdLine.tests.cpp:: passed: cli.parse({"test", "-e"}) for: {?} +CmdLine.tests.cpp:: passed: config.noThrow for: true +CmdLine.tests.cpp:: passed: cli.parse({"test", "--nothrow"}) for: {?} +CmdLine.tests.cpp:: passed: config.noThrow for: true +CmdLine.tests.cpp:: passed: cli.parse({"test", "-o", "filename.ext"}) for: {?} +CmdLine.tests.cpp:: passed: config.defaultOutputFilename == "filename.ext" for: "filename.ext" == "filename.ext" +CmdLine.tests.cpp:: passed: cli.parse({"test", "--out", "filename.ext"}) for: {?} +CmdLine.tests.cpp:: passed: config.defaultOutputFilename == "filename.ext" for: "filename.ext" == "filename.ext" +CmdLine.tests.cpp:: passed: cli.parse({"test", "-abe"}) for: {?} +CmdLine.tests.cpp:: passed: config.abortAfter == 1 for: 1 == 1 +CmdLine.tests.cpp:: passed: config.shouldDebugBreak for: true +CmdLine.tests.cpp:: passed: config.noThrow == true for: true == true +CmdLine.tests.cpp:: passed: cli.parse({"test"}) for: {?} +CmdLine.tests.cpp:: passed: config.defaultColourMode == ColourMode::PlatformDefault for: 0 == 0 +CmdLine.tests.cpp:: passed: cli.parse( { "test", "--colour-mode", "default" } ) for: {?} +CmdLine.tests.cpp:: passed: config.defaultColourMode == ColourMode::PlatformDefault for: 0 == 0 +CmdLine.tests.cpp:: passed: cli.parse({"test", "--colour-mode", "ansi"}) for: {?} +CmdLine.tests.cpp:: passed: config.defaultColourMode == ColourMode::ANSI for: 1 == 1 +CmdLine.tests.cpp:: passed: cli.parse({"test", "--colour-mode", "none"}) for: {?} +CmdLine.tests.cpp:: passed: config.defaultColourMode == ColourMode::None for: 3 == 3 +CmdLine.tests.cpp:: passed: !result for: true +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring( "colour mode must be one of" ) for: "colour mode must be one of: default, ansi, win32, or none. 'wrong' is not recognised" contains: "colour mode must be one of" +CmdLine.tests.cpp:: passed: cli.parse({ "test", "--benchmark-samples=200" }) for: {?} +CmdLine.tests.cpp:: passed: config.benchmarkSamples == 200 for: 200 == 200 +CmdLine.tests.cpp:: passed: cli.parse({ "test", "--benchmark-resamples=20000" }) for: {?} +CmdLine.tests.cpp:: passed: config.benchmarkResamples == 20000 for: 20000 (0x) == 20000 (0x) +CmdLine.tests.cpp:: passed: cli.parse({ "test", "--benchmark-confidence-interval=0.99" }) for: {?} +CmdLine.tests.cpp:: passed: config.benchmarkConfidenceInterval == Catch::Approx(0.99) for: 0.98999999999999999 +== +Approx( 0.98999999999999999 ) +CmdLine.tests.cpp:: passed: cli.parse({ "test", "--benchmark-no-analysis" }) for: {?} +CmdLine.tests.cpp:: passed: config.benchmarkNoAnalysis for: true +CmdLine.tests.cpp:: passed: cli.parse({ "test", "--benchmark-warmup-time=10" }) for: {?} +CmdLine.tests.cpp:: passed: config.benchmarkWarmupTime == 10 for: 10 == 10 +Misc.tests.cpp:: passed: std::tuple_size::value >= 1 for: 3 >= 1 +Misc.tests.cpp:: passed: std::tuple_size::value >= 1 for: 2 >= 1 +Misc.tests.cpp:: passed: std::tuple_size::value >= 1 for: 1 >= 1 +RandomNumberGeneration.tests.cpp:: passed: Catch::generateRandomSeed(method) +RandomNumberGeneration.tests.cpp:: passed: Catch::generateRandomSeed(method) +RandomNumberGeneration.tests.cpp:: passed: Catch::generateRandomSeed(method) +RandomNumberGeneration.tests.cpp:: passed: Catch::generateRandomSeed(static_cast(77)) +ToString.tests.cpp:: passed: Catch::Detail::stringify(UsesSentinel{}) == "{ }" for: "{ }" == "{ }" +Decomposition.tests.cpp:: failed: truthy(false) for: Hey, its truthy! +Matchers.tests.cpp:: failed: testStringForMatching(), Matches( "this STRING contains 'abc' as a substring" ) for: "this string contains 'abc' as a substring" matches "this STRING contains 'abc' as a substring" case sensitively +Matchers.tests.cpp:: failed: testStringForMatching(), Matches( "contains 'abc' as a substring" ) for: "this string contains 'abc' as a substring" matches "contains 'abc' as a substring" case sensitively +Matchers.tests.cpp:: failed: testStringForMatching(), Matches( "this string contains 'abc' as a" ) for: "this string contains 'abc' as a substring" matches "this string contains 'abc' as a" case sensitively +Reporters.tests.cpp:: passed: registry.registerReporter( "with::doublecolons", Catch::Detail::make_unique() ), "'::' is not allowed in reporter name: 'with::doublecolons'" for: "'::' is not allowed in reporter name: 'with::doublecolons'" equals: "'::' is not allowed in reporter name: 'with::doublecolons'" +Matchers.tests.cpp:: passed: actual, !UnorderedEquals( expected ) for: { 'a', 'b' } not UnorderedEquals: { 'c', 'b' } +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fakeTag"s) for: "All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" with 1 message: 'Tested reporter: Automake' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" with 1 message: 'Tested reporter: Automake' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: Automake' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fakeTag"s) for: "All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" with 1 message: 'Tested reporter: compact' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" with 1 message: 'Tested reporter: compact' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: compact' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fakeTag"s) for: "All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" with 1 message: 'Tested reporter: console' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" with 1 message: 'Tested reporter: console' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: console' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fakeTag"s) for: "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "" + }, + "listings": { + "tags": [ + { + "aliases": [ + "fakeTag" + ], + "count": 1 + } + ]" contains: "fakeTag" with 1 message: 'Tested reporter: JSON' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fake reporter"s) for: "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "" + }, + "listings": { + "reporters": [ + { + "name": "fake reporter", + "description": "fake description" + } + ]" contains: "fake reporter" with 1 message: 'Tested reporter: JSON' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "" + }, + "listings": { + "tests": [ + { + "name": "fake test name", + "class-name": "", + "tags": [ + "fakeTestTag" + ], + "source-location": { + "filename": "fake-file.cpp", + "line": 123456789 + } + } + ]" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: JSON' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fakeTag"s) for: " +All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" with 1 message: 'Tested reporter: JUnit' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fake reporter"s) for: " +Available reporters: + fake reporter: fake description + +" contains: "fake reporter" with 1 message: 'Tested reporter: JUnit' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: " +All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: JUnit' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fakeTag"s) for: " +All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" with 1 message: 'Tested reporter: SonarQube' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fake reporter"s) for: " +Available reporters: + fake reporter: fake description + +" contains: "fake reporter" with 1 message: 'Tested reporter: SonarQube' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: " +All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: SonarQube' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fakeTag"s) for: "All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" with 1 message: 'Tested reporter: TAP' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" with 1 message: 'Tested reporter: TAP' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: TAP' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fakeTag"s) for: "All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" with 1 message: 'Tested reporter: TeamCity' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" with 1 message: 'Tested reporter: TeamCity' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: TeamCity' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fakeTag"s) for: " + + + 1 + + fakeTag + + +" contains: "fakeTag" with 1 message: 'Tested reporter: XML' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fake reporter"s) for: " + + + fake reporter + fake description + +" contains: "fake reporter" with 1 message: 'Tested reporter: XML' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: " + + + fake test name + + [fakeTestTag] + + fake-file.cpp + 123456789 + + +" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: XML' +Reporters.tests.cpp:: passed: +Message.tests.cpp:: passed: with 1 message: 'this is a success' +Message.tests.cpp:: passed: +BDD.tests.cpp:: passed: before == 0 for: 0 == 0 +BDD.tests.cpp:: passed: after > before for: 1 > 0 +BDD.tests.cpp:: passed: itDoesThis() for: true +BDD.tests.cpp:: passed: itDoesThat() for: true +BDD.tests.cpp:: passed: with 1 message: 'boo!' +BDD.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +BDD.tests.cpp:: passed: v.size() == 10 for: 10 == 10 +BDD.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +BDD.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +BDD.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +BDD.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +BDD.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +BDD.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +A string sent directly to stdout +A string sent directly to stderr +A string sent to stderr via clog +Approx.tests.cpp:: passed: d == Approx( 1.23 ) for: 1.22999999999999998 +== +Approx( 1.22999999999999998 ) +Approx.tests.cpp:: passed: d != Approx( 1.22 ) for: 1.22999999999999998 +!= +Approx( 1.21999999999999997 ) +Approx.tests.cpp:: passed: d != Approx( 1.24 ) for: 1.22999999999999998 +!= +Approx( 1.23999999999999999 ) +Approx.tests.cpp:: passed: d == 1.23_a for: 1.22999999999999998 +== +Approx( 1.22999999999999998 ) +Approx.tests.cpp:: passed: d != 1.22_a for: 1.22999999999999998 +!= +Approx( 1.21999999999999997 ) +Approx.tests.cpp:: passed: Approx( d ) == 1.23 for: Approx( 1.22999999999999998 ) +== +1.22999999999999998 +Approx.tests.cpp:: passed: Approx( d ) != 1.22 for: Approx( 1.22999999999999998 ) +!= +1.21999999999999997 +Approx.tests.cpp:: passed: Approx( d ) != 1.24 for: Approx( 1.22999999999999998 ) +!= +1.23999999999999999 +Message from section one +Message from section two +Matchers.tests.cpp:: failed: testStringForMatching(), StartsWith( "This String" ) for: "this string contains 'abc' as a substring" starts with: "This String" +Matchers.tests.cpp:: failed: testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" starts with: "string" (case insensitive) +ToStringGeneral.tests.cpp:: passed: Catch::Detail::stringify(singular) == "{ 1 }" for: "{ 1 }" == "{ 1 }" +ToStringGeneral.tests.cpp:: passed: Catch::Detail::stringify(arr) == "{ 3, 2, 1 }" for: "{ 3, 2, 1 }" == "{ 3, 2, 1 }" +ToStringGeneral.tests.cpp:: passed: Catch::Detail::stringify(arr) == R"({ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } })" for: "{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }" +== +"{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }" +Matchers.tests.cpp:: passed: testStringForMatching(), ContainsSubstring( "string" ) for: "this string contains 'abc' as a substring" contains: "string" +Matchers.tests.cpp:: passed: testStringForMatching(), ContainsSubstring( "string", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "string" (case insensitive) +Matchers.tests.cpp:: passed: testStringForMatching(), ContainsSubstring( "abc" ) for: "this string contains 'abc' as a substring" contains: "abc" +Matchers.tests.cpp:: passed: testStringForMatching(), ContainsSubstring( "aBC", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "abc" (case insensitive) +Matchers.tests.cpp:: passed: testStringForMatching(), StartsWith( "this" ) for: "this string contains 'abc' as a substring" starts with: "this" +Matchers.tests.cpp:: passed: testStringForMatching(), StartsWith( "THIS", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" starts with: "this" (case insensitive) +Matchers.tests.cpp:: passed: testStringForMatching(), EndsWith( "substring" ) for: "this string contains 'abc' as a substring" ends with: "substring" +Matchers.tests.cpp:: passed: testStringForMatching(), EndsWith( " SuBsTrInG", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" ends with: " substring" (case insensitive) +String.tests.cpp:: passed: empty.empty() for: true +String.tests.cpp:: passed: empty.size() == 0 for: 0 == 0 +String.tests.cpp:: passed: std::strcmp( empty.data(), "" ) == 0 for: 0 == 0 +String.tests.cpp:: passed: s.empty() == false for: false == false +String.tests.cpp:: passed: s.size() == 5 for: 5 == 5 +String.tests.cpp:: passed: std::strcmp( rawChars, "hello" ) == 0 for: 0 == 0 +String.tests.cpp:: passed: s.data() == rawChars for: "hello" == "hello" +String.tests.cpp:: passed: original == "original" +String.tests.cpp:: passed: original.data() +String.tests.cpp:: passed: original.begin() == copy.begin() for: "original string" == "original string" +String.tests.cpp:: passed: original.begin() == copy.begin() for: "original string" == "original string" +String.tests.cpp:: passed: ss.empty() == false for: false == false +String.tests.cpp:: passed: ss.size() == 5 for: 5 == 5 +String.tests.cpp:: passed: std::strncmp( ss.data(), "hello", 5 ) == 0 for: 0 == 0 +String.tests.cpp:: passed: ss == "hello" for: hello == "hello" +String.tests.cpp:: passed: ss.size() == 6 for: 6 == 6 +String.tests.cpp:: passed: std::strcmp( ss.data(), "world!" ) == 0 for: 0 == 0 +String.tests.cpp:: passed: s.data() == s2.data() for: "hello world!" == "hello world!" +String.tests.cpp:: passed: s.data() == ss.data() for: "hello world!" == "hello world!" +String.tests.cpp:: passed: s.substr(s.size() + 1, 123).empty() for: true +String.tests.cpp:: passed: std::strcmp(ss.data(), "world!") == 0 for: 0 == 0 +String.tests.cpp:: passed: s.substr(1'000'000, 1).empty() for: true +String.tests.cpp:: passed: reinterpret_cast(buffer1) != reinterpret_cast(buffer2) for: "Hello" != "Hello" +String.tests.cpp:: passed: left == right for: Hello == Hello +String.tests.cpp:: passed: left != left.substr(0, 3) for: Hello != Hel +String.tests.cpp:: passed: sr == "a standard string" for: a standard string == "a standard string" +String.tests.cpp:: passed: sr.size() == stdStr.size() for: 17 == 17 +String.tests.cpp:: passed: sr == "a standard string" for: a standard string == "a standard string" +String.tests.cpp:: passed: sr.size() == stdStr.size() for: 17 == 17 +String.tests.cpp:: passed: sr == "a standard string" for: a standard string == "a standard string" +String.tests.cpp:: passed: sr.size() == stdStr.size() for: 17 == 17 +String.tests.cpp:: passed: stdStr == "a stringref" for: "a stringref" == "a stringref" +String.tests.cpp:: passed: stdStr.size() == sr.size() for: 11 == 11 +String.tests.cpp:: passed: stdStr == "a stringref" for: "a stringref" == "a stringref" +String.tests.cpp:: passed: stdStr.size() == sr.size() for: 11 == 11 +String.tests.cpp:: passed: lhs == "some string += the stringref contents" for: "some string += the stringref contents" +== +"some string += the stringref contents" +String.tests.cpp:: passed: together == "abrakadabra" for: "abrakadabra" == "abrakadabra" +String.tests.cpp:: passed: with 1 message: 'empty.size() == 0' +String.tests.cpp:: passed: with 1 message: 'empty.begin() == empty.end()' +String.tests.cpp:: passed: with 1 message: 'stringref.size() == 3' +String.tests.cpp:: passed: with 1 message: 'stringref.data() == abc' +String.tests.cpp:: passed: with 1 message: 'stringref.begin() == abc' +String.tests.cpp:: passed: with 1 message: 'stringref.begin() != stringref.end()' +String.tests.cpp:: passed: with 1 message: 'stringref.substr(10, 0).empty()' +String.tests.cpp:: passed: with 1 message: 'stringref.substr(2, 1).data() == abc + 2' +String.tests.cpp:: passed: with 1 message: 'stringref[1] == 'b'' +String.tests.cpp:: passed: with 1 message: 'shortened.size() == 2' +String.tests.cpp:: passed: with 1 message: 'shortened.data() == abc' +String.tests.cpp:: passed: with 1 message: 'shortened.begin() != shortened.end()' +String.tests.cpp:: passed: with 1 message: '!(sr1.empty())' +String.tests.cpp:: passed: with 1 message: 'sr1.size() == 3' +String.tests.cpp:: passed: with 1 message: 'sr2.empty()' +String.tests.cpp:: passed: with 1 message: 'sr2.size() == 0' +ToString.tests.cpp:: passed: ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +ToString.tests.cpp:: passed: ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +ToString.tests.cpp:: passed: ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +ToString.tests.cpp:: passed: ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +ToString.tests.cpp:: passed: ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +ToString.tests.cpp:: passed: ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +ToStringChrono.tests.cpp:: passed: minute == seconds for: 1 m == 60 s +ToStringChrono.tests.cpp:: passed: hour != seconds for: 1 h != 60 s +ToStringChrono.tests.cpp:: passed: micro != milli for: 1 us != 1 ms +ToStringChrono.tests.cpp:: passed: nano != micro for: 1 ns != 1 us +ToStringChrono.tests.cpp:: passed: half_minute != femto_second for: 1 [30/1]s != 1 fs +ToStringChrono.tests.cpp:: passed: pico_second != atto_second for: 1 ps != 1 as +ToStringChrono.tests.cpp:: passed: now != later for: {iso8601-timestamp} +!= +{iso8601-timestamp} +Misc.tests.cpp:: failed: s1 == s2 for: "if ($b == 10) { + $a = 20; +}" +== +"if ($b == 10) { + $a = 20; +} +" +Tag.tests.cpp:: passed: what, ContainsSubstring( "[@zzz]" ) for: "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "[@zzz]" +Tag.tests.cpp:: passed: what, ContainsSubstring( "file" ) for: "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "file" +Tag.tests.cpp:: passed: what, ContainsSubstring( "2" ) for: "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "2" +Tag.tests.cpp:: passed: what, ContainsSubstring( "10" ) for: "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "10" +Tag.tests.cpp:: passed: registry.add( "[no ampersat]", "", Catch::SourceLineInfo( "file", 3 ) ) +Tag.tests.cpp:: passed: registry.add( "[the @ is not at the start]", "", Catch::SourceLineInfo( "file", 3 ) ) +Tag.tests.cpp:: passed: registry.add( "@no square bracket at start]", "", Catch::SourceLineInfo( "file", 3 ) ) +Tag.tests.cpp:: passed: registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) ) +Tag.tests.cpp:: passed: testCase.tags.size() == 2 for: 2 == 2 +Tag.tests.cpp:: passed: testCase.tags, VectorContains( Tag( "tag with spaces" ) ) && VectorContains( Tag( "I said \"good day\" sir!"_catch_sr ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} ) +Class.tests.cpp:: passed: Template_Fixture::m_a == 1 for: 1 == 1 +Class.tests.cpp:: passed: Template_Fixture::m_a == 1 for: 1 == 1 +Class.tests.cpp:: passed: Template_Fixture::m_a == 1 for: 1.0 == 1 +Misc.tests.cpp:: passed: std::is_default_constructible::value for: true +Misc.tests.cpp:: passed: std::is_default_constructible::value for: true +Misc.tests.cpp:: passed: std::is_trivially_copyable::value for: true +Misc.tests.cpp:: passed: std::is_trivially_copyable::value for: true +Misc.tests.cpp:: passed: std::is_arithmetic::value for: true +Misc.tests.cpp:: passed: std::is_arithmetic::value for: true +Misc.tests.cpp:: passed: std::is_arithmetic::value for: true +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 10 for: 10 == 10 +Misc.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.capacity() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 10 for: 10 == 10 +Misc.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.capacity() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 10 for: 10 == 10 +Misc.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.capacity() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 10 for: 10 == 10 +Misc.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.capacity() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == V for: 6 == 6 +Misc.tests.cpp:: passed: v.capacity() >= V for: 6 >= 6 +Misc.tests.cpp:: passed: v.size() == 2 * V for: 12 == 12 +Misc.tests.cpp:: passed: v.capacity() >= 2 * V for: 12 >= 12 +Misc.tests.cpp:: passed: v.size() == V for: 6 == 6 +Misc.tests.cpp:: passed: v.capacity() >= V for: 6 >= 6 +Misc.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.capacity() >= V for: 6 >= 6 +Misc.tests.cpp:: passed: v.capacity() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.size() == V for: 6 == 6 +Misc.tests.cpp:: passed: v.capacity() >= V for: 6 >= 6 +Misc.tests.cpp:: passed: v.size() == V for: 6 == 6 +Misc.tests.cpp:: passed: v.capacity() >= 2 * V for: 12 >= 12 +Misc.tests.cpp:: passed: v.size() == V for: 6 == 6 +Misc.tests.cpp:: passed: v.capacity() >= V for: 6 >= 6 +Misc.tests.cpp:: passed: v.size() == V for: 6 == 6 +Misc.tests.cpp:: passed: v.capacity() >= V for: 6 >= 6 +Misc.tests.cpp:: passed: v.size() == V for: 4 == 4 +Misc.tests.cpp:: passed: v.capacity() >= V for: 4 >= 4 +Misc.tests.cpp:: passed: v.size() == 2 * V for: 8 == 8 +Misc.tests.cpp:: passed: v.capacity() >= 2 * V for: 8 >= 8 +Misc.tests.cpp:: passed: v.size() == V for: 4 == 4 +Misc.tests.cpp:: passed: v.capacity() >= V for: 4 >= 4 +Misc.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.capacity() >= V for: 4 >= 4 +Misc.tests.cpp:: passed: v.capacity() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.size() == V for: 4 == 4 +Misc.tests.cpp:: passed: v.capacity() >= V for: 4 >= 4 +Misc.tests.cpp:: passed: v.size() == V for: 4 == 4 +Misc.tests.cpp:: passed: v.capacity() >= 2 * V for: 8 >= 8 +Misc.tests.cpp:: passed: v.size() == V for: 4 == 4 +Misc.tests.cpp:: passed: v.capacity() >= V for: 4 >= 4 +Misc.tests.cpp:: passed: v.size() == V for: 4 == 4 +Misc.tests.cpp:: passed: v.capacity() >= V for: 4 >= 4 +Misc.tests.cpp:: passed: v.size() == V for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= V for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 2 * V for: 10 == 10 +Misc.tests.cpp:: passed: v.capacity() >= 2 * V for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == V for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= V for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.capacity() >= V for: 5 >= 5 +Misc.tests.cpp:: passed: v.capacity() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.size() == V for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= V for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == V for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 2 * V for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == V for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= V for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == V for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= V for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == V for: 15 == 15 +Misc.tests.cpp:: passed: v.capacity() >= V for: 15 >= 15 +Misc.tests.cpp:: passed: v.size() == 2 * V for: 30 == 30 +Misc.tests.cpp:: passed: v.capacity() >= 2 * V for: 30 >= 30 +Misc.tests.cpp:: passed: v.size() == V for: 15 == 15 +Misc.tests.cpp:: passed: v.capacity() >= V for: 15 >= 15 +Misc.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.capacity() >= V for: 15 >= 15 +Misc.tests.cpp:: passed: v.capacity() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.size() == V for: 15 == 15 +Misc.tests.cpp:: passed: v.capacity() >= V for: 15 >= 15 +Misc.tests.cpp:: passed: v.size() == V for: 15 == 15 +Misc.tests.cpp:: passed: v.capacity() >= 2 * V for: 30 >= 30 +Misc.tests.cpp:: passed: v.size() == V for: 15 == 15 +Misc.tests.cpp:: passed: v.capacity() >= V for: 15 >= 15 +Misc.tests.cpp:: passed: v.size() == V for: 15 == 15 +Misc.tests.cpp:: passed: v.capacity() >= V for: 15 >= 15 +Tag.tests.cpp:: passed: testCase.tags.size() == 1 for: 1 == 1 +Tag.tests.cpp:: passed: testCase.tags[0] == Tag( "tag1" ) for: {?} == {?} +VariadicMacros.tests.cpp:: passed: with 1 message: 'no assertions' +Tricky.tests.cpp:: passed: 0x == bit30and31 for: 3221225472 (0x) == 3221225472 +CmdLine.tests.cpp:: passed: +Misc.tests.cpp:: passed: true +Misc.tests.cpp:: passed: +Misc.tests.cpp:: failed - but was ok: false +Misc.tests.cpp:: passed: true +Misc.tests.cpp:: failed - but was ok: false +Misc.tests.cpp:: passed: +Misc.tests.cpp:: passed: true +Misc.tests.cpp:: failed: explicitly +Misc.tests.cpp:: failed - but was ok: false +Misc.tests.cpp:: failed: explicitly +Misc.tests.cpp:: passed: true +Misc.tests.cpp:: failed: unexpected exception with message: 'Uncaught exception should fail!'; expression was: {Unknown expression after the reported line} +Misc.tests.cpp:: failed - but was ok: false +Misc.tests.cpp:: failed: unexpected exception with message: 'Uncaught exception should fail!'; expression was: {Unknown expression after the reported line} +Message.tests.cpp:: failed - but was ok: 1 == 2 +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("[fakeTag]"s) for: "All available tags: + 1 [fakeTag] +1 tag + +" contains: "[fakeTag]" +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fake reporter"s ) && ContainsSubstring( "fake description"s ) for: "Available reporters: + fake reporter: fake description + +" ( contains: "fake reporter" and contains: "fake description" ) +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fakeListener"s ) && ContainsSubstring( "fake description"s ) for: "Registered listeners: + fakeListener: fake description + +" ( contains: "fakeListener" and contains: "fake description" ) +Misc.tests.cpp:: passed: with 1 message: 'oops!' +Exception.tests.cpp:: failed: unexpected exception with message: 'For some reason someone is throwing a string literal!' +PartTracker.tests.cpp:: passed: testCase.isOpen() for: true +PartTracker.tests.cpp:: passed: s1.isOpen() for: true +PartTracker.tests.cpp:: passed: s1.isSuccessfullyCompleted() for: true +PartTracker.tests.cpp:: passed: testCase.isComplete() == false for: false == false +PartTracker.tests.cpp:: passed: ctx.completedCycle() for: true +PartTracker.tests.cpp:: passed: testCase.isSuccessfullyCompleted() for: true +PartTracker.tests.cpp:: passed: testCase.isOpen() for: true +PartTracker.tests.cpp:: passed: s1.isOpen() for: true +PartTracker.tests.cpp:: passed: s1.isComplete() for: true +PartTracker.tests.cpp:: passed: s1.isSuccessfullyCompleted() == false for: false == false +PartTracker.tests.cpp:: passed: testCase.isComplete() == false for: false == false +PartTracker.tests.cpp:: passed: ctx.completedCycle() for: true +PartTracker.tests.cpp:: passed: testCase.isSuccessfullyCompleted() == false for: false == false +PartTracker.tests.cpp:: passed: testCase2.isOpen() for: true +PartTracker.tests.cpp:: passed: s1b.isOpen() == false for: false == false +PartTracker.tests.cpp:: passed: ctx.completedCycle() for: true +PartTracker.tests.cpp:: passed: testCase.isComplete() for: true +PartTracker.tests.cpp:: passed: testCase.isSuccessfullyCompleted() for: true +PartTracker.tests.cpp:: passed: testCase.isOpen() for: true +PartTracker.tests.cpp:: passed: s1.isOpen() for: true +PartTracker.tests.cpp:: passed: s1.isComplete() for: true +PartTracker.tests.cpp:: passed: s1.isSuccessfullyCompleted() == false for: false == false +PartTracker.tests.cpp:: passed: testCase.isComplete() == false for: false == false +PartTracker.tests.cpp:: passed: ctx.completedCycle() for: true +PartTracker.tests.cpp:: passed: testCase.isSuccessfullyCompleted() == false for: false == false +PartTracker.tests.cpp:: passed: testCase2.isOpen() for: true +PartTracker.tests.cpp:: passed: s1b.isOpen() == false for: false == false +PartTracker.tests.cpp:: passed: s2.isOpen() for: true +PartTracker.tests.cpp:: passed: ctx.completedCycle() for: true +PartTracker.tests.cpp:: passed: testCase.isComplete() for: true +PartTracker.tests.cpp:: passed: testCase.isSuccessfullyCompleted() for: true +PartTracker.tests.cpp:: passed: testCase.isOpen() for: true +PartTracker.tests.cpp:: passed: s1.isOpen() for: true +PartTracker.tests.cpp:: passed: s2.isOpen() == false for: false == false +PartTracker.tests.cpp:: passed: testCase.isComplete() == false for: false == false +PartTracker.tests.cpp:: passed: testCase2.isOpen() for: true +PartTracker.tests.cpp:: passed: s1b.isOpen() == false for: false == false +PartTracker.tests.cpp:: passed: s2b.isOpen() for: true +PartTracker.tests.cpp:: passed: ctx.completedCycle() == false for: false == false +PartTracker.tests.cpp:: passed: ctx.completedCycle() for: true +PartTracker.tests.cpp:: passed: s2b.isSuccessfullyCompleted() for: true +PartTracker.tests.cpp:: passed: testCase2.isComplete() == false for: false == false +PartTracker.tests.cpp:: passed: testCase2.isSuccessfullyCompleted() for: true +PartTracker.tests.cpp:: passed: testCase.isOpen() for: true +PartTracker.tests.cpp:: passed: s1.isOpen() for: true +PartTracker.tests.cpp:: passed: s2.isOpen() == false for: false == false +PartTracker.tests.cpp:: passed: testCase.isComplete() == false for: false == false +PartTracker.tests.cpp:: passed: testCase2.isOpen() for: true +PartTracker.tests.cpp:: passed: s1b.isOpen() == false for: false == false +PartTracker.tests.cpp:: passed: s2b.isOpen() for: true +PartTracker.tests.cpp:: passed: ctx.completedCycle() == false for: false == false +PartTracker.tests.cpp:: passed: ctx.completedCycle() for: true +PartTracker.tests.cpp:: passed: s2b.isComplete() for: true +PartTracker.tests.cpp:: passed: s2b.isSuccessfullyCompleted() == false for: false == false +PartTracker.tests.cpp:: passed: testCase2.isSuccessfullyCompleted() == false for: false == false +PartTracker.tests.cpp:: passed: testCase3.isOpen() for: true +PartTracker.tests.cpp:: passed: s1c.isOpen() == false for: false == false +PartTracker.tests.cpp:: passed: s2c.isOpen() == false for: false == false +PartTracker.tests.cpp:: passed: testCase3.isSuccessfullyCompleted() for: true +PartTracker.tests.cpp:: passed: testCase.isOpen() for: true +PartTracker.tests.cpp:: passed: s1.isOpen() for: true +PartTracker.tests.cpp:: passed: s2.isOpen() for: true +PartTracker.tests.cpp:: passed: s2.isComplete() for: true +PartTracker.tests.cpp:: passed: s1.isComplete() == false for: false == false +PartTracker.tests.cpp:: passed: s1.isComplete() for: true +PartTracker.tests.cpp:: passed: testCase.isComplete() == false for: false == false +PartTracker.tests.cpp:: passed: testCase.isComplete() for: true +StringManip.tests.cpp:: passed: trim(std::string(no_whitespace)) == no_whitespace for: "There is no extra whitespace here" +== +"There is no extra whitespace here" +StringManip.tests.cpp:: passed: trim(std::string(leading_whitespace)) == no_whitespace for: "There is no extra whitespace here" +== +"There is no extra whitespace here" +StringManip.tests.cpp:: passed: trim(std::string(trailing_whitespace)) == no_whitespace for: "There is no extra whitespace here" +== +"There is no extra whitespace here" +StringManip.tests.cpp:: passed: trim(std::string(whitespace_at_both_ends)) == no_whitespace for: "There is no extra whitespace here" +== +"There is no extra whitespace here" +StringManip.tests.cpp:: passed: trim(StringRef(no_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here +== +There is no extra whitespace here +StringManip.tests.cpp:: passed: trim(StringRef(leading_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here +== +There is no extra whitespace here +StringManip.tests.cpp:: passed: trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here +== +There is no extra whitespace here +StringManip.tests.cpp:: passed: trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace) for: There is no extra whitespace here +== +There is no extra whitespace here +MatchersRanges.tests.cpp:: passed: array_int_a, RangeEquals( c_array ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:: passed: array_int_a, UnorderedRangeEquals( c_array ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:: passed: array_int_3, !RangeEquals( array_int_4 ) for: { 1, 2, 3 } not elements are { 1, 2, 3, 4 } +MatchersRanges.tests.cpp:: passed: array_int_3, !UnorderedRangeEquals( array_int_4 ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } +MatchersRanges.tests.cpp:: passed: array_int_a, RangeEquals( vector_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:: passed: array_int_a, UnorderedRangeEquals( vector_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:: passed: with 1 message: 'ContainerIsRandomAccess( array_int_a ) != ContainerIsRandomAccess( list_char_a )' +MatchersRanges.tests.cpp:: passed: array_int_a, RangeEquals( list_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:: passed: array_int_a, UnorderedRangeEquals( list_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:: passed: vector_int_a, RangeEquals( vector_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:: passed: vector_int_a, UnorderedRangeEquals( vector_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:: passed: vector_int_a, !RangeEquals( vector_char_b ) for: { 1, 2, 3 } not elements are { 1, 2, 2 } +MatchersRanges.tests.cpp:: passed: vector_int_a, !UnorderedRangeEquals( vector_char_b ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 2 } +MatchersRanges.tests.cpp:: passed: a, !RangeEquals( b ) for: { 1, 2, 3 } not elements are { 3, 2, 1 } +MatchersRanges.tests.cpp:: passed: a, UnorderedRangeEquals( b ) for: { 1, 2, 3 } unordered elements are { 3, 2, 1 } +MatchersRanges.tests.cpp:: passed: vector_a, RangeEquals( array_a_plus_1, close_enough ) for: { 1, 2, 3 } elements are { 2, 3, 4 } +MatchersRanges.tests.cpp:: passed: vector_a, UnorderedRangeEquals( array_a_plus_1, close_enough ) for: { 1, 2, 3 } unordered elements are { 2, 3, 4 } +Exception.tests.cpp:: failed: unexpected exception with message: '3.14000000000000012' +UniquePtr.tests.cpp:: passed: bptr->i == 3 for: 3 == 3 +UniquePtr.tests.cpp:: passed: bptr->i == 3 for: 3 == 3 +MatchersRanges.tests.cpp:: passed: data, AllMatch(SizeIs(5)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } all match has size == 5 +MatchersRanges.tests.cpp:: passed: data, !AllMatch(Contains(0) && Contains(1)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not all match ( contains element 0 and contains element 1 ) +MatchersRanges.tests.cpp:: passed: needs_adl, AllMatch( Predicate( []( int elem ) { return elem < 6; } ) ) for: { 1, 2, 3, 4, 5 } all match matches undescribed predicate +MatchersRanges.tests.cpp:: passed: mocked, allMatch for: { 1, 2, 3, 4, 5 } all match matches undescribed predicate +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[3] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[4] for: true +MatchersRanges.tests.cpp:: passed: mocked, !allMatch for: { 1, 2, 3, 4, 5 } not all match matches undescribed predicate +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[3]) for: !false +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[4]) for: !false +MatchersRanges.tests.cpp:: passed: data, AllTrue() for: { true, true, true, true, true } contains only true +MatchersRanges.tests.cpp:: passed: data, AllTrue() for: { } contains only true +MatchersRanges.tests.cpp:: passed: data, !AllTrue() for: { true, true, false, true, true } not contains only true +MatchersRanges.tests.cpp:: passed: data, !AllTrue() for: { false, false, false, false, false } not contains only true +MatchersRanges.tests.cpp:: passed: data, AllTrue() for: { true, true, true, true, true } contains only true +MatchersRanges.tests.cpp:: passed: data, !AllTrue() for: { true, true, false, true, true } not contains only true +MatchersRanges.tests.cpp:: passed: data, !AllTrue() for: { false, false, false, false, false } not contains only true +MatchersRanges.tests.cpp:: passed: mocked, AllTrue() for: { true, true, true, true, true } contains only true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[3] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[4] for: true +MatchersRanges.tests.cpp:: passed: mocked, !AllTrue() for: { true, true, false, true, true } not contains only true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[3]) for: !false +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[4]) for: !false +MatchersRanges.tests.cpp:: passed: data, AnyMatch(SizeIs(5)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } any match has size == 5 +MatchersRanges.tests.cpp:: passed: data, !AnyMatch(Contains(0) && Contains(10)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not any match ( contains element 0 and contains element 10 ) +MatchersRanges.tests.cpp:: passed: needs_adl, AnyMatch( Predicate( []( int elem ) { return elem < 3; } ) ) for: { 1, 2, 3, 4, 5 } any match matches undescribed predicate +MatchersRanges.tests.cpp:: passed: mocked, !anyMatch for: { 1, 2, 3, 4, 5 } not any match matches undescribed predicate +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[3] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[4] for: true +MatchersRanges.tests.cpp:: passed: mocked, anyMatch for: { 1, 2, 3, 4, 5 } any match matches undescribed predicate +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[1]) for: !false +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[2]) for: !false +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[3]) for: !false +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[4]) for: !false +MatchersRanges.tests.cpp:: passed: data, AnyTrue() for: { true, true, true, true, true } contains at least one true +MatchersRanges.tests.cpp:: passed: data, !AnyTrue() for: { } not contains at least one true +MatchersRanges.tests.cpp:: passed: data, AnyTrue() for: { false, false, true, false, false } contains at least one true +MatchersRanges.tests.cpp:: passed: data, !AnyTrue() for: { false, false, false, false, false } not contains at least one true +MatchersRanges.tests.cpp:: passed: data, AnyTrue() for: { true, true, true, true, true } contains at least one true +MatchersRanges.tests.cpp:: passed: data, AnyTrue() for: { false, false, true, false, false } contains at least one true +MatchersRanges.tests.cpp:: passed: data, !AnyTrue() for: { false, false, false, false, false } not contains at least one true +MatchersRanges.tests.cpp:: passed: mocked, AnyTrue() for: { false, false, false, false, true } contains at least one true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[3] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[4] for: true +MatchersRanges.tests.cpp:: passed: mocked, AnyTrue() for: { false, false, true, true, true } contains at least one true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[3]) for: !false +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[4]) for: !false +MatchersRanges.tests.cpp:: passed: data, NoneMatch(SizeIs(6)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } none match has size == 6 +MatchersRanges.tests.cpp:: passed: data, !NoneMatch(Contains(0) && Contains(1)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not none match ( contains element 0 and contains element 1 ) +MatchersRanges.tests.cpp:: passed: needs_adl, NoneMatch( Predicate( []( int elem ) { return elem > 6; } ) ) for: { 1, 2, 3, 4, 5 } none match matches undescribed predicate +MatchersRanges.tests.cpp:: passed: mocked, noneMatch for: { 1, 2, 3, 4, 5 } none match matches undescribed predicate +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[3] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[4] for: true +MatchersRanges.tests.cpp:: passed: mocked, !noneMatch for: { 1, 2, 3, 4, 5 } not none match matches undescribed predicate +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[1]) for: !false +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[2]) for: !false +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[3]) for: !false +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[4]) for: !false +MatchersRanges.tests.cpp:: passed: data, !NoneTrue() for: { true, true, true, true, true } not contains no true +MatchersRanges.tests.cpp:: passed: data, NoneTrue() for: { } contains no true +MatchersRanges.tests.cpp:: passed: data, !NoneTrue() for: { false, false, true, false, false } not contains no true +MatchersRanges.tests.cpp:: passed: data, NoneTrue() for: { false, false, false, false, false } contains no true +MatchersRanges.tests.cpp:: passed: data, !NoneTrue() for: { true, true, true, true, true } not contains no true +MatchersRanges.tests.cpp:: passed: data, !NoneTrue() for: { false, false, true, false, false } not contains no true +MatchersRanges.tests.cpp:: passed: data, NoneTrue() for: { false, false, false, false, false } contains no true +MatchersRanges.tests.cpp:: passed: mocked, NoneTrue() for: { false, false, false, false, false } contains no true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[3] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[4] for: true +MatchersRanges.tests.cpp:: passed: mocked, !NoneTrue() for: { false, false, true, true, true } not contains no true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[3]) for: !false +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[4]) for: !false +MatchersRanges.tests.cpp:: passed: empty_vector, RangeEquals( empty_vector ) for: { } elements are { } +MatchersRanges.tests.cpp:: passed: empty_vector, !RangeEquals( non_empty_vector ) for: { } not elements are { 1 } +MatchersRanges.tests.cpp:: passed: non_empty_vector, !RangeEquals( empty_vector ) for: { 1 } not elements are { } +MatchersRanges.tests.cpp:: passed: non_empty_array, RangeEquals( non_empty_array ) for: { 1 } elements are { 1 } +MatchersRanges.tests.cpp:: passed: array_a, RangeEquals( array_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:: passed: array_a, !RangeEquals( array_b ) for: { 1, 2, 3 } not elements are { 2, 2, 3 } +MatchersRanges.tests.cpp:: passed: array_a, !RangeEquals( array_c ) for: { 1, 2, 3 } not elements are { 1, 2, 2 } +MatchersRanges.tests.cpp:: passed: vector_a, !RangeEquals( vector_b ) for: { 1, 2, 3 } not elements are { 1, 2, 3, 4 } +MatchersRanges.tests.cpp:: passed: vector_a, RangeEquals( vector_a_plus_1, close_enough ) for: { 1, 2, 3 } elements are { 2, 3, 4 } +MatchersRanges.tests.cpp:: passed: vector_a, !RangeEquals( vector_b, close_enough ) for: { 1, 2, 3 } not elements are { 3, 3, 4 } +MatchersRanges.tests.cpp:: passed: needs_adl1, RangeEquals( needs_adl2 ) for: { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 } +MatchersRanges.tests.cpp:: passed: needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } ) for: { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 } +MatchersRanges.tests.cpp:: passed: array_a, RangeEquals( { 1, 2, 3 } ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:: passed: array_a, RangeEquals( { 2, 4, 6 }, []( int l, int r ) { return l * 2 == r; } ) for: { 1, 2, 3 } elements are { 2, 4, 6 } +MatchersRanges.tests.cpp:: passed: mocked1, !RangeEquals( arr ) for: { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 } +MatchersRanges.tests.cpp:: passed: mocked1.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked1.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked1.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: !(mocked1.m_derefed[3]) for: !false +MatchersRanges.tests.cpp:: passed: mocked1, RangeEquals( arr ) for: { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 } +MatchersRanges.tests.cpp:: passed: mocked1.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked1.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked1.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: mocked1.m_derefed[3] for: true +MatchersRanges.tests.cpp:: passed: empty_vector, UnorderedRangeEquals( empty_vector ) for: { } unordered elements are { } +MatchersRanges.tests.cpp:: passed: empty_vector, !UnorderedRangeEquals( non_empty_vector ) for: { } not unordered elements are { 1 } +MatchersRanges.tests.cpp:: passed: non_empty_vector, !UnorderedRangeEquals( empty_vector ) for: { 1 } not unordered elements are { } +MatchersRanges.tests.cpp:: passed: non_empty_array, UnorderedRangeEquals( non_empty_array ) for: { 1 } unordered elements are { 1 } +MatchersRanges.tests.cpp:: passed: array_a, UnorderedRangeEquals( array_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:: passed: array_a, !UnorderedRangeEquals( array_b ) for: { 1, 2, 3 } not unordered elements are { 2, 2, 3 } +MatchersRanges.tests.cpp:: passed: vector_a, !UnorderedRangeEquals( vector_b ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } +MatchersRanges.tests.cpp:: passed: vector_a, UnorderedRangeEquals( vector_a_plus_1, close_enough ) for: { 1, 10, 20 } unordered elements are { 11, 21, 2 } +MatchersRanges.tests.cpp:: passed: vector_a, !UnorderedRangeEquals( vector_b, close_enough ) for: { 1, 10, 21 } not unordered elements are { 11, 21, 3 } +MatchersRanges.tests.cpp:: passed: needs_adl1, UnorderedRangeEquals( needs_adl2 ) for: { 1, 2, 3, 4, 5 } unordered elements are { 1, 2, 3, 4, 5 } +MatchersRanges.tests.cpp:: passed: array_a, UnorderedRangeEquals( { 10, 20, 1 } ) for: { 1, 10, 20 } unordered elements are { 10, 20, 1 } +MatchersRanges.tests.cpp:: passed: array_a, UnorderedRangeEquals( { 11, 21, 2 }, []( int l, int r ) { return std::abs( l - r ) <= 1; } ) for: { 1, 10, 20 } unordered elements are { 11, 21, 2 } +MatchersRanges.tests.cpp:: passed: empty_vec, SizeIs(0) for: { } has size == 0 +MatchersRanges.tests.cpp:: passed: empty_vec, !SizeIs(2) for: { } not has size == 2 +MatchersRanges.tests.cpp:: passed: empty_vec, SizeIs(Lt(2)) for: { } size matches is less than 2 +MatchersRanges.tests.cpp:: passed: arr, SizeIs(2) for: { 0, 0 } has size == 2 +MatchersRanges.tests.cpp:: passed: arr, SizeIs( Lt(3)) for: { 0, 0 } size matches is less than 3 +MatchersRanges.tests.cpp:: passed: arr, !SizeIs(!Lt(3)) for: { 0, 0 } not size matches not is less than 3 +MatchersRanges.tests.cpp:: passed: map, SizeIs(3) for: { {?}, {?}, {?} } has size == 3 +MatchersRanges.tests.cpp:: passed: unrelated::ADL_size{}, SizeIs(12) for: {?} has size == 12 +MatchersRanges.tests.cpp:: passed: has_size{}, SizeIs(13) for: {?} has size == 13 +Approx.tests.cpp:: passed: d == approx( 1.23 ) for: 1.22999999999999998 +== +Approx( 1.22999999999999998 ) +Approx.tests.cpp:: passed: d == approx( 1.22 ) for: 1.22999999999999998 +== +Approx( 1.21999999999999997 ) +Approx.tests.cpp:: passed: d == approx( 1.24 ) for: 1.22999999999999998 +== +Approx( 1.23999999999999999 ) +Approx.tests.cpp:: passed: d != approx( 1.25 ) for: 1.22999999999999998 != Approx( 1.25 ) +Approx.tests.cpp:: passed: approx( d ) == 1.23 for: Approx( 1.22999999999999998 ) +== +1.22999999999999998 +Approx.tests.cpp:: passed: approx( d ) == 1.22 for: Approx( 1.22999999999999998 ) +== +1.21999999999999997 +Approx.tests.cpp:: passed: approx( d ) == 1.24 for: Approx( 1.22999999999999998 ) +== +1.23999999999999999 +Approx.tests.cpp:: passed: approx( d ) != 1.25 for: Approx( 1.22999999999999998 ) != 1.25 +VariadicMacros.tests.cpp:: passed: with 1 message: 'no assertions' +Matchers.tests.cpp:: passed: empty, Approx( empty ) for: { } is approx: { } +Matchers.tests.cpp:: passed: v1, Approx( v1 ) for: { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } +Matchers.tests.cpp:: passed: v1, Approx( { 1., 2., 3. } ) for: { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } +Matchers.tests.cpp:: passed: v1, !Approx( temp ) for: { 1.0, 2.0, 3.0 } not is approx: { 1.0, 2.0, 3.0, 4.0 } +Matchers.tests.cpp:: passed: v1, !Approx( v2 ) for: { 1.0, 2.0, 3.0 } not is approx: { 1.5, 2.5, 3.5 } +Matchers.tests.cpp:: passed: v1, Approx( v2 ).margin( 0.5 ) for: { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } +Matchers.tests.cpp:: passed: v1, Approx( v2 ).epsilon( 0.5 ) for: { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } +Matchers.tests.cpp:: passed: v1, Approx( v2 ).epsilon( 0.1 ).scale( 500 ) for: { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } +Matchers.tests.cpp:: failed: empty, Approx( t1 ) for: { } is approx: { 1.0, 2.0 } +Matchers.tests.cpp:: failed: v1, Approx( v2 ) for: { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 } +Matchers.tests.cpp:: passed: v, VectorContains( 1 ) for: { 1, 2, 3 } Contains: 1 +Matchers.tests.cpp:: passed: v, VectorContains( 2 ) for: { 1, 2, 3 } Contains: 2 +Matchers.tests.cpp:: passed: v5, ( VectorContains>( 2 ) ) for: { 1, 2, 3 } Contains: 2 +Matchers.tests.cpp:: passed: v, Contains( v2 ) for: { 1, 2, 3 } Contains: { 1, 2 } +Matchers.tests.cpp:: passed: v, Contains( { 1, 2 } ) for: { 1, 2, 3 } Contains: { 1, 2 } +Matchers.tests.cpp:: passed: v5, ( Contains, CustomAllocator>( v2 ) ) for: { 1, 2, 3 } Contains: { 1, 2 } +Matchers.tests.cpp:: passed: v, Contains( v2 ) for: { 1, 2, 3 } Contains: { 1, 2, 3 } +Matchers.tests.cpp:: passed: v, Contains( empty ) for: { 1, 2, 3 } Contains: { } +Matchers.tests.cpp:: passed: empty, Contains( empty ) for: { } Contains: { } +Matchers.tests.cpp:: passed: v5, ( Contains, CustomAllocator>( v2 ) ) for: { 1, 2, 3 } Contains: { 1, 2, 3 } +Matchers.tests.cpp:: passed: v5, Contains( v6 ) for: { 1, 2, 3 } Contains: { 1, 2 } +Matchers.tests.cpp:: passed: v, VectorContains( 1 ) && VectorContains( 2 ) for: { 1, 2, 3 } ( Contains: 1 and Contains: 2 ) +Matchers.tests.cpp:: passed: v, Equals( v ) for: { 1, 2, 3 } Equals: { 1, 2, 3 } +Matchers.tests.cpp:: passed: empty, Equals( empty ) for: { } Equals: { } +Matchers.tests.cpp:: passed: v, Equals( { 1, 2, 3 } ) for: { 1, 2, 3 } Equals: { 1, 2, 3 } +Matchers.tests.cpp:: passed: v, Equals( v2 ) for: { 1, 2, 3 } Equals: { 1, 2, 3 } +Matchers.tests.cpp:: passed: v5, ( Equals, CustomAllocator>( v2 ) ) for: { 1, 2, 3 } Equals: { 1, 2, 3 } +Matchers.tests.cpp:: passed: v5, Equals( v6 ) for: { 1, 2, 3 } Equals: { 1, 2, 3 } +Matchers.tests.cpp:: passed: v, UnorderedEquals( v ) for: { 1, 2, 3 } UnorderedEquals: { 1, 2, 3 } +Matchers.tests.cpp:: passed: v, UnorderedEquals( { 3, 2, 1 } ) for: { 1, 2, 3 } UnorderedEquals: { 3, 2, 1 } +Matchers.tests.cpp:: passed: empty, UnorderedEquals( empty ) for: { } UnorderedEquals: { } +Matchers.tests.cpp:: passed: permuted, UnorderedEquals( v ) for: { 1, 3, 2 } UnorderedEquals: { 1, 2, 3 } +Matchers.tests.cpp:: passed: permuted, UnorderedEquals( v ) for: { 2, 3, 1 } UnorderedEquals: { 1, 2, 3 } +Matchers.tests.cpp:: passed: v5, ( UnorderedEquals, CustomAllocator>( permuted ) ) for: { 1, 2, 3 } UnorderedEquals: { 2, 3, 1 } +Matchers.tests.cpp:: passed: v5_permuted, UnorderedEquals( v5 ) for: { 1, 3, 2 } UnorderedEquals: { 1, 2, 3 } +Matchers.tests.cpp:: failed: v, VectorContains( -1 ) for: { 1, 2, 3 } Contains: -1 +Matchers.tests.cpp:: failed: empty, VectorContains( 1 ) for: { } Contains: 1 +Matchers.tests.cpp:: failed: empty, Contains( v ) for: { } Contains: { 1, 2, 3 } +Matchers.tests.cpp:: failed: v, Contains( v2 ) for: { 1, 2, 3 } Contains: { 1, 2, 4 } +Matchers.tests.cpp:: failed: v, Equals( v2 ) for: { 1, 2, 3 } Equals: { 1, 2 } +Matchers.tests.cpp:: failed: v2, Equals( v ) for: { 1, 2 } Equals: { 1, 2, 3 } +Matchers.tests.cpp:: failed: empty, Equals( v ) for: { } Equals: { 1, 2, 3 } +Matchers.tests.cpp:: failed: v, Equals( empty ) for: { 1, 2, 3 } Equals: { } +Matchers.tests.cpp:: failed: v, UnorderedEquals( empty ) for: { 1, 2, 3 } UnorderedEquals: { } +Matchers.tests.cpp:: failed: empty, UnorderedEquals( v ) for: { } UnorderedEquals: { 1, 2, 3 } +Matchers.tests.cpp:: failed: permuted, UnorderedEquals( v ) for: { 1, 3 } UnorderedEquals: { 1, 2, 3 } +Matchers.tests.cpp:: failed: permuted, UnorderedEquals( v ) for: { 3, 1 } UnorderedEquals: { 1, 2, 3 } +Exception.tests.cpp:: passed: thisThrows(), std::domain_error +Exception.tests.cpp:: passed: thisDoesntThrow() +Exception.tests.cpp:: passed: thisThrows() +Exception.tests.cpp:: failed: unexpected exception with message: 'unexpected exception' +Exception.tests.cpp:: failed: unexpected exception with message: 'expected exception'; expression was: thisThrows() == 0 +Exception.tests.cpp:: failed: unexpected exception with message: 'expected exception'; expression was: thisThrows() == 0 +Exception.tests.cpp:: failed: unexpected exception with message: 'expected exception'; expression was: thisThrows() == 0 +Exception.tests.cpp:: failed: unexpected exception with message: 'unexpected exception' +Tricky.tests.cpp:: passed: +Tricky.tests.cpp:: passed: +Tricky.tests.cpp:: passed: +Tricky.tests.cpp:: passed: +Xml.tests.cpp:: passed: encode( "normal string" ) == "normal string" for: "normal string" == "normal string" +Xml.tests.cpp:: passed: encode( "" ) == "" for: "" == "" +Xml.tests.cpp:: passed: encode( "smith & jones" ) == "smith & jones" for: "smith & jones" == "smith & jones" +Xml.tests.cpp:: passed: encode( "smith < jones" ) == "smith < jones" for: "smith < jones" == "smith < jones" +Xml.tests.cpp:: passed: encode( "smith > jones" ) == "smith > jones" for: "smith > jones" == "smith > jones" +Xml.tests.cpp:: passed: encode( "smith ]]> jones" ) == "smith ]]> jones" for: "smith ]]> jones" +== +"smith ]]> jones" +Xml.tests.cpp:: passed: encode( stringWithQuotes ) == stringWithQuotes for: "don't "quote" me on that" +== +"don't "quote" me on that" +Xml.tests.cpp:: passed: encode( stringWithQuotes, Catch::XmlEncode::ForAttributes ) == "don't "quote" me on that" for: "don't "quote" me on that" +== +"don't "quote" me on that" +Xml.tests.cpp:: passed: encode( "[\x01]" ) == "[\\x01]" for: "[\x01]" == "[\x01]" +Xml.tests.cpp:: passed: encode( "[\x7F]" ) == "[\\x7F]" for: "[\x7F]" == "[\x7F]" +Xml.tests.cpp:: passed: stream.str(), ContainsSubstring(R"(attr1="true")") && ContainsSubstring(R"(attr2="false")") for: " + +" ( contains: "attr1="true"" and contains: "attr2="false"" ) +Skip.tests.cpp:: passed: +Skip.tests.cpp:: skipped: +InternalBenchmark.tests.cpp:: passed: analysis.mean.point.count() == 23 for: 23.0 == 23 +InternalBenchmark.tests.cpp:: passed: analysis.mean.lower_bound.count() == 23 for: 23.0 == 23 +InternalBenchmark.tests.cpp:: passed: analysis.mean.upper_bound.count() == 23 for: 23.0 == 23 +InternalBenchmark.tests.cpp:: passed: analysis.standard_deviation.point.count() == 0 for: 0.0 == 0 +InternalBenchmark.tests.cpp:: passed: analysis.standard_deviation.lower_bound.count() == 0 for: 0.0 == 0 +InternalBenchmark.tests.cpp:: passed: analysis.standard_deviation.upper_bound.count() == 0 for: 0.0 == 0 +InternalBenchmark.tests.cpp:: passed: analysis.outliers.total() == 0 for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: analysis.outliers.low_mild == 0 for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: analysis.outliers.low_severe == 0 for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: analysis.outliers.high_mild == 0 for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: analysis.outliers.high_severe == 0 for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: analysis.outliers.samples_seen == 0 for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: analysis.outlier_variance == 0 for: 0.0 == 0 +ToStringVector.tests.cpp:: passed: Catch::Detail::stringify( empty ) == "{ }" for: "{ }" == "{ }" +ToStringVector.tests.cpp:: passed: Catch::Detail::stringify( oneValue ) == "{ 42 }" for: "{ 42 }" == "{ 42 }" +ToStringVector.tests.cpp:: passed: Catch::Detail::stringify( twoValues ) == "{ 42, 250 }" for: "{ 42, 250 }" == "{ 42, 250 }" +InternalBenchmark.tests.cpp:: passed: model.started == 1 for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: model.finished == 0 for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: model.started == 1 for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: model.finished == 1 for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: called == 1 for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: model.started == 0 for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: model.finished == 0 for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: model.started == 0 for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: model.finished == 0 for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: called == 1 for: 1 == 1 +Tricky.tests.cpp:: passed: obj.prop != 0 for: 0x != 0 +Misc.tests.cpp:: passed: flag for: true +Misc.tests.cpp:: passed: testCheckedElse( true ) for: true +Misc.tests.cpp:: failed - but was ok: flag for: false +Misc.tests.cpp:: failed: testCheckedElse( false ) for: false +Misc.tests.cpp:: passed: flag for: true +Misc.tests.cpp:: passed: testCheckedIf( true ) for: true +Misc.tests.cpp:: failed - but was ok: flag for: false +Misc.tests.cpp:: failed: testCheckedIf( false ) for: false +InternalBenchmark.tests.cpp:: passed: o.samples_seen == static_cast(x.size()) for: 6 == 6 +InternalBenchmark.tests.cpp:: passed: o.low_severe == los for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.low_mild == lom for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.high_mild == him for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.high_severe == his for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.total() == los + lom + him + his for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.samples_seen == static_cast(x.size()) for: 6 == 6 +InternalBenchmark.tests.cpp:: passed: o.low_severe == los for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: o.low_mild == lom for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.high_mild == him for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.high_severe == his for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.total() == los + lom + him + his for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: o.samples_seen == static_cast(x.size()) for: 6 == 6 +InternalBenchmark.tests.cpp:: passed: o.low_severe == los for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.low_mild == lom for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: o.high_mild == him for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.high_severe == his for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.total() == los + lom + him + his for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: o.samples_seen == static_cast(x.size()) for: 6 == 6 +InternalBenchmark.tests.cpp:: passed: o.low_severe == los for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.low_mild == lom for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.high_mild == him for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: o.high_severe == his for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.total() == los + lom + him + his for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: o.samples_seen == static_cast(x.size()) for: 6 == 6 +InternalBenchmark.tests.cpp:: passed: o.low_severe == los for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.low_mild == lom for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.high_mild == him for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.high_severe == his for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: o.total() == los + lom + him + his for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: o.samples_seen == static_cast(x.size()) for: 6 == 6 +InternalBenchmark.tests.cpp:: passed: o.low_severe == los for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: o.low_mild == lom for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.high_mild == him for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: o.high_severe == his for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.total() == los + lom + him + his for: 2 == 2 +Condition.tests.cpp:: passed: unsigned_char_var == 1 for: 1 == 1 +Condition.tests.cpp:: passed: unsigned_short_var == 1 for: 1 == 1 +Condition.tests.cpp:: passed: unsigned_int_var == 1 for: 1 == 1 +Condition.tests.cpp:: passed: unsigned_long_var == 1 for: 1 == 1 +Condition.tests.cpp:: passed: long_var == unsigned_char_var for: 1 == 1 +Condition.tests.cpp:: passed: long_var == unsigned_short_var for: 1 == 1 +Condition.tests.cpp:: passed: long_var == unsigned_int_var for: 1 == 1 +Condition.tests.cpp:: passed: long_var == unsigned_long_var for: 1 == 1 +FloatingPoint.tests.cpp:: passed: convertToBits( 0.f ) == 0 for: 0 == 0 +FloatingPoint.tests.cpp:: passed: convertToBits( -0.f ) == ( 1ULL << 31 ) for: 2147483648 (0x) +== +2147483648 (0x) +FloatingPoint.tests.cpp:: passed: convertToBits( 0. ) == 0 for: 0 == 0 +FloatingPoint.tests.cpp:: passed: convertToBits( -0. ) == ( 1ULL << 63 ) for: 9223372036854775808 (0x) +== +9223372036854775808 (0x) +FloatingPoint.tests.cpp:: passed: convertToBits( std::numeric_limits::denorm_min() ) == 1 for: 1 == 1 +FloatingPoint.tests.cpp:: passed: convertToBits( std::numeric_limits::denorm_min() ) == 1 for: 1 == 1 +Skip.tests.cpp:: skipped: 'skipping because answer = 41' +Skip.tests.cpp:: passed: +Skip.tests.cpp:: skipped: 'skipping because answer = 43' +Tag.tests.cpp:: passed: Catch::TestCaseInfo("", { "test with an empty tag", "[]" }, dummySourceLineInfo) +InternalBenchmark.tests.cpp:: passed: erfc_inv(1.103560) == Approx(-0.09203687623843015) for: -0.09203687623843014 +== +Approx( -0.09203687623843015 ) +InternalBenchmark.tests.cpp:: passed: erfc_inv(1.067400) == Approx(-0.05980291115763361) for: -0.05980291115763361 +== +Approx( -0.05980291115763361 ) +InternalBenchmark.tests.cpp:: passed: erfc_inv(0.050000) == Approx(1.38590382434967796) for: 1.38590382434967774 +== +Approx( 1.38590382434967796 ) +InternalBenchmark.tests.cpp:: passed: res.mean.count() == rate for: 2000.0 == 2000 (0x) +InternalBenchmark.tests.cpp:: passed: res.outliers.total() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: +Misc.tests.cpp:: passed: +Misc.tests.cpp:: passed: +Skip.tests.cpp:: failed: 3 == 4 +Skip.tests.cpp:: skipped: +Skip.tests.cpp:: failed: explicitly +Skip.tests.cpp:: skipped: +Skip.tests.cpp:: failed: explicitly +Skip.tests.cpp:: skipped: +Skip.tests.cpp:: skipped: +Skip.tests.cpp:: failed: explicitly +loose text artifact +Clara.tests.cpp:: passed: with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +Clara.tests.cpp:: passed: with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +Clara.tests.cpp:: passed: with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +Clara.tests.cpp:: passed: with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +Clara.tests.cpp:: passed: with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +Clara.tests.cpp:: passed: with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +Clara.tests.cpp:: passed: with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +Clara.tests.cpp:: passed: with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +Clara.tests.cpp:: passed: with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +Clara.tests.cpp:: passed: with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +Clara.tests.cpp:: passed: with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +Clara.tests.cpp:: passed: with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +Message.tests.cpp:: failed: explicitly with 1 message: 'Previous info should not be seen' +Message.tests.cpp:: failed: explicitly with 1 message: 'previous unscoped info SHOULD not be seen' +Misc.tests.cpp:: passed: l == std::numeric_limits::max() for: 9223372036854775807 (0x) +== +9223372036854775807 (0x) +Misc.tests.cpp:: failed: b > a for: 0 > 1 +Misc.tests.cpp:: failed: b > a for: 1 > 1 +Misc.tests.cpp:: passed: b > a for: 2 > 1 +Misc.tests.cpp:: passed: b > a for: 3 > 1 +Misc.tests.cpp:: passed: b > a for: 4 > 1 +Misc.tests.cpp:: passed: b > a for: 5 > 1 +Misc.tests.cpp:: passed: b > a for: 6 > 1 +Misc.tests.cpp:: passed: b > a for: 7 > 1 +Misc.tests.cpp:: passed: b > a for: 8 > 1 +Misc.tests.cpp:: passed: b > a for: 9 > 1 +Misc.tests.cpp:: failed: ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[0] (1) is even' +Misc.tests.cpp:: failed: ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[1] (1) is even' +Misc.tests.cpp:: passed: ( fib[i] % 2 ) == 0 for: 0 == 0 with 1 message: 'Testing if fib[2] (2) is even' +Misc.tests.cpp:: failed: ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[3] (3) is even' +Misc.tests.cpp:: failed: ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[4] (5) is even' +Misc.tests.cpp:: passed: ( fib[i] % 2 ) == 0 for: 0 == 0 with 1 message: 'Testing if fib[5] (8) is even' +Misc.tests.cpp:: failed: ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[6] (13) is even' +Misc.tests.cpp:: failed: ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[7] (21) is even' +Stream.tests.cpp:: passed: Catch::makeStream( "%debug" ) +UniquePtr.tests.cpp:: passed: !(lval.has_moved) for: !false +UniquePtr.tests.cpp:: passed: rval.has_moved for: true +UniquePtr.tests.cpp:: passed: *ptr == std::tuple{1, 2., 3} for: {?} == {?} +InternalBenchmark.tests.cpp:: passed: m == 19. for: 19.0 == 19.0 +InternalBenchmark.tests.cpp:: passed: x == 17 for: 17 == 17 +InternalBenchmark.tests.cpp:: passed: x == 23 for: 23 == 23 +InternalBenchmark.tests.cpp:: passed: r.elapsed.count() == 42 for: 42 == 42 +InternalBenchmark.tests.cpp:: passed: r.result == 23 for: 23 == 23 +InternalBenchmark.tests.cpp:: passed: r.iterations == 1 for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: s.elapsed.count() == 69 for: 69 == 69 +InternalBenchmark.tests.cpp:: passed: s.result == 17 for: 17 == 17 +InternalBenchmark.tests.cpp:: passed: s.iterations == 1 for: 1 == 1 +Message.tests.cpp:: warning: 'info' with 2 messages: 'unscoped info' and 'and warn may mix' +Message.tests.cpp:: warning: 'info' with 2 messages: 'unscoped info' and 'they are not cleared after warnings' +Misc.tests.cpp:: failed: a == b for: 1 == 2 +Misc.tests.cpp:: passed: a != b for: 1 != 2 +Misc.tests.cpp:: passed: a < b for: 1 < 2 +Misc.tests.cpp:: passed: a != b for: 1 != 2 +Misc.tests.cpp:: passed: b != a for: 2 != 1 +Misc.tests.cpp:: passed: a != b for: 1 != 2 +a! +b1! +Skip.tests.cpp:: skipped: +! +Tricky.tests.cpp:: passed: s == "7" for: "7" == "7" +Tricky.tests.cpp:: passed: ti == typeid(int) for: {?} == {?} +InternalBenchmark.tests.cpp:: passed: normal_quantile(0.551780) == Approx(0.13015979861484198) for: 0.13015979861484195 +== +Approx( 0.13015979861484198 ) +InternalBenchmark.tests.cpp:: passed: normal_quantile(0.533700) == Approx(0.08457408802851875) for: 0.08457408802851875 +== +Approx( 0.08457408802851875 ) +InternalBenchmark.tests.cpp:: passed: normal_quantile(0.025000) == Approx(-1.95996398454005449) for: -1.95996398454005405 +== +Approx( -1.95996398454005449 ) +Misc.tests.cpp:: passed: +Message.tests.cpp:: passed: true with 1 message: 'this MAY be seen only for the FIRST assertion IF info is printed for passing assertions' +Message.tests.cpp:: passed: true with 1 message: 'this MAY be seen only for the SECOND assertion IF info is printed for passing assertions' +Message.tests.cpp:: failed: false with 1 message: 'this SHOULD be seen' +Misc.tests.cpp:: passed: makeString( false ) != static_cast(0) for: "valid string" != {null string} +Misc.tests.cpp:: passed: makeString( true ) == static_cast(0) for: {null string} == {null string} +Tricky.tests.cpp:: passed: ptr.get() == 0 for: 0 == 0 +ToStringPair.tests.cpp:: passed: ::Catch::Detail::stringify( pair ) == "{ { 42, \"Arthur\" }, { \"Ford\", 24 } }" for: "{ { 42, "Arthur" }, { "Ford", 24 } }" +== +"{ { 42, "Arthur" }, { "Ford", 24 } }" +ToString.tests.cpp:: passed: parseEnums( "" ), Equals( std::vector{} ) for: { } Equals: { } +ToString.tests.cpp:: passed: parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector{"Value1"} ) for: { Value1 } Equals: { Value1 } +ToString.tests.cpp:: passed: parseEnums( "Value1" ), Equals( std::vector{"Value1"} ) for: { Value1 } Equals: { Value1 } +ToString.tests.cpp:: passed: parseEnums( "EnumName::Value1" ), Equals(std::vector{"Value1"} ) for: { Value1 } Equals: { Value1 } +ToString.tests.cpp:: passed: parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector{"Value1", "Value2"} ) for: { Value1, Value2 } Equals: { Value1, Value2 } +ToString.tests.cpp:: passed: parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector{"Value1", "Value2", "Value3"} ) for: { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 } +ToString.tests.cpp:: passed: parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector{"Value1", "Value2", "Value3"} ) for: { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 } +Tricky.tests.cpp:: passed: p == 0 for: 0 == 0 +Message.tests.cpp:: passed: true with 1 message: 'this MAY be seen IF info is printed for passing assertions' +Message.tests.cpp:: failed: false with 2 messages: 'this SHOULD be seen' and 'this SHOULD also be seen' +Message.tests.cpp:: failed: false with 1 message: 'this SHOULD be seen only ONCE' +Message.tests.cpp:: passed: true +Message.tests.cpp:: passed: true with 1 message: 'this MAY also be seen only ONCE IF info is printed for passing assertions' +Message.tests.cpp:: passed: true +Misc.tests.cpp:: passed: a != b for: 1 != 2 +Misc.tests.cpp:: passed: b != a for: 2 != 1 +Misc.tests.cpp:: passed: a != b for: 1 != 2 +StringManip.tests.cpp:: passed: Catch::replaceInPlace(letters, "b", "z") for: true +StringManip.tests.cpp:: passed: letters == "azcdefcg" for: "azcdefcg" == "azcdefcg" +StringManip.tests.cpp:: passed: Catch::replaceInPlace(letters, "c", "z") for: true +StringManip.tests.cpp:: passed: letters == "abzdefzg" for: "abzdefzg" == "abzdefzg" +StringManip.tests.cpp:: passed: Catch::replaceInPlace(letters, "a", "z") for: true +StringManip.tests.cpp:: passed: letters == "zbcdefcg" for: "zbcdefcg" == "zbcdefcg" +StringManip.tests.cpp:: passed: Catch::replaceInPlace(letters, "g", "z") for: true +StringManip.tests.cpp:: passed: letters == "abcdefcz" for: "abcdefcz" == "abcdefcz" +StringManip.tests.cpp:: passed: Catch::replaceInPlace(letters, letters, "replaced") for: true +StringManip.tests.cpp:: passed: letters == "replaced" for: "replaced" == "replaced" +StringManip.tests.cpp:: passed: !(Catch::replaceInPlace(letters, "x", "z")) for: !false +StringManip.tests.cpp:: passed: letters == letters for: "abcdefcg" == "abcdefcg" +StringManip.tests.cpp:: passed: Catch::replaceInPlace(letters, "c", "cc") for: true +StringManip.tests.cpp:: passed: letters == "abccdefccg" for: "abccdefccg" == "abccdefccg" +StringManip.tests.cpp:: passed: Catch::replaceInPlace(s, "--", "-") for: true +StringManip.tests.cpp:: passed: s == "--" for: "--" == "--" +StringManip.tests.cpp:: passed: Catch::replaceInPlace(s, "'", "|'") for: true +StringManip.tests.cpp:: passed: s == "didn|'t" for: "didn|'t" == "didn|'t" +Stream.tests.cpp:: passed: Catch::makeStream( "%somestream" ) +InternalBenchmark.tests.cpp:: passed: res.size() == count for: 10 == 10 +InternalBenchmark.tests.cpp:: passed: res[i] == rate for: 1000.0 == 1000 (0x) +InternalBenchmark.tests.cpp:: passed: res[i] == rate for: 1000.0 == 1000 (0x) +InternalBenchmark.tests.cpp:: passed: res[i] == rate for: 1000.0 == 1000 (0x) +InternalBenchmark.tests.cpp:: passed: res[i] == rate for: 1000.0 == 1000 (0x) +InternalBenchmark.tests.cpp:: passed: res[i] == rate for: 1000.0 == 1000 (0x) +InternalBenchmark.tests.cpp:: passed: res[i] == rate for: 1000.0 == 1000 (0x) +InternalBenchmark.tests.cpp:: passed: res[i] == rate for: 1000.0 == 1000 (0x) +InternalBenchmark.tests.cpp:: passed: res[i] == rate for: 1000.0 == 1000 (0x) +InternalBenchmark.tests.cpp:: passed: res[i] == rate for: 1000.0 == 1000 (0x) +InternalBenchmark.tests.cpp:: passed: meter.runs() >= old_runs for: 1 >= 1 +InternalBenchmark.tests.cpp:: passed: meter.runs() >= old_runs for: 2 >= 1 +InternalBenchmark.tests.cpp:: passed: meter.runs() >= old_runs for: 4 >= 2 +InternalBenchmark.tests.cpp:: passed: meter.runs() >= old_runs for: 8 >= 4 +InternalBenchmark.tests.cpp:: passed: meter.runs() >= old_runs for: 16 >= 8 +InternalBenchmark.tests.cpp:: passed: meter.runs() >= old_runs for: 32 >= 16 +InternalBenchmark.tests.cpp:: passed: meter.runs() >= old_runs for: 64 >= 32 +InternalBenchmark.tests.cpp:: passed: meter.runs() >= old_runs for: 128 >= 64 +InternalBenchmark.tests.cpp:: passed: Timing.elapsed >= time for: 128 ns >= 100 ns +InternalBenchmark.tests.cpp:: passed: Timing.result == Timing.iterations + 17 for: 145 == 145 +InternalBenchmark.tests.cpp:: passed: Timing.iterations >= time.count() for: 128 >= 100 +InternalBenchmark.tests.cpp:: passed: x >= old_x for: 1 >= 1 +InternalBenchmark.tests.cpp:: passed: x >= old_x for: 2 >= 1 +InternalBenchmark.tests.cpp:: passed: x >= old_x for: 4 >= 2 +InternalBenchmark.tests.cpp:: passed: x >= old_x for: 8 >= 4 +InternalBenchmark.tests.cpp:: passed: x >= old_x for: 16 >= 8 +InternalBenchmark.tests.cpp:: passed: x >= old_x for: 32 >= 16 +InternalBenchmark.tests.cpp:: passed: x >= old_x for: 64 >= 32 +InternalBenchmark.tests.cpp:: passed: x >= old_x for: 128 >= 64 +InternalBenchmark.tests.cpp:: passed: Timing.elapsed >= time for: 128 ns >= 100 ns +InternalBenchmark.tests.cpp:: passed: Timing.result == Timing.iterations + 17 for: 145 == 145 +InternalBenchmark.tests.cpp:: passed: Timing.iterations >= time.count() for: 128 >= 100 +Skip.tests.cpp:: passed: +Skip.tests.cpp:: skipped: +Skip.tests.cpp:: passed: +Misc.tests.cpp:: failed: false with 1 message: '3' +Message.tests.cpp:: failed: false with 2 messages: 'hi' and 'i := 7' +Tag.tests.cpp:: passed: testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "."_catch_sr ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} ) +Skip.tests.cpp:: skipped: 'skipping because answer = 43' +StringManip.tests.cpp:: passed: splitStringRef("", ','), Equals(std::vector()) for: { } Equals: { } +StringManip.tests.cpp:: passed: splitStringRef("abc", ','), Equals(std::vector{"abc"}) for: { abc } Equals: { abc } +StringManip.tests.cpp:: passed: splitStringRef("abc,def", ','), Equals(std::vector{"abc", "def"}) for: { abc, def } Equals: { abc, def } +Message.tests.cpp:: failed: false with 4 messages: 'Count 1 to 3...' and '1' and '2' and '3' +Message.tests.cpp:: failed: false with 4 messages: 'Count 4 to 6...' and '4' and '5' and '6' +StringManip.tests.cpp:: passed: !(startsWith("", 'c')) for: !false +StringManip.tests.cpp:: passed: startsWith(std::string("abc"), 'a') for: true +StringManip.tests.cpp:: passed: startsWith("def"_catch_sr, 'd') for: true +ToStringGeneral.tests.cpp:: passed: Catch::Detail::stringify( emptyMap ) == "{ }" for: "{ }" == "{ }" +ToStringGeneral.tests.cpp:: passed: Catch::Detail::stringify( map ) == "{ { \"one\", 1 } }" for: "{ { "one", 1 } }" == "{ { "one", 1 } }" +ToStringGeneral.tests.cpp:: passed: Catch::Detail::stringify( map ) == "{ { \"abc\", 1 }, { \"def\", 2 }, { \"ghi\", 3 } }" for: "{ { "abc", 1 }, { "def", 2 }, { "ghi", 3 } }" +== +"{ { "abc", 1 }, { "def", 2 }, { "ghi", 3 } }" +ToStringPair.tests.cpp:: passed: ::Catch::Detail::stringify(value) == "{ 34, \"xyzzy\" }" for: "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" +ToStringPair.tests.cpp:: passed: ::Catch::Detail::stringify( value ) == "{ 34, \"xyzzy\" }" for: "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" +ToStringGeneral.tests.cpp:: passed: Catch::Detail::stringify( emptySet ) == "{ }" for: "{ }" == "{ }" +ToStringGeneral.tests.cpp:: passed: Catch::Detail::stringify( set ) == "{ \"one\" }" for: "{ "one" }" == "{ "one" }" +ToStringGeneral.tests.cpp:: passed: Catch::Detail::stringify( set ) == "{ \"abc\", \"def\", \"ghi\" }" for: "{ "abc", "def", "ghi" }" +== +"{ "abc", "def", "ghi" }" +ToStringPair.tests.cpp:: passed: ::Catch::Detail::stringify( pr ) == "{ { \"green\", 55 } }" for: "{ { "green", 55 } }" +== +"{ { "green", 55 } }" +Stream.tests.cpp:: passed: Catch::makeStream( "%stderr" )->isConsole() for: true +Stream.tests.cpp:: passed: Catch::makeStream( "%stdout" )->isConsole() for: true +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify(streamable_range{}) == "op<<(streamable_range)" for: "op<<(streamable_range)" +== +"op<<(streamable_range)" +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify(stringmaker_range{}) == "stringmaker(streamable_range)" for: "stringmaker(streamable_range)" +== +"stringmaker(streamable_range)" +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify(just_range{}) == "{ 1, 2, 3, 4 }" for: "{ 1, 2, 3, 4 }" == "{ 1, 2, 3, 4 }" +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify(disabled_range{}) == "{?}" for: "{?}" == "{?}" +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify( item ) == "StringMaker" for: "StringMaker" +== +"StringMaker" +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify( item ) == "StringMaker" for: "StringMaker" +== +"StringMaker" +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify(item) == "{?}" for: "{?}" == "{?}" +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify( item ) == "operator<<( has_operator )" for: "operator<<( has_operator )" +== +"operator<<( has_operator )" +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify( item ) == "operator<<( has_template_operator )" for: "operator<<( has_template_operator )" +== +"operator<<( has_template_operator )" +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify( v ) == "{ StringMaker }" for: "{ StringMaker }" +== +"{ StringMaker }" +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify( v ) == "{ StringMaker }" for: "{ StringMaker }" +== +"{ StringMaker }" +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify( v ) == "{ operator<<( has_operator ) }" for: "{ operator<<( has_operator ) }" +== +"{ operator<<( has_operator ) }" +Generators.tests.cpp:: passed: data.str.size() == data.len for: 3 == 3 +Generators.tests.cpp:: passed: data.str.size() == data.len for: 3 == 3 +Generators.tests.cpp:: passed: data.str.size() == data.len for: 5 == 5 +Generators.tests.cpp:: passed: data.str.size() == data.len for: 4 == 4 +Generators.tests.cpp:: passed: strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) for: 5 == 5 +Generators.tests.cpp:: passed: strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) for: 6 == 6 +Generators.tests.cpp:: passed: strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) for: 5 == 5 +Generators.tests.cpp:: passed: strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) for: 6 == 6 +Tag.tests.cpp:: passed: testcase.tags.size() == 1 for: 1 == 1 +Tag.tests.cpp:: passed: testcase.tags[0].original == "magic.tag"_catch_sr for: magic.tag == magic.tag +Skip.tests.cpp:: skipped: +Exception.tests.cpp:: failed: unexpected exception with message: 'Why would you throw a std::string?' +Misc.tests.cpp:: passed: result == "\"wide load\"" for: ""wide load"" == ""wide load"" +Misc.tests.cpp:: passed: result == "\"wide load\"" for: ""wide load"" == ""wide load"" +Misc.tests.cpp:: passed: result == "\"wide load\"" for: ""wide load"" == ""wide load"" +Misc.tests.cpp:: passed: result == "\"wide load\"" for: ""wide load"" == ""wide load"" +EnumToString.tests.cpp:: passed: ::Catch::Detail::stringify(e0) == "E2/V0" for: "E2/V0" == "E2/V0" +EnumToString.tests.cpp:: passed: ::Catch::Detail::stringify(e1) == "E2/V1" for: "E2/V1" == "E2/V1" +EnumToString.tests.cpp:: passed: ::Catch::Detail::stringify(e3) == "Unknown enum value 10" for: "Unknown enum value 10" +== +"Unknown enum value 10" +EnumToString.tests.cpp:: passed: ::Catch::Detail::stringify(e0) == "0" for: "0" == "0" +EnumToString.tests.cpp:: passed: ::Catch::Detail::stringify(e1) == "1" for: "1" == "1" +EnumToString.tests.cpp:: passed: ::Catch::Detail::stringify(e0) == "E2{0}" for: "E2{0}" == "E2{0}" +EnumToString.tests.cpp:: passed: ::Catch::Detail::stringify(e1) == "E2{1}" for: "E2{1}" == "E2{1}" +EnumToString.tests.cpp:: passed: ::Catch::Detail::stringify(e0) == "0" for: "0" == "0" +EnumToString.tests.cpp:: passed: ::Catch::Detail::stringify(e1) == "1" for: "1" == "1" +ToStringTuple.tests.cpp:: passed: "{ }" == ::Catch::Detail::stringify(type{}) for: "{ }" == "{ }" +ToStringTuple.tests.cpp:: passed: "{ }" == ::Catch::Detail::stringify(value) for: "{ }" == "{ }" +ToStringTuple.tests.cpp:: passed: "1.5f" == ::Catch::Detail::stringify(float(1.5)) for: "1.5f" == "1.5f" +ToStringTuple.tests.cpp:: passed: "{ 1.5f, 0 }" == ::Catch::Detail::stringify(type{1.5f,0}) for: "{ 1.5f, 0 }" == "{ 1.5f, 0 }" +ToStringTuple.tests.cpp:: passed: "{ 0 }" == ::Catch::Detail::stringify(type{0}) for: "{ 0 }" == "{ 0 }" +ToStringTuple.tests.cpp:: passed: "{ \"hello\", \"world\" }" == ::Catch::Detail::stringify(type{"hello","world"}) for: "{ "hello", "world" }" +== +"{ "hello", "world" }" +ToStringTuple.tests.cpp:: passed: "{ { 42 }, { }, 1.5f }" == ::Catch::Detail::stringify(value) for: "{ { 42 }, { }, 1.5f }" +== +"{ { 42 }, { }, 1.5f }" +InternalBenchmark.tests.cpp:: passed: e.point == 23 for: 23.0 == 23 +InternalBenchmark.tests.cpp:: passed: e.upper_bound == 23 for: 23.0 == 23 +InternalBenchmark.tests.cpp:: passed: e.lower_bound == 23 for: 23.0 == 23 +InternalBenchmark.tests.cpp:: passed: e.confidence_interval == 0.95 for: 0.94999999999999996 == 0.94999999999999996 +RandomNumberGeneration.tests.cpp:: passed: dist.a() == -10 for: -10 == -10 +RandomNumberGeneration.tests.cpp:: passed: dist.b() == 10 for: 10 == 10 +UniquePtr.tests.cpp:: passed: !(ptr) for: !{?} +UniquePtr.tests.cpp:: passed: ptr.get() == 0 for: 0 == 0 +UniquePtr.tests.cpp:: passed: ptr for: {?} +UniquePtr.tests.cpp:: passed: *ptr == 0 for: 0 == 0 +UniquePtr.tests.cpp:: passed: ptr.get() == naked_ptr for: 0x == 0x +UniquePtr.tests.cpp:: passed: !(ptr) for: !{?} +UniquePtr.tests.cpp:: passed: ptr.get() == 0 for: 0 == 0 +UniquePtr.tests.cpp:: passed: ptr for: {?} +UniquePtr.tests.cpp:: passed: *ptr == 0 for: 0 == 0 +UniquePtr.tests.cpp:: passed: ptr.get() == naked_ptr for: 0x == 0x +UniquePtr.tests.cpp:: passed: ptr for: {?} +UniquePtr.tests.cpp:: passed: ptr.get() != 0 for: 0x != 0 +UniquePtr.tests.cpp:: passed: *ptr == 2 for: 2 == 2 +UniquePtr.tests.cpp:: passed: !(ptr) for: !{?} +UniquePtr.tests.cpp:: passed: ptr.get() == 0 for: 0 == 0 +UniquePtr.tests.cpp:: passed: !(ptr1) for: !{?} +UniquePtr.tests.cpp:: passed: ptr2 for: {?} +UniquePtr.tests.cpp:: passed: *ptr2 == 1 for: 1 == 1 +UniquePtr.tests.cpp:: passed: !(ptr2) for: !{?} +UniquePtr.tests.cpp:: passed: ptr1 for: {?} +UniquePtr.tests.cpp:: passed: *ptr1 == 2 for: 2 == 2 +UniquePtr.tests.cpp:: passed: *ptr1 == 2 for: 2 == 2 +UniquePtr.tests.cpp:: passed: *ptr2 == 1 for: 1 == 1 +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(v) == "{ }" for: "{ }" == "{ }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(v) == "{ { \"hello\" }, { \"world\" } }" for: "{ { "hello" }, { "world" } }" +== +"{ { "hello" }, { "world" } }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(bools) == "{ }" for: "{ }" == "{ }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(bools) == "{ true }" for: "{ true }" == "{ true }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(bools) == "{ true, false }" for: "{ true, false }" == "{ true, false }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(vv) == "{ }" for: "{ }" == "{ }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(vv) == "{ 42 }" for: "{ 42 }" == "{ 42 }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(vv) == "{ 42, 250 }" for: "{ 42, 250 }" == "{ 42, 250 }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(vv) == "{ }" for: "{ }" == "{ }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(vv) == "{ 42 }" for: "{ 42 }" == "{ 42 }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(vv) == "{ 42, 250 }" for: "{ 42, 250 }" == "{ 42, 250 }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(vv) == "{ }" for: "{ }" == "{ }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(vv) == "{ \"hello\" }" for: "{ "hello" }" == "{ "hello" }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(vv) == "{ \"hello\", \"world\" }" for: "{ "hello", "world" }" +== +"{ "hello", "world" }" +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 10 for: 10 == 10 +Misc.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.capacity() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +InternalBenchmark.tests.cpp:: passed: (iterations * rate) > Catch::Benchmark::Detail::warmup_time.count() for: 160000000 (0x) > 100 +InternalBenchmark.tests.cpp:: passed: (end - start) > Catch::Benchmark::Detail::warmup_time for: 310016000 ns > 100 ms +InternalBenchmark.tests.cpp:: passed: q1 == 14.5 for: 14.5 == 14.5 +InternalBenchmark.tests.cpp:: passed: med == 18. for: 18.0 == 18.0 +InternalBenchmark.tests.cpp:: passed: q3 == 23. for: 23.0 == 23.0 +Misc.tests.cpp:: passed: +Misc.tests.cpp:: passed: +test cases: 419 | 313 passed | 86 failed | 6 skipped | 14 failed as expected +assertions: 2269 | 2087 passed | 147 failed | 35 failed as expected + + diff --git a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt new file mode 100644 index 0000000..9e3e537 --- /dev/null +++ b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt @@ -0,0 +1,2849 @@ +Filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals] +RNG seed: 1 +Misc.tests.cpp:: passed: with 1 message: 'yay' +Compilation.tests.cpp:: passed: y.v == 0 for: 0 == 0 +Compilation.tests.cpp:: passed: 0 == y.v for: 0 == 0 +Compilation.tests.cpp:: passed: t1 == t2 for: {?} == {?} +Compilation.tests.cpp:: passed: t1 != t2 for: {?} != {?} +Compilation.tests.cpp:: passed: t1 < t2 for: {?} < {?} +Compilation.tests.cpp:: passed: t1 > t2 for: {?} > {?} +Compilation.tests.cpp:: passed: t1 <= t2 for: {?} <= {?} +Compilation.tests.cpp:: passed: t1 >= t2 for: {?} >= {?} +Misc.tests.cpp:: passed: +Compilation.tests.cpp:: passed: std::memcmp(uarr, "123", sizeof(uarr)) == 0 for: 0 == 0 with 2 messages: 'uarr := "123"' and 'sarr := "456"' +Compilation.tests.cpp:: passed: std::memcmp(sarr, "456", sizeof(sarr)) == 0 for: 0 == 0 with 2 messages: 'uarr := "123"' and 'sarr := "456"' +Compilation.tests.cpp:: passed: +Compilation.tests.cpp:: passed: +Compilation.tests.cpp:: passed: h1 == h2 for: [1403 helper] == [1403 helper] +Message.tests.cpp:: warning: ' +This info message starts with a linebreak' with 1 message: ' +This warning message starts with a linebreak' +Tricky.tests.cpp:: failed: explicitly with 1 message: '1514' +Compilation.tests.cpp:: passed: std::is_same, TypeList>::value for: true +TestSpec.tests.cpp:: passed: spec.matches(*fakeTestCase("spec . char")) for: true +TestSpec.tests.cpp:: passed: spec.matches(*fakeTestCase("spec , char")) for: true +TestSpec.tests.cpp:: passed: !(spec.matches(*fakeTestCase(R"(spec \, char)"))) for: !false +TestSpec.tests.cpp:: passed: spec.matches(*fakeTestCase(R"(spec {a} char)")) for: true +TestSpec.tests.cpp:: passed: spec.matches(*fakeTestCase(R"(spec [a] char)")) for: true +TestSpec.tests.cpp:: passed: !(spec.matches(*fakeTestCase("differs but has similar tag", "[a]"))) for: !false +TestSpec.tests.cpp:: passed: spec.matches(*fakeTestCase(R"(spec \ char)")) for: true +Generators.tests.cpp:: passed: counter < 7 for: 3 < 7 +Generators.tests.cpp:: passed: counter < 7 for: 6 < 7 +Generators.tests.cpp:: passed: i != j for: 1 != 3 +Generators.tests.cpp:: passed: i != j for: 1 != 4 +Generators.tests.cpp:: passed: i != j for: 2 != 3 +Generators.tests.cpp:: passed: i != j for: 2 != 4 +PartTracker.tests.cpp:: passed: with 1 message: 'A' +PartTracker.tests.cpp:: passed: m for: 1 +PartTracker.tests.cpp:: passed: m for: 2 +PartTracker.tests.cpp:: passed: m for: 3 +PartTracker.tests.cpp:: passed: 1 +PartTracker.tests.cpp:: passed: m for: 2 +PartTracker.tests.cpp:: passed: m for: 3 +PartTracker.tests.cpp:: passed: m for: 1 +PartTracker.tests.cpp:: passed: m for: 2 +PartTracker.tests.cpp:: passed: m for: 3 +PartTracker.tests.cpp:: passed: with 1 message: 'A' +PartTracker.tests.cpp:: passed: with 3 messages: 'i := 1' and 'j := 3' and 'k := 5' +PartTracker.tests.cpp:: passed: with 1 message: 'B' +PartTracker.tests.cpp:: passed: with 3 messages: 'i := 1' and 'j := 3' and 'k := 6' +PartTracker.tests.cpp:: passed: with 1 message: 'B' +PartTracker.tests.cpp:: passed: with 3 messages: 'i := 1' and 'j := 4' and 'k := 5' +PartTracker.tests.cpp:: passed: with 3 messages: 'i := 1' and 'j := 4' and 'k := 6' +PartTracker.tests.cpp:: passed: with 1 message: 'A' +PartTracker.tests.cpp:: passed: with 3 messages: 'i := 2' and 'j := 3' and 'k := 5' +PartTracker.tests.cpp:: passed: with 1 message: 'B' +PartTracker.tests.cpp:: passed: with 3 messages: 'i := 2' and 'j := 3' and 'k := 6' +PartTracker.tests.cpp:: passed: with 1 message: 'B' +PartTracker.tests.cpp:: passed: with 3 messages: 'i := 2' and 'j := 4' and 'k := 5' +PartTracker.tests.cpp:: passed: with 3 messages: 'i := 2' and 'j := 4' and 'k := 6' +PartTracker.tests.cpp:: passed: m for: 1 +PartTracker.tests.cpp:: passed: n for: 1 +PartTracker.tests.cpp:: passed: m for: 1 +PartTracker.tests.cpp:: passed: n for: 2 +PartTracker.tests.cpp:: passed: m for: 1 +PartTracker.tests.cpp:: passed: n for: 3 +PartTracker.tests.cpp:: passed: m for: 2 +PartTracker.tests.cpp:: passed: n for: 1 +PartTracker.tests.cpp:: passed: m for: 2 +PartTracker.tests.cpp:: passed: n for: 2 +PartTracker.tests.cpp:: passed: m for: 2 +PartTracker.tests.cpp:: passed: n for: 3 +PartTracker.tests.cpp:: passed: m for: 3 +PartTracker.tests.cpp:: passed: n for: 1 +PartTracker.tests.cpp:: passed: m for: 3 +PartTracker.tests.cpp:: passed: n for: 2 +PartTracker.tests.cpp:: passed: m for: 3 +PartTracker.tests.cpp:: passed: n for: 3 +Misc.tests.cpp:: passed: +Misc.tests.cpp:: passed: +Misc.tests.cpp:: passed: +Matchers.tests.cpp:: passed: smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) for: 0.0 is within 2 ULPs of -4.9406564584124654e-324 ([-1.4821969375237396e-323, 4.9406564584124654e-324]) +Matchers.tests.cpp:: passed: smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) for: 0.0 not is within 1 ULPs of -4.9406564584124654e-324 ([-9.8813129168249309e-324, -0.0000000000000000e+00]) +Matchers.tests.cpp:: passed: smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) for: 0.0f is within 2 ULPs of -1.40129846e-45f ([-4.20389539e-45, 1.40129846e-45]) +Matchers.tests.cpp:: passed: smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) for: 0.0f not is within 1 ULPs of -1.40129846e-45f ([-2.80259693e-45, -0.00000000e+00]) +Generators.tests.cpp:: failed: unexpected exception with message: 'failure to init' +Exception.tests.cpp:: failed: unexpected exception with message: 'answer := 42' with 1 message: 'expected exception' +Exception.tests.cpp:: failed: unexpected exception with message: 'answer := 42'; expression was: thisThrows() with 1 message: 'expected exception' +Exception.tests.cpp:: passed: thisThrows() with 1 message: 'answer := 42' +Compilation.tests.cpp:: passed: 42 == f for: 42 == {?} +Compilation.tests.cpp:: passed: a == t for: 3 == 3 +Compilation.tests.cpp:: passed: a == t for: 3 == 3 +Compilation.tests.cpp:: passed: throws_int(true) +Compilation.tests.cpp:: passed: throws_int(true), int +Compilation.tests.cpp:: passed: throws_int(false) +Compilation.tests.cpp:: passed: "aaa", Catch::Matchers::EndsWith("aaa") for: "aaa" ends with: "aaa" +Compilation.tests.cpp:: passed: templated_tests(3) for: true +Misc.tests.cpp:: failed: f() == 0 for: 1 == 0 +Misc.tests.cpp:: passed: errno_after == 1 for: 1 == 1 +Compilation.tests.cpp:: passed: x == 4 for: {?} == 4 with 1 message: 'dummy := 0' +Misc.tests.cpp:: passed: with 1 message: 'Everything is OK' +Misc.tests.cpp:: passed: with 1 message: 'Everything is OK' +Misc.tests.cpp:: passed: with 1 message: 'Everything is OK' +Misc.tests.cpp:: passed: with 1 message: 'Everything is OK' +Misc.tests.cpp:: passed: with 1 message: 'Everything is OK' +Condition.tests.cpp:: failed: false != false +Condition.tests.cpp:: failed: true != true +Condition.tests.cpp:: failed: !true for: false +Condition.tests.cpp:: failed: !(true) for: !true +Condition.tests.cpp:: failed: !trueValue for: false +Condition.tests.cpp:: failed: !(trueValue) for: !true +Condition.tests.cpp:: failed: !(1 == 1) for: false +Condition.tests.cpp:: failed: !(1 == 1) +Condition.tests.cpp:: passed: false == false +Condition.tests.cpp:: passed: true == true +Condition.tests.cpp:: passed: !false for: true +Condition.tests.cpp:: passed: !(false) for: !false +Condition.tests.cpp:: passed: !falseValue for: true +Condition.tests.cpp:: passed: !(falseValue) for: !false +Condition.tests.cpp:: passed: !(1 == 2) for: true +Condition.tests.cpp:: passed: !(1 == 2) +Tricky.tests.cpp:: passed: is_true::value == true for: true == true +Tricky.tests.cpp:: passed: true == is_true::value for: true == true +Tricky.tests.cpp:: passed: is_true::value == false for: false == false +Tricky.tests.cpp:: passed: false == is_true::value for: false == false +Tricky.tests.cpp:: passed: !is_true::value for: true +Tricky.tests.cpp:: passed: !!is_true::value for: true +Tricky.tests.cpp:: passed: is_true::value for: true +Tricky.tests.cpp:: passed: !(is_true::value) for: !false +Generators.tests.cpp:: passed: x < y for: 1 < 4 +Generators.tests.cpp:: passed: y < z for: 4 < 7 +Generators.tests.cpp:: passed: x < z for: 1 < 7 +Generators.tests.cpp:: passed: x < y for: 1 < 4 +Generators.tests.cpp:: passed: y < z for: 4 < 8 +Generators.tests.cpp:: passed: x < z for: 1 < 8 +Generators.tests.cpp:: passed: x < y for: 1 < 4 +Generators.tests.cpp:: passed: y < z for: 4 < 9 +Generators.tests.cpp:: passed: x < z for: 1 < 9 +Generators.tests.cpp:: passed: x < y for: 1 < 5 +Generators.tests.cpp:: passed: y < z for: 5 < 7 +Generators.tests.cpp:: passed: x < z for: 1 < 7 +Generators.tests.cpp:: passed: x < y for: 1 < 5 +Generators.tests.cpp:: passed: y < z for: 5 < 8 +Generators.tests.cpp:: passed: x < z for: 1 < 8 +Generators.tests.cpp:: passed: x < y for: 1 < 5 +Generators.tests.cpp:: passed: y < z for: 5 < 9 +Generators.tests.cpp:: passed: x < z for: 1 < 9 +Generators.tests.cpp:: passed: x < y for: 1 < 6 +Generators.tests.cpp:: passed: y < z for: 6 < 7 +Generators.tests.cpp:: passed: x < z for: 1 < 7 +Generators.tests.cpp:: passed: x < y for: 1 < 6 +Generators.tests.cpp:: passed: y < z for: 6 < 8 +Generators.tests.cpp:: passed: x < z for: 1 < 8 +Generators.tests.cpp:: passed: x < y for: 1 < 6 +Generators.tests.cpp:: passed: y < z for: 6 < 9 +Generators.tests.cpp:: passed: x < z for: 1 < 9 +Generators.tests.cpp:: passed: x < y for: 2 < 4 +Generators.tests.cpp:: passed: y < z for: 4 < 7 +Generators.tests.cpp:: passed: x < z for: 2 < 7 +Generators.tests.cpp:: passed: x < y for: 2 < 4 +Generators.tests.cpp:: passed: y < z for: 4 < 8 +Generators.tests.cpp:: passed: x < z for: 2 < 8 +Generators.tests.cpp:: passed: x < y for: 2 < 4 +Generators.tests.cpp:: passed: y < z for: 4 < 9 +Generators.tests.cpp:: passed: x < z for: 2 < 9 +Generators.tests.cpp:: passed: x < y for: 2 < 5 +Generators.tests.cpp:: passed: y < z for: 5 < 7 +Generators.tests.cpp:: passed: x < z for: 2 < 7 +Generators.tests.cpp:: passed: x < y for: 2 < 5 +Generators.tests.cpp:: passed: y < z for: 5 < 8 +Generators.tests.cpp:: passed: x < z for: 2 < 8 +Generators.tests.cpp:: passed: x < y for: 2 < 5 +Generators.tests.cpp:: passed: y < z for: 5 < 9 +Generators.tests.cpp:: passed: x < z for: 2 < 9 +Generators.tests.cpp:: passed: x < y for: 2 < 6 +Generators.tests.cpp:: passed: y < z for: 6 < 7 +Generators.tests.cpp:: passed: x < z for: 2 < 7 +Generators.tests.cpp:: passed: x < y for: 2 < 6 +Generators.tests.cpp:: passed: y < z for: 6 < 8 +Generators.tests.cpp:: passed: x < z for: 2 < 8 +Generators.tests.cpp:: passed: x < y for: 2 < 6 +Generators.tests.cpp:: passed: y < z for: 6 < 9 +Generators.tests.cpp:: passed: x < z for: 2 < 9 +Generators.tests.cpp:: passed: x < y for: 3 < 4 +Generators.tests.cpp:: passed: y < z for: 4 < 7 +Generators.tests.cpp:: passed: x < z for: 3 < 7 +Generators.tests.cpp:: passed: x < y for: 3 < 4 +Generators.tests.cpp:: passed: y < z for: 4 < 8 +Generators.tests.cpp:: passed: x < z for: 3 < 8 +Generators.tests.cpp:: passed: x < y for: 3 < 4 +Generators.tests.cpp:: passed: y < z for: 4 < 9 +Generators.tests.cpp:: passed: x < z for: 3 < 9 +Generators.tests.cpp:: passed: x < y for: 3 < 5 +Generators.tests.cpp:: passed: y < z for: 5 < 7 +Generators.tests.cpp:: passed: x < z for: 3 < 7 +Generators.tests.cpp:: passed: x < y for: 3 < 5 +Generators.tests.cpp:: passed: y < z for: 5 < 8 +Generators.tests.cpp:: passed: x < z for: 3 < 8 +Generators.tests.cpp:: passed: x < y for: 3 < 5 +Generators.tests.cpp:: passed: y < z for: 5 < 9 +Generators.tests.cpp:: passed: x < z for: 3 < 9 +Generators.tests.cpp:: passed: x < y for: 3 < 6 +Generators.tests.cpp:: passed: y < z for: 6 < 7 +Generators.tests.cpp:: passed: x < z for: 3 < 7 +Generators.tests.cpp:: passed: x < y for: 3 < 6 +Generators.tests.cpp:: passed: y < z for: 6 < 8 +Generators.tests.cpp:: passed: x < z for: 3 < 8 +Generators.tests.cpp:: passed: x < y for: 3 < 6 +Generators.tests.cpp:: passed: y < z for: 6 < 9 +Generators.tests.cpp:: passed: x < z for: 3 < 9 +Class.tests.cpp:: failed: s == "world" for: "hello" == "world" +Class.tests.cpp:: passed: s == "hello" for: "hello" == "hello" +Class.tests.cpp:: failed: Template_Fixture_2::m_a.size() == 1 for: 0 == 1 +Class.tests.cpp:: failed: Template_Fixture_2::m_a.size() == 1 for: 0 == 1 +Class.tests.cpp:: failed: Template_Fixture_2::m_a.size() == 1 for: 0 == 1 +Class.tests.cpp:: failed: Template_Fixture_2::m_a.size() == 1 for: 0 == 1 +Class.tests.cpp:: passed: Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +Class.tests.cpp:: passed: Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +Class.tests.cpp:: passed: Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +Class.tests.cpp:: passed: Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +Class.tests.cpp:: failed: Template_Fixture_2{}.m_a.size() < 2 for: 6 < 2 +Class.tests.cpp:: failed: Template_Fixture_2{}.m_a.size() < 2 for: 2 < 2 +Class.tests.cpp:: failed: Template_Fixture_2{}.m_a.size() < 2 for: 6 < 2 +Class.tests.cpp:: failed: Template_Fixture_2{}.m_a.size() < 2 for: 2 < 2 +Class.tests.cpp:: passed: Template_Fixture_2{}.m_a.size() >= 2 for: 6 >= 2 +Class.tests.cpp:: passed: Template_Fixture_2{}.m_a.size() >= 2 for: 2 >= 2 +Class.tests.cpp:: passed: Template_Fixture_2{}.m_a.size() >= 2 for: 6 >= 2 +Class.tests.cpp:: passed: Template_Fixture_2{}.m_a.size() >= 2 for: 2 >= 2 +Class.tests.cpp:: failed: Template_Fixture::m_a == 2 for: 1.0 == 2 +Class.tests.cpp:: failed: Template_Fixture::m_a == 2 for: 1.0f == 2 +Class.tests.cpp:: failed: Template_Fixture::m_a == 2 for: 1 == 2 +Class.tests.cpp:: passed: Template_Fixture::m_a == 1 for: 1.0 == 1 +Class.tests.cpp:: passed: Template_Fixture::m_a == 1 for: 1.0f == 1 +Class.tests.cpp:: passed: Template_Fixture::m_a == 1 for: 1 == 1 +Class.tests.cpp:: failed: Nttp_Fixture::value == 0 for: 1 == 0 +Class.tests.cpp:: failed: Nttp_Fixture::value == 0 for: 3 == 0 +Class.tests.cpp:: failed: Nttp_Fixture::value == 0 for: 6 == 0 +Class.tests.cpp:: passed: Nttp_Fixture::value > 0 for: 1 > 0 +Class.tests.cpp:: passed: Nttp_Fixture::value > 0 for: 3 > 0 +Class.tests.cpp:: passed: Nttp_Fixture::value > 0 for: 6 > 0 +Class.tests.cpp:: failed: m_a == 2 for: 1 == 2 +Class.tests.cpp:: passed: m_a == 1 for: 1 == 1 +Class.tests.cpp:: passed: m_a++ == 0 for: 0 == 0 +Class.tests.cpp:: failed: m_a == 0 for: 1 == 0 +Class.tests.cpp:: passed: m_a++ == 0 for: 0 == 0 +Class.tests.cpp:: passed: m_a == 1 for: 1 == 1 +Misc.tests.cpp:: passed: x.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: x.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: x.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: x.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: x.size() > 0 for: 42 > 0 +Misc.tests.cpp:: passed: x.size() > 0 for: 9 > 0 +Misc.tests.cpp:: passed: x.size() > 0 for: 42 > 0 +Misc.tests.cpp:: passed: x.size() > 0 for: 9 > 0 +Approx.tests.cpp:: passed: d == 1.23_a for: 1.22999999999999998 +== +Approx( 1.22999999999999998 ) +Approx.tests.cpp:: passed: d != 1.22_a for: 1.22999999999999998 +!= +Approx( 1.21999999999999997 ) +Approx.tests.cpp:: passed: -d == -1.23_a for: -1.22999999999999998 +== +Approx( -1.22999999999999998 ) +Approx.tests.cpp:: passed: d == 1.2_a .epsilon(.1) for: 1.22999999999999998 +== +Approx( 1.19999999999999996 ) +Approx.tests.cpp:: passed: d != 1.2_a .epsilon(.001) for: 1.22999999999999998 +!= +Approx( 1.19999999999999996 ) +Approx.tests.cpp:: passed: d == 1_a .epsilon(.3) for: 1.22999999999999998 == Approx( 1.0 ) +Misc.tests.cpp:: passed: with 1 message: 'that's not flying - that's failing in style' +Misc.tests.cpp:: failed: explicitly with 1 message: 'to infinity and beyond' +Tricky.tests.cpp:: failed: &o1 == &o2 for: 0x == 0x +Tricky.tests.cpp:: failed: o1 == o2 for: {?} == {?} +Approx.tests.cpp:: passed: 104.0 != Approx(100.0) for: 104.0 != Approx( 100.0 ) +Approx.tests.cpp:: passed: 104.0 == Approx(100.0).margin(5) for: 104.0 == Approx( 100.0 ) +Approx.tests.cpp:: passed: 104.0 == Approx(100.0).margin(4) for: 104.0 == Approx( 100.0 ) +Approx.tests.cpp:: passed: 104.0 != Approx(100.0).margin(3) for: 104.0 != Approx( 100.0 ) +Approx.tests.cpp:: passed: 100.3 != Approx(100.0) for: 100.29999999999999716 != Approx( 100.0 ) +Approx.tests.cpp:: passed: 100.3 == Approx(100.0).margin(0.5) for: 100.29999999999999716 == Approx( 100.0 ) +Tricky.tests.cpp:: passed: i++ == 7 for: 7 == 7 +Tricky.tests.cpp:: passed: i++ == 8 for: 8 == 8 +Exception.tests.cpp:: passed: 1 == 1 +Exception.tests.cpp:: failed: unexpected exception with message: 'unexpected exception'; expression was: {Unknown expression after the reported line} +VariadicMacros.tests.cpp:: passed: with 1 message: 'anonymous test case' +Approx.tests.cpp:: passed: Approx(0).margin(0) +Approx.tests.cpp:: passed: Approx(0).margin(1234656) +Approx.tests.cpp:: passed: Approx(0).margin(-2), std::domain_error +Approx.tests.cpp:: passed: Approx(0).epsilon(0) +Approx.tests.cpp:: passed: Approx(0).epsilon(1) +Approx.tests.cpp:: passed: Approx(0).epsilon(-0.001), std::domain_error +Approx.tests.cpp:: passed: Approx(0).epsilon(1.0001), std::domain_error +Approx.tests.cpp:: passed: 0.25f == Approx(0.0f).margin(0.25f) for: 0.25f == Approx( 0.0 ) +Approx.tests.cpp:: passed: 0.0f == Approx(0.25f).margin(0.25f) for: 0.0f == Approx( 0.25 ) +Approx.tests.cpp:: passed: 0.5f == Approx(0.25f).margin(0.25f) for: 0.5f == Approx( 0.25 ) +Approx.tests.cpp:: passed: 245.0f == Approx(245.25f).margin(0.25f) for: 245.0f == Approx( 245.25 ) +Approx.tests.cpp:: passed: 245.5f == Approx(245.25f).margin(0.25f) for: 245.5f == Approx( 245.25 ) +Approx.tests.cpp:: passed: divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) for: 3.14285714285714279 +== +Approx( 3.14100000000000001 ) +Approx.tests.cpp:: passed: divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) for: 3.14285714285714279 +!= +Approx( 3.14100000000000001 ) +Approx.tests.cpp:: passed: d != Approx( 1.231 ) for: 1.22999999999999998 +!= +Approx( 1.23100000000000009 ) +Approx.tests.cpp:: passed: d == Approx( 1.231 ).epsilon( 0.1 ) for: 1.22999999999999998 +== +Approx( 1.23100000000000009 ) +Approx.tests.cpp:: passed: 1.23f == Approx( 1.23f ) for: 1.230000019f +== +Approx( 1.23000001907348633 ) +Approx.tests.cpp:: passed: 0.0f == Approx( 0.0f ) for: 0.0f == Approx( 0.0 ) +Approx.tests.cpp:: passed: 1 == Approx( 1 ) for: 1 == Approx( 1.0 ) +Approx.tests.cpp:: passed: 0 == Approx( 0 ) for: 0 == Approx( 0.0 ) +Approx.tests.cpp:: passed: 1.0f == Approx( 1 ) for: 1.0f == Approx( 1.0 ) +Approx.tests.cpp:: passed: 0 == Approx( dZero) for: 0 == Approx( 0.0 ) +Approx.tests.cpp:: passed: 0 == Approx( dSmall ).margin( 0.001 ) for: 0 == Approx( 0.00001 ) +Approx.tests.cpp:: passed: 1.234f == Approx( dMedium ) for: 1.233999968f +== +Approx( 1.23399999999999999 ) +Approx.tests.cpp:: passed: dMedium == Approx( 1.234f ) for: 1.23399999999999999 +== +Approx( 1.23399996757507324 ) +Matchers.tests.cpp:: passed: 1, Predicate( alwaysTrue, "always true" ) for: 1 matches predicate: "always true" +Matchers.tests.cpp:: passed: 1, !Predicate( alwaysFalse, "always false" ) for: 1 not matches predicate: "always false" +Matchers.tests.cpp:: passed: "Hello olleH", Predicate( []( std::string const& str ) -> bool { return str.front() == str.back(); }, "First and last character should be equal" ) for: "Hello olleH" matches predicate: "First and last character should be equal" +Matchers.tests.cpp:: passed: "This wouldn't pass", !Predicate( []( std::string const& str ) -> bool { return str.front() == str.back(); } ) for: "This wouldn't pass" not matches undescribed predicate +Compilation.tests.cpp:: passed: lhs | rhs for: Val: 1 | Val: 2 +Compilation.tests.cpp:: passed: !(lhs & rhs) for: !(Val: 1 & Val: 2) +Compilation.tests.cpp:: passed: HasBitOperators{ 1 } & HasBitOperators{ 1 } for: Val: 1 & Val: 1 +Compilation.tests.cpp:: passed: lhs ^ rhs for: Val: 1 ^ Val: 2 +Compilation.tests.cpp:: passed: !(lhs ^ lhs) for: !(Val: 1 ^ Val: 1) +Tricky.tests.cpp:: passed: true +Tricky.tests.cpp:: passed: true +Tricky.tests.cpp:: passed: true +Tricky.tests.cpp:: passed: true +Tricky.tests.cpp:: passed: true +Tricky.tests.cpp:: passed: true +MatchersRanges.tests.cpp:: passed: a, Contains(1) for: { 1, 2, 3 } contains element 1 +MatchersRanges.tests.cpp:: passed: b, Contains(1) for: { 0, 1, 2 } contains element 1 +MatchersRanges.tests.cpp:: passed: c, !Contains(1) for: { 4, 5, 6 } not contains element 1 +MatchersRanges.tests.cpp:: passed: a, Contains(0, close_enough) for: { 1, 2, 3 } contains element 0 +MatchersRanges.tests.cpp:: passed: b, Contains(0, close_enough) for: { 0, 1, 2 } contains element 0 +MatchersRanges.tests.cpp:: passed: c, !Contains(0, close_enough) for: { 4, 5, 6 } not contains element 0 +MatchersRanges.tests.cpp:: passed: a, Contains(4, [](auto&& lhs, size_t sz) { return lhs.size() == sz; }) for: { "abc", "abcd", "abcde" } contains element 4 +MatchersRanges.tests.cpp:: passed: in, Contains(1) for: { 1, 2, 3, 4, 5 } contains element 1 +MatchersRanges.tests.cpp:: passed: in, !Contains(8) for: { 1, 2, 3, 4, 5 } not contains element 8 +MatchersRanges.tests.cpp:: passed: in, Contains(MoveOnlyTestElement{ 2 }) for: { 1, 2, 3 } contains element 2 +MatchersRanges.tests.cpp:: passed: in, !Contains(MoveOnlyTestElement{ 9 }) for: { 1, 2, 3 } not contains element 9 +MatchersRanges.tests.cpp:: passed: in, Contains(Catch::Matchers::WithinAbs(0.5, 0.5)) for: { 1.0, 2.0, 3.0, 0.0 } contains element matching is within 0.5 of 0.5 +MatchersRanges.tests.cpp:: passed: empty_array, IsEmpty() for: { } is empty +MatchersRanges.tests.cpp:: passed: non_empty_array, !IsEmpty() for: { 0.0 } not is empty +MatchersRanges.tests.cpp:: passed: empty_vec, IsEmpty() for: { } is empty +MatchersRanges.tests.cpp:: passed: non_empty_vec, !IsEmpty() for: { 'a', 'b', 'c' } not is empty +MatchersRanges.tests.cpp:: passed: inner_lists_are_empty, !IsEmpty() for: { { } } not is empty +MatchersRanges.tests.cpp:: passed: inner_lists_are_empty.front(), IsEmpty() for: { } is empty +MatchersRanges.tests.cpp:: passed: has_empty{}, !IsEmpty() for: {?} not is empty +MatchersRanges.tests.cpp:: passed: unrelated::ADL_empty{}, IsEmpty() for: {?} is empty +Message.tests.cpp:: passed: with 7 messages: 'a := 1' and 'b := 2' and 'c := 3' and 'a + b := 3' and 'a+b := 3' and 'c > b := true' and 'a == 1 := true' +Message.tests.cpp:: passed: with 7 messages: 'custom_index_op{1, 2, 3}[0, 1, 2] := 0' and 'custom_index_op{1, 2, 3}[(0, 1)] := 0' and 'custom_index_op{1, 2, 3}[0] := 0' and '(helper_1436{12, -12}) := { 12, -12 }' and '(helper_1436(-12, 12)) := { -12, 12 }' and '(1, 2) := 2' and '(2, 3) := 3' +Message.tests.cpp:: passed: with 11 messages: '("comma, in string", "escaped, \", ") := "escaped, ", "' and '"single quote in string,'," := "single quote in string,',"' and '"some escapes, \\,\\\\" := "some escapes, \,\\"' and '"some, ), unmatched, } prenheses {[<" := "some, ), unmatched, } prenheses {[<"' and ''"' := '"'' and ''\'' := '''' and '',' := ','' and ''}' := '}'' and '')' := ')'' and ''(' := '('' and ''{' := '{'' +ToStringGeneral.tests.cpp:: passed: true with 1 message: 'i := 2' +ToStringGeneral.tests.cpp:: passed: true with 1 message: '3' +Details.tests.cpp:: passed: eq( "", "" ) for: true +Details.tests.cpp:: passed: !(eq( "", "a" )) for: !false +Details.tests.cpp:: passed: eq( "a", "a" ) for: true +Details.tests.cpp:: passed: eq( "a", "A" ) for: true +Details.tests.cpp:: passed: eq( "A", "a" ) for: true +Details.tests.cpp:: passed: eq( "A", "A" ) for: true +Details.tests.cpp:: passed: !(eq( "a", "b" )) for: !false +Details.tests.cpp:: passed: !(eq( "a", "B" )) for: !false +Details.tests.cpp:: passed: lt( "", "a" ) for: true +Details.tests.cpp:: passed: !(lt( "a", "a" )) for: !false +Details.tests.cpp:: passed: !(lt( "", "" )) for: !false +Details.tests.cpp:: passed: lt( "a", "b" ) for: true +Details.tests.cpp:: passed: lt( "a", "B" ) for: true +Details.tests.cpp:: passed: lt( "A", "b" ) for: true +Details.tests.cpp:: passed: lt( "A", "B" ) for: true +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify('\t') == "'\\t'" for: "'\t'" == "'\t'" +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify('\n') == "'\\n'" for: "'\n'" == "'\n'" +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify('\r') == "'\\r'" for: "'\r'" == "'\r'" +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify('\f') == "'\\f'" for: "'\f'" == "'\f'" +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify( ' ' ) == "' '" for: "' '" == "' '" +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify( 'A' ) == "'A'" for: "'A'" == "'A'" +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify( 'z' ) == "'z'" for: "'z'" == "'z'" +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify( '\0' ) == "0" for: "0" == "0" +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify( static_cast(2) ) == "2" for: "2" == "2" +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify( static_cast(5) ) == "5" for: "5" == "5" +Clara.tests.cpp:: passed: name.empty() for: true +Clara.tests.cpp:: passed: result for: {?} +Clara.tests.cpp:: passed: result.type() == Catch::Clara::Detail::ResultType::Ok for: 0 == 0 +Clara.tests.cpp:: passed: parsed.type() == Catch::Clara::ParseResultType::NoMatch for: 1 == 1 +Clara.tests.cpp:: passed: parsed.remainingTokens().count() == 2 for: 2 == 2 +Clara.tests.cpp:: passed: name.empty() for: true +Clara.tests.cpp:: passed: name.empty() for: true +Clara.tests.cpp:: passed: name == "foo" for: "foo" == "foo" +Clara.tests.cpp:: passed: !(parse_result) for: !{?} +Clara.tests.cpp:: passed: parse_result for: {?} +Clara.tests.cpp:: passed: res == std::vector{ "aaa", "bbb" } for: { "aaa", "bbb" } == { "aaa", "bbb" } +ColourImpl.tests.cpp:: passed: streamWrapper.str().empty() for: true +ColourImpl.tests.cpp:: passed: streamWrapper.str() == "1\nUsing code: 2\n2\nUsing code: 0\n3\n" for: "1 +Using code: 2 +2 +Using code: 0 +3 +" +== +"1 +Using code: 2 +2 +Using code: 0 +3 +" +ColourImpl.tests.cpp:: passed: streamWrapper.str() == "Using code: 2\nA\nB\nUsing code: 0\nC\n" for: "Using code: 2 +A +B +Using code: 0 +C +" +== +"Using code: 2 +A +B +Using code: 0 +C +" +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same< decltype( ( MatcherA() && MatcherB() ) && MatcherC() ), Catch::Matchers::Detail:: MatchAllOfGeneric>::value' +Matchers.tests.cpp:: passed: 1, ( MatcherA() && MatcherB() ) && MatcherC() for: 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 ) +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same< decltype( MatcherA() && ( MatcherB() && MatcherC() ) ), Catch::Matchers::Detail:: MatchAllOfGeneric>::value' +Matchers.tests.cpp:: passed: 1, MatcherA() && ( MatcherB() && MatcherC() ) for: 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 ) +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same< decltype( ( MatcherA() && MatcherB() ) && ( MatcherC() && MatcherD() ) ), Catch::Matchers::Detail:: MatchAllOfGeneric>:: value' +Matchers.tests.cpp:: passed: 1, ( MatcherA() && MatcherB() ) && ( MatcherC() && MatcherD() ) for: 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 and equals: true ) +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same< decltype( ( MatcherA() || MatcherB() ) || MatcherC() ), Catch::Matchers::Detail:: MatchAnyOfGeneric>::value' +Matchers.tests.cpp:: passed: 1, ( MatcherA() || MatcherB() ) || MatcherC() for: 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 ) +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same< decltype( MatcherA() || ( MatcherB() || MatcherC() ) ), Catch::Matchers::Detail:: MatchAnyOfGeneric>::value' +Matchers.tests.cpp:: passed: 1, MatcherA() || ( MatcherB() || MatcherC() ) for: 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 ) +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same< decltype( ( MatcherA() || MatcherB() ) || ( MatcherC() || MatcherD() ) ), Catch::Matchers::Detail:: MatchAnyOfGeneric>:: value' +Matchers.tests.cpp:: passed: 1, ( MatcherA() || MatcherB() ) || ( MatcherC() || MatcherD() ) for: 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 or equals: true ) +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same< decltype( !MatcherA() ), Catch::Matchers::Detail::MatchNotOfGeneric>::value' +Matchers.tests.cpp:: passed: 0, !MatcherA() for: 0 not equals: (int) 1 or (string) "1" +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same::value' +Matchers.tests.cpp:: passed: 1, !!MatcherA() for: 1 equals: (int) 1 or (string) "1" +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same< decltype( !!!MatcherA() ), Catch::Matchers::Detail::MatchNotOfGeneric>::value' +Matchers.tests.cpp:: passed: 0, !!!MatcherA() for: 0 not equals: (int) 1 or (string) "1" +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same::value' +Matchers.tests.cpp:: passed: 1, !!!!MatcherA() for: 1 equals: (int) 1 or (string) "1" +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same>::value' +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same>::value' +Matchers.tests.cpp:: passed: 1, MatcherA() || MatcherB() for: 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 ) +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same>::value' +Matchers.tests.cpp:: passed: 1, MatcherA() && MatcherB() for: 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 ) +Matchers.tests.cpp:: passed: with 1 message: 'std::is_same< decltype( MatcherA() || !MatcherB() ), Catch::Matchers::Detail::MatchAnyOfGeneric< MatcherA, Catch::Matchers::Detail::MatchNotOfGeneric>>::value' +Matchers.tests.cpp:: passed: 1, MatcherA() || !MatcherB() for: 1 ( equals: (int) 1 or (string) "1" or not equals: (long long) 1 ) +Matchers.tests.cpp:: passed: vec, Predicate>( []( auto const& v ) { return std::all_of( v.begin(), v.end(), []( int elem ) { return elem % 2 == 1; } ); }, "All elements are odd" ) && !EqualsRange( a ) for: { 1, 3, 5 } ( matches predicate: "All elements are odd" and not Equals: { 5, 3, 1 } ) +Matchers.tests.cpp:: passed: str, StartsWith( "foo" ) && EqualsRange( arr ) && EndsWith( "bar" ) for: "foobar" ( starts with: "foo" and Equals: { 'f', 'o', 'o', 'b', 'a', 'r' } and ends with: "bar" ) +Matchers.tests.cpp:: passed: str, StartsWith( "foo" ) && !EqualsRange( bad_arr ) && EndsWith( "bar" ) for: "foobar" ( starts with: "foo" and not Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } and ends with: "bar" ) +Matchers.tests.cpp:: passed: str, EqualsRange( arr ) && StartsWith( "foo" ) && EndsWith( "bar" ) for: "foobar" ( Equals: { 'f', 'o', 'o', 'b', 'a', 'r' } and starts with: "foo" and ends with: "bar" ) +Matchers.tests.cpp:: passed: str, !EqualsRange( bad_arr ) && StartsWith( "foo" ) && EndsWith( "bar" ) for: "foobar" ( not Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } and starts with: "foo" and ends with: "bar" ) +Matchers.tests.cpp:: passed: str, EqualsRange( bad_arr ) || ( StartsWith( "foo" ) && EndsWith( "bar" ) ) for: "foobar" ( Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } or ( starts with: "foo" and ends with: "bar" ) ) +Matchers.tests.cpp:: passed: str, ( StartsWith( "foo" ) && EndsWith( "bar" ) ) || EqualsRange( bad_arr ) for: "foobar" ( ( starts with: "foo" and ends with: "bar" ) or Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } ) +Matchers.tests.cpp:: passed: container, EqualsRange( a ) || EqualsRange( b ) || EqualsRange( c ) for: { 1, 2, 3 } ( Equals: { 1, 2, 3 } or Equals: { 0, 1, 2 } or Equals: { 4, 5, 6 } ) +Tricky.tests.cpp:: passed: std::vector{constructor_throws{}, constructor_throws{}} +Tricky.tests.cpp:: passed: std::vector{constructor_throws{}, constructor_throws{}} +Tricky.tests.cpp:: passed: std::vector{1, 2, 3} == std::vector{1, 2, 3} +Tricky.tests.cpp:: passed: std::vector{1, 2, 3} == std::vector{1, 2, 3} +Tricky.tests.cpp:: passed: std::vector{1, 2} == std::vector{1, 2} for: { 1, 2 } == { 1, 2 } +Tricky.tests.cpp:: passed: std::vector{1, 2} == std::vector{1, 2} for: { 1, 2 } == { 1, 2 } +Tricky.tests.cpp:: passed: !(std::vector{1, 2} == std::vector{1, 2, 3}) for: !({ 1, 2 } == { 1, 2, 3 }) +Tricky.tests.cpp:: passed: !(std::vector{1, 2} == std::vector{1, 2, 3}) for: !({ 1, 2 } == { 1, 2, 3 }) +Tricky.tests.cpp:: passed: std::vector{1, 2} == std::vector{1, 2} for: { 1, 2 } == { 1, 2 } +Tricky.tests.cpp:: passed: std::vector{1, 2} == std::vector{1, 2} for: { 1, 2 } == { 1, 2 } +Tricky.tests.cpp:: passed: true +Tricky.tests.cpp:: passed: std::vector{1, 2} == std::vector{1, 2} for: { 1, 2 } == { 1, 2 } +Tricky.tests.cpp:: passed: a for: 0x +Tricky.tests.cpp:: passed: a == &foo for: 0x == 0x +RandomNumberGeneration.tests.cpp:: passed: SimplePcg32{} == SimplePcg32{} for: {?} == {?} +RandomNumberGeneration.tests.cpp:: passed: SimplePcg32{ 0 } != SimplePcg32{} for: {?} != {?} +RandomNumberGeneration.tests.cpp:: passed: !(SimplePcg32{ 1 } == SimplePcg32{ 2 }) for: !({?} == {?}) +RandomNumberGeneration.tests.cpp:: passed: !(SimplePcg32{ 1 } != SimplePcg32{ 1 }) for: !({?} != {?}) +Approx.tests.cpp:: passed: td == Approx(10.0) for: StrongDoubleTypedef(10) == Approx( 10.0 ) +Approx.tests.cpp:: passed: Approx(10.0) == td for: Approx( 10.0 ) == StrongDoubleTypedef(10) +Approx.tests.cpp:: passed: td != Approx(11.0) for: StrongDoubleTypedef(10) != Approx( 11.0 ) +Approx.tests.cpp:: passed: Approx(11.0) != td for: Approx( 11.0 ) != StrongDoubleTypedef(10) +Approx.tests.cpp:: passed: td <= Approx(10.0) for: StrongDoubleTypedef(10) <= Approx( 10.0 ) +Approx.tests.cpp:: passed: td <= Approx(11.0) for: StrongDoubleTypedef(10) <= Approx( 11.0 ) +Approx.tests.cpp:: passed: Approx(10.0) <= td for: Approx( 10.0 ) <= StrongDoubleTypedef(10) +Approx.tests.cpp:: passed: Approx(9.0) <= td for: Approx( 9.0 ) <= StrongDoubleTypedef(10) +Approx.tests.cpp:: passed: td >= Approx(9.0) for: StrongDoubleTypedef(10) >= Approx( 9.0 ) +Approx.tests.cpp:: passed: td >= Approx(td) for: StrongDoubleTypedef(10) >= Approx( 10.0 ) +Approx.tests.cpp:: passed: Approx(td) >= td for: Approx( 10.0 ) >= StrongDoubleTypedef(10) +Approx.tests.cpp:: passed: Approx(11.0) >= td for: Approx( 11.0 ) >= StrongDoubleTypedef(10) +Condition.tests.cpp:: passed: 54 == 6*9 for: 54 == 54 +Condition.tests.cpp:: passed: ( -1 > 2u ) for: true +Condition.tests.cpp:: passed: -1 > 2u for: -1 > 2 +Condition.tests.cpp:: passed: ( 2u < -1 ) for: true +Condition.tests.cpp:: passed: 2u < -1 for: 2 < -1 +Condition.tests.cpp:: passed: ( minInt > 2u ) for: true +Condition.tests.cpp:: passed: minInt > 2u for: -2147483648 > 2 +Condition.tests.cpp:: passed: i == 1 for: 1 == 1 +Condition.tests.cpp:: passed: ui == 2 for: 2 == 2 +Condition.tests.cpp:: passed: l == 3 for: 3 == 3 +Condition.tests.cpp:: passed: ul == 4 for: 4 == 4 +Condition.tests.cpp:: passed: c == 5 for: 5 == 5 +Condition.tests.cpp:: passed: uc == 6 for: 6 == 6 +Condition.tests.cpp:: passed: 1 == i for: 1 == 1 +Condition.tests.cpp:: passed: 2 == ui for: 2 == 2 +Condition.tests.cpp:: passed: 3 == l for: 3 == 3 +Condition.tests.cpp:: passed: 4 == ul for: 4 == 4 +Condition.tests.cpp:: passed: 5 == c for: 5 == 5 +Condition.tests.cpp:: passed: 6 == uc for: 6 == 6 +Condition.tests.cpp:: passed: (std::numeric_limits::max)() > ul for: 4294967295 (0x) > 4 +Matchers.tests.cpp:: passed: !(matcher.match( 1 )) for: !false +Matchers.tests.cpp:: passed: first.matchCalled for: true +Matchers.tests.cpp:: passed: !second.matchCalled for: true +Matchers.tests.cpp:: passed: matcher.match( 1 ) for: true +Matchers.tests.cpp:: passed: first.matchCalled for: true +Matchers.tests.cpp:: passed: !second.matchCalled for: true +Matchers.tests.cpp:: passed: !(matcher.match( 1 )) for: !false +Matchers.tests.cpp:: passed: first.matchCalled for: true +Matchers.tests.cpp:: passed: !second.matchCalled for: true +Matchers.tests.cpp:: passed: matcher.match( 1 ) for: true +Matchers.tests.cpp:: passed: first.matchCalled for: true +Matchers.tests.cpp:: passed: !second.matchCalled for: true +Matchers.tests.cpp:: failed: testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "not there" (case insensitive) +Matchers.tests.cpp:: failed: testStringForMatching(), ContainsSubstring( "STRING" ) for: "this string contains 'abc' as a substring" contains: "STRING" +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: elem % 2 == 1 for: 1 == 1 +Generators.tests.cpp:: passed: call_count == 1 for: 1 == 1 +Generators.tests.cpp:: passed: make_data().size() == test_count for: 6 == 6 +Stream.tests.cpp:: passed: Catch::makeStream( "-" )->isConsole() for: true +Exception.tests.cpp:: failed: unexpected exception with message: 'custom exception - not std'; expression was: throwCustom() +Exception.tests.cpp:: failed: unexpected exception with message: 'custom exception - not std'; expression was: throwCustom(), std::exception +Exception.tests.cpp:: failed: unexpected exception with message: 'custom std exception' +Approx.tests.cpp:: passed: 101.000001 != Approx(100).epsilon(0.01) for: 101.00000099999999748 != Approx( 100.0 ) +Approx.tests.cpp:: passed: std::pow(10, -5) != Approx(std::pow(10, -7)) for: 0.00001 != Approx( 0.0000001 ) +ToString.tests.cpp:: passed: enumInfo->lookup(0) == "Value1" for: Value1 == "Value1" +ToString.tests.cpp:: passed: enumInfo->lookup(1) == "Value2" for: Value2 == "Value2" +ToString.tests.cpp:: passed: enumInfo->lookup(3) == "{** unexpected enum value **}" for: {** unexpected enum value **} +== +"{** unexpected enum value **}" +Skip.tests.cpp:: skipped: 'This generator is empty' +Stream.tests.cpp:: passed: Catch::makeStream( "" )->isConsole() for: true +Matchers.tests.cpp:: failed: testStringForMatching(), EndsWith( "Substring" ) for: "this string contains 'abc' as a substring" ends with: "Substring" +Matchers.tests.cpp:: failed: testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" ends with: "this" (case insensitive) +EnumToString.tests.cpp:: passed: stringify( EnumClass3::Value1 ) == "Value1" for: "Value1" == "Value1" +EnumToString.tests.cpp:: passed: stringify( EnumClass3::Value2 ) == "Value2" for: "Value2" == "Value2" +EnumToString.tests.cpp:: passed: stringify( EnumClass3::Value3 ) == "Value3" for: "Value3" == "Value3" +EnumToString.tests.cpp:: passed: stringify( EnumClass3::Value4 ) == "{** unexpected enum value **}" for: "{** unexpected enum value **}" +== +"{** unexpected enum value **}" +EnumToString.tests.cpp:: passed: stringify( ec3 ) == "Value2" for: "Value2" == "Value2" +EnumToString.tests.cpp:: passed: stringify( Bikeshed::Colours::Red ) == "Red" for: "Red" == "Red" +EnumToString.tests.cpp:: passed: stringify( Bikeshed::Colours::Blue ) == "Blue" for: "Blue" == "Blue" +Approx.tests.cpp:: passed: 101.01 != Approx(100).epsilon(0.01) for: 101.01000000000000512 != Approx( 100.0 ) +Condition.tests.cpp:: failed: data.int_seven == 6 for: 7 == 6 +Condition.tests.cpp:: failed: data.int_seven == 8 for: 7 == 8 +Condition.tests.cpp:: failed: data.int_seven == 0 for: 7 == 0 +Condition.tests.cpp:: failed: data.float_nine_point_one == Approx( 9.11f ) for: 9.100000381f +== +Approx( 9.10999965667724609 ) +Condition.tests.cpp:: failed: data.float_nine_point_one == Approx( 9.0f ) for: 9.100000381f == Approx( 9.0 ) +Condition.tests.cpp:: failed: data.float_nine_point_one == Approx( 1 ) for: 9.100000381f == Approx( 1.0 ) +Condition.tests.cpp:: failed: data.float_nine_point_one == Approx( 0 ) for: 9.100000381f == Approx( 0.0 ) +Condition.tests.cpp:: failed: data.double_pi == Approx( 3.1415 ) for: 3.14159265350000005 +== +Approx( 3.14150000000000018 ) +Condition.tests.cpp:: failed: data.str_hello == "goodbye" for: "hello" == "goodbye" +Condition.tests.cpp:: failed: data.str_hello == "hell" for: "hello" == "hell" +Condition.tests.cpp:: failed: data.str_hello == "hello1" for: "hello" == "hello1" +Condition.tests.cpp:: failed: data.str_hello.size() == 6 for: 5 == 6 +Condition.tests.cpp:: failed: x == Approx( 1.301 ) for: 1.30000000000000027 +== +Approx( 1.30099999999999993 ) +Condition.tests.cpp:: passed: data.int_seven == 7 for: 7 == 7 +Condition.tests.cpp:: passed: data.float_nine_point_one == Approx( 9.1f ) for: 9.100000381f +== +Approx( 9.10000038146972656 ) +Condition.tests.cpp:: passed: data.double_pi == Approx( 3.1415926535 ) for: 3.14159265350000005 +== +Approx( 3.14159265350000005 ) +Condition.tests.cpp:: passed: data.str_hello == "hello" for: "hello" == "hello" +Condition.tests.cpp:: passed: "hello" == data.str_hello for: "hello" == "hello" +Condition.tests.cpp:: passed: data.str_hello.size() == 5 for: 5 == 5 +Condition.tests.cpp:: passed: x == Approx( 1.3 ) for: 1.30000000000000027 +== +Approx( 1.30000000000000004 ) +Matchers.tests.cpp:: passed: testStringForMatching(), Equals( "this string contains 'abc' as a substring" ) for: "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" +Matchers.tests.cpp:: passed: testStringForMatching(), Equals( "this string contains 'ABC' as a substring", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" (case insensitive) +Matchers.tests.cpp:: failed: testStringForMatching(), Equals( "this string contains 'ABC' as a substring" ) for: "this string contains 'abc' as a substring" equals: "this string contains 'ABC' as a substring" +Matchers.tests.cpp:: failed: testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" equals: "something else" (case insensitive) +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify(WhatException{}) == "This exception has overridden what() method" for: "This exception has overridden what() method" +== +"This exception has overridden what() method" +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify(OperatorException{}) == "OperatorException" for: "OperatorException" == "OperatorException" +ToStringGeneral.tests.cpp:: passed: ::Catch::Detail::stringify(StringMakerException{}) == "StringMakerException" for: "StringMakerException" +== +"StringMakerException" +Matchers.tests.cpp:: failed: expected exception, got none; expression was: doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } +Matchers.tests.cpp:: failed: expected exception, got none; expression was: doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } +Matchers.tests.cpp:: failed: unexpected exception with message: 'Unknown exception'; expression was: throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } +Matchers.tests.cpp:: failed: unexpected exception with message: 'Unknown exception'; expression was: throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } +Matchers.tests.cpp:: failed: throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } for: SpecialException::what special exception has value of 1 +Matchers.tests.cpp:: failed: throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } for: SpecialException::what special exception has value of 1 +Matchers.tests.cpp:: passed: throwsSpecialException( 1 ), SpecialException, ExceptionMatcher{ 1 } for: SpecialException::what special exception has value of 1 +Matchers.tests.cpp:: passed: throwsSpecialException( 2 ), SpecialException, ExceptionMatcher{ 2 } for: SpecialException::what special exception has value of 2 +Matchers.tests.cpp:: passed: throwsDerivedException(), DerivedException, MessageMatches( StartsWith( "Derived" ) ) for: DerivedException::what matches "starts with: "Derived"" +Matchers.tests.cpp:: passed: throwsDerivedException(), DerivedException, MessageMatches( EndsWith( "::what" ) ) for: DerivedException::what matches "ends with: "::what"" +Matchers.tests.cpp:: passed: throwsDerivedException(), DerivedException, MessageMatches( !StartsWith( "::what" ) ) for: DerivedException::what matches "not starts with: "::what"" +Matchers.tests.cpp:: passed: throwsSpecialException( 2 ), SpecialException, MessageMatches( StartsWith( "Special" ) ) for: SpecialException::what matches "starts with: "Special"" +Exception.tests.cpp:: passed: thisThrows(), "expected exception" for: "expected exception" equals: "expected exception" +Exception.tests.cpp:: passed: thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) for: "expected exception" equals: "expected exception" (case insensitive) +Exception.tests.cpp:: passed: thisThrows(), StartsWith( "expected" ) for: "expected exception" starts with: "expected" +Exception.tests.cpp:: passed: thisThrows(), EndsWith( "exception" ) for: "expected exception" ends with: "exception" +Exception.tests.cpp:: passed: thisThrows(), ContainsSubstring( "except" ) for: "expected exception" contains: "except" +Exception.tests.cpp:: passed: thisThrows(), ContainsSubstring( "exCept", Catch::CaseSensitive::No ) for: "expected exception" contains: "except" (case insensitive) +Matchers.tests.cpp:: passed: throwsDerivedException(), DerivedException, Message( "DerivedException::what" ) for: DerivedException::what exception message matches "DerivedException::what" +Matchers.tests.cpp:: passed: throwsDerivedException(), DerivedException, !Message( "derivedexception::what" ) for: DerivedException::what not exception message matches "derivedexception::what" +Matchers.tests.cpp:: passed: throwsSpecialException( 2 ), SpecialException, !Message( "DerivedException::what" ) for: SpecialException::what not exception message matches "DerivedException::what" +Matchers.tests.cpp:: passed: throwsSpecialException( 2 ), SpecialException, Message( "SpecialException::what" ) for: SpecialException::what exception message matches "SpecialException::what" +Exception.tests.cpp:: failed: unexpected exception with message: 'expected exception'; expression was: thisThrows(), std::string +Exception.tests.cpp:: failed: expected exception, got none; expression was: thisDoesntThrow(), std::domain_error +Exception.tests.cpp:: failed: unexpected exception with message: 'expected exception'; expression was: thisThrows() +Message.tests.cpp:: failed: explicitly with 1 message: 'This is a failure' +Message.tests.cpp:: failed: explicitly +Message.tests.cpp:: failed: explicitly with 1 message: 'This is a failure' +Message.tests.cpp:: warning: 'This message appears in the output' +Misc.tests.cpp:: passed: Factorial(0) == 1 for: 1 == 1 +Misc.tests.cpp:: passed: Factorial(1) == 1 for: 1 == 1 +Misc.tests.cpp:: passed: Factorial(2) == 2 for: 2 == 2 +Misc.tests.cpp:: passed: Factorial(3) == 6 for: 6 == 6 +Misc.tests.cpp:: passed: Factorial(10) == 3628800 for: 3628800 (0x) == 3628800 (0x) +GeneratorsImpl.tests.cpp:: passed: filter( []( int ) { return false; }, value( 3 ) ), Catch::GeneratorException +Matchers.tests.cpp:: passed: 10., WithinRel( 11.1, 0.1 ) for: 10.0 and 11.09999999999999964 are within 10% of each other +Matchers.tests.cpp:: passed: 10., !WithinRel( 11.2, 0.1 ) for: 10.0 not and 11.19999999999999929 are within 10% of each other +Matchers.tests.cpp:: passed: 1., !WithinRel( 0., 0.99 ) for: 1.0 not and 0.0 are within 99% of each other +Matchers.tests.cpp:: passed: -0., WithinRel( 0. ) for: -0.0 and 0.0 are within 2.22045e-12% of each other +Matchers.tests.cpp:: passed: v1, WithinRel( v2 ) for: 0.0 and 0.0 are within 2.22045e-12% of each other +Matchers.tests.cpp:: passed: 1., WithinAbs( 1., 0 ) for: 1.0 is within 0.0 of 1.0 +Matchers.tests.cpp:: passed: 0., WithinAbs( 1., 1 ) for: 0.0 is within 1.0 of 1.0 +Matchers.tests.cpp:: passed: 0., !WithinAbs( 1., 0.99 ) for: 0.0 not is within 0.98999999999999999 of 1.0 +Matchers.tests.cpp:: passed: 0., !WithinAbs( 1., 0.99 ) for: 0.0 not is within 0.98999999999999999 of 1.0 +Matchers.tests.cpp:: passed: 11., !WithinAbs( 10., 0.5 ) for: 11.0 not is within 0.5 of 10.0 +Matchers.tests.cpp:: passed: 10., !WithinAbs( 11., 0.5 ) for: 10.0 not is within 0.5 of 11.0 +Matchers.tests.cpp:: passed: -10., WithinAbs( -10., 0.5 ) for: -10.0 is within 0.5 of -10.0 +Matchers.tests.cpp:: passed: -10., WithinAbs( -9.6, 0.5 ) for: -10.0 is within 0.5 of -9.59999999999999964 +Matchers.tests.cpp:: passed: 1., WithinULP( 1., 0 ) for: 1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00]) +Matchers.tests.cpp:: passed: nextafter( 1., 2. ), WithinULP( 1., 1 ) for: 1.00000000000000022 is within 1 ULPs of 1.0000000000000000e+00 ([9.9999999999999989e-01, 1.0000000000000002e+00]) +Matchers.tests.cpp:: passed: 0., WithinULP( nextafter( 0., 1. ), 1 ) for: 0.0 is within 1 ULPs of 4.9406564584124654e-324 ([0.0000000000000000e+00, 9.8813129168249309e-324]) +Matchers.tests.cpp:: passed: 1., WithinULP( nextafter( 1., 0. ), 1 ) for: 1.0 is within 1 ULPs of 9.9999999999999989e-01 ([9.9999999999999978e-01, 1.0000000000000000e+00]) +Matchers.tests.cpp:: passed: 1., !WithinULP( nextafter( 1., 2. ), 0 ) for: 1.0 not is within 0 ULPs of 1.0000000000000002e+00 ([1.0000000000000002e+00, 1.0000000000000002e+00]) +Matchers.tests.cpp:: passed: 1., WithinULP( 1., 0 ) for: 1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00]) +Matchers.tests.cpp:: passed: -0., WithinULP( 0., 0 ) for: -0.0 is within 0 ULPs of 0.0000000000000000e+00 ([0.0000000000000000e+00, 0.0000000000000000e+00]) +Matchers.tests.cpp:: passed: 1., WithinAbs( 1., 0.5 ) || WithinULP( 2., 1 ) for: 1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0000000000000000e+00 ([1.9999999999999998e+00, 2.0000000000000004e+00]) ) +Matchers.tests.cpp:: passed: 1., WithinAbs( 2., 0.5 ) || WithinULP( 1., 0 ) for: 1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00]) ) +Matchers.tests.cpp:: passed: 0.0001, WithinAbs( 0., 0.001 ) || WithinRel( 0., 0.1 ) for: 0.0001 ( is within 0.001 of 0.0 or and 0.0 are within 10% of each other ) +Matchers.tests.cpp:: passed: WithinAbs( 1., 0. ) +Matchers.tests.cpp:: passed: WithinAbs( 1., -1. ), std::domain_error +Matchers.tests.cpp:: passed: WithinULP( 1., 0 ) +Matchers.tests.cpp:: passed: WithinRel( 1., 0. ) +Matchers.tests.cpp:: passed: WithinRel( 1., -0.2 ), std::domain_error +Matchers.tests.cpp:: passed: WithinRel( 1., 1. ), std::domain_error +Matchers.tests.cpp:: passed: 1., !IsNaN() for: 1.0 not is NaN +Matchers.tests.cpp:: passed: 10.f, WithinRel( 11.1f, 0.1f ) for: 10.0f and 11.10000038146972656 are within 10% of each other +Matchers.tests.cpp:: passed: 10.f, !WithinRel( 11.2f, 0.1f ) for: 10.0f not and 11.19999980926513672 are within 10% of each other +Matchers.tests.cpp:: passed: 1.f, !WithinRel( 0.f, 0.99f ) for: 1.0f not and 0.0 are within 99% of each other +Matchers.tests.cpp:: passed: -0.f, WithinRel( 0.f ) for: -0.0f and 0.0 are within 0.00119209% of each other +Matchers.tests.cpp:: passed: v1, WithinRel( v2 ) for: 0.0f and 0.0 are within 0.00119209% of each other +Matchers.tests.cpp:: passed: 1.f, WithinAbs( 1.f, 0 ) for: 1.0f is within 0.0 of 1.0 +Matchers.tests.cpp:: passed: 0.f, WithinAbs( 1.f, 1 ) for: 0.0f is within 1.0 of 1.0 +Matchers.tests.cpp:: passed: 0.f, !WithinAbs( 1.f, 0.99f ) for: 0.0f not is within 0.99000000953674316 of 1.0 +Matchers.tests.cpp:: passed: 0.f, !WithinAbs( 1.f, 0.99f ) for: 0.0f not is within 0.99000000953674316 of 1.0 +Matchers.tests.cpp:: passed: 0.f, WithinAbs( -0.f, 0 ) for: 0.0f is within 0.0 of -0.0 +Matchers.tests.cpp:: passed: 11.f, !WithinAbs( 10.f, 0.5f ) for: 11.0f not is within 0.5 of 10.0 +Matchers.tests.cpp:: passed: 10.f, !WithinAbs( 11.f, 0.5f ) for: 10.0f not is within 0.5 of 11.0 +Matchers.tests.cpp:: passed: -10.f, WithinAbs( -10.f, 0.5f ) for: -10.0f is within 0.5 of -10.0 +Matchers.tests.cpp:: passed: -10.f, WithinAbs( -9.6f, 0.5f ) for: -10.0f is within 0.5 of -9.60000038146972656 +Matchers.tests.cpp:: passed: 1.f, WithinULP( 1.f, 0 ) for: 1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) +Matchers.tests.cpp:: passed: -1.f, WithinULP( -1.f, 0 ) for: -1.0f is within 0 ULPs of -1.00000000e+00f ([-1.00000000e+00, -1.00000000e+00]) +Matchers.tests.cpp:: passed: nextafter( 1.f, 2.f ), WithinULP( 1.f, 1 ) for: 1.000000119f is within 1 ULPs of 1.00000000e+00f ([9.99999940e-01, 1.00000012e+00]) +Matchers.tests.cpp:: passed: 0.f, WithinULP( nextafter( 0.f, 1.f ), 1 ) for: 0.0f is within 1 ULPs of 1.40129846e-45f ([0.00000000e+00, 2.80259693e-45]) +Matchers.tests.cpp:: passed: 1.f, WithinULP( nextafter( 1.f, 0.f ), 1 ) for: 1.0f is within 1 ULPs of 9.99999940e-01f ([9.99999881e-01, 1.00000000e+00]) +Matchers.tests.cpp:: passed: 1.f, !WithinULP( nextafter( 1.f, 2.f ), 0 ) for: 1.0f not is within 0 ULPs of 1.00000012e+00f ([1.00000012e+00, 1.00000012e+00]) +Matchers.tests.cpp:: passed: 1.f, WithinULP( 1.f, 0 ) for: 1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) +Matchers.tests.cpp:: passed: -0.f, WithinULP( 0.f, 0 ) for: -0.0f is within 0 ULPs of 0.00000000e+00f ([0.00000000e+00, 0.00000000e+00]) +Matchers.tests.cpp:: passed: 1.f, WithinAbs( 1.f, 0.5 ) || WithinULP( 1.f, 1 ) for: 1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.00000000e+00f ([9.99999940e-01, 1.00000012e+00]) ) +Matchers.tests.cpp:: passed: 1.f, WithinAbs( 2.f, 0.5 ) || WithinULP( 1.f, 0 ) for: 1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) ) +Matchers.tests.cpp:: passed: 0.0001f, WithinAbs( 0.f, 0.001f ) || WithinRel( 0.f, 0.1f ) for: 0.0001f ( is within 0.00100000004749745 of 0.0 or and 0.0 are within 10% of each other ) +Matchers.tests.cpp:: passed: WithinAbs( 1.f, 0.f ) +Matchers.tests.cpp:: passed: WithinAbs( 1.f, -1.f ), std::domain_error +Matchers.tests.cpp:: passed: WithinULP( 1.f, 0 ) +Matchers.tests.cpp:: passed: WithinULP( 1.f, static_cast( -1 ) ), std::domain_error +Matchers.tests.cpp:: passed: WithinRel( 1.f, 0.f ) +Matchers.tests.cpp:: passed: WithinRel( 1.f, -0.2f ), std::domain_error +Matchers.tests.cpp:: passed: WithinRel( 1.f, 1.f ), std::domain_error +Matchers.tests.cpp:: passed: 1., !IsNaN() for: 1.0 not is NaN +Generators.tests.cpp:: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:: passed: filter([] (int) {return false; }, value(1)), Catch::GeneratorException +Generators.tests.cpp:: passed: i < 4 for: 1 < 4 +Generators.tests.cpp:: passed: i < 4 for: 2 < 4 +Generators.tests.cpp:: passed: i < 4 for: 3 < 4 +Generators.tests.cpp:: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:: passed: i.size() == 1 for: 1 == 1 +Generators.tests.cpp:: passed: i.size() == 1 for: 1 == 1 +Generators.tests.cpp:: passed: i.size() == 1 for: 1 == 1 +Generators.tests.cpp:: passed: i.size() == 1 for: 1 == 1 +Generators.tests.cpp:: passed: i.size() == 1 for: 1 == 1 +Generators.tests.cpp:: passed: i.size() == 1 for: 1 == 1 +Generators.tests.cpp:: passed: j > 0 for: 1 > 0 +Generators.tests.cpp:: passed: j > 0 for: 2 > 0 +Generators.tests.cpp:: passed: j > 0 for: 3 > 0 +Generators.tests.cpp:: passed: j > 0 for: 1 > 0 +Generators.tests.cpp:: passed: j > 0 for: 2 > 0 +Generators.tests.cpp:: passed: j > 0 for: 3 > 0 +Generators.tests.cpp:: passed: chunk2.size() == 2 for: 2 == 2 +Generators.tests.cpp:: passed: chunk2.front() == chunk2.back() for: 1 == 1 +Generators.tests.cpp:: passed: chunk2.size() == 2 for: 2 == 2 +Generators.tests.cpp:: passed: chunk2.front() == chunk2.back() for: 2 == 2 +Generators.tests.cpp:: passed: chunk2.size() == 2 for: 2 == 2 +Generators.tests.cpp:: passed: chunk2.front() == chunk2.back() for: 3 == 3 +Generators.tests.cpp:: passed: chunk2.size() == 2 for: 2 == 2 +Generators.tests.cpp:: passed: chunk2.front() == chunk2.back() for: 1 == 1 +Generators.tests.cpp:: passed: chunk2.front() < 3 for: 1 < 3 +Generators.tests.cpp:: passed: chunk2.size() == 2 for: 2 == 2 +Generators.tests.cpp:: passed: chunk2.front() == chunk2.back() for: 2 == 2 +Generators.tests.cpp:: passed: chunk2.front() < 3 for: 2 < 3 +Generators.tests.cpp:: passed: chunk2.size() == 0 for: 0 == 0 +Generators.tests.cpp:: passed: chunk2.size() == 0 for: 0 == 0 +Generators.tests.cpp:: passed: chunk2.size() == 0 for: 0 == 0 +Generators.tests.cpp:: passed: chunk(2, value(1)), Catch::GeneratorException +Generators.tests.cpp:: passed: j < i for: -3 < 1 +Generators.tests.cpp:: passed: j < i for: -2 < 1 +Generators.tests.cpp:: passed: j < i for: -1 < 1 +Generators.tests.cpp:: passed: 4u * i > str.size() for: 4 > 1 +Generators.tests.cpp:: passed: 4u * i > str.size() for: 4 > 2 +Generators.tests.cpp:: passed: 4u * i > str.size() for: 4 > 3 +Generators.tests.cpp:: passed: j < i for: -3 < 2 +Generators.tests.cpp:: passed: j < i for: -2 < 2 +Generators.tests.cpp:: passed: j < i for: -1 < 2 +Generators.tests.cpp:: passed: 4u * i > str.size() for: 8 > 1 +Generators.tests.cpp:: passed: 4u * i > str.size() for: 8 > 2 +Generators.tests.cpp:: passed: 4u * i > str.size() for: 8 > 3 +Generators.tests.cpp:: passed: j < i for: -3 < 3 +Generators.tests.cpp:: passed: j < i for: -2 < 3 +Generators.tests.cpp:: passed: j < i for: -1 < 3 +Generators.tests.cpp:: passed: 4u * i > str.size() for: 12 > 1 +Generators.tests.cpp:: passed: 4u * i > str.size() for: 12 > 2 +Generators.tests.cpp:: passed: 4u * i > str.size() for: 12 > 3 +GeneratorsImpl.tests.cpp:: passed: gen.get() == 123 for: 123 == 123 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 3 for: 3 == 3 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 5 for: 5 == 5 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 5 for: 5 == 5 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 4 for: 4 == 4 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 0 for: 0 == 0 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get().size() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: gen.get() == "aa" for: "aa" == "aa" +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == "bb" for: "bb" == "bb" +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == "cc" for: "cc" == "cc" +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 3 for: 3 == 3 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 3 for: 3 == 3 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: filter([](int) { return false; }, value(1)), Catch::GeneratorException +GeneratorsImpl.tests.cpp:: passed: filter([](int) { return false; }, values({ 1, 2, 3 })), Catch::GeneratorException +GeneratorsImpl.tests.cpp:: passed: gen.get() == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2.0 for: 2.0 == 2.0 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 4.0 for: 4.0 == 4.0 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 6.0 for: 6.0 == 6.0 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2.0 for: 2.0 == 2.0 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 4.0 for: 4.0 == 4.0 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 6.0 for: 6.0 == 6.0 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 3 for: 3 == 3 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 3 for: 3 == 3 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 3 for: 3 == 3 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == -2 for: -2 == -2 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -1 for: -1 == -1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 0 for: 0 == 0 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 1 for: 1 == 1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 0 for: 0 == 0 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -1 for: -1 == -1 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == -7 for: -7 == -7 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -4 for: -4 == -4 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -1 for: -1 == -1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == -7 for: -7 == -7 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -4 for: -4 == -4 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -1 for: -1 == -1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == -7 for: -7 == -7 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -4 for: -4 == -4 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -1 for: -1 == -1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 5 for: 5 == 5 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -1.0 == Approx( -1.0 ) with 1 message: 'Current expected value is -1' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -1' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.90000000000000002 +== +Approx( -0.90000000000000002 ) with 1 message: 'Current expected value is -0.9' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.9' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.80000000000000004 +== +Approx( -0.80000000000000004 ) with 1 message: 'Current expected value is -0.8' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.8' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.70000000000000007 +== +Approx( -0.70000000000000007 ) with 1 message: 'Current expected value is -0.7' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.7' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.60000000000000009 +== +Approx( -0.60000000000000009 ) with 1 message: 'Current expected value is -0.6' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.6' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.50000000000000011 +== +Approx( -0.50000000000000011 ) with 1 message: 'Current expected value is -0.5' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.5' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.40000000000000013 +== +Approx( -0.40000000000000013 ) with 1 message: 'Current expected value is -0.4' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.4' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.30000000000000016 +== +Approx( -0.30000000000000016 ) with 1 message: 'Current expected value is -0.3' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.3' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.20000000000000015 +== +Approx( -0.20000000000000015 ) with 1 message: 'Current expected value is -0.2' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.2' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.10000000000000014 +== +Approx( -0.10000000000000014 ) with 1 message: 'Current expected value is -0.1' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.1' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.00000000000000014 +== +Approx( -0.00000000000000014 ) with 1 message: 'Current expected value is -1.38778e-16' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -1.38778e-16' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.09999999999999987 +== +Approx( 0.09999999999999987 ) with 1 message: 'Current expected value is 0.1' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.1' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.19999999999999987 +== +Approx( 0.19999999999999987 ) with 1 message: 'Current expected value is 0.2' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.2' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.29999999999999988 +== +Approx( 0.29999999999999988 ) with 1 message: 'Current expected value is 0.3' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.3' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.39999999999999991 +== +Approx( 0.39999999999999991 ) with 1 message: 'Current expected value is 0.4' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.4' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.49999999999999989 +== +Approx( 0.49999999999999989 ) with 1 message: 'Current expected value is 0.5' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.5' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.59999999999999987 +== +Approx( 0.59999999999999987 ) with 1 message: 'Current expected value is 0.6' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.6' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.69999999999999984 +== +Approx( 0.69999999999999984 ) with 1 message: 'Current expected value is 0.7' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.7' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.79999999999999982 +== +Approx( 0.79999999999999982 ) with 1 message: 'Current expected value is 0.8' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.8' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.8999999999999998 +== +Approx( 0.8999999999999998 ) with 1 message: 'Current expected value is 0.9' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.9' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx( rangeEnd ) for: 0.99999999999999978 == Approx( 1.0 ) +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -1.0 == Approx( -1.0 ) with 1 message: 'Current expected value is -1' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -1' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.69999999999999996 +== +Approx( -0.69999999999999996 ) with 1 message: 'Current expected value is -0.7' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.7' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.39999999999999997 +== +Approx( -0.39999999999999997 ) with 1 message: 'Current expected value is -0.4' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.4' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.09999999999999998 +== +Approx( -0.09999999999999998 ) with 1 message: 'Current expected value is -0.1' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.1' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.20000000000000001 +== +Approx( 0.20000000000000001 ) with 1 message: 'Current expected value is 0.2' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.2' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.5 == Approx( 0.5 ) with 1 message: 'Current expected value is 0.5' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.5' +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -1.0 == Approx( -1.0 ) with 1 message: 'Current expected value is -1' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -1' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.69999999999999996 +== +Approx( -0.69999999999999996 ) with 1 message: 'Current expected value is -0.7' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.7' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.39999999999999997 +== +Approx( -0.39999999999999997 ) with 1 message: 'Current expected value is -0.4' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.4' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: -0.09999999999999998 +== +Approx( -0.09999999999999998 ) with 1 message: 'Current expected value is -0.1' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is -0.1' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.20000000000000001 +== +Approx( 0.20000000000000001 ) with 1 message: 'Current expected value is 0.2' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.2' +GeneratorsImpl.tests.cpp:: passed: gen.get() == Approx(expected) for: 0.5 == Approx( 0.5 ) with 1 message: 'Current expected value is 0.5' +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true with 1 message: 'Current expected value is 0.5' +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 5 for: 5 == 5 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -1 for: -1 == -1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -4 for: -4 == -4 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 5 for: 5 == 5 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -1 for: -1 == -1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -4 for: -4 == -4 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +GeneratorsImpl.tests.cpp:: passed: gen.get() == 5 for: 5 == 5 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == 2 for: 2 == 2 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -1 for: -1 == -1 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -4 for: -4 == -4 +GeneratorsImpl.tests.cpp:: passed: gen.next() for: true +GeneratorsImpl.tests.cpp:: passed: gen.get() == -7 for: -7 == -7 +GeneratorsImpl.tests.cpp:: passed: !(gen.next()) for: !false +Approx.tests.cpp:: passed: d >= Approx( 1.22 ) for: 1.22999999999999998 +>= +Approx( 1.21999999999999997 ) +Approx.tests.cpp:: passed: d >= Approx( 1.23 ) for: 1.22999999999999998 +>= +Approx( 1.22999999999999998 ) +Approx.tests.cpp:: passed: !(d >= Approx( 1.24 )) for: !(1.22999999999999998 +>= +Approx( 1.23999999999999999 )) +Approx.tests.cpp:: passed: d >= Approx( 1.24 ).epsilon(0.1) for: 1.22999999999999998 +>= +Approx( 1.23999999999999999 ) +TestCaseInfoHasher.tests.cpp:: passed: h1( dummy ) != h2( dummy ) for: 3422778688 (0x) +!= +130711275 (0x) +TestCaseInfoHasher.tests.cpp:: passed: h1( dummy ) == h2( dummy ) for: 3422778688 (0x) +== +3422778688 (0x) +TestCaseInfoHasher.tests.cpp:: passed: h( dummy1 ) != h( dummy2 ) for: 2903002874 (0x) +!= +2668622104 (0x) +TestCaseInfoHasher.tests.cpp:: passed: h( dummy1 ) != h( dummy2 ) for: 2673152918 (0x) +!= +3916075712 (0x) +TestCaseInfoHasher.tests.cpp:: passed: h( dummy1 ) != h( dummy2 ) for: 2074929312 (0x) +!= +3429949824 (0x) +TestCaseInfoHasher.tests.cpp:: passed: h( dummy ) == h( dummy ) for: 3422778688 (0x) +== +3422778688 (0x) +Message.tests.cpp:: failed: explicitly with 3 messages: 'This info has multiple parts.' and 'This unscoped info has multiple parts.' and 'Show infos!' +Message.tests.cpp:: warning: 'this is a message' with 1 message: 'this is a warning' +Message.tests.cpp:: failed: a == 1 for: 2 == 1 with 2 messages: 'this message should be logged' and 'so should this' +Message.tests.cpp:: passed: a == 2 for: 2 == 2 with 1 message: 'this message may be logged later' +Message.tests.cpp:: failed: a == 1 for: 2 == 1 with 2 messages: 'this message may be logged later' and 'this message should be logged' +Message.tests.cpp:: failed: a == 0 for: 2 == 0 with 3 messages: 'this message may be logged later' and 'this message should be logged' and 'and this, but later' +Message.tests.cpp:: passed: a == 2 for: 2 == 2 with 4 messages: 'this message may be logged later' and 'this message should be logged' and 'and this, but later' and 'but not this' +Message.tests.cpp:: passed: i < 10 for: 0 < 10 with 2 messages: 'current counter 0' and 'i := 0' +Message.tests.cpp:: passed: i < 10 for: 1 < 10 with 2 messages: 'current counter 1' and 'i := 1' +Message.tests.cpp:: passed: i < 10 for: 2 < 10 with 2 messages: 'current counter 2' and 'i := 2' +Message.tests.cpp:: passed: i < 10 for: 3 < 10 with 2 messages: 'current counter 3' and 'i := 3' +Message.tests.cpp:: passed: i < 10 for: 4 < 10 with 2 messages: 'current counter 4' and 'i := 4' +Message.tests.cpp:: passed: i < 10 for: 5 < 10 with 2 messages: 'current counter 5' and 'i := 5' +Message.tests.cpp:: passed: i < 10 for: 6 < 10 with 2 messages: 'current counter 6' and 'i := 6' +Message.tests.cpp:: passed: i < 10 for: 7 < 10 with 2 messages: 'current counter 7' and 'i := 7' +Message.tests.cpp:: passed: i < 10 for: 8 < 10 with 2 messages: 'current counter 8' and 'i := 8' +Message.tests.cpp:: passed: i < 10 for: 9 < 10 with 2 messages: 'current counter 9' and 'i := 9' +Message.tests.cpp:: failed: i < 10 for: 10 < 10 with 2 messages: 'current counter 10' and 'i := 10' +AssertionHandler.tests.cpp:: failed: unexpected exception with message: 'Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE'; expression was: Dummy +Condition.tests.cpp:: failed: data.int_seven != 7 for: 7 != 7 +Condition.tests.cpp:: failed: data.float_nine_point_one != Approx( 9.1f ) for: 9.100000381f +!= +Approx( 9.10000038146972656 ) +Condition.tests.cpp:: failed: data.double_pi != Approx( 3.1415926535 ) for: 3.14159265350000005 +!= +Approx( 3.14159265350000005 ) +Condition.tests.cpp:: failed: data.str_hello != "hello" for: "hello" != "hello" +Condition.tests.cpp:: failed: data.str_hello.size() != 5 for: 5 != 5 +Condition.tests.cpp:: passed: data.int_seven != 6 for: 7 != 6 +Condition.tests.cpp:: passed: data.int_seven != 8 for: 7 != 8 +Condition.tests.cpp:: passed: data.float_nine_point_one != Approx( 9.11f ) for: 9.100000381f +!= +Approx( 9.10999965667724609 ) +Condition.tests.cpp:: passed: data.float_nine_point_one != Approx( 9.0f ) for: 9.100000381f != Approx( 9.0 ) +Condition.tests.cpp:: passed: data.float_nine_point_one != Approx( 1 ) for: 9.100000381f != Approx( 1.0 ) +Condition.tests.cpp:: passed: data.float_nine_point_one != Approx( 0 ) for: 9.100000381f != Approx( 0.0 ) +Condition.tests.cpp:: passed: data.double_pi != Approx( 3.1415 ) for: 3.14159265350000005 +!= +Approx( 3.14150000000000018 ) +Condition.tests.cpp:: passed: data.str_hello != "goodbye" for: "hello" != "goodbye" +Condition.tests.cpp:: passed: data.str_hello != "hell" for: "hello" != "hell" +Condition.tests.cpp:: passed: data.str_hello != "hello1" for: "hello" != "hello1" +Condition.tests.cpp:: passed: data.str_hello.size() != 6 for: 5 != 6 +Json.tests.cpp:: passed: stream.str() == "" for: "" == "" +Json.tests.cpp:: passed: stream.str() == "{\n}" for: "{ +}" +== +"{ +}" +Json.tests.cpp:: passed: stream.str(), ContainsSubstring( "\"int\": 1," ) && ContainsSubstring( "\"double\": 1.5," ) && ContainsSubstring( "\"true\": true," ) && ContainsSubstring( "\"false\": false," ) && ContainsSubstring( "\"string\": \"this is a string\"," ) && ContainsSubstring( "\"array\": [\n 1,\n 2\n ]\n}" ) for: "{ + "int": 1, + "double": 1.5, + "true": true, + "false": false, + "string": "this is a string", + "array": [ + 1, + 2 + ] +}" ( contains: ""int": 1," and contains: ""double": 1.5," and contains: ""true": true," and contains: ""false": false," and contains: ""string": "this is a string"," and contains: ""array": [ + 1, + 2 + ] +}" ) +Json.tests.cpp:: passed: stream.str(), ContainsSubstring( "\"empty_object\": {\n }," ) && ContainsSubstring( "\"fully_object\": {\n \"key\": 1\n }" ) for: "{ + "empty_object": { + }, + "fully_object": { + "key": 1 + } +}" ( contains: ""empty_object": { + }," and contains: ""fully_object": { + "key": 1 + }" ) +Json.tests.cpp:: passed: stream.str() == "[\n]" for: "[ +]" +== +"[ +]" +Json.tests.cpp:: passed: stream.str() == "[\n 1,\n 1.5,\n true,\n false,\n \"this is a string\",\n {\n \"object\": 42\n },\n [\n \"array\",\n 42.5\n ]\n]" for: "[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] +]" +== +"[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] +]" +Json.tests.cpp:: passed: stream.str() == "{\n}" for: "{ +}" +== +"{ +}" +Json.tests.cpp:: passed: stream.str() == "[\n]" for: "[ +]" +== +"[ +]" +Json.tests.cpp:: passed: stream.str() == "\"custom\"" for: ""custom"" == ""custom"" +Json.tests.cpp:: passed: sstream.str() == "\"\\\"\"" for: ""\""" == ""\""" +Json.tests.cpp:: passed: sstream.str() == "\"\\\\\"" for: ""\\"" == ""\\"" +Json.tests.cpp:: passed: sstream.str() == "\"/\"" for: ""/"" == ""/"" +Json.tests.cpp:: passed: sstream.str() == "\"\\b\"" for: ""\b"" == ""\b"" +Json.tests.cpp:: passed: sstream.str() == "\"\\f\"" for: ""\f"" == ""\f"" +Json.tests.cpp:: passed: sstream.str() == "\"\\n\"" for: ""\n"" == ""\n"" +Json.tests.cpp:: passed: sstream.str() == "\"\\r\"" for: ""\r"" == ""\r"" +Json.tests.cpp:: passed: sstream.str() == "\"\\t\"" for: ""\t"" == ""\t"" +Json.tests.cpp:: passed: sstream.str() == "\"\\\\/\\t\\r\\n\"" for: ""\\/\t\r\n"" == ""\\/\t\r\n"" +Compilation.tests.cpp:: passed: []() { return true; }() for: true +Approx.tests.cpp:: passed: d <= Approx( 1.24 ) for: 1.22999999999999998 +<= +Approx( 1.23999999999999999 ) +Approx.tests.cpp:: passed: d <= Approx( 1.23 ) for: 1.22999999999999998 +<= +Approx( 1.22999999999999998 ) +Approx.tests.cpp:: passed: !(d <= Approx( 1.22 )) for: !(1.22999999999999998 +<= +Approx( 1.21999999999999997 )) +Approx.tests.cpp:: passed: d <= Approx( 1.22 ).epsilon(0.1) for: 1.22999999999999998 +<= +Approx( 1.21999999999999997 ) +Misc.tests.cpp:: passed: with 1 message: 'was called' +Matchers.tests.cpp:: passed: testStringForMatching(), ContainsSubstring( "string" ) && ContainsSubstring( "abc" ) && ContainsSubstring( "substring" ) && ContainsSubstring( "contains" ) for: "this string contains 'abc' as a substring" ( contains: "string" and contains: "abc" and contains: "substring" and contains: "contains" ) +Matchers.tests.cpp:: passed: testStringForMatching(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) for: "this string contains 'abc' as a substring" ( contains: "string" or contains: "different" or contains: "random" ) +Matchers.tests.cpp:: passed: testStringForMatching2(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) for: "some completely different text that contains one common word" ( contains: "string" or contains: "different" or contains: "random" ) +Matchers.tests.cpp:: passed: testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "substring" ) for: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "substring" ) +Matchers.tests.cpp:: failed: testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) for: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" ) +Matchers.tests.cpp:: passed: testStringForMatching(), !ContainsSubstring( "different" ) for: "this string contains 'abc' as a substring" not contains: "different" +Matchers.tests.cpp:: failed: testStringForMatching(), !ContainsSubstring( "substring" ) for: "this string contains 'abc' as a substring" not contains: "substring" +Condition.tests.cpp:: failed: explicitly +Condition.tests.cpp:: failed: explicitly +Condition.tests.cpp:: failed: explicitly +Condition.tests.cpp:: failed: explicitly +Exception.tests.cpp:: passed: thisThrows(), "expected exception" for: "expected exception" equals: "expected exception" +Exception.tests.cpp:: failed: thisThrows(), "should fail" for: "expected exception" equals: "should fail" +Reporters.tests.cpp:: passed: records == expected for: { "Hello", "world", "Goodbye", "world" } +== +{ "Hello", "world", "Goodbye", "world" } +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldRedirectStdOut == false for: false == false +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldRedirectStdOut == false for: false == false +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +Reporters.tests.cpp:: passed: multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +Generators.tests.cpp:: passed: values > -6 for: 3 > -6 +Generators.tests.cpp:: passed: values > -6 for: 4 > -6 +Generators.tests.cpp:: passed: values > -6 for: 5 > -6 +Generators.tests.cpp:: passed: values > -6 for: 6 > -6 +Generators.tests.cpp:: passed: values > -6 for: -5 > -6 +Generators.tests.cpp:: passed: values > -6 for: -4 > -6 +Generators.tests.cpp:: passed: values > -6 for: 90 > -6 +Generators.tests.cpp:: passed: values > -6 for: 91 > -6 +Generators.tests.cpp:: passed: values > -6 for: 92 > -6 +Generators.tests.cpp:: passed: values > -6 for: 93 > -6 +Generators.tests.cpp:: passed: values > -6 for: 94 > -6 +Generators.tests.cpp:: passed: values > -6 for: 95 > -6 +Generators.tests.cpp:: passed: values > -6 for: 96 > -6 +Generators.tests.cpp:: passed: values > -6 for: 97 > -6 +Generators.tests.cpp:: passed: values > -6 for: 98 > -6 +Generators.tests.cpp:: passed: values > -6 for: 99 > -6 +Misc.tests.cpp:: warning: 'This one ran' +Exception.tests.cpp:: failed: unexpected exception with message: 'custom exception' +Tricky.tests.cpp:: passed: True for: {?} +Tricky.tests.cpp:: passed: !False for: true +Tricky.tests.cpp:: passed: !(False) for: !{?} +Compilation.tests.cpp:: passed: with 1 message: 'std::is_void::value' +Compilation.tests.cpp:: passed: with 1 message: '!(std::is_void::value)' +Compilation.tests.cpp:: passed: with 1 message: 'std::is_void::value' +Compilation.tests.cpp:: passed: with 1 message: '!(std::is_void::value)' +Condition.tests.cpp:: failed: data.int_seven > 7 for: 7 > 7 +Condition.tests.cpp:: failed: data.int_seven < 7 for: 7 < 7 +Condition.tests.cpp:: failed: data.int_seven > 8 for: 7 > 8 +Condition.tests.cpp:: failed: data.int_seven < 6 for: 7 < 6 +Condition.tests.cpp:: failed: data.int_seven < 0 for: 7 < 0 +Condition.tests.cpp:: failed: data.int_seven < -1 for: 7 < -1 +Condition.tests.cpp:: failed: data.int_seven >= 8 for: 7 >= 8 +Condition.tests.cpp:: failed: data.int_seven <= 6 for: 7 <= 6 +Condition.tests.cpp:: failed: data.float_nine_point_one < 9 for: 9.100000381f < 9 +Condition.tests.cpp:: failed: data.float_nine_point_one > 10 for: 9.100000381f > 10 +Condition.tests.cpp:: failed: data.float_nine_point_one > 9.2 for: 9.100000381f > 9.19999999999999929 +Condition.tests.cpp:: failed: data.str_hello > "hello" for: "hello" > "hello" +Condition.tests.cpp:: failed: data.str_hello < "hello" for: "hello" < "hello" +Condition.tests.cpp:: failed: data.str_hello > "hellp" for: "hello" > "hellp" +Condition.tests.cpp:: failed: data.str_hello > "z" for: "hello" > "z" +Condition.tests.cpp:: failed: data.str_hello < "hellm" for: "hello" < "hellm" +Condition.tests.cpp:: failed: data.str_hello < "a" for: "hello" < "a" +Condition.tests.cpp:: failed: data.str_hello >= "z" for: "hello" >= "z" +Condition.tests.cpp:: failed: data.str_hello <= "a" for: "hello" <= "a" +Condition.tests.cpp:: passed: data.int_seven < 8 for: 7 < 8 +Condition.tests.cpp:: passed: data.int_seven > 6 for: 7 > 6 +Condition.tests.cpp:: passed: data.int_seven > 0 for: 7 > 0 +Condition.tests.cpp:: passed: data.int_seven > -1 for: 7 > -1 +Condition.tests.cpp:: passed: data.int_seven >= 7 for: 7 >= 7 +Condition.tests.cpp:: passed: data.int_seven >= 6 for: 7 >= 6 +Condition.tests.cpp:: passed: data.int_seven <= 7 for: 7 <= 7 +Condition.tests.cpp:: passed: data.int_seven <= 8 for: 7 <= 8 +Condition.tests.cpp:: passed: data.float_nine_point_one > 9 for: 9.100000381f > 9 +Condition.tests.cpp:: passed: data.float_nine_point_one < 10 for: 9.100000381f < 10 +Condition.tests.cpp:: passed: data.float_nine_point_one < 9.2 for: 9.100000381f < 9.19999999999999929 +Condition.tests.cpp:: passed: data.str_hello <= "hello" for: "hello" <= "hello" +Condition.tests.cpp:: passed: data.str_hello >= "hello" for: "hello" >= "hello" +Condition.tests.cpp:: passed: data.str_hello < "hellp" for: "hello" < "hellp" +Condition.tests.cpp:: passed: data.str_hello < "zebra" for: "hello" < "zebra" +Condition.tests.cpp:: passed: data.str_hello > "hellm" for: "hello" > "hellm" +Condition.tests.cpp:: passed: data.str_hello > "a" for: "hello" > "a" +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 4242248763 (0x) +== +4242248763 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 1867888929 (0x) +== +1867888929 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 1276619030 (0x) +== +1276619030 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 1911218783 (0x) +== +1911218783 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 1827115164 (0x) +== +1827115164 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 1472234645 (0x) +== +1472234645 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 868832940 (0x) +== +868832940 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 570883446 (0x) +== +570883446 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 889299803 (0x) +== +889299803 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 4261393167 (0x) +== +4261393167 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 1472234645 (0x) +== +1472234645 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 868832940 (0x) +== +868832940 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 570883446 (0x) +== +570883446 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 889299803 (0x) +== +889299803 (0x) +RandomNumberGeneration.tests.cpp:: passed: rng() == 0x for: 4261393167 (0x) +== +4261393167 (0x) +Message.tests.cpp:: failed: explicitly with 1 message: 'Message from section one' +Message.tests.cpp:: failed: explicitly with 1 message: 'Message from section two' +Matchers.tests.cpp:: passed: ( EvilMatcher(), EvilMatcher() ), EvilCommaOperatorUsed +Matchers.tests.cpp:: passed: &EvilMatcher(), EvilAddressOfOperatorUsed +Matchers.tests.cpp:: passed: EvilMatcher() || ( EvilMatcher() && !EvilMatcher() ) +Matchers.tests.cpp:: passed: ( EvilMatcher() && EvilMatcher() ) || !EvilMatcher() +Parse.tests.cpp:: passed: parseUInt( "0" ) == Optional{ 0 } for: {?} == {?} +Parse.tests.cpp:: passed: parseUInt( "100" ) == Optional{ 100 } for: {?} == {?} +Parse.tests.cpp:: passed: parseUInt( "4294967295" ) == Optional{ 4294967295 } for: {?} == {?} +Parse.tests.cpp:: passed: parseUInt( "0x", 16 ) == Optional{ 255 } for: {?} == {?} +Parse.tests.cpp:: passed: !(parseUInt( "" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "!!KJHF*#" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "-1" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "4294967296" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "42949672964294967296429496729642949672964294967296" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "2 4" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "0x", 10 )) for: !{?} +TestSpecParser.tests.cpp:: passed: spec.hasFilters() for: true +TestSpecParser.tests.cpp:: passed: spec.getInvalidSpecs().empty() for: true +TestSpecParser.tests.cpp:: passed: spec.matches( testCase ) for: true +CmdLine.tests.cpp:: passed: cli.parse({ "test", "--shard-count=8" }) for: {?} +CmdLine.tests.cpp:: passed: config.shardCount == 8 for: 8 == 8 +CmdLine.tests.cpp:: passed: !(result) for: !{?} +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring( "Could not parse '-1' as shard count" ) for: "Could not parse '-1' as shard count" contains: "Could not parse '-1' as shard count" +CmdLine.tests.cpp:: passed: !(result) for: !{?} +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring( "Shard count must be positive" ) for: "Shard count must be positive" contains: "Shard count must be positive" +CmdLine.tests.cpp:: passed: cli.parse({ "test", "--shard-index=2" }) for: {?} +CmdLine.tests.cpp:: passed: config.shardIndex == 2 for: 2 == 2 +CmdLine.tests.cpp:: passed: !(result) for: !{?} +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring( "Could not parse '-12' as shard index" ) for: "Could not parse '-12' as shard index" contains: "Could not parse '-12' as shard index" +CmdLine.tests.cpp:: passed: cli.parse({ "test", "--shard-index=0" }) for: {?} +CmdLine.tests.cpp:: passed: config.shardIndex == 0 for: 0 == 0 +TestSpecParser.tests.cpp:: passed: spec.hasFilters() for: true with 1 message: 'tagString := "[tag with spaces]"' +TestSpecParser.tests.cpp:: passed: spec.getInvalidSpecs().empty() for: true with 1 message: 'tagString := "[tag with spaces]"' +TestSpecParser.tests.cpp:: passed: spec.matches( testCase ) for: true with 1 message: 'tagString := "[tag with spaces]"' +TestSpecParser.tests.cpp:: passed: spec.hasFilters() for: true with 1 message: 'tagString := "[I said "good day" sir!]"' +TestSpecParser.tests.cpp:: passed: spec.getInvalidSpecs().empty() for: true with 1 message: 'tagString := "[I said "good day" sir!]"' +TestSpecParser.tests.cpp:: passed: spec.matches( testCase ) for: true with 1 message: 'tagString := "[I said "good day" sir!]"' +CmdLine.tests.cpp:: passed: cli.parse( { "test", "-w", "NoAssertions" } ) for: {?} +CmdLine.tests.cpp:: passed: config.warnings == WarnAbout::NoAssertions for: 1 == 1 +CmdLine.tests.cpp:: passed: !(cli.parse( { "test", "-w", "NoTests" } )) for: !{?} +CmdLine.tests.cpp:: passed: cli.parse( { "test", "--warn", "NoAssertions", "--warn", "UnmatchedTestSpec" } ) for: {?} +CmdLine.tests.cpp:: passed: config.warnings == ( WarnAbout::NoAssertions | WarnAbout::UnmatchedTestSpec ) for: 3 == 3 +Condition.tests.cpp:: passed: p == 0 for: 0 == 0 +Condition.tests.cpp:: passed: p == pNULL for: 0 == 0 +Condition.tests.cpp:: passed: p != 0 for: 0x != 0 +Condition.tests.cpp:: passed: cp != 0 for: 0x != 0 +Condition.tests.cpp:: passed: cpc != 0 for: 0x != 0 +Condition.tests.cpp:: passed: returnsNull() == 0 for: {null string} == 0 +Condition.tests.cpp:: passed: returnsConstNull() == 0 for: {null string} == 0 +Condition.tests.cpp:: passed: 0 != p for: 0 != 0x +ToStringGeneral.tests.cpp:: passed: str1.size() == 3 + 5 for: 8 == 8 +ToStringGeneral.tests.cpp:: passed: str2.size() == 3 + 10 for: 13 == 13 +ToStringGeneral.tests.cpp:: passed: str1.size() == 2 + 5 for: 7 == 7 +ToStringGeneral.tests.cpp:: passed: str2.size() == 2 + 15 for: 17 == 17 +Matchers.tests.cpp:: passed: "foo", Predicate( []( const char* const& ) { return true; } ) for: "foo" matches undescribed predicate +CmdLine.tests.cpp:: passed: result for: {?} +CmdLine.tests.cpp:: passed: config.processName == "" for: "" == "" +CmdLine.tests.cpp:: passed: result for: {?} +CmdLine.tests.cpp:: passed: config.processName == "test" for: "test" == "test" +CmdLine.tests.cpp:: passed: config.shouldDebugBreak == false for: false == false +CmdLine.tests.cpp:: passed: config.abortAfter == -1 for: -1 == -1 +CmdLine.tests.cpp:: passed: config.noThrow == false for: false == false +CmdLine.tests.cpp:: passed: config.reporterSpecifications.empty() for: true +CmdLine.tests.cpp:: passed: !(cfg.hasTestFilters()) for: !false +CmdLine.tests.cpp:: passed: cfg.getReporterSpecs().size() == 1 for: 1 == 1 +CmdLine.tests.cpp:: passed: cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, {}, {}, {} } for: {?} == {?} +CmdLine.tests.cpp:: passed: cfg.getProcessedReporterSpecs().size() == 1 for: 1 == 1 +CmdLine.tests.cpp:: passed: cfg.getProcessedReporterSpecs()[0] == Catch::ProcessedReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} } for: {?} == {?} +CmdLine.tests.cpp:: passed: result for: {?} +CmdLine.tests.cpp:: passed: cfg.hasTestFilters() for: true +CmdLine.tests.cpp:: passed: cfg.testSpec().matches(*fakeTestCase("notIncluded")) == false for: false == false +CmdLine.tests.cpp:: passed: cfg.testSpec().matches(*fakeTestCase("test1")) for: true +CmdLine.tests.cpp:: passed: result for: {?} +CmdLine.tests.cpp:: passed: cfg.hasTestFilters() for: true +CmdLine.tests.cpp:: passed: cfg.testSpec().matches(*fakeTestCase("test1")) == false for: false == false +CmdLine.tests.cpp:: passed: cfg.testSpec().matches(*fakeTestCase("alwaysIncluded")) for: true +CmdLine.tests.cpp:: passed: result for: {?} +CmdLine.tests.cpp:: passed: cfg.hasTestFilters() for: true +CmdLine.tests.cpp:: passed: cfg.testSpec().matches(*fakeTestCase("test1")) == false for: false == false +CmdLine.tests.cpp:: passed: cfg.testSpec().matches(*fakeTestCase("alwaysIncluded")) for: true +CmdLine.tests.cpp:: passed: result for: {?} with 1 message: 'result.errorMessage() := ""' +CmdLine.tests.cpp:: passed: config.reporterSpecifications == vec_Specs{ { "console", {}, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""' +CmdLine.tests.cpp:: passed: result for: {?} with 1 message: 'result.errorMessage() := ""' +CmdLine.tests.cpp:: passed: config.reporterSpecifications == vec_Specs{ { "xml", {}, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""' +CmdLine.tests.cpp:: passed: result for: {?} with 1 message: 'result.errorMessage() := ""' +CmdLine.tests.cpp:: passed: config.reporterSpecifications == vec_Specs{ { "junit", {}, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""' +CmdLine.tests.cpp:: passed: !result for: true +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring("Unrecognized reporter") for: "Unrecognized reporter, 'unsupported'. Check available with --list-reporters" contains: "Unrecognized reporter" +CmdLine.tests.cpp:: passed: result for: {?} with 1 message: 'result.errorMessage() := ""' +CmdLine.tests.cpp:: passed: config.reporterSpecifications == vec_Specs{ { "console", "out.txt"s, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""' +CmdLine.tests.cpp:: passed: result for: {?} with 1 message: 'result.errorMessage() := ""' +CmdLine.tests.cpp:: passed: config.reporterSpecifications == vec_Specs{ { "console", "C:\\Temp\\out.txt"s, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""' +CmdLine.tests.cpp:: passed: cli.parse({ "test", "-r", "xml::out=output.xml", "-r", "junit::out=output-junit.xml" }) for: {?} +CmdLine.tests.cpp:: passed: config.reporterSpecifications == vec_Specs{ { "xml", "output.xml"s, {}, {} }, { "junit", "output-junit.xml"s, {}, {} } } for: { {?}, {?} } == { {?}, {?} } +CmdLine.tests.cpp:: passed: cli.parse({ "test", "-r", "xml::out=output.xml", "-r", "console" }) for: {?} +CmdLine.tests.cpp:: passed: config.reporterSpecifications == vec_Specs{ { "xml", "output.xml"s, {}, {} }, { "console", {}, {}, {} } } for: { {?}, {?} } == { {?}, {?} } +CmdLine.tests.cpp:: passed: !result for: true +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring("Only one reporter may have unspecified output file.") for: "Only one reporter may have unspecified output file." contains: "Only one reporter may have unspecified output file." +CmdLine.tests.cpp:: passed: cli.parse({"test", "-b"}) for: {?} +CmdLine.tests.cpp:: passed: config.shouldDebugBreak == true for: true == true +CmdLine.tests.cpp:: passed: cli.parse({"test", "--break"}) for: {?} +CmdLine.tests.cpp:: passed: config.shouldDebugBreak for: true +CmdLine.tests.cpp:: passed: cli.parse({"test", "-a"}) for: {?} +CmdLine.tests.cpp:: passed: config.abortAfter == 1 for: 1 == 1 +CmdLine.tests.cpp:: passed: cli.parse({"test", "-x", "2"}) for: {?} +CmdLine.tests.cpp:: passed: config.abortAfter == 2 for: 2 == 2 +CmdLine.tests.cpp:: passed: !result for: true +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring("convert") && ContainsSubstring("oops") for: "Unable to convert 'oops' to destination type" ( contains: "convert" and contains: "oops" ) +CmdLine.tests.cpp:: passed: cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?} +CmdLine.tests.cpp:: passed: config.waitForKeypress == std::get<1>(input) for: 0 == 0 +CmdLine.tests.cpp:: passed: cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?} +CmdLine.tests.cpp:: passed: config.waitForKeypress == std::get<1>(input) for: 1 == 1 +CmdLine.tests.cpp:: passed: cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?} +CmdLine.tests.cpp:: passed: config.waitForKeypress == std::get<1>(input) for: 2 == 2 +CmdLine.tests.cpp:: passed: cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?} +CmdLine.tests.cpp:: passed: config.waitForKeypress == std::get<1>(input) for: 3 == 3 +CmdLine.tests.cpp:: passed: !result for: true +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring("never") && ContainsSubstring("both") for: "keypress argument must be one of: never, start, exit or both. 'sometimes' not recognised" ( contains: "never" and contains: "both" ) +CmdLine.tests.cpp:: passed: cli.parse({"test", "-e"}) for: {?} +CmdLine.tests.cpp:: passed: config.noThrow for: true +CmdLine.tests.cpp:: passed: cli.parse({"test", "--nothrow"}) for: {?} +CmdLine.tests.cpp:: passed: config.noThrow for: true +CmdLine.tests.cpp:: passed: cli.parse({"test", "-o", "filename.ext"}) for: {?} +CmdLine.tests.cpp:: passed: config.defaultOutputFilename == "filename.ext" for: "filename.ext" == "filename.ext" +CmdLine.tests.cpp:: passed: cli.parse({"test", "--out", "filename.ext"}) for: {?} +CmdLine.tests.cpp:: passed: config.defaultOutputFilename == "filename.ext" for: "filename.ext" == "filename.ext" +CmdLine.tests.cpp:: passed: cli.parse({"test", "-abe"}) for: {?} +CmdLine.tests.cpp:: passed: config.abortAfter == 1 for: 1 == 1 +CmdLine.tests.cpp:: passed: config.shouldDebugBreak for: true +CmdLine.tests.cpp:: passed: config.noThrow == true for: true == true +CmdLine.tests.cpp:: passed: cli.parse({"test"}) for: {?} +CmdLine.tests.cpp:: passed: config.defaultColourMode == ColourMode::PlatformDefault for: 0 == 0 +CmdLine.tests.cpp:: passed: cli.parse( { "test", "--colour-mode", "default" } ) for: {?} +CmdLine.tests.cpp:: passed: config.defaultColourMode == ColourMode::PlatformDefault for: 0 == 0 +CmdLine.tests.cpp:: passed: cli.parse({"test", "--colour-mode", "ansi"}) for: {?} +CmdLine.tests.cpp:: passed: config.defaultColourMode == ColourMode::ANSI for: 1 == 1 +CmdLine.tests.cpp:: passed: cli.parse({"test", "--colour-mode", "none"}) for: {?} +CmdLine.tests.cpp:: passed: config.defaultColourMode == ColourMode::None for: 3 == 3 +CmdLine.tests.cpp:: passed: !result for: true +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring( "colour mode must be one of" ) for: "colour mode must be one of: default, ansi, win32, or none. 'wrong' is not recognised" contains: "colour mode must be one of" +CmdLine.tests.cpp:: passed: cli.parse({ "test", "--benchmark-samples=200" }) for: {?} +CmdLine.tests.cpp:: passed: config.benchmarkSamples == 200 for: 200 == 200 +CmdLine.tests.cpp:: passed: cli.parse({ "test", "--benchmark-resamples=20000" }) for: {?} +CmdLine.tests.cpp:: passed: config.benchmarkResamples == 20000 for: 20000 (0x) == 20000 (0x) +CmdLine.tests.cpp:: passed: cli.parse({ "test", "--benchmark-confidence-interval=0.99" }) for: {?} +CmdLine.tests.cpp:: passed: config.benchmarkConfidenceInterval == Catch::Approx(0.99) for: 0.98999999999999999 +== +Approx( 0.98999999999999999 ) +CmdLine.tests.cpp:: passed: cli.parse({ "test", "--benchmark-no-analysis" }) for: {?} +CmdLine.tests.cpp:: passed: config.benchmarkNoAnalysis for: true +CmdLine.tests.cpp:: passed: cli.parse({ "test", "--benchmark-warmup-time=10" }) for: {?} +CmdLine.tests.cpp:: passed: config.benchmarkWarmupTime == 10 for: 10 == 10 +Misc.tests.cpp:: passed: std::tuple_size::value >= 1 for: 3 >= 1 +Misc.tests.cpp:: passed: std::tuple_size::value >= 1 for: 2 >= 1 +Misc.tests.cpp:: passed: std::tuple_size::value >= 1 for: 1 >= 1 +RandomNumberGeneration.tests.cpp:: passed: Catch::generateRandomSeed(method) +RandomNumberGeneration.tests.cpp:: passed: Catch::generateRandomSeed(method) +RandomNumberGeneration.tests.cpp:: passed: Catch::generateRandomSeed(method) +RandomNumberGeneration.tests.cpp:: passed: Catch::generateRandomSeed(static_cast(77)) +ToString.tests.cpp:: passed: Catch::Detail::stringify(UsesSentinel{}) == "{ }" for: "{ }" == "{ }" +Decomposition.tests.cpp:: failed: truthy(false) for: Hey, its truthy! +Matchers.tests.cpp:: failed: testStringForMatching(), Matches( "this STRING contains 'abc' as a substring" ) for: "this string contains 'abc' as a substring" matches "this STRING contains 'abc' as a substring" case sensitively +Matchers.tests.cpp:: failed: testStringForMatching(), Matches( "contains 'abc' as a substring" ) for: "this string contains 'abc' as a substring" matches "contains 'abc' as a substring" case sensitively +Matchers.tests.cpp:: failed: testStringForMatching(), Matches( "this string contains 'abc' as a" ) for: "this string contains 'abc' as a substring" matches "this string contains 'abc' as a" case sensitively +Reporters.tests.cpp:: passed: registry.registerReporter( "with::doublecolons", Catch::Detail::make_unique() ), "'::' is not allowed in reporter name: 'with::doublecolons'" for: "'::' is not allowed in reporter name: 'with::doublecolons'" equals: "'::' is not allowed in reporter name: 'with::doublecolons'" +Matchers.tests.cpp:: passed: actual, !UnorderedEquals( expected ) for: { 'a', 'b' } not UnorderedEquals: { 'c', 'b' } +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fakeTag"s) for: "All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" with 1 message: 'Tested reporter: Automake' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" with 1 message: 'Tested reporter: Automake' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: Automake' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fakeTag"s) for: "All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" with 1 message: 'Tested reporter: compact' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" with 1 message: 'Tested reporter: compact' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: compact' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fakeTag"s) for: "All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" with 1 message: 'Tested reporter: console' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" with 1 message: 'Tested reporter: console' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: console' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fakeTag"s) for: "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "" + }, + "listings": { + "tags": [ + { + "aliases": [ + "fakeTag" + ], + "count": 1 + } + ]" contains: "fakeTag" with 1 message: 'Tested reporter: JSON' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fake reporter"s) for: "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "" + }, + "listings": { + "reporters": [ + { + "name": "fake reporter", + "description": "fake description" + } + ]" contains: "fake reporter" with 1 message: 'Tested reporter: JSON' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "" + }, + "listings": { + "tests": [ + { + "name": "fake test name", + "class-name": "", + "tags": [ + "fakeTestTag" + ], + "source-location": { + "filename": "fake-file.cpp", + "line": 123456789 + } + } + ]" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: JSON' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fakeTag"s) for: " +All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" with 1 message: 'Tested reporter: JUnit' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fake reporter"s) for: " +Available reporters: + fake reporter: fake description + +" contains: "fake reporter" with 1 message: 'Tested reporter: JUnit' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: " +All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: JUnit' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fakeTag"s) for: " +All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" with 1 message: 'Tested reporter: SonarQube' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fake reporter"s) for: " +Available reporters: + fake reporter: fake description + +" contains: "fake reporter" with 1 message: 'Tested reporter: SonarQube' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: " +All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: SonarQube' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fakeTag"s) for: "All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" with 1 message: 'Tested reporter: TAP' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" with 1 message: 'Tested reporter: TAP' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: TAP' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fakeTag"s) for: "All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" with 1 message: 'Tested reporter: TeamCity' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" with 1 message: 'Tested reporter: TeamCity' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: TeamCity' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fakeTag"s) for: " + + + 1 + + fakeTag + + +" contains: "fakeTag" with 1 message: 'Tested reporter: XML' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("fake reporter"s) for: " + + + fake reporter + fake description + +" contains: "fake reporter" with 1 message: 'Tested reporter: XML' +Reporters.tests.cpp:: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: " + + + fake test name + + [fakeTestTag] + + fake-file.cpp + 123456789 + + +" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: XML' +Reporters.tests.cpp:: passed: +Message.tests.cpp:: passed: with 1 message: 'this is a success' +Message.tests.cpp:: passed: +BDD.tests.cpp:: passed: before == 0 for: 0 == 0 +BDD.tests.cpp:: passed: after > before for: 1 > 0 +BDD.tests.cpp:: passed: itDoesThis() for: true +BDD.tests.cpp:: passed: itDoesThat() for: true +BDD.tests.cpp:: passed: with 1 message: 'boo!' +BDD.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +BDD.tests.cpp:: passed: v.size() == 10 for: 10 == 10 +BDD.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +BDD.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +BDD.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +BDD.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +BDD.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +BDD.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +Approx.tests.cpp:: passed: d == Approx( 1.23 ) for: 1.22999999999999998 +== +Approx( 1.22999999999999998 ) +Approx.tests.cpp:: passed: d != Approx( 1.22 ) for: 1.22999999999999998 +!= +Approx( 1.21999999999999997 ) +Approx.tests.cpp:: passed: d != Approx( 1.24 ) for: 1.22999999999999998 +!= +Approx( 1.23999999999999999 ) +Approx.tests.cpp:: passed: d == 1.23_a for: 1.22999999999999998 +== +Approx( 1.22999999999999998 ) +Approx.tests.cpp:: passed: d != 1.22_a for: 1.22999999999999998 +!= +Approx( 1.21999999999999997 ) +Approx.tests.cpp:: passed: Approx( d ) == 1.23 for: Approx( 1.22999999999999998 ) +== +1.22999999999999998 +Approx.tests.cpp:: passed: Approx( d ) != 1.22 for: Approx( 1.22999999999999998 ) +!= +1.21999999999999997 +Approx.tests.cpp:: passed: Approx( d ) != 1.24 for: Approx( 1.22999999999999998 ) +!= +1.23999999999999999 +Matchers.tests.cpp:: failed: testStringForMatching(), StartsWith( "This String" ) for: "this string contains 'abc' as a substring" starts with: "This String" +Matchers.tests.cpp:: failed: testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" starts with: "string" (case insensitive) +ToStringGeneral.tests.cpp:: passed: Catch::Detail::stringify(singular) == "{ 1 }" for: "{ 1 }" == "{ 1 }" +ToStringGeneral.tests.cpp:: passed: Catch::Detail::stringify(arr) == "{ 3, 2, 1 }" for: "{ 3, 2, 1 }" == "{ 3, 2, 1 }" +ToStringGeneral.tests.cpp:: passed: Catch::Detail::stringify(arr) == R"({ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } })" for: "{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }" +== +"{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }" +Matchers.tests.cpp:: passed: testStringForMatching(), ContainsSubstring( "string" ) for: "this string contains 'abc' as a substring" contains: "string" +Matchers.tests.cpp:: passed: testStringForMatching(), ContainsSubstring( "string", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "string" (case insensitive) +Matchers.tests.cpp:: passed: testStringForMatching(), ContainsSubstring( "abc" ) for: "this string contains 'abc' as a substring" contains: "abc" +Matchers.tests.cpp:: passed: testStringForMatching(), ContainsSubstring( "aBC", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "abc" (case insensitive) +Matchers.tests.cpp:: passed: testStringForMatching(), StartsWith( "this" ) for: "this string contains 'abc' as a substring" starts with: "this" +Matchers.tests.cpp:: passed: testStringForMatching(), StartsWith( "THIS", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" starts with: "this" (case insensitive) +Matchers.tests.cpp:: passed: testStringForMatching(), EndsWith( "substring" ) for: "this string contains 'abc' as a substring" ends with: "substring" +Matchers.tests.cpp:: passed: testStringForMatching(), EndsWith( " SuBsTrInG", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" ends with: " substring" (case insensitive) +String.tests.cpp:: passed: empty.empty() for: true +String.tests.cpp:: passed: empty.size() == 0 for: 0 == 0 +String.tests.cpp:: passed: std::strcmp( empty.data(), "" ) == 0 for: 0 == 0 +String.tests.cpp:: passed: s.empty() == false for: false == false +String.tests.cpp:: passed: s.size() == 5 for: 5 == 5 +String.tests.cpp:: passed: std::strcmp( rawChars, "hello" ) == 0 for: 0 == 0 +String.tests.cpp:: passed: s.data() == rawChars for: "hello" == "hello" +String.tests.cpp:: passed: original == "original" +String.tests.cpp:: passed: original.data() +String.tests.cpp:: passed: original.begin() == copy.begin() for: "original string" == "original string" +String.tests.cpp:: passed: original.begin() == copy.begin() for: "original string" == "original string" +String.tests.cpp:: passed: ss.empty() == false for: false == false +String.tests.cpp:: passed: ss.size() == 5 for: 5 == 5 +String.tests.cpp:: passed: std::strncmp( ss.data(), "hello", 5 ) == 0 for: 0 == 0 +String.tests.cpp:: passed: ss == "hello" for: hello == "hello" +String.tests.cpp:: passed: ss.size() == 6 for: 6 == 6 +String.tests.cpp:: passed: std::strcmp( ss.data(), "world!" ) == 0 for: 0 == 0 +String.tests.cpp:: passed: s.data() == s2.data() for: "hello world!" == "hello world!" +String.tests.cpp:: passed: s.data() == ss.data() for: "hello world!" == "hello world!" +String.tests.cpp:: passed: s.substr(s.size() + 1, 123).empty() for: true +String.tests.cpp:: passed: std::strcmp(ss.data(), "world!") == 0 for: 0 == 0 +String.tests.cpp:: passed: s.substr(1'000'000, 1).empty() for: true +String.tests.cpp:: passed: reinterpret_cast(buffer1) != reinterpret_cast(buffer2) for: "Hello" != "Hello" +String.tests.cpp:: passed: left == right for: Hello == Hello +String.tests.cpp:: passed: left != left.substr(0, 3) for: Hello != Hel +String.tests.cpp:: passed: sr == "a standard string" for: a standard string == "a standard string" +String.tests.cpp:: passed: sr.size() == stdStr.size() for: 17 == 17 +String.tests.cpp:: passed: sr == "a standard string" for: a standard string == "a standard string" +String.tests.cpp:: passed: sr.size() == stdStr.size() for: 17 == 17 +String.tests.cpp:: passed: sr == "a standard string" for: a standard string == "a standard string" +String.tests.cpp:: passed: sr.size() == stdStr.size() for: 17 == 17 +String.tests.cpp:: passed: stdStr == "a stringref" for: "a stringref" == "a stringref" +String.tests.cpp:: passed: stdStr.size() == sr.size() for: 11 == 11 +String.tests.cpp:: passed: stdStr == "a stringref" for: "a stringref" == "a stringref" +String.tests.cpp:: passed: stdStr.size() == sr.size() for: 11 == 11 +String.tests.cpp:: passed: lhs == "some string += the stringref contents" for: "some string += the stringref contents" +== +"some string += the stringref contents" +String.tests.cpp:: passed: together == "abrakadabra" for: "abrakadabra" == "abrakadabra" +String.tests.cpp:: passed: with 1 message: 'empty.size() == 0' +String.tests.cpp:: passed: with 1 message: 'empty.begin() == empty.end()' +String.tests.cpp:: passed: with 1 message: 'stringref.size() == 3' +String.tests.cpp:: passed: with 1 message: 'stringref.data() == abc' +String.tests.cpp:: passed: with 1 message: 'stringref.begin() == abc' +String.tests.cpp:: passed: with 1 message: 'stringref.begin() != stringref.end()' +String.tests.cpp:: passed: with 1 message: 'stringref.substr(10, 0).empty()' +String.tests.cpp:: passed: with 1 message: 'stringref.substr(2, 1).data() == abc + 2' +String.tests.cpp:: passed: with 1 message: 'stringref[1] == 'b'' +String.tests.cpp:: passed: with 1 message: 'shortened.size() == 2' +String.tests.cpp:: passed: with 1 message: 'shortened.data() == abc' +String.tests.cpp:: passed: with 1 message: 'shortened.begin() != shortened.end()' +String.tests.cpp:: passed: with 1 message: '!(sr1.empty())' +String.tests.cpp:: passed: with 1 message: 'sr1.size() == 3' +String.tests.cpp:: passed: with 1 message: 'sr2.empty()' +String.tests.cpp:: passed: with 1 message: 'sr2.size() == 0' +ToString.tests.cpp:: passed: ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +ToString.tests.cpp:: passed: ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +ToString.tests.cpp:: passed: ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +ToString.tests.cpp:: passed: ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +ToString.tests.cpp:: passed: ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +ToString.tests.cpp:: passed: ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +ToStringChrono.tests.cpp:: passed: minute == seconds for: 1 m == 60 s +ToStringChrono.tests.cpp:: passed: hour != seconds for: 1 h != 60 s +ToStringChrono.tests.cpp:: passed: micro != milli for: 1 us != 1 ms +ToStringChrono.tests.cpp:: passed: nano != micro for: 1 ns != 1 us +ToStringChrono.tests.cpp:: passed: half_minute != femto_second for: 1 [30/1]s != 1 fs +ToStringChrono.tests.cpp:: passed: pico_second != atto_second for: 1 ps != 1 as +ToStringChrono.tests.cpp:: passed: now != later for: {iso8601-timestamp} +!= +{iso8601-timestamp} +Misc.tests.cpp:: failed: s1 == s2 for: "if ($b == 10) { + $a = 20; +}" +== +"if ($b == 10) { + $a = 20; +} +" +Tag.tests.cpp:: passed: what, ContainsSubstring( "[@zzz]" ) for: "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "[@zzz]" +Tag.tests.cpp:: passed: what, ContainsSubstring( "file" ) for: "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "file" +Tag.tests.cpp:: passed: what, ContainsSubstring( "2" ) for: "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "2" +Tag.tests.cpp:: passed: what, ContainsSubstring( "10" ) for: "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "10" +Tag.tests.cpp:: passed: registry.add( "[no ampersat]", "", Catch::SourceLineInfo( "file", 3 ) ) +Tag.tests.cpp:: passed: registry.add( "[the @ is not at the start]", "", Catch::SourceLineInfo( "file", 3 ) ) +Tag.tests.cpp:: passed: registry.add( "@no square bracket at start]", "", Catch::SourceLineInfo( "file", 3 ) ) +Tag.tests.cpp:: passed: registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) ) +Tag.tests.cpp:: passed: testCase.tags.size() == 2 for: 2 == 2 +Tag.tests.cpp:: passed: testCase.tags, VectorContains( Tag( "tag with spaces" ) ) && VectorContains( Tag( "I said \"good day\" sir!"_catch_sr ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} ) +Class.tests.cpp:: passed: Template_Fixture::m_a == 1 for: 1 == 1 +Class.tests.cpp:: passed: Template_Fixture::m_a == 1 for: 1 == 1 +Class.tests.cpp:: passed: Template_Fixture::m_a == 1 for: 1.0 == 1 +Misc.tests.cpp:: passed: std::is_default_constructible::value for: true +Misc.tests.cpp:: passed: std::is_default_constructible::value for: true +Misc.tests.cpp:: passed: std::is_trivially_copyable::value for: true +Misc.tests.cpp:: passed: std::is_trivially_copyable::value for: true +Misc.tests.cpp:: passed: std::is_arithmetic::value for: true +Misc.tests.cpp:: passed: std::is_arithmetic::value for: true +Misc.tests.cpp:: passed: std::is_arithmetic::value for: true +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 10 for: 10 == 10 +Misc.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.capacity() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 10 for: 10 == 10 +Misc.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.capacity() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 10 for: 10 == 10 +Misc.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.capacity() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 10 for: 10 == 10 +Misc.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.capacity() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == V for: 6 == 6 +Misc.tests.cpp:: passed: v.capacity() >= V for: 6 >= 6 +Misc.tests.cpp:: passed: v.size() == 2 * V for: 12 == 12 +Misc.tests.cpp:: passed: v.capacity() >= 2 * V for: 12 >= 12 +Misc.tests.cpp:: passed: v.size() == V for: 6 == 6 +Misc.tests.cpp:: passed: v.capacity() >= V for: 6 >= 6 +Misc.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.capacity() >= V for: 6 >= 6 +Misc.tests.cpp:: passed: v.capacity() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.size() == V for: 6 == 6 +Misc.tests.cpp:: passed: v.capacity() >= V for: 6 >= 6 +Misc.tests.cpp:: passed: v.size() == V for: 6 == 6 +Misc.tests.cpp:: passed: v.capacity() >= 2 * V for: 12 >= 12 +Misc.tests.cpp:: passed: v.size() == V for: 6 == 6 +Misc.tests.cpp:: passed: v.capacity() >= V for: 6 >= 6 +Misc.tests.cpp:: passed: v.size() == V for: 6 == 6 +Misc.tests.cpp:: passed: v.capacity() >= V for: 6 >= 6 +Misc.tests.cpp:: passed: v.size() == V for: 4 == 4 +Misc.tests.cpp:: passed: v.capacity() >= V for: 4 >= 4 +Misc.tests.cpp:: passed: v.size() == 2 * V for: 8 == 8 +Misc.tests.cpp:: passed: v.capacity() >= 2 * V for: 8 >= 8 +Misc.tests.cpp:: passed: v.size() == V for: 4 == 4 +Misc.tests.cpp:: passed: v.capacity() >= V for: 4 >= 4 +Misc.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.capacity() >= V for: 4 >= 4 +Misc.tests.cpp:: passed: v.capacity() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.size() == V for: 4 == 4 +Misc.tests.cpp:: passed: v.capacity() >= V for: 4 >= 4 +Misc.tests.cpp:: passed: v.size() == V for: 4 == 4 +Misc.tests.cpp:: passed: v.capacity() >= 2 * V for: 8 >= 8 +Misc.tests.cpp:: passed: v.size() == V for: 4 == 4 +Misc.tests.cpp:: passed: v.capacity() >= V for: 4 >= 4 +Misc.tests.cpp:: passed: v.size() == V for: 4 == 4 +Misc.tests.cpp:: passed: v.capacity() >= V for: 4 >= 4 +Misc.tests.cpp:: passed: v.size() == V for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= V for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 2 * V for: 10 == 10 +Misc.tests.cpp:: passed: v.capacity() >= 2 * V for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == V for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= V for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.capacity() >= V for: 5 >= 5 +Misc.tests.cpp:: passed: v.capacity() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.size() == V for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= V for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == V for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 2 * V for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == V for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= V for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == V for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= V for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == V for: 15 == 15 +Misc.tests.cpp:: passed: v.capacity() >= V for: 15 >= 15 +Misc.tests.cpp:: passed: v.size() == 2 * V for: 30 == 30 +Misc.tests.cpp:: passed: v.capacity() >= 2 * V for: 30 >= 30 +Misc.tests.cpp:: passed: v.size() == V for: 15 == 15 +Misc.tests.cpp:: passed: v.capacity() >= V for: 15 >= 15 +Misc.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.capacity() >= V for: 15 >= 15 +Misc.tests.cpp:: passed: v.capacity() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.size() == V for: 15 == 15 +Misc.tests.cpp:: passed: v.capacity() >= V for: 15 >= 15 +Misc.tests.cpp:: passed: v.size() == V for: 15 == 15 +Misc.tests.cpp:: passed: v.capacity() >= 2 * V for: 30 >= 30 +Misc.tests.cpp:: passed: v.size() == V for: 15 == 15 +Misc.tests.cpp:: passed: v.capacity() >= V for: 15 >= 15 +Misc.tests.cpp:: passed: v.size() == V for: 15 == 15 +Misc.tests.cpp:: passed: v.capacity() >= V for: 15 >= 15 +Tag.tests.cpp:: passed: testCase.tags.size() == 1 for: 1 == 1 +Tag.tests.cpp:: passed: testCase.tags[0] == Tag( "tag1" ) for: {?} == {?} +VariadicMacros.tests.cpp:: passed: with 1 message: 'no assertions' +Tricky.tests.cpp:: passed: 0x == bit30and31 for: 3221225472 (0x) == 3221225472 +CmdLine.tests.cpp:: passed: +Misc.tests.cpp:: passed: true +Misc.tests.cpp:: passed: +Misc.tests.cpp:: failed - but was ok: false +Misc.tests.cpp:: passed: true +Misc.tests.cpp:: failed - but was ok: false +Misc.tests.cpp:: passed: +Misc.tests.cpp:: passed: true +Misc.tests.cpp:: failed: explicitly +Misc.tests.cpp:: failed - but was ok: false +Misc.tests.cpp:: failed: explicitly +Misc.tests.cpp:: passed: true +Misc.tests.cpp:: failed: unexpected exception with message: 'Uncaught exception should fail!'; expression was: {Unknown expression after the reported line} +Misc.tests.cpp:: failed - but was ok: false +Misc.tests.cpp:: failed: unexpected exception with message: 'Uncaught exception should fail!'; expression was: {Unknown expression after the reported line} +Message.tests.cpp:: failed - but was ok: 1 == 2 +Reporters.tests.cpp:: passed: listingString, ContainsSubstring("[fakeTag]"s) for: "All available tags: + 1 [fakeTag] +1 tag + +" contains: "[fakeTag]" +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fake reporter"s ) && ContainsSubstring( "fake description"s ) for: "Available reporters: + fake reporter: fake description + +" ( contains: "fake reporter" and contains: "fake description" ) +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) +Reporters.tests.cpp:: passed: listingString, ContainsSubstring( "fakeListener"s ) && ContainsSubstring( "fake description"s ) for: "Registered listeners: + fakeListener: fake description + +" ( contains: "fakeListener" and contains: "fake description" ) +Misc.tests.cpp:: passed: with 1 message: 'oops!' +Exception.tests.cpp:: failed: unexpected exception with message: 'For some reason someone is throwing a string literal!' +PartTracker.tests.cpp:: passed: testCase.isOpen() for: true +PartTracker.tests.cpp:: passed: s1.isOpen() for: true +PartTracker.tests.cpp:: passed: s1.isSuccessfullyCompleted() for: true +PartTracker.tests.cpp:: passed: testCase.isComplete() == false for: false == false +PartTracker.tests.cpp:: passed: ctx.completedCycle() for: true +PartTracker.tests.cpp:: passed: testCase.isSuccessfullyCompleted() for: true +PartTracker.tests.cpp:: passed: testCase.isOpen() for: true +PartTracker.tests.cpp:: passed: s1.isOpen() for: true +PartTracker.tests.cpp:: passed: s1.isComplete() for: true +PartTracker.tests.cpp:: passed: s1.isSuccessfullyCompleted() == false for: false == false +PartTracker.tests.cpp:: passed: testCase.isComplete() == false for: false == false +PartTracker.tests.cpp:: passed: ctx.completedCycle() for: true +PartTracker.tests.cpp:: passed: testCase.isSuccessfullyCompleted() == false for: false == false +PartTracker.tests.cpp:: passed: testCase2.isOpen() for: true +PartTracker.tests.cpp:: passed: s1b.isOpen() == false for: false == false +PartTracker.tests.cpp:: passed: ctx.completedCycle() for: true +PartTracker.tests.cpp:: passed: testCase.isComplete() for: true +PartTracker.tests.cpp:: passed: testCase.isSuccessfullyCompleted() for: true +PartTracker.tests.cpp:: passed: testCase.isOpen() for: true +PartTracker.tests.cpp:: passed: s1.isOpen() for: true +PartTracker.tests.cpp:: passed: s1.isComplete() for: true +PartTracker.tests.cpp:: passed: s1.isSuccessfullyCompleted() == false for: false == false +PartTracker.tests.cpp:: passed: testCase.isComplete() == false for: false == false +PartTracker.tests.cpp:: passed: ctx.completedCycle() for: true +PartTracker.tests.cpp:: passed: testCase.isSuccessfullyCompleted() == false for: false == false +PartTracker.tests.cpp:: passed: testCase2.isOpen() for: true +PartTracker.tests.cpp:: passed: s1b.isOpen() == false for: false == false +PartTracker.tests.cpp:: passed: s2.isOpen() for: true +PartTracker.tests.cpp:: passed: ctx.completedCycle() for: true +PartTracker.tests.cpp:: passed: testCase.isComplete() for: true +PartTracker.tests.cpp:: passed: testCase.isSuccessfullyCompleted() for: true +PartTracker.tests.cpp:: passed: testCase.isOpen() for: true +PartTracker.tests.cpp:: passed: s1.isOpen() for: true +PartTracker.tests.cpp:: passed: s2.isOpen() == false for: false == false +PartTracker.tests.cpp:: passed: testCase.isComplete() == false for: false == false +PartTracker.tests.cpp:: passed: testCase2.isOpen() for: true +PartTracker.tests.cpp:: passed: s1b.isOpen() == false for: false == false +PartTracker.tests.cpp:: passed: s2b.isOpen() for: true +PartTracker.tests.cpp:: passed: ctx.completedCycle() == false for: false == false +PartTracker.tests.cpp:: passed: ctx.completedCycle() for: true +PartTracker.tests.cpp:: passed: s2b.isSuccessfullyCompleted() for: true +PartTracker.tests.cpp:: passed: testCase2.isComplete() == false for: false == false +PartTracker.tests.cpp:: passed: testCase2.isSuccessfullyCompleted() for: true +PartTracker.tests.cpp:: passed: testCase.isOpen() for: true +PartTracker.tests.cpp:: passed: s1.isOpen() for: true +PartTracker.tests.cpp:: passed: s2.isOpen() == false for: false == false +PartTracker.tests.cpp:: passed: testCase.isComplete() == false for: false == false +PartTracker.tests.cpp:: passed: testCase2.isOpen() for: true +PartTracker.tests.cpp:: passed: s1b.isOpen() == false for: false == false +PartTracker.tests.cpp:: passed: s2b.isOpen() for: true +PartTracker.tests.cpp:: passed: ctx.completedCycle() == false for: false == false +PartTracker.tests.cpp:: passed: ctx.completedCycle() for: true +PartTracker.tests.cpp:: passed: s2b.isComplete() for: true +PartTracker.tests.cpp:: passed: s2b.isSuccessfullyCompleted() == false for: false == false +PartTracker.tests.cpp:: passed: testCase2.isSuccessfullyCompleted() == false for: false == false +PartTracker.tests.cpp:: passed: testCase3.isOpen() for: true +PartTracker.tests.cpp:: passed: s1c.isOpen() == false for: false == false +PartTracker.tests.cpp:: passed: s2c.isOpen() == false for: false == false +PartTracker.tests.cpp:: passed: testCase3.isSuccessfullyCompleted() for: true +PartTracker.tests.cpp:: passed: testCase.isOpen() for: true +PartTracker.tests.cpp:: passed: s1.isOpen() for: true +PartTracker.tests.cpp:: passed: s2.isOpen() for: true +PartTracker.tests.cpp:: passed: s2.isComplete() for: true +PartTracker.tests.cpp:: passed: s1.isComplete() == false for: false == false +PartTracker.tests.cpp:: passed: s1.isComplete() for: true +PartTracker.tests.cpp:: passed: testCase.isComplete() == false for: false == false +PartTracker.tests.cpp:: passed: testCase.isComplete() for: true +StringManip.tests.cpp:: passed: trim(std::string(no_whitespace)) == no_whitespace for: "There is no extra whitespace here" +== +"There is no extra whitespace here" +StringManip.tests.cpp:: passed: trim(std::string(leading_whitespace)) == no_whitespace for: "There is no extra whitespace here" +== +"There is no extra whitespace here" +StringManip.tests.cpp:: passed: trim(std::string(trailing_whitespace)) == no_whitespace for: "There is no extra whitespace here" +== +"There is no extra whitespace here" +StringManip.tests.cpp:: passed: trim(std::string(whitespace_at_both_ends)) == no_whitespace for: "There is no extra whitespace here" +== +"There is no extra whitespace here" +StringManip.tests.cpp:: passed: trim(StringRef(no_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here +== +There is no extra whitespace here +StringManip.tests.cpp:: passed: trim(StringRef(leading_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here +== +There is no extra whitespace here +StringManip.tests.cpp:: passed: trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here +== +There is no extra whitespace here +StringManip.tests.cpp:: passed: trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace) for: There is no extra whitespace here +== +There is no extra whitespace here +MatchersRanges.tests.cpp:: passed: array_int_a, RangeEquals( c_array ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:: passed: array_int_a, UnorderedRangeEquals( c_array ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:: passed: array_int_3, !RangeEquals( array_int_4 ) for: { 1, 2, 3 } not elements are { 1, 2, 3, 4 } +MatchersRanges.tests.cpp:: passed: array_int_3, !UnorderedRangeEquals( array_int_4 ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } +MatchersRanges.tests.cpp:: passed: array_int_a, RangeEquals( vector_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:: passed: array_int_a, UnorderedRangeEquals( vector_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:: passed: with 1 message: 'ContainerIsRandomAccess( array_int_a ) != ContainerIsRandomAccess( list_char_a )' +MatchersRanges.tests.cpp:: passed: array_int_a, RangeEquals( list_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:: passed: array_int_a, UnorderedRangeEquals( list_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:: passed: vector_int_a, RangeEquals( vector_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:: passed: vector_int_a, UnorderedRangeEquals( vector_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:: passed: vector_int_a, !RangeEquals( vector_char_b ) for: { 1, 2, 3 } not elements are { 1, 2, 2 } +MatchersRanges.tests.cpp:: passed: vector_int_a, !UnorderedRangeEquals( vector_char_b ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 2 } +MatchersRanges.tests.cpp:: passed: a, !RangeEquals( b ) for: { 1, 2, 3 } not elements are { 3, 2, 1 } +MatchersRanges.tests.cpp:: passed: a, UnorderedRangeEquals( b ) for: { 1, 2, 3 } unordered elements are { 3, 2, 1 } +MatchersRanges.tests.cpp:: passed: vector_a, RangeEquals( array_a_plus_1, close_enough ) for: { 1, 2, 3 } elements are { 2, 3, 4 } +MatchersRanges.tests.cpp:: passed: vector_a, UnorderedRangeEquals( array_a_plus_1, close_enough ) for: { 1, 2, 3 } unordered elements are { 2, 3, 4 } +Exception.tests.cpp:: failed: unexpected exception with message: '3.14000000000000012' +UniquePtr.tests.cpp:: passed: bptr->i == 3 for: 3 == 3 +UniquePtr.tests.cpp:: passed: bptr->i == 3 for: 3 == 3 +MatchersRanges.tests.cpp:: passed: data, AllMatch(SizeIs(5)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } all match has size == 5 +MatchersRanges.tests.cpp:: passed: data, !AllMatch(Contains(0) && Contains(1)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not all match ( contains element 0 and contains element 1 ) +MatchersRanges.tests.cpp:: passed: needs_adl, AllMatch( Predicate( []( int elem ) { return elem < 6; } ) ) for: { 1, 2, 3, 4, 5 } all match matches undescribed predicate +MatchersRanges.tests.cpp:: passed: mocked, allMatch for: { 1, 2, 3, 4, 5 } all match matches undescribed predicate +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[3] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[4] for: true +MatchersRanges.tests.cpp:: passed: mocked, !allMatch for: { 1, 2, 3, 4, 5 } not all match matches undescribed predicate +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[3]) for: !false +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[4]) for: !false +MatchersRanges.tests.cpp:: passed: data, AllTrue() for: { true, true, true, true, true } contains only true +MatchersRanges.tests.cpp:: passed: data, AllTrue() for: { } contains only true +MatchersRanges.tests.cpp:: passed: data, !AllTrue() for: { true, true, false, true, true } not contains only true +MatchersRanges.tests.cpp:: passed: data, !AllTrue() for: { false, false, false, false, false } not contains only true +MatchersRanges.tests.cpp:: passed: data, AllTrue() for: { true, true, true, true, true } contains only true +MatchersRanges.tests.cpp:: passed: data, !AllTrue() for: { true, true, false, true, true } not contains only true +MatchersRanges.tests.cpp:: passed: data, !AllTrue() for: { false, false, false, false, false } not contains only true +MatchersRanges.tests.cpp:: passed: mocked, AllTrue() for: { true, true, true, true, true } contains only true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[3] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[4] for: true +MatchersRanges.tests.cpp:: passed: mocked, !AllTrue() for: { true, true, false, true, true } not contains only true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[3]) for: !false +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[4]) for: !false +MatchersRanges.tests.cpp:: passed: data, AnyMatch(SizeIs(5)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } any match has size == 5 +MatchersRanges.tests.cpp:: passed: data, !AnyMatch(Contains(0) && Contains(10)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not any match ( contains element 0 and contains element 10 ) +MatchersRanges.tests.cpp:: passed: needs_adl, AnyMatch( Predicate( []( int elem ) { return elem < 3; } ) ) for: { 1, 2, 3, 4, 5 } any match matches undescribed predicate +MatchersRanges.tests.cpp:: passed: mocked, !anyMatch for: { 1, 2, 3, 4, 5 } not any match matches undescribed predicate +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[3] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[4] for: true +MatchersRanges.tests.cpp:: passed: mocked, anyMatch for: { 1, 2, 3, 4, 5 } any match matches undescribed predicate +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[1]) for: !false +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[2]) for: !false +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[3]) for: !false +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[4]) for: !false +MatchersRanges.tests.cpp:: passed: data, AnyTrue() for: { true, true, true, true, true } contains at least one true +MatchersRanges.tests.cpp:: passed: data, !AnyTrue() for: { } not contains at least one true +MatchersRanges.tests.cpp:: passed: data, AnyTrue() for: { false, false, true, false, false } contains at least one true +MatchersRanges.tests.cpp:: passed: data, !AnyTrue() for: { false, false, false, false, false } not contains at least one true +MatchersRanges.tests.cpp:: passed: data, AnyTrue() for: { true, true, true, true, true } contains at least one true +MatchersRanges.tests.cpp:: passed: data, AnyTrue() for: { false, false, true, false, false } contains at least one true +MatchersRanges.tests.cpp:: passed: data, !AnyTrue() for: { false, false, false, false, false } not contains at least one true +MatchersRanges.tests.cpp:: passed: mocked, AnyTrue() for: { false, false, false, false, true } contains at least one true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[3] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[4] for: true +MatchersRanges.tests.cpp:: passed: mocked, AnyTrue() for: { false, false, true, true, true } contains at least one true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[3]) for: !false +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[4]) for: !false +MatchersRanges.tests.cpp:: passed: data, NoneMatch(SizeIs(6)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } none match has size == 6 +MatchersRanges.tests.cpp:: passed: data, !NoneMatch(Contains(0) && Contains(1)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not none match ( contains element 0 and contains element 1 ) +MatchersRanges.tests.cpp:: passed: needs_adl, NoneMatch( Predicate( []( int elem ) { return elem > 6; } ) ) for: { 1, 2, 3, 4, 5 } none match matches undescribed predicate +MatchersRanges.tests.cpp:: passed: mocked, noneMatch for: { 1, 2, 3, 4, 5 } none match matches undescribed predicate +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[3] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[4] for: true +MatchersRanges.tests.cpp:: passed: mocked, !noneMatch for: { 1, 2, 3, 4, 5 } not none match matches undescribed predicate +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[1]) for: !false +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[2]) for: !false +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[3]) for: !false +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[4]) for: !false +MatchersRanges.tests.cpp:: passed: data, !NoneTrue() for: { true, true, true, true, true } not contains no true +MatchersRanges.tests.cpp:: passed: data, NoneTrue() for: { } contains no true +MatchersRanges.tests.cpp:: passed: data, !NoneTrue() for: { false, false, true, false, false } not contains no true +MatchersRanges.tests.cpp:: passed: data, NoneTrue() for: { false, false, false, false, false } contains no true +MatchersRanges.tests.cpp:: passed: data, !NoneTrue() for: { true, true, true, true, true } not contains no true +MatchersRanges.tests.cpp:: passed: data, !NoneTrue() for: { false, false, true, false, false } not contains no true +MatchersRanges.tests.cpp:: passed: data, NoneTrue() for: { false, false, false, false, false } contains no true +MatchersRanges.tests.cpp:: passed: mocked, NoneTrue() for: { false, false, false, false, false } contains no true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[3] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[4] for: true +MatchersRanges.tests.cpp:: passed: mocked, !NoneTrue() for: { false, false, true, true, true } not contains no true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[3]) for: !false +MatchersRanges.tests.cpp:: passed: !(mocked.m_derefed[4]) for: !false +MatchersRanges.tests.cpp:: passed: empty_vector, RangeEquals( empty_vector ) for: { } elements are { } +MatchersRanges.tests.cpp:: passed: empty_vector, !RangeEquals( non_empty_vector ) for: { } not elements are { 1 } +MatchersRanges.tests.cpp:: passed: non_empty_vector, !RangeEquals( empty_vector ) for: { 1 } not elements are { } +MatchersRanges.tests.cpp:: passed: non_empty_array, RangeEquals( non_empty_array ) for: { 1 } elements are { 1 } +MatchersRanges.tests.cpp:: passed: array_a, RangeEquals( array_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:: passed: array_a, !RangeEquals( array_b ) for: { 1, 2, 3 } not elements are { 2, 2, 3 } +MatchersRanges.tests.cpp:: passed: array_a, !RangeEquals( array_c ) for: { 1, 2, 3 } not elements are { 1, 2, 2 } +MatchersRanges.tests.cpp:: passed: vector_a, !RangeEquals( vector_b ) for: { 1, 2, 3 } not elements are { 1, 2, 3, 4 } +MatchersRanges.tests.cpp:: passed: vector_a, RangeEquals( vector_a_plus_1, close_enough ) for: { 1, 2, 3 } elements are { 2, 3, 4 } +MatchersRanges.tests.cpp:: passed: vector_a, !RangeEquals( vector_b, close_enough ) for: { 1, 2, 3 } not elements are { 3, 3, 4 } +MatchersRanges.tests.cpp:: passed: needs_adl1, RangeEquals( needs_adl2 ) for: { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 } +MatchersRanges.tests.cpp:: passed: needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } ) for: { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 } +MatchersRanges.tests.cpp:: passed: array_a, RangeEquals( { 1, 2, 3 } ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:: passed: array_a, RangeEquals( { 2, 4, 6 }, []( int l, int r ) { return l * 2 == r; } ) for: { 1, 2, 3 } elements are { 2, 4, 6 } +MatchersRanges.tests.cpp:: passed: mocked1, !RangeEquals( arr ) for: { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 } +MatchersRanges.tests.cpp:: passed: mocked1.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked1.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked1.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: !(mocked1.m_derefed[3]) for: !false +MatchersRanges.tests.cpp:: passed: mocked1, RangeEquals( arr ) for: { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 } +MatchersRanges.tests.cpp:: passed: mocked1.m_derefed[0] for: true +MatchersRanges.tests.cpp:: passed: mocked1.m_derefed[1] for: true +MatchersRanges.tests.cpp:: passed: mocked1.m_derefed[2] for: true +MatchersRanges.tests.cpp:: passed: mocked1.m_derefed[3] for: true +MatchersRanges.tests.cpp:: passed: empty_vector, UnorderedRangeEquals( empty_vector ) for: { } unordered elements are { } +MatchersRanges.tests.cpp:: passed: empty_vector, !UnorderedRangeEquals( non_empty_vector ) for: { } not unordered elements are { 1 } +MatchersRanges.tests.cpp:: passed: non_empty_vector, !UnorderedRangeEquals( empty_vector ) for: { 1 } not unordered elements are { } +MatchersRanges.tests.cpp:: passed: non_empty_array, UnorderedRangeEquals( non_empty_array ) for: { 1 } unordered elements are { 1 } +MatchersRanges.tests.cpp:: passed: array_a, UnorderedRangeEquals( array_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:: passed: array_a, !UnorderedRangeEquals( array_b ) for: { 1, 2, 3 } not unordered elements are { 2, 2, 3 } +MatchersRanges.tests.cpp:: passed: vector_a, !UnorderedRangeEquals( vector_b ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } +MatchersRanges.tests.cpp:: passed: vector_a, UnorderedRangeEquals( vector_a_plus_1, close_enough ) for: { 1, 10, 20 } unordered elements are { 11, 21, 2 } +MatchersRanges.tests.cpp:: passed: vector_a, !UnorderedRangeEquals( vector_b, close_enough ) for: { 1, 10, 21 } not unordered elements are { 11, 21, 3 } +MatchersRanges.tests.cpp:: passed: needs_adl1, UnorderedRangeEquals( needs_adl2 ) for: { 1, 2, 3, 4, 5 } unordered elements are { 1, 2, 3, 4, 5 } +MatchersRanges.tests.cpp:: passed: array_a, UnorderedRangeEquals( { 10, 20, 1 } ) for: { 1, 10, 20 } unordered elements are { 10, 20, 1 } +MatchersRanges.tests.cpp:: passed: array_a, UnorderedRangeEquals( { 11, 21, 2 }, []( int l, int r ) { return std::abs( l - r ) <= 1; } ) for: { 1, 10, 20 } unordered elements are { 11, 21, 2 } +MatchersRanges.tests.cpp:: passed: empty_vec, SizeIs(0) for: { } has size == 0 +MatchersRanges.tests.cpp:: passed: empty_vec, !SizeIs(2) for: { } not has size == 2 +MatchersRanges.tests.cpp:: passed: empty_vec, SizeIs(Lt(2)) for: { } size matches is less than 2 +MatchersRanges.tests.cpp:: passed: arr, SizeIs(2) for: { 0, 0 } has size == 2 +MatchersRanges.tests.cpp:: passed: arr, SizeIs( Lt(3)) for: { 0, 0 } size matches is less than 3 +MatchersRanges.tests.cpp:: passed: arr, !SizeIs(!Lt(3)) for: { 0, 0 } not size matches not is less than 3 +MatchersRanges.tests.cpp:: passed: map, SizeIs(3) for: { {?}, {?}, {?} } has size == 3 +MatchersRanges.tests.cpp:: passed: unrelated::ADL_size{}, SizeIs(12) for: {?} has size == 12 +MatchersRanges.tests.cpp:: passed: has_size{}, SizeIs(13) for: {?} has size == 13 +Approx.tests.cpp:: passed: d == approx( 1.23 ) for: 1.22999999999999998 +== +Approx( 1.22999999999999998 ) +Approx.tests.cpp:: passed: d == approx( 1.22 ) for: 1.22999999999999998 +== +Approx( 1.21999999999999997 ) +Approx.tests.cpp:: passed: d == approx( 1.24 ) for: 1.22999999999999998 +== +Approx( 1.23999999999999999 ) +Approx.tests.cpp:: passed: d != approx( 1.25 ) for: 1.22999999999999998 != Approx( 1.25 ) +Approx.tests.cpp:: passed: approx( d ) == 1.23 for: Approx( 1.22999999999999998 ) +== +1.22999999999999998 +Approx.tests.cpp:: passed: approx( d ) == 1.22 for: Approx( 1.22999999999999998 ) +== +1.21999999999999997 +Approx.tests.cpp:: passed: approx( d ) == 1.24 for: Approx( 1.22999999999999998 ) +== +1.23999999999999999 +Approx.tests.cpp:: passed: approx( d ) != 1.25 for: Approx( 1.22999999999999998 ) != 1.25 +VariadicMacros.tests.cpp:: passed: with 1 message: 'no assertions' +Matchers.tests.cpp:: passed: empty, Approx( empty ) for: { } is approx: { } +Matchers.tests.cpp:: passed: v1, Approx( v1 ) for: { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } +Matchers.tests.cpp:: passed: v1, Approx( { 1., 2., 3. } ) for: { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } +Matchers.tests.cpp:: passed: v1, !Approx( temp ) for: { 1.0, 2.0, 3.0 } not is approx: { 1.0, 2.0, 3.0, 4.0 } +Matchers.tests.cpp:: passed: v1, !Approx( v2 ) for: { 1.0, 2.0, 3.0 } not is approx: { 1.5, 2.5, 3.5 } +Matchers.tests.cpp:: passed: v1, Approx( v2 ).margin( 0.5 ) for: { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } +Matchers.tests.cpp:: passed: v1, Approx( v2 ).epsilon( 0.5 ) for: { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } +Matchers.tests.cpp:: passed: v1, Approx( v2 ).epsilon( 0.1 ).scale( 500 ) for: { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } +Matchers.tests.cpp:: failed: empty, Approx( t1 ) for: { } is approx: { 1.0, 2.0 } +Matchers.tests.cpp:: failed: v1, Approx( v2 ) for: { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 } +Matchers.tests.cpp:: passed: v, VectorContains( 1 ) for: { 1, 2, 3 } Contains: 1 +Matchers.tests.cpp:: passed: v, VectorContains( 2 ) for: { 1, 2, 3 } Contains: 2 +Matchers.tests.cpp:: passed: v5, ( VectorContains>( 2 ) ) for: { 1, 2, 3 } Contains: 2 +Matchers.tests.cpp:: passed: v, Contains( v2 ) for: { 1, 2, 3 } Contains: { 1, 2 } +Matchers.tests.cpp:: passed: v, Contains( { 1, 2 } ) for: { 1, 2, 3 } Contains: { 1, 2 } +Matchers.tests.cpp:: passed: v5, ( Contains, CustomAllocator>( v2 ) ) for: { 1, 2, 3 } Contains: { 1, 2 } +Matchers.tests.cpp:: passed: v, Contains( v2 ) for: { 1, 2, 3 } Contains: { 1, 2, 3 } +Matchers.tests.cpp:: passed: v, Contains( empty ) for: { 1, 2, 3 } Contains: { } +Matchers.tests.cpp:: passed: empty, Contains( empty ) for: { } Contains: { } +Matchers.tests.cpp:: passed: v5, ( Contains, CustomAllocator>( v2 ) ) for: { 1, 2, 3 } Contains: { 1, 2, 3 } +Matchers.tests.cpp:: passed: v5, Contains( v6 ) for: { 1, 2, 3 } Contains: { 1, 2 } +Matchers.tests.cpp:: passed: v, VectorContains( 1 ) && VectorContains( 2 ) for: { 1, 2, 3 } ( Contains: 1 and Contains: 2 ) +Matchers.tests.cpp:: passed: v, Equals( v ) for: { 1, 2, 3 } Equals: { 1, 2, 3 } +Matchers.tests.cpp:: passed: empty, Equals( empty ) for: { } Equals: { } +Matchers.tests.cpp:: passed: v, Equals( { 1, 2, 3 } ) for: { 1, 2, 3 } Equals: { 1, 2, 3 } +Matchers.tests.cpp:: passed: v, Equals( v2 ) for: { 1, 2, 3 } Equals: { 1, 2, 3 } +Matchers.tests.cpp:: passed: v5, ( Equals, CustomAllocator>( v2 ) ) for: { 1, 2, 3 } Equals: { 1, 2, 3 } +Matchers.tests.cpp:: passed: v5, Equals( v6 ) for: { 1, 2, 3 } Equals: { 1, 2, 3 } +Matchers.tests.cpp:: passed: v, UnorderedEquals( v ) for: { 1, 2, 3 } UnorderedEquals: { 1, 2, 3 } +Matchers.tests.cpp:: passed: v, UnorderedEquals( { 3, 2, 1 } ) for: { 1, 2, 3 } UnorderedEquals: { 3, 2, 1 } +Matchers.tests.cpp:: passed: empty, UnorderedEquals( empty ) for: { } UnorderedEquals: { } +Matchers.tests.cpp:: passed: permuted, UnorderedEquals( v ) for: { 1, 3, 2 } UnorderedEquals: { 1, 2, 3 } +Matchers.tests.cpp:: passed: permuted, UnorderedEquals( v ) for: { 2, 3, 1 } UnorderedEquals: { 1, 2, 3 } +Matchers.tests.cpp:: passed: v5, ( UnorderedEquals, CustomAllocator>( permuted ) ) for: { 1, 2, 3 } UnorderedEquals: { 2, 3, 1 } +Matchers.tests.cpp:: passed: v5_permuted, UnorderedEquals( v5 ) for: { 1, 3, 2 } UnorderedEquals: { 1, 2, 3 } +Matchers.tests.cpp:: failed: v, VectorContains( -1 ) for: { 1, 2, 3 } Contains: -1 +Matchers.tests.cpp:: failed: empty, VectorContains( 1 ) for: { } Contains: 1 +Matchers.tests.cpp:: failed: empty, Contains( v ) for: { } Contains: { 1, 2, 3 } +Matchers.tests.cpp:: failed: v, Contains( v2 ) for: { 1, 2, 3 } Contains: { 1, 2, 4 } +Matchers.tests.cpp:: failed: v, Equals( v2 ) for: { 1, 2, 3 } Equals: { 1, 2 } +Matchers.tests.cpp:: failed: v2, Equals( v ) for: { 1, 2 } Equals: { 1, 2, 3 } +Matchers.tests.cpp:: failed: empty, Equals( v ) for: { } Equals: { 1, 2, 3 } +Matchers.tests.cpp:: failed: v, Equals( empty ) for: { 1, 2, 3 } Equals: { } +Matchers.tests.cpp:: failed: v, UnorderedEquals( empty ) for: { 1, 2, 3 } UnorderedEquals: { } +Matchers.tests.cpp:: failed: empty, UnorderedEquals( v ) for: { } UnorderedEquals: { 1, 2, 3 } +Matchers.tests.cpp:: failed: permuted, UnorderedEquals( v ) for: { 1, 3 } UnorderedEquals: { 1, 2, 3 } +Matchers.tests.cpp:: failed: permuted, UnorderedEquals( v ) for: { 3, 1 } UnorderedEquals: { 1, 2, 3 } +Exception.tests.cpp:: passed: thisThrows(), std::domain_error +Exception.tests.cpp:: passed: thisDoesntThrow() +Exception.tests.cpp:: passed: thisThrows() +Exception.tests.cpp:: failed: unexpected exception with message: 'unexpected exception' +Exception.tests.cpp:: failed: unexpected exception with message: 'expected exception'; expression was: thisThrows() == 0 +Exception.tests.cpp:: failed: unexpected exception with message: 'expected exception'; expression was: thisThrows() == 0 +Exception.tests.cpp:: failed: unexpected exception with message: 'expected exception'; expression was: thisThrows() == 0 +Exception.tests.cpp:: failed: unexpected exception with message: 'unexpected exception' +Tricky.tests.cpp:: passed: +Tricky.tests.cpp:: passed: +Tricky.tests.cpp:: passed: +Tricky.tests.cpp:: passed: +Xml.tests.cpp:: passed: encode( "normal string" ) == "normal string" for: "normal string" == "normal string" +Xml.tests.cpp:: passed: encode( "" ) == "" for: "" == "" +Xml.tests.cpp:: passed: encode( "smith & jones" ) == "smith & jones" for: "smith & jones" == "smith & jones" +Xml.tests.cpp:: passed: encode( "smith < jones" ) == "smith < jones" for: "smith < jones" == "smith < jones" +Xml.tests.cpp:: passed: encode( "smith > jones" ) == "smith > jones" for: "smith > jones" == "smith > jones" +Xml.tests.cpp:: passed: encode( "smith ]]> jones" ) == "smith ]]> jones" for: "smith ]]> jones" +== +"smith ]]> jones" +Xml.tests.cpp:: passed: encode( stringWithQuotes ) == stringWithQuotes for: "don't "quote" me on that" +== +"don't "quote" me on that" +Xml.tests.cpp:: passed: encode( stringWithQuotes, Catch::XmlEncode::ForAttributes ) == "don't "quote" me on that" for: "don't "quote" me on that" +== +"don't "quote" me on that" +Xml.tests.cpp:: passed: encode( "[\x01]" ) == "[\\x01]" for: "[\x01]" == "[\x01]" +Xml.tests.cpp:: passed: encode( "[\x7F]" ) == "[\\x7F]" for: "[\x7F]" == "[\x7F]" +Xml.tests.cpp:: passed: stream.str(), ContainsSubstring(R"(attr1="true")") && ContainsSubstring(R"(attr2="false")") for: " + +" ( contains: "attr1="true"" and contains: "attr2="false"" ) +Skip.tests.cpp:: passed: +Skip.tests.cpp:: skipped: +InternalBenchmark.tests.cpp:: passed: analysis.mean.point.count() == 23 for: 23.0 == 23 +InternalBenchmark.tests.cpp:: passed: analysis.mean.lower_bound.count() == 23 for: 23.0 == 23 +InternalBenchmark.tests.cpp:: passed: analysis.mean.upper_bound.count() == 23 for: 23.0 == 23 +InternalBenchmark.tests.cpp:: passed: analysis.standard_deviation.point.count() == 0 for: 0.0 == 0 +InternalBenchmark.tests.cpp:: passed: analysis.standard_deviation.lower_bound.count() == 0 for: 0.0 == 0 +InternalBenchmark.tests.cpp:: passed: analysis.standard_deviation.upper_bound.count() == 0 for: 0.0 == 0 +InternalBenchmark.tests.cpp:: passed: analysis.outliers.total() == 0 for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: analysis.outliers.low_mild == 0 for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: analysis.outliers.low_severe == 0 for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: analysis.outliers.high_mild == 0 for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: analysis.outliers.high_severe == 0 for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: analysis.outliers.samples_seen == 0 for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: analysis.outlier_variance == 0 for: 0.0 == 0 +ToStringVector.tests.cpp:: passed: Catch::Detail::stringify( empty ) == "{ }" for: "{ }" == "{ }" +ToStringVector.tests.cpp:: passed: Catch::Detail::stringify( oneValue ) == "{ 42 }" for: "{ 42 }" == "{ 42 }" +ToStringVector.tests.cpp:: passed: Catch::Detail::stringify( twoValues ) == "{ 42, 250 }" for: "{ 42, 250 }" == "{ 42, 250 }" +InternalBenchmark.tests.cpp:: passed: model.started == 1 for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: model.finished == 0 for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: model.started == 1 for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: model.finished == 1 for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: called == 1 for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: model.started == 0 for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: model.finished == 0 for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: model.started == 0 for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: model.finished == 0 for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: called == 1 for: 1 == 1 +Tricky.tests.cpp:: passed: obj.prop != 0 for: 0x != 0 +Misc.tests.cpp:: passed: flag for: true +Misc.tests.cpp:: passed: testCheckedElse( true ) for: true +Misc.tests.cpp:: failed - but was ok: flag for: false +Misc.tests.cpp:: failed: testCheckedElse( false ) for: false +Misc.tests.cpp:: passed: flag for: true +Misc.tests.cpp:: passed: testCheckedIf( true ) for: true +Misc.tests.cpp:: failed - but was ok: flag for: false +Misc.tests.cpp:: failed: testCheckedIf( false ) for: false +InternalBenchmark.tests.cpp:: passed: o.samples_seen == static_cast(x.size()) for: 6 == 6 +InternalBenchmark.tests.cpp:: passed: o.low_severe == los for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.low_mild == lom for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.high_mild == him for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.high_severe == his for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.total() == los + lom + him + his for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.samples_seen == static_cast(x.size()) for: 6 == 6 +InternalBenchmark.tests.cpp:: passed: o.low_severe == los for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: o.low_mild == lom for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.high_mild == him for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.high_severe == his for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.total() == los + lom + him + his for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: o.samples_seen == static_cast(x.size()) for: 6 == 6 +InternalBenchmark.tests.cpp:: passed: o.low_severe == los for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.low_mild == lom for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: o.high_mild == him for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.high_severe == his for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.total() == los + lom + him + his for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: o.samples_seen == static_cast(x.size()) for: 6 == 6 +InternalBenchmark.tests.cpp:: passed: o.low_severe == los for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.low_mild == lom for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.high_mild == him for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: o.high_severe == his for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.total() == los + lom + him + his for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: o.samples_seen == static_cast(x.size()) for: 6 == 6 +InternalBenchmark.tests.cpp:: passed: o.low_severe == los for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.low_mild == lom for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.high_mild == him for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.high_severe == his for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: o.total() == los + lom + him + his for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: o.samples_seen == static_cast(x.size()) for: 6 == 6 +InternalBenchmark.tests.cpp:: passed: o.low_severe == los for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: o.low_mild == lom for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.high_mild == him for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: o.high_severe == his for: 0 == 0 +InternalBenchmark.tests.cpp:: passed: o.total() == los + lom + him + his for: 2 == 2 +Condition.tests.cpp:: passed: unsigned_char_var == 1 for: 1 == 1 +Condition.tests.cpp:: passed: unsigned_short_var == 1 for: 1 == 1 +Condition.tests.cpp:: passed: unsigned_int_var == 1 for: 1 == 1 +Condition.tests.cpp:: passed: unsigned_long_var == 1 for: 1 == 1 +Condition.tests.cpp:: passed: long_var == unsigned_char_var for: 1 == 1 +Condition.tests.cpp:: passed: long_var == unsigned_short_var for: 1 == 1 +Condition.tests.cpp:: passed: long_var == unsigned_int_var for: 1 == 1 +Condition.tests.cpp:: passed: long_var == unsigned_long_var for: 1 == 1 +FloatingPoint.tests.cpp:: passed: convertToBits( 0.f ) == 0 for: 0 == 0 +FloatingPoint.tests.cpp:: passed: convertToBits( -0.f ) == ( 1ULL << 31 ) for: 2147483648 (0x) +== +2147483648 (0x) +FloatingPoint.tests.cpp:: passed: convertToBits( 0. ) == 0 for: 0 == 0 +FloatingPoint.tests.cpp:: passed: convertToBits( -0. ) == ( 1ULL << 63 ) for: 9223372036854775808 (0x) +== +9223372036854775808 (0x) +FloatingPoint.tests.cpp:: passed: convertToBits( std::numeric_limits::denorm_min() ) == 1 for: 1 == 1 +FloatingPoint.tests.cpp:: passed: convertToBits( std::numeric_limits::denorm_min() ) == 1 for: 1 == 1 +Skip.tests.cpp:: skipped: 'skipping because answer = 41' +Skip.tests.cpp:: passed: +Skip.tests.cpp:: skipped: 'skipping because answer = 43' +Tag.tests.cpp:: passed: Catch::TestCaseInfo("", { "test with an empty tag", "[]" }, dummySourceLineInfo) +InternalBenchmark.tests.cpp:: passed: erfc_inv(1.103560) == Approx(-0.09203687623843015) for: -0.09203687623843014 +== +Approx( -0.09203687623843015 ) +InternalBenchmark.tests.cpp:: passed: erfc_inv(1.067400) == Approx(-0.05980291115763361) for: -0.05980291115763361 +== +Approx( -0.05980291115763361 ) +InternalBenchmark.tests.cpp:: passed: erfc_inv(0.050000) == Approx(1.38590382434967796) for: 1.38590382434967774 +== +Approx( 1.38590382434967796 ) +InternalBenchmark.tests.cpp:: passed: res.mean.count() == rate for: 2000.0 == 2000 (0x) +InternalBenchmark.tests.cpp:: passed: res.outliers.total() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: +Misc.tests.cpp:: passed: +Misc.tests.cpp:: passed: +Skip.tests.cpp:: failed: 3 == 4 +Skip.tests.cpp:: skipped: +Skip.tests.cpp:: failed: explicitly +Skip.tests.cpp:: skipped: +Skip.tests.cpp:: failed: explicitly +Skip.tests.cpp:: skipped: +Skip.tests.cpp:: skipped: +Skip.tests.cpp:: failed: explicitly +Clara.tests.cpp:: passed: with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +Clara.tests.cpp:: passed: with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +Clara.tests.cpp:: passed: with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +Clara.tests.cpp:: passed: with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +Clara.tests.cpp:: passed: with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +Clara.tests.cpp:: passed: with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +Clara.tests.cpp:: passed: with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +Clara.tests.cpp:: passed: with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +Clara.tests.cpp:: passed: with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +Clara.tests.cpp:: passed: with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +Clara.tests.cpp:: passed: with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +Clara.tests.cpp:: passed: with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +Message.tests.cpp:: failed: explicitly with 1 message: 'Previous info should not be seen' +Message.tests.cpp:: failed: explicitly with 1 message: 'previous unscoped info SHOULD not be seen' +Misc.tests.cpp:: passed: l == std::numeric_limits::max() for: 9223372036854775807 (0x) +== +9223372036854775807 (0x) +Misc.tests.cpp:: failed: b > a for: 0 > 1 +Misc.tests.cpp:: failed: b > a for: 1 > 1 +Misc.tests.cpp:: passed: b > a for: 2 > 1 +Misc.tests.cpp:: passed: b > a for: 3 > 1 +Misc.tests.cpp:: passed: b > a for: 4 > 1 +Misc.tests.cpp:: passed: b > a for: 5 > 1 +Misc.tests.cpp:: passed: b > a for: 6 > 1 +Misc.tests.cpp:: passed: b > a for: 7 > 1 +Misc.tests.cpp:: passed: b > a for: 8 > 1 +Misc.tests.cpp:: passed: b > a for: 9 > 1 +Misc.tests.cpp:: failed: ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[0] (1) is even' +Misc.tests.cpp:: failed: ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[1] (1) is even' +Misc.tests.cpp:: passed: ( fib[i] % 2 ) == 0 for: 0 == 0 with 1 message: 'Testing if fib[2] (2) is even' +Misc.tests.cpp:: failed: ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[3] (3) is even' +Misc.tests.cpp:: failed: ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[4] (5) is even' +Misc.tests.cpp:: passed: ( fib[i] % 2 ) == 0 for: 0 == 0 with 1 message: 'Testing if fib[5] (8) is even' +Misc.tests.cpp:: failed: ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[6] (13) is even' +Misc.tests.cpp:: failed: ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[7] (21) is even' +Stream.tests.cpp:: passed: Catch::makeStream( "%debug" ) +UniquePtr.tests.cpp:: passed: !(lval.has_moved) for: !false +UniquePtr.tests.cpp:: passed: rval.has_moved for: true +UniquePtr.tests.cpp:: passed: *ptr == std::tuple{1, 2., 3} for: {?} == {?} +InternalBenchmark.tests.cpp:: passed: m == 19. for: 19.0 == 19.0 +InternalBenchmark.tests.cpp:: passed: x == 17 for: 17 == 17 +InternalBenchmark.tests.cpp:: passed: x == 23 for: 23 == 23 +InternalBenchmark.tests.cpp:: passed: r.elapsed.count() == 42 for: 42 == 42 +InternalBenchmark.tests.cpp:: passed: r.result == 23 for: 23 == 23 +InternalBenchmark.tests.cpp:: passed: r.iterations == 1 for: 1 == 1 +InternalBenchmark.tests.cpp:: passed: s.elapsed.count() == 69 for: 69 == 69 +InternalBenchmark.tests.cpp:: passed: s.result == 17 for: 17 == 17 +InternalBenchmark.tests.cpp:: passed: s.iterations == 1 for: 1 == 1 +Message.tests.cpp:: warning: 'info' with 2 messages: 'unscoped info' and 'and warn may mix' +Message.tests.cpp:: warning: 'info' with 2 messages: 'unscoped info' and 'they are not cleared after warnings' +Misc.tests.cpp:: failed: a == b for: 1 == 2 +Misc.tests.cpp:: passed: a != b for: 1 != 2 +Misc.tests.cpp:: passed: a < b for: 1 < 2 +Misc.tests.cpp:: passed: a != b for: 1 != 2 +Misc.tests.cpp:: passed: b != a for: 2 != 1 +Misc.tests.cpp:: passed: a != b for: 1 != 2 +Skip.tests.cpp:: skipped: +Tricky.tests.cpp:: passed: s == "7" for: "7" == "7" +Tricky.tests.cpp:: passed: ti == typeid(int) for: {?} == {?} +InternalBenchmark.tests.cpp:: passed: normal_quantile(0.551780) == Approx(0.13015979861484198) for: 0.13015979861484195 +== +Approx( 0.13015979861484198 ) +InternalBenchmark.tests.cpp:: passed: normal_quantile(0.533700) == Approx(0.08457408802851875) for: 0.08457408802851875 +== +Approx( 0.08457408802851875 ) +InternalBenchmark.tests.cpp:: passed: normal_quantile(0.025000) == Approx(-1.95996398454005449) for: -1.95996398454005405 +== +Approx( -1.95996398454005449 ) +Misc.tests.cpp:: passed: +Message.tests.cpp:: passed: true with 1 message: 'this MAY be seen only for the FIRST assertion IF info is printed for passing assertions' +Message.tests.cpp:: passed: true with 1 message: 'this MAY be seen only for the SECOND assertion IF info is printed for passing assertions' +Message.tests.cpp:: failed: false with 1 message: 'this SHOULD be seen' +Misc.tests.cpp:: passed: makeString( false ) != static_cast(0) for: "valid string" != {null string} +Misc.tests.cpp:: passed: makeString( true ) == static_cast(0) for: {null string} == {null string} +Tricky.tests.cpp:: passed: ptr.get() == 0 for: 0 == 0 +ToStringPair.tests.cpp:: passed: ::Catch::Detail::stringify( pair ) == "{ { 42, \"Arthur\" }, { \"Ford\", 24 } }" for: "{ { 42, "Arthur" }, { "Ford", 24 } }" +== +"{ { 42, "Arthur" }, { "Ford", 24 } }" +ToString.tests.cpp:: passed: parseEnums( "" ), Equals( std::vector{} ) for: { } Equals: { } +ToString.tests.cpp:: passed: parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector{"Value1"} ) for: { Value1 } Equals: { Value1 } +ToString.tests.cpp:: passed: parseEnums( "Value1" ), Equals( std::vector{"Value1"} ) for: { Value1 } Equals: { Value1 } +ToString.tests.cpp:: passed: parseEnums( "EnumName::Value1" ), Equals(std::vector{"Value1"} ) for: { Value1 } Equals: { Value1 } +ToString.tests.cpp:: passed: parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector{"Value1", "Value2"} ) for: { Value1, Value2 } Equals: { Value1, Value2 } +ToString.tests.cpp:: passed: parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector{"Value1", "Value2", "Value3"} ) for: { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 } +ToString.tests.cpp:: passed: parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector{"Value1", "Value2", "Value3"} ) for: { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 } +Tricky.tests.cpp:: passed: p == 0 for: 0 == 0 +Message.tests.cpp:: passed: true with 1 message: 'this MAY be seen IF info is printed for passing assertions' +Message.tests.cpp:: failed: false with 2 messages: 'this SHOULD be seen' and 'this SHOULD also be seen' +Message.tests.cpp:: failed: false with 1 message: 'this SHOULD be seen only ONCE' +Message.tests.cpp:: passed: true +Message.tests.cpp:: passed: true with 1 message: 'this MAY also be seen only ONCE IF info is printed for passing assertions' +Message.tests.cpp:: passed: true +Misc.tests.cpp:: passed: a != b for: 1 != 2 +Misc.tests.cpp:: passed: b != a for: 2 != 1 +Misc.tests.cpp:: passed: a != b for: 1 != 2 +StringManip.tests.cpp:: passed: Catch::replaceInPlace(letters, "b", "z") for: true +StringManip.tests.cpp:: passed: letters == "azcdefcg" for: "azcdefcg" == "azcdefcg" +StringManip.tests.cpp:: passed: Catch::replaceInPlace(letters, "c", "z") for: true +StringManip.tests.cpp:: passed: letters == "abzdefzg" for: "abzdefzg" == "abzdefzg" +StringManip.tests.cpp:: passed: Catch::replaceInPlace(letters, "a", "z") for: true +StringManip.tests.cpp:: passed: letters == "zbcdefcg" for: "zbcdefcg" == "zbcdefcg" +StringManip.tests.cpp:: passed: Catch::replaceInPlace(letters, "g", "z") for: true +StringManip.tests.cpp:: passed: letters == "abcdefcz" for: "abcdefcz" == "abcdefcz" +StringManip.tests.cpp:: passed: Catch::replaceInPlace(letters, letters, "replaced") for: true +StringManip.tests.cpp:: passed: letters == "replaced" for: "replaced" == "replaced" +StringManip.tests.cpp:: passed: !(Catch::replaceInPlace(letters, "x", "z")) for: !false +StringManip.tests.cpp:: passed: letters == letters for: "abcdefcg" == "abcdefcg" +StringManip.tests.cpp:: passed: Catch::replaceInPlace(letters, "c", "cc") for: true +StringManip.tests.cpp:: passed: letters == "abccdefccg" for: "abccdefccg" == "abccdefccg" +StringManip.tests.cpp:: passed: Catch::replaceInPlace(s, "--", "-") for: true +StringManip.tests.cpp:: passed: s == "--" for: "--" == "--" +StringManip.tests.cpp:: passed: Catch::replaceInPlace(s, "'", "|'") for: true +StringManip.tests.cpp:: passed: s == "didn|'t" for: "didn|'t" == "didn|'t" +Stream.tests.cpp:: passed: Catch::makeStream( "%somestream" ) +InternalBenchmark.tests.cpp:: passed: res.size() == count for: 10 == 10 +InternalBenchmark.tests.cpp:: passed: res[i] == rate for: 1000.0 == 1000 (0x) +InternalBenchmark.tests.cpp:: passed: res[i] == rate for: 1000.0 == 1000 (0x) +InternalBenchmark.tests.cpp:: passed: res[i] == rate for: 1000.0 == 1000 (0x) +InternalBenchmark.tests.cpp:: passed: res[i] == rate for: 1000.0 == 1000 (0x) +InternalBenchmark.tests.cpp:: passed: res[i] == rate for: 1000.0 == 1000 (0x) +InternalBenchmark.tests.cpp:: passed: res[i] == rate for: 1000.0 == 1000 (0x) +InternalBenchmark.tests.cpp:: passed: res[i] == rate for: 1000.0 == 1000 (0x) +InternalBenchmark.tests.cpp:: passed: res[i] == rate for: 1000.0 == 1000 (0x) +InternalBenchmark.tests.cpp:: passed: res[i] == rate for: 1000.0 == 1000 (0x) +InternalBenchmark.tests.cpp:: passed: meter.runs() >= old_runs for: 1 >= 1 +InternalBenchmark.tests.cpp:: passed: meter.runs() >= old_runs for: 2 >= 1 +InternalBenchmark.tests.cpp:: passed: meter.runs() >= old_runs for: 4 >= 2 +InternalBenchmark.tests.cpp:: passed: meter.runs() >= old_runs for: 8 >= 4 +InternalBenchmark.tests.cpp:: passed: meter.runs() >= old_runs for: 16 >= 8 +InternalBenchmark.tests.cpp:: passed: meter.runs() >= old_runs for: 32 >= 16 +InternalBenchmark.tests.cpp:: passed: meter.runs() >= old_runs for: 64 >= 32 +InternalBenchmark.tests.cpp:: passed: meter.runs() >= old_runs for: 128 >= 64 +InternalBenchmark.tests.cpp:: passed: Timing.elapsed >= time for: 128 ns >= 100 ns +InternalBenchmark.tests.cpp:: passed: Timing.result == Timing.iterations + 17 for: 145 == 145 +InternalBenchmark.tests.cpp:: passed: Timing.iterations >= time.count() for: 128 >= 100 +InternalBenchmark.tests.cpp:: passed: x >= old_x for: 1 >= 1 +InternalBenchmark.tests.cpp:: passed: x >= old_x for: 2 >= 1 +InternalBenchmark.tests.cpp:: passed: x >= old_x for: 4 >= 2 +InternalBenchmark.tests.cpp:: passed: x >= old_x for: 8 >= 4 +InternalBenchmark.tests.cpp:: passed: x >= old_x for: 16 >= 8 +InternalBenchmark.tests.cpp:: passed: x >= old_x for: 32 >= 16 +InternalBenchmark.tests.cpp:: passed: x >= old_x for: 64 >= 32 +InternalBenchmark.tests.cpp:: passed: x >= old_x for: 128 >= 64 +InternalBenchmark.tests.cpp:: passed: Timing.elapsed >= time for: 128 ns >= 100 ns +InternalBenchmark.tests.cpp:: passed: Timing.result == Timing.iterations + 17 for: 145 == 145 +InternalBenchmark.tests.cpp:: passed: Timing.iterations >= time.count() for: 128 >= 100 +Skip.tests.cpp:: passed: +Skip.tests.cpp:: skipped: +Skip.tests.cpp:: passed: +Misc.tests.cpp:: failed: false with 1 message: '3' +Message.tests.cpp:: failed: false with 2 messages: 'hi' and 'i := 7' +Tag.tests.cpp:: passed: testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "."_catch_sr ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} ) +Skip.tests.cpp:: skipped: 'skipping because answer = 43' +StringManip.tests.cpp:: passed: splitStringRef("", ','), Equals(std::vector()) for: { } Equals: { } +StringManip.tests.cpp:: passed: splitStringRef("abc", ','), Equals(std::vector{"abc"}) for: { abc } Equals: { abc } +StringManip.tests.cpp:: passed: splitStringRef("abc,def", ','), Equals(std::vector{"abc", "def"}) for: { abc, def } Equals: { abc, def } +Message.tests.cpp:: failed: false with 4 messages: 'Count 1 to 3...' and '1' and '2' and '3' +Message.tests.cpp:: failed: false with 4 messages: 'Count 4 to 6...' and '4' and '5' and '6' +StringManip.tests.cpp:: passed: !(startsWith("", 'c')) for: !false +StringManip.tests.cpp:: passed: startsWith(std::string("abc"), 'a') for: true +StringManip.tests.cpp:: passed: startsWith("def"_catch_sr, 'd') for: true +ToStringGeneral.tests.cpp:: passed: Catch::Detail::stringify( emptyMap ) == "{ }" for: "{ }" == "{ }" +ToStringGeneral.tests.cpp:: passed: Catch::Detail::stringify( map ) == "{ { \"one\", 1 } }" for: "{ { "one", 1 } }" == "{ { "one", 1 } }" +ToStringGeneral.tests.cpp:: passed: Catch::Detail::stringify( map ) == "{ { \"abc\", 1 }, { \"def\", 2 }, { \"ghi\", 3 } }" for: "{ { "abc", 1 }, { "def", 2 }, { "ghi", 3 } }" +== +"{ { "abc", 1 }, { "def", 2 }, { "ghi", 3 } }" +ToStringPair.tests.cpp:: passed: ::Catch::Detail::stringify(value) == "{ 34, \"xyzzy\" }" for: "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" +ToStringPair.tests.cpp:: passed: ::Catch::Detail::stringify( value ) == "{ 34, \"xyzzy\" }" for: "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" +ToStringGeneral.tests.cpp:: passed: Catch::Detail::stringify( emptySet ) == "{ }" for: "{ }" == "{ }" +ToStringGeneral.tests.cpp:: passed: Catch::Detail::stringify( set ) == "{ \"one\" }" for: "{ "one" }" == "{ "one" }" +ToStringGeneral.tests.cpp:: passed: Catch::Detail::stringify( set ) == "{ \"abc\", \"def\", \"ghi\" }" for: "{ "abc", "def", "ghi" }" +== +"{ "abc", "def", "ghi" }" +ToStringPair.tests.cpp:: passed: ::Catch::Detail::stringify( pr ) == "{ { \"green\", 55 } }" for: "{ { "green", 55 } }" +== +"{ { "green", 55 } }" +Stream.tests.cpp:: passed: Catch::makeStream( "%stderr" )->isConsole() for: true +Stream.tests.cpp:: passed: Catch::makeStream( "%stdout" )->isConsole() for: true +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify(streamable_range{}) == "op<<(streamable_range)" for: "op<<(streamable_range)" +== +"op<<(streamable_range)" +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify(stringmaker_range{}) == "stringmaker(streamable_range)" for: "stringmaker(streamable_range)" +== +"stringmaker(streamable_range)" +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify(just_range{}) == "{ 1, 2, 3, 4 }" for: "{ 1, 2, 3, 4 }" == "{ 1, 2, 3, 4 }" +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify(disabled_range{}) == "{?}" for: "{?}" == "{?}" +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify( item ) == "StringMaker" for: "StringMaker" +== +"StringMaker" +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify( item ) == "StringMaker" for: "StringMaker" +== +"StringMaker" +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify(item) == "{?}" for: "{?}" == "{?}" +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify( item ) == "operator<<( has_operator )" for: "operator<<( has_operator )" +== +"operator<<( has_operator )" +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify( item ) == "operator<<( has_template_operator )" for: "operator<<( has_template_operator )" +== +"operator<<( has_template_operator )" +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify( v ) == "{ StringMaker }" for: "{ StringMaker }" +== +"{ StringMaker }" +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify( v ) == "{ StringMaker }" for: "{ StringMaker }" +== +"{ StringMaker }" +ToStringWhich.tests.cpp:: passed: ::Catch::Detail::stringify( v ) == "{ operator<<( has_operator ) }" for: "{ operator<<( has_operator ) }" +== +"{ operator<<( has_operator ) }" +Generators.tests.cpp:: passed: data.str.size() == data.len for: 3 == 3 +Generators.tests.cpp:: passed: data.str.size() == data.len for: 3 == 3 +Generators.tests.cpp:: passed: data.str.size() == data.len for: 5 == 5 +Generators.tests.cpp:: passed: data.str.size() == data.len for: 4 == 4 +Generators.tests.cpp:: passed: strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) for: 5 == 5 +Generators.tests.cpp:: passed: strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) for: 6 == 6 +Generators.tests.cpp:: passed: strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) for: 5 == 5 +Generators.tests.cpp:: passed: strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) for: 6 == 6 +Tag.tests.cpp:: passed: testcase.tags.size() == 1 for: 1 == 1 +Tag.tests.cpp:: passed: testcase.tags[0].original == "magic.tag"_catch_sr for: magic.tag == magic.tag +Skip.tests.cpp:: skipped: +Exception.tests.cpp:: failed: unexpected exception with message: 'Why would you throw a std::string?' +Misc.tests.cpp:: passed: result == "\"wide load\"" for: ""wide load"" == ""wide load"" +Misc.tests.cpp:: passed: result == "\"wide load\"" for: ""wide load"" == ""wide load"" +Misc.tests.cpp:: passed: result == "\"wide load\"" for: ""wide load"" == ""wide load"" +Misc.tests.cpp:: passed: result == "\"wide load\"" for: ""wide load"" == ""wide load"" +EnumToString.tests.cpp:: passed: ::Catch::Detail::stringify(e0) == "E2/V0" for: "E2/V0" == "E2/V0" +EnumToString.tests.cpp:: passed: ::Catch::Detail::stringify(e1) == "E2/V1" for: "E2/V1" == "E2/V1" +EnumToString.tests.cpp:: passed: ::Catch::Detail::stringify(e3) == "Unknown enum value 10" for: "Unknown enum value 10" +== +"Unknown enum value 10" +EnumToString.tests.cpp:: passed: ::Catch::Detail::stringify(e0) == "0" for: "0" == "0" +EnumToString.tests.cpp:: passed: ::Catch::Detail::stringify(e1) == "1" for: "1" == "1" +EnumToString.tests.cpp:: passed: ::Catch::Detail::stringify(e0) == "E2{0}" for: "E2{0}" == "E2{0}" +EnumToString.tests.cpp:: passed: ::Catch::Detail::stringify(e1) == "E2{1}" for: "E2{1}" == "E2{1}" +EnumToString.tests.cpp:: passed: ::Catch::Detail::stringify(e0) == "0" for: "0" == "0" +EnumToString.tests.cpp:: passed: ::Catch::Detail::stringify(e1) == "1" for: "1" == "1" +ToStringTuple.tests.cpp:: passed: "{ }" == ::Catch::Detail::stringify(type{}) for: "{ }" == "{ }" +ToStringTuple.tests.cpp:: passed: "{ }" == ::Catch::Detail::stringify(value) for: "{ }" == "{ }" +ToStringTuple.tests.cpp:: passed: "1.5f" == ::Catch::Detail::stringify(float(1.5)) for: "1.5f" == "1.5f" +ToStringTuple.tests.cpp:: passed: "{ 1.5f, 0 }" == ::Catch::Detail::stringify(type{1.5f,0}) for: "{ 1.5f, 0 }" == "{ 1.5f, 0 }" +ToStringTuple.tests.cpp:: passed: "{ 0 }" == ::Catch::Detail::stringify(type{0}) for: "{ 0 }" == "{ 0 }" +ToStringTuple.tests.cpp:: passed: "{ \"hello\", \"world\" }" == ::Catch::Detail::stringify(type{"hello","world"}) for: "{ "hello", "world" }" +== +"{ "hello", "world" }" +ToStringTuple.tests.cpp:: passed: "{ { 42 }, { }, 1.5f }" == ::Catch::Detail::stringify(value) for: "{ { 42 }, { }, 1.5f }" +== +"{ { 42 }, { }, 1.5f }" +InternalBenchmark.tests.cpp:: passed: e.point == 23 for: 23.0 == 23 +InternalBenchmark.tests.cpp:: passed: e.upper_bound == 23 for: 23.0 == 23 +InternalBenchmark.tests.cpp:: passed: e.lower_bound == 23 for: 23.0 == 23 +InternalBenchmark.tests.cpp:: passed: e.confidence_interval == 0.95 for: 0.94999999999999996 == 0.94999999999999996 +RandomNumberGeneration.tests.cpp:: passed: dist.a() == -10 for: -10 == -10 +RandomNumberGeneration.tests.cpp:: passed: dist.b() == 10 for: 10 == 10 +UniquePtr.tests.cpp:: passed: !(ptr) for: !{?} +UniquePtr.tests.cpp:: passed: ptr.get() == 0 for: 0 == 0 +UniquePtr.tests.cpp:: passed: ptr for: {?} +UniquePtr.tests.cpp:: passed: *ptr == 0 for: 0 == 0 +UniquePtr.tests.cpp:: passed: ptr.get() == naked_ptr for: 0x == 0x +UniquePtr.tests.cpp:: passed: !(ptr) for: !{?} +UniquePtr.tests.cpp:: passed: ptr.get() == 0 for: 0 == 0 +UniquePtr.tests.cpp:: passed: ptr for: {?} +UniquePtr.tests.cpp:: passed: *ptr == 0 for: 0 == 0 +UniquePtr.tests.cpp:: passed: ptr.get() == naked_ptr for: 0x == 0x +UniquePtr.tests.cpp:: passed: ptr for: {?} +UniquePtr.tests.cpp:: passed: ptr.get() != 0 for: 0x != 0 +UniquePtr.tests.cpp:: passed: *ptr == 2 for: 2 == 2 +UniquePtr.tests.cpp:: passed: !(ptr) for: !{?} +UniquePtr.tests.cpp:: passed: ptr.get() == 0 for: 0 == 0 +UniquePtr.tests.cpp:: passed: !(ptr1) for: !{?} +UniquePtr.tests.cpp:: passed: ptr2 for: {?} +UniquePtr.tests.cpp:: passed: *ptr2 == 1 for: 1 == 1 +UniquePtr.tests.cpp:: passed: !(ptr2) for: !{?} +UniquePtr.tests.cpp:: passed: ptr1 for: {?} +UniquePtr.tests.cpp:: passed: *ptr1 == 2 for: 2 == 2 +UniquePtr.tests.cpp:: passed: *ptr1 == 2 for: 2 == 2 +UniquePtr.tests.cpp:: passed: *ptr2 == 1 for: 1 == 1 +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(v) == "{ }" for: "{ }" == "{ }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(v) == "{ { \"hello\" }, { \"world\" } }" for: "{ { "hello" }, { "world" } }" +== +"{ { "hello" }, { "world" } }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(bools) == "{ }" for: "{ }" == "{ }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(bools) == "{ true }" for: "{ true }" == "{ true }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(bools) == "{ true, false }" for: "{ true, false }" == "{ true, false }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(vv) == "{ }" for: "{ }" == "{ }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(vv) == "{ 42 }" for: "{ 42 }" == "{ 42 }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(vv) == "{ 42, 250 }" for: "{ 42, 250 }" == "{ 42, 250 }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(vv) == "{ }" for: "{ }" == "{ }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(vv) == "{ 42 }" for: "{ 42 }" == "{ 42 }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(vv) == "{ 42, 250 }" for: "{ 42, 250 }" == "{ 42, 250 }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(vv) == "{ }" for: "{ }" == "{ }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(vv) == "{ \"hello\" }" for: "{ "hello" }" == "{ "hello" }" +ToStringVector.tests.cpp:: passed: ::Catch::Detail::stringify(vv) == "{ \"hello\", \"world\" }" for: "{ "hello", "world" }" +== +"{ "hello", "world" }" +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 10 for: 10 == 10 +Misc.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.capacity() == 0 for: 0 == 0 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 10 for: 10 >= 10 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +Misc.tests.cpp:: passed: v.size() == 5 for: 5 == 5 +Misc.tests.cpp:: passed: v.capacity() >= 5 for: 5 >= 5 +InternalBenchmark.tests.cpp:: passed: (iterations * rate) > Catch::Benchmark::Detail::warmup_time.count() for: 160000000 (0x) > 100 +InternalBenchmark.tests.cpp:: passed: (end - start) > Catch::Benchmark::Detail::warmup_time for: 310016000 ns > 100 ms +InternalBenchmark.tests.cpp:: passed: q1 == 14.5 for: 14.5 == 14.5 +InternalBenchmark.tests.cpp:: passed: med == 18. for: 18.0 == 18.0 +InternalBenchmark.tests.cpp:: passed: q3 == 23. for: 23.0 == 23.0 +Misc.tests.cpp:: passed: +Misc.tests.cpp:: passed: +test cases: 419 | 313 passed | 86 failed | 6 skipped | 14 failed as expected +assertions: 2269 | 2087 passed | 147 failed | 35 failed as expected + + diff --git a/tests/SelfTest/Baselines/console.std.approved.txt b/tests/SelfTest/Baselines/console.std.approved.txt new file mode 100644 index 0000000..495264b --- /dev/null +++ b/tests/SelfTest/Baselines/console.std.approved.txt @@ -0,0 +1,1615 @@ +Filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals] +Randomness seeded to: 1 + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + is a Catch2 v host application. +Run with -? for options + +------------------------------------------------------------------------------- +#1455 - INFO and WARN can start with a linebreak +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: warning: + +This warning message starts with a linebreak + +This would not be caught previously +Nor would this +------------------------------------------------------------------------------- +#1514: stderr/stdout is not captured in tests aborted by an exception +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: FAILED: +explicitly with message: + 1514 + +------------------------------------------------------------------------------- +#2615 - Throwing in constructor generator fails test case but does not abort +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: FAILED: +due to unexpected exception with message: + failure to init + +------------------------------------------------------------------------------- +#748 - captures with unexpected exceptions + outside assertions +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with messages: + answer := 42 + expected exception + +------------------------------------------------------------------------------- +#748 - captures with unexpected exceptions + inside REQUIRE_NOTHROW +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + REQUIRE_NOTHROW( thisThrows() ) +due to unexpected exception with messages: + answer := 42 + expected exception + +------------------------------------------------------------------------------- +#835 -- errno should not be touched by Catch2 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + CHECK( f() == 0 ) +with expansion: + 1 == 0 + +------------------------------------------------------------------------------- +'Not' checks that should fail +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + CHECK( false != false ) + +Condition.tests.cpp:: FAILED: + CHECK( true != true ) + +Condition.tests.cpp:: FAILED: + CHECK( !true ) +with expansion: + false + +Condition.tests.cpp:: FAILED: + CHECK_FALSE( true ) +with expansion: + !true + +Condition.tests.cpp:: FAILED: + CHECK( !trueValue ) +with expansion: + false + +Condition.tests.cpp:: FAILED: + CHECK_FALSE( trueValue ) +with expansion: + !true + +Condition.tests.cpp:: FAILED: + CHECK( !(1 == 1) ) +with expansion: + false + +Condition.tests.cpp:: FAILED: + CHECK_FALSE( 1 == 1 ) + +------------------------------------------------------------------------------- +A METHOD_AS_TEST_CASE based test run that fails +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( s == "world" ) +with expansion: + "hello" == "world" + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2::m_a.size() == 1 ) +with expansion: + 0 == 1 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2::m_a.size() == 1 ) +with expansion: + 0 == 1 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2::m_a.size() == 1 ) +with expansion: + 0 == 1 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2::m_a.size() == 1 ) +with expansion: + 0 == 1 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - +Template_Foo_2 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2{}.m_a.size() < 2 ) +with expansion: + 6 < 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - +Template_Foo_2 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2{}.m_a.size() < 2 ) +with expansion: + 2 < 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2{}.m_a.size() < 2 ) +with expansion: + 6 < 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2{}.m_a.size() < 2 ) +with expansion: + 2 < 2 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD based test run that fails - double +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture::m_a == 2 ) +with expansion: + 1.0 == 2 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD based test run that fails - float +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture::m_a == 2 ) +with expansion: + 1.0f == 2 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD based test run that fails - int +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture::m_a == 2 ) +with expansion: + 1 == 2 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Nttp_Fixture::value == 0 ) +with expansion: + 1 == 0 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Nttp_Fixture::value == 0 ) +with expansion: + 3 == 0 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Nttp_Fixture::value == 0 ) +with expansion: + 6 == 0 + +------------------------------------------------------------------------------- +A TEST_CASE_METHOD based test run that fails +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( m_a == 2 ) +with expansion: + 1 == 2 + +------------------------------------------------------------------------------- +A TEST_CASE_PERSISTENT_FIXTURE based test run that fails + Second partial run +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( m_a == 0 ) +with expansion: + 1 == 0 + +------------------------------------------------------------------------------- +A couple of nested sections followed by a failure +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: +explicitly with message: + to infinity and beyond + +------------------------------------------------------------------------------- +A failing expression with a non streamable type is still captured +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: FAILED: + CHECK( &o1 == &o2 ) +with expansion: + 0x == 0x + +Tricky.tests.cpp:: FAILED: + CHECK( o1 == o2 ) +with expansion: + {?} == {?} + +------------------------------------------------------------------------------- +An unchecked exception reports the line of the last assertion +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + {Unknown expression after the reported line} +due to unexpected exception with message: + unexpected exception + +------------------------------------------------------------------------------- +Contains string matcher +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "not there" (case + insensitive) + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "STRING" + +------------------------------------------------------------------------------- +Custom exceptions can be translated when testing for nothrow +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + REQUIRE_NOTHROW( throwCustom() ) +due to unexpected exception with message: + custom exception - not std + +------------------------------------------------------------------------------- +Custom exceptions can be translated when testing for throwing as something else +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + REQUIRE_THROWS_AS( throwCustom(), std::exception ) +due to unexpected exception with message: + custom exception - not std + +------------------------------------------------------------------------------- +Custom std-exceptions can be custom translated +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with message: + custom std exception + +------------------------------------------------------------------------------- +Empty generators can SKIP in constructor +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: +explicitly with message: + This generator is empty + +------------------------------------------------------------------------------- +EndsWith string matcher +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), EndsWith( "Substring" ) ) +with expansion: + "this string contains 'abc' as a substring" ends with: "Substring" + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" ends with: "this" (case + insensitive) + +------------------------------------------------------------------------------- +Equality checks that should fail +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven == 6 ) +with expansion: + 7 == 6 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven == 8 ) +with expansion: + 7 == 8 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven == 0 ) +with expansion: + 7 == 0 + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one == Approx( 9.11f ) ) +with expansion: + 9.100000381f + == + Approx( 9.10999965667724609 ) + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one == Approx( 9.0f ) ) +with expansion: + 9.100000381f == Approx( 9.0 ) + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one == Approx( 1 ) ) +with expansion: + 9.100000381f == Approx( 1.0 ) + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one == Approx( 0 ) ) +with expansion: + 9.100000381f == Approx( 0.0 ) + +Condition.tests.cpp:: FAILED: + CHECK( data.double_pi == Approx( 3.1415 ) ) +with expansion: + 3.14159265350000005 + == + Approx( 3.14150000000000018 ) + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello == "goodbye" ) +with expansion: + "hello" == "goodbye" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello == "hell" ) +with expansion: + "hello" == "hell" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello == "hello1" ) +with expansion: + "hello" == "hello1" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello.size() == 6 ) +with expansion: + 5 == 6 + +Condition.tests.cpp:: FAILED: + CHECK( x == Approx( 1.301 ) ) +with expansion: + 1.30000000000000027 + == + Approx( 1.30099999999999993 ) + +------------------------------------------------------------------------------- +Equals string matcher +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), Equals( "this string contains 'ABC' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" equals: "this string contains + 'ABC' as a substring" + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" equals: "something else" (case + insensitive) + +------------------------------------------------------------------------------- +Exception matchers that fail + No exception +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) +because no exception was thrown where one was expected: + +Matchers.tests.cpp:: FAILED: + REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) +because no exception was thrown where one was expected: + +------------------------------------------------------------------------------- +Exception matchers that fail + Type mismatch +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) +due to unexpected exception with message: + Unknown exception + +Matchers.tests.cpp:: FAILED: + REQUIRE_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) +due to unexpected exception with message: + Unknown exception + +------------------------------------------------------------------------------- +Exception matchers that fail + Contents are wrong +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THROWS_MATCHES( throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } ) +with expansion: + SpecialException::what special exception has value of 1 + +Matchers.tests.cpp:: FAILED: + REQUIRE_THROWS_MATCHES( throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } ) +with expansion: + SpecialException::what special exception has value of 1 + +------------------------------------------------------------------------------- +Expected exceptions that don't throw or unexpected exceptions fail the test +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + CHECK_THROWS_AS( thisThrows(), std::string ) +due to unexpected exception with message: + expected exception + +Exception.tests.cpp:: FAILED: + CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error ) +because no exception was thrown where one was expected: + +Exception.tests.cpp:: FAILED: + CHECK_NOTHROW( thisThrows() ) +due to unexpected exception with message: + expected exception + +------------------------------------------------------------------------------- +FAIL aborts the test +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: +explicitly with message: + This is a failure + +------------------------------------------------------------------------------- +FAIL does not require an argument +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +FAIL_CHECK does not abort the test +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: +explicitly with message: + This is a failure + +Message.tests.cpp:: warning: + This message appears in the output + +------------------------------------------------------------------------------- +INFO and UNSCOPED_INFO can stream multiple arguments +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: +explicitly with messages: + This info has multiple parts. + This unscoped info has multiple parts. + Show infos! + +------------------------------------------------------------------------------- +INFO and WARN do not abort tests +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: warning: + this is a warning + +------------------------------------------------------------------------------- +INFO gets logged on failure +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: + REQUIRE( a == 1 ) +with expansion: + 2 == 1 +with messages: + this message should be logged + so should this + +------------------------------------------------------------------------------- +INFO gets logged on failure, even if captured before successful assertions +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: + CHECK( a == 1 ) +with expansion: + 2 == 1 +with messages: + this message may be logged later + this message should be logged + +Message.tests.cpp:: FAILED: + CHECK( a == 0 ) +with expansion: + 2 == 0 +with messages: + this message may be logged later + this message should be logged + and this, but later + +------------------------------------------------------------------------------- +INFO is reset for each loop +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: + REQUIRE( i < 10 ) +with expansion: + 10 < 10 +with messages: + current counter 10 + i := 10 + +------------------------------------------------------------------------------- +Incomplete AssertionHandler +------------------------------------------------------------------------------- +AssertionHandler.tests.cpp: +............................................................................... + +AssertionHandler.tests.cpp:: FAILED: + REQUIRE( Dummy ) +due to unexpected exception with message: + Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE + +------------------------------------------------------------------------------- +Inequality checks that should fail +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven != 7 ) +with expansion: + 7 != 7 + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one != Approx( 9.1f ) ) +with expansion: + 9.100000381f + != + Approx( 9.10000038146972656 ) + +Condition.tests.cpp:: FAILED: + CHECK( data.double_pi != Approx( 3.1415926535 ) ) +with expansion: + 3.14159265350000005 + != + Approx( 3.14159265350000005 ) + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello != "hello" ) +with expansion: + "hello" != "hello" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello.size() != 5 ) +with expansion: + 5 != 5 + +------------------------------------------------------------------------------- +Matchers can be composed with both && and || - failing +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) ) +with expansion: + "this string contains 'abc' as a substring" ( ( contains: "string" or + contains: "different" ) and contains: "random" ) + +------------------------------------------------------------------------------- +Matchers can be negated (Not) with the ! operator - failing +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) ) +with expansion: + "this string contains 'abc' as a substring" not contains: "substring" + +------------------------------------------------------------------------------- +Mayfail test case with nested sections + A + 1 +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +Mayfail test case with nested sections + A + 2 +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +Mayfail test case with nested sections + B + 1 +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +Mayfail test case with nested sections + B + 2 +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +Mismatching exception messages failing the test +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + REQUIRE_THROWS_WITH( thisThrows(), "should fail" ) +with expansion: + "expected exception" equals: "should fail" + +------------------------------------------------------------------------------- +Nice descriptive name +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: warning: + This one ran + +------------------------------------------------------------------------------- +Non-std exceptions can be translated +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with message: + custom exception + +------------------------------------------------------------------------------- +Ordering comparison checks that should fail +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven > 7 ) +with expansion: + 7 > 7 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven < 7 ) +with expansion: + 7 < 7 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven > 8 ) +with expansion: + 7 > 8 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven < 6 ) +with expansion: + 7 < 6 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven < 0 ) +with expansion: + 7 < 0 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven < -1 ) +with expansion: + 7 < -1 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven >= 8 ) +with expansion: + 7 >= 8 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven <= 6 ) +with expansion: + 7 <= 6 + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one < 9 ) +with expansion: + 9.100000381f < 9 + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one > 10 ) +with expansion: + 9.100000381f > 10 + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one > 9.2 ) +with expansion: + 9.100000381f > 9.19999999999999929 + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello > "hello" ) +with expansion: + "hello" > "hello" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello < "hello" ) +with expansion: + "hello" < "hello" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello > "hellp" ) +with expansion: + "hello" > "hellp" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello > "z" ) +with expansion: + "hello" > "z" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello < "hellm" ) +with expansion: + "hello" < "hellm" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello < "a" ) +with expansion: + "hello" < "a" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello >= "z" ) +with expansion: + "hello" >= "z" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello <= "a" ) +with expansion: + "hello" <= "a" + +------------------------------------------------------------------------------- +Output from all sections is reported + one +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: +explicitly with message: + Message from section one + +------------------------------------------------------------------------------- +Output from all sections is reported + two +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: +explicitly with message: + Message from section two + +------------------------------------------------------------------------------- +Reconstruction should be based on stringification: #914 +------------------------------------------------------------------------------- +Decomposition.tests.cpp: +............................................................................... + +Decomposition.tests.cpp:: FAILED: + CHECK( truthy(false) ) +with expansion: + Hey, its truthy! + +------------------------------------------------------------------------------- +Regex string matcher +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), Matches( "this STRING contains 'abc' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" matches "this STRING contains + 'abc' as a substring" case sensitively + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), Matches( "contains 'abc' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" matches "contains 'abc' as a + substring" case sensitively + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), Matches( "this string contains 'abc' as a" ) ) +with expansion: + "this string contains 'abc' as a substring" matches "this string contains + 'abc' as a" case sensitively + +A string sent directly to stdout +A string sent directly to stderr +A string sent to stderr via clog +Message from section one +Message from section two +------------------------------------------------------------------------------- +StartsWith string matcher +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), StartsWith( "This String" ) ) +with expansion: + "this string contains 'abc' as a substring" starts with: "This String" + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" starts with: "string" (case + insensitive) + +------------------------------------------------------------------------------- +Tabs and newlines show in output +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + CHECK( s1 == s2 ) +with expansion: + "if ($b == 10) { + $a = 20; + }" + == + "if ($b == 10) { + $a = 20; + } + " + +------------------------------------------------------------------------------- +Testing checked-if 2 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +Testing checked-if 3 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +Testing checked-if 4 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + {Unknown expression after the reported line} +due to unexpected exception with message: + Uncaught exception should fail! + +------------------------------------------------------------------------------- +Testing checked-if 5 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + {Unknown expression after the reported line} +due to unexpected exception with message: + Uncaught exception should fail! + +------------------------------------------------------------------------------- +Thrown string literals are translated +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with message: + For some reason someone is throwing a string literal! + +------------------------------------------------------------------------------- +Unexpected exceptions can be translated +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with message: + 3.14000000000000012 + +------------------------------------------------------------------------------- +Vector Approx matcher -- failing + Empty and non empty vectors are not approx equal +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( empty, Approx( t1 ) ) +with expansion: + { } is approx: { 1.0, 2.0 } + +------------------------------------------------------------------------------- +Vector Approx matcher -- failing + Just different vectors +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( v1, Approx( v2 ) ) +with expansion: + { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 } + +------------------------------------------------------------------------------- +Vector matchers that fail + Contains (element) +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( v, VectorContains( -1 ) ) +with expansion: + { 1, 2, 3 } Contains: -1 + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( empty, VectorContains( 1 ) ) +with expansion: + { } Contains: 1 + +------------------------------------------------------------------------------- +Vector matchers that fail + Contains (vector) +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( empty, Contains( v ) ) +with expansion: + { } Contains: { 1, 2, 3 } + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( v, Contains( v2 ) ) +with expansion: + { 1, 2, 3 } Contains: { 1, 2, 4 } + +------------------------------------------------------------------------------- +Vector matchers that fail + Equals +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( v, Equals( v2 ) ) +with expansion: + { 1, 2, 3 } Equals: { 1, 2 } + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( v2, Equals( v ) ) +with expansion: + { 1, 2 } Equals: { 1, 2, 3 } + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( empty, Equals( v ) ) +with expansion: + { } Equals: { 1, 2, 3 } + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( v, Equals( empty ) ) +with expansion: + { 1, 2, 3 } Equals: { } + +------------------------------------------------------------------------------- +Vector matchers that fail + UnorderedEquals +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( v, UnorderedEquals( empty ) ) +with expansion: + { 1, 2, 3 } UnorderedEquals: { } + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( empty, UnorderedEquals( v ) ) +with expansion: + { } UnorderedEquals: { 1, 2, 3 } + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( permuted, UnorderedEquals( v ) ) +with expansion: + { 1, 3 } UnorderedEquals: { 1, 2, 3 } + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( permuted, UnorderedEquals( v ) ) +with expansion: + { 3, 1 } UnorderedEquals: { 1, 2, 3 } + +------------------------------------------------------------------------------- +When unchecked exceptions are thrown directly they are always failures +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with message: + unexpected exception + +------------------------------------------------------------------------------- +When unchecked exceptions are thrown during a CHECK the test should continue +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + CHECK( thisThrows() == 0 ) +due to unexpected exception with message: + expected exception + +------------------------------------------------------------------------------- +When unchecked exceptions are thrown during a REQUIRE the test should abort +fail +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + REQUIRE( thisThrows() == 0 ) +due to unexpected exception with message: + expected exception + +------------------------------------------------------------------------------- +When unchecked exceptions are thrown from functions they are always failures +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + CHECK( thisThrows() == 0 ) +due to unexpected exception with message: + expected exception + +------------------------------------------------------------------------------- +When unchecked exceptions are thrown from sections they are always failures + section name +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with message: + unexpected exception + +------------------------------------------------------------------------------- +a succeeding test can still be skipped +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: + +------------------------------------------------------------------------------- +checkedElse, failing +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + REQUIRE( testCheckedElse( false ) ) +with expansion: + false + +------------------------------------------------------------------------------- +checkedIf, failing +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + REQUIRE( testCheckedIf( false ) ) +with expansion: + false + +------------------------------------------------------------------------------- +dynamic skipping works with generators +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: +explicitly with message: + skipping because answer = 41 + +------------------------------------------------------------------------------- +dynamic skipping works with generators +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: +explicitly with message: + skipping because answer = 43 + +------------------------------------------------------------------------------- +failed assertions before SKIP cause test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: FAILED: + CHECK( 3 == 4 ) + +Skip.tests.cpp:: SKIPPED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: + +------------------------------------------------------------------------------- +failing in some unskipped sections causes entire test case to fail + skipped +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: + +------------------------------------------------------------------------------- +failing in some unskipped sections causes entire test case to fail + not skipped +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: FAILED: + +loose text artifact +------------------------------------------------------------------------------- +just failure +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: +explicitly with message: + Previous info should not be seen + +------------------------------------------------------------------------------- +just failure after unscoped info +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: +explicitly with message: + previous unscoped info SHOULD not be seen + +------------------------------------------------------------------------------- +looped SECTION tests + b is currently: 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + CHECK( b > a ) +with expansion: + 0 > 1 + +------------------------------------------------------------------------------- +looped SECTION tests + b is currently: 1 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + CHECK( b > a ) +with expansion: + 1 > 1 + +------------------------------------------------------------------------------- +looped tests +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[0] (1) is even + +Misc.tests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[1] (1) is even + +Misc.tests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[3] (3) is even + +Misc.tests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[4] (5) is even + +Misc.tests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[6] (13) is even + +Misc.tests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[7] (21) is even + +------------------------------------------------------------------------------- +mix info, unscoped info and warning +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: warning: + and warn may mix + +Message.tests.cpp:: warning: + they are not cleared after warnings + +------------------------------------------------------------------------------- +more nested SECTION tests + doesn't equal + equal +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + REQUIRE( a == b ) +with expansion: + 1 == 2 + +a! +b1! +------------------------------------------------------------------------------- +nested sections can be skipped dynamically at runtime + B + B2 +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: + +! +------------------------------------------------------------------------------- +not prints unscoped info from previous failures +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: + REQUIRE( false ) +with message: + this SHOULD be seen + +------------------------------------------------------------------------------- +prints unscoped info on failure +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: + REQUIRE( false ) +with messages: + this SHOULD be seen + this SHOULD also be seen + +------------------------------------------------------------------------------- +prints unscoped info only for the first assertion +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: + CHECK( false ) +with message: + this SHOULD be seen only ONCE + +------------------------------------------------------------------------------- +sections can be skipped dynamically at runtime + skipped +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: + +------------------------------------------------------------------------------- +send a single char to INFO +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + REQUIRE( false ) +with message: + 3 + +------------------------------------------------------------------------------- +sends information to INFO +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: + REQUIRE( false ) +with messages: + hi + i := 7 + +------------------------------------------------------------------------------- +skipped tests can optionally provide a reason +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: +explicitly with message: + skipping because answer = 43 + +------------------------------------------------------------------------------- +stacks unscoped info in loops +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: + CHECK( false ) +with messages: + Count 1 to 3... + 1 + 2 + 3 + +Message.tests.cpp:: FAILED: + CHECK( false ) +with messages: + Count 4 to 6... + 4 + 5 + 6 + +------------------------------------------------------------------------------- +tests can be skipped dynamically at runtime +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: + +------------------------------------------------------------------------------- +thrown std::strings are translated +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with message: + Why would you throw a std::string? + +=============================================================================== +test cases: 419 | 327 passed | 71 failed | 7 skipped | 14 failed as expected +assertions: 2252 | 2087 passed | 130 failed | 35 failed as expected + diff --git a/tests/SelfTest/Baselines/console.sw.approved.txt b/tests/SelfTest/Baselines/console.sw.approved.txt new file mode 100644 index 0000000..a53f40d --- /dev/null +++ b/tests/SelfTest/Baselines/console.sw.approved.txt @@ -0,0 +1,19017 @@ +Filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals] +Randomness seeded to: 1 + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + is a Catch2 v host application. +Run with -? for options + +------------------------------------------------------------------------------- +# A test name that starts with a # +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + yay + +------------------------------------------------------------------------------- +#1027: Bitfields can be captured +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( y.v == 0 ) +with expansion: + 0 == 0 + +Compilation.tests.cpp:: PASSED: + REQUIRE( 0 == y.v ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +#1147 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( t1 == t2 ) +with expansion: + {?} == {?} + +Compilation.tests.cpp:: PASSED: + REQUIRE( t1 != t2 ) +with expansion: + {?} != {?} + +Compilation.tests.cpp:: PASSED: + REQUIRE( t1 < t2 ) +with expansion: + {?} < {?} + +Compilation.tests.cpp:: PASSED: + REQUIRE( t1 > t2 ) +with expansion: + {?} > {?} + +Compilation.tests.cpp:: PASSED: + REQUIRE( t1 <= t2 ) +with expansion: + {?} <= {?} + +Compilation.tests.cpp:: PASSED: + REQUIRE( t1 >= t2 ) +with expansion: + {?} >= {?} + +------------------------------------------------------------------------------- +#1175 - Hidden Test +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +#1238 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( std::memcmp(uarr, "123", sizeof(uarr)) == 0 ) +with expansion: + 0 == 0 +with messages: + uarr := "123" + sarr := "456" + +Compilation.tests.cpp:: PASSED: + REQUIRE( std::memcmp(sarr, "456", sizeof(sarr)) == 0 ) +with expansion: + 0 == 0 +with messages: + uarr := "123" + sarr := "456" + +------------------------------------------------------------------------------- +#1245 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +#1319: Sections can have description (even if it is not saved + SectionName +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +#1403 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( h1 == h2 ) +with expansion: + [1403 helper] == [1403 helper] + +------------------------------------------------------------------------------- +#1455 - INFO and WARN can start with a linebreak +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: warning: + +This info message starts with a linebreak + +This warning message starts with a linebreak + + +No assertions in test case '#1455 - INFO and WARN can start with a linebreak' + +This would not be caught previously +Nor would this +------------------------------------------------------------------------------- +#1514: stderr/stdout is not captured in tests aborted by an exception +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: FAILED: +explicitly with message: + 1514 + +------------------------------------------------------------------------------- +#1548 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( std::is_same, TypeList>::value ) +with expansion: + true + +------------------------------------------------------------------------------- +#1905 -- test spec parser properly clears internal state between compound tests +------------------------------------------------------------------------------- +TestSpec.tests.cpp: +............................................................................... + +TestSpec.tests.cpp:: PASSED: + REQUIRE( spec.matches(*fakeTestCase("spec . char")) ) +with expansion: + true + +TestSpec.tests.cpp:: PASSED: + REQUIRE( spec.matches(*fakeTestCase("spec , char")) ) +with expansion: + true + +TestSpec.tests.cpp:: PASSED: + REQUIRE_FALSE( spec.matches(*fakeTestCase(R"(spec \, char)")) ) +with expansion: + !false + +------------------------------------------------------------------------------- +#1912 -- test spec parser handles escaping + Various parentheses +------------------------------------------------------------------------------- +TestSpec.tests.cpp: +............................................................................... + +TestSpec.tests.cpp:: PASSED: + REQUIRE( spec.matches(*fakeTestCase(R"(spec {a} char)")) ) +with expansion: + true + +TestSpec.tests.cpp:: PASSED: + REQUIRE( spec.matches(*fakeTestCase(R"(spec [a] char)")) ) +with expansion: + true + +TestSpec.tests.cpp:: PASSED: + REQUIRE_FALSE( spec.matches(*fakeTestCase("differs but has similar tag", "[a]")) ) +with expansion: + !false + +------------------------------------------------------------------------------- +#1912 -- test spec parser handles escaping + backslash in test name +------------------------------------------------------------------------------- +TestSpec.tests.cpp: +............................................................................... + +TestSpec.tests.cpp:: PASSED: + REQUIRE( spec.matches(*fakeTestCase(R"(spec \ char)")) ) +with expansion: + true + +------------------------------------------------------------------------------- +#1913 - GENERATE inside a for loop should not keep recreating the generator +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( counter < 7 ) +with expansion: + 3 < 7 + +------------------------------------------------------------------------------- +#1913 - GENERATE inside a for loop should not keep recreating the generator +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( counter < 7 ) +with expansion: + 6 < 7 + +------------------------------------------------------------------------------- +#1913 - GENERATEs can share a line +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i != j ) +with expansion: + 1 != 3 + +------------------------------------------------------------------------------- +#1913 - GENERATEs can share a line +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i != j ) +with expansion: + 1 != 4 + +------------------------------------------------------------------------------- +#1913 - GENERATEs can share a line +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i != j ) +with expansion: + 2 != 3 + +------------------------------------------------------------------------------- +#1913 - GENERATEs can share a line +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i != j ) +with expansion: + 2 != 4 + +------------------------------------------------------------------------------- +#1938 - GENERATE after a section + A +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with message: + A + +------------------------------------------------------------------------------- +#1938 - GENERATE after a section + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - GENERATE after a section + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - GENERATE after a section + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - Section followed by flat generate + A +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( 1 ) + +------------------------------------------------------------------------------- +#1938 - Section followed by flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - Section followed by flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + A +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with message: + A + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 1 + j := 3 + k := 5 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with message: + B + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 1 + j := 3 + k := 6 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with message: + B + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 1 + j := 4 + k := 5 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 1 + j := 4 + k := 6 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + A +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with message: + A + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 2 + j := 3 + k := 5 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with message: + B + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 2 + j := 3 + k := 6 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with message: + B + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 2 + j := 4 + k := 5 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 2 + j := 4 + k := 6 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 1 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 1 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 1 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 2 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 2 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 2 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 3 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 3 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 3 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +#1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +#1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +#2152 - ULP checks between differently signed values were wrong - double +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) ) +with expansion: + 0.0 is within 2 ULPs of -4.9406564584124654e-324 ([-1.4821969375237396e-323, + 4.9406564584124654e-324]) + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) ) +with expansion: + 0.0 not is within 1 ULPs of -4.9406564584124654e-324 ([-9.8813129168249309e- + 324, -0.0000000000000000e+00]) + +------------------------------------------------------------------------------- +#2152 - ULP checks between differently signed values were wrong - float +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) ) +with expansion: + 0.0f is within 2 ULPs of -1.40129846e-45f ([-4.20389539e-45, 1.40129846e-45]) + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) ) +with expansion: + 0.0f not is within 1 ULPs of -1.40129846e-45f ([-2.80259693e-45, -0. + 00000000e+00]) + +------------------------------------------------------------------------------- +#2615 - Throwing in constructor generator fails test case but does not abort +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: FAILED: +due to unexpected exception with message: + failure to init + +------------------------------------------------------------------------------- +#748 - captures with unexpected exceptions + outside assertions +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with messages: + answer := 42 + expected exception + +------------------------------------------------------------------------------- +#748 - captures with unexpected exceptions + inside REQUIRE_NOTHROW +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + REQUIRE_NOTHROW( thisThrows() ) +due to unexpected exception with messages: + answer := 42 + expected exception + +------------------------------------------------------------------------------- +#748 - captures with unexpected exceptions + inside REQUIRE_THROWS +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: PASSED: + REQUIRE_THROWS( thisThrows() ) +with message: + answer := 42 + +------------------------------------------------------------------------------- +#809 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( 42 == f ) +with expansion: + 42 == {?} + +------------------------------------------------------------------------------- +#833 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( a == t ) +with expansion: + 3 == 3 + +Compilation.tests.cpp:: PASSED: + CHECK( a == t ) +with expansion: + 3 == 3 + +Compilation.tests.cpp:: PASSED: + REQUIRE_THROWS( throws_int(true) ) + +Compilation.tests.cpp:: PASSED: + CHECK_THROWS_AS( throws_int(true), int ) + +Compilation.tests.cpp:: PASSED: + REQUIRE_NOTHROW( throws_int(false) ) + +Compilation.tests.cpp:: PASSED: + REQUIRE_THAT( "aaa", Catch::Matchers::EndsWith("aaa") ) +with expansion: + "aaa" ends with: "aaa" + +Compilation.tests.cpp:: PASSED: + REQUIRE( templated_tests(3) ) +with expansion: + true + +------------------------------------------------------------------------------- +#835 -- errno should not be touched by Catch2 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + CHECK( f() == 0 ) +with expansion: + 1 == 0 + +Misc.tests.cpp:: PASSED: + REQUIRE( errno_after == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +#872 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( x == 4 ) +with expansion: + {?} == 4 +with message: + dummy := 0 + +------------------------------------------------------------------------------- +#961 -- Dynamically created sections should all be reported + Looped section 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + Everything is OK + +------------------------------------------------------------------------------- +#961 -- Dynamically created sections should all be reported + Looped section 1 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + Everything is OK + +------------------------------------------------------------------------------- +#961 -- Dynamically created sections should all be reported + Looped section 2 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + Everything is OK + +------------------------------------------------------------------------------- +#961 -- Dynamically created sections should all be reported + Looped section 3 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + Everything is OK + +------------------------------------------------------------------------------- +#961 -- Dynamically created sections should all be reported + Looped section 4 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + Everything is OK + +------------------------------------------------------------------------------- +'Not' checks that should fail +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + CHECK( false != false ) + +Condition.tests.cpp:: FAILED: + CHECK( true != true ) + +Condition.tests.cpp:: FAILED: + CHECK( !true ) +with expansion: + false + +Condition.tests.cpp:: FAILED: + CHECK_FALSE( true ) +with expansion: + !true + +Condition.tests.cpp:: FAILED: + CHECK( !trueValue ) +with expansion: + false + +Condition.tests.cpp:: FAILED: + CHECK_FALSE( trueValue ) +with expansion: + !true + +Condition.tests.cpp:: FAILED: + CHECK( !(1 == 1) ) +with expansion: + false + +Condition.tests.cpp:: FAILED: + CHECK_FALSE( 1 == 1 ) + +------------------------------------------------------------------------------- +'Not' checks that should succeed +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: PASSED: + REQUIRE( false == false ) + +Condition.tests.cpp:: PASSED: + REQUIRE( true == true ) + +Condition.tests.cpp:: PASSED: + REQUIRE( !false ) +with expansion: + true + +Condition.tests.cpp:: PASSED: + REQUIRE_FALSE( false ) +with expansion: + !false + +Condition.tests.cpp:: PASSED: + REQUIRE( !falseValue ) +with expansion: + true + +Condition.tests.cpp:: PASSED: + REQUIRE_FALSE( falseValue ) +with expansion: + !false + +Condition.tests.cpp:: PASSED: + REQUIRE( !(1 == 2) ) +with expansion: + true + +Condition.tests.cpp:: PASSED: + REQUIRE_FALSE( 1 == 2 ) + +------------------------------------------------------------------------------- +(unimplemented) static bools can be evaluated + compare to true +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( is_true::value == true ) +with expansion: + true == true + +Tricky.tests.cpp:: PASSED: + REQUIRE( true == is_true::value ) +with expansion: + true == true + +------------------------------------------------------------------------------- +(unimplemented) static bools can be evaluated + compare to false +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( is_true::value == false ) +with expansion: + false == false + +Tricky.tests.cpp:: PASSED: + REQUIRE( false == is_true::value ) +with expansion: + false == false + +------------------------------------------------------------------------------- +(unimplemented) static bools can be evaluated + negation +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( !is_true::value ) +with expansion: + true + +------------------------------------------------------------------------------- +(unimplemented) static bools can be evaluated + double negation +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( !!is_true::value ) +with expansion: + true + +------------------------------------------------------------------------------- +(unimplemented) static bools can be evaluated + direct +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( is_true::value ) +with expansion: + true + +Tricky.tests.cpp:: PASSED: + REQUIRE_FALSE( is_true::value ) +with expansion: + !false + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 1 < 4 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 4 < 7 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 1 < 7 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 1 < 4 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 4 < 8 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 1 < 8 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 1 < 4 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 4 < 9 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 1 < 9 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 1 < 5 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 5 < 7 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 1 < 7 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 1 < 5 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 5 < 8 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 1 < 8 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 1 < 5 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 5 < 9 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 1 < 9 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 1 < 6 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 6 < 7 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 1 < 7 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 1 < 6 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 6 < 8 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 1 < 8 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 1 < 6 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 6 < 9 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 1 < 9 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 2 < 4 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 4 < 7 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 2 < 7 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 2 < 4 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 4 < 8 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 2 < 8 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 2 < 4 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 4 < 9 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 2 < 9 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 2 < 5 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 5 < 7 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 2 < 7 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 2 < 5 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 5 < 8 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 2 < 8 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 2 < 5 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 5 < 9 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 2 < 9 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 2 < 6 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 6 < 7 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 2 < 7 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 2 < 6 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 6 < 8 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 2 < 8 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 2 < 6 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 6 < 9 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 2 < 9 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 3 < 4 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 4 < 7 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 3 < 7 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 3 < 4 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 4 < 8 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 3 < 8 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 3 < 4 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 4 < 9 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 3 < 9 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 3 < 5 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 5 < 7 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 3 < 7 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 3 < 5 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 5 < 8 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 3 < 8 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 3 < 5 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 5 < 9 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 3 < 9 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 3 < 6 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 6 < 7 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 3 < 7 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 3 < 6 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 6 < 8 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 3 < 8 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 3 < 6 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 6 < 9 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 3 < 9 + +------------------------------------------------------------------------------- +A METHOD_AS_TEST_CASE based test run that fails +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( s == "world" ) +with expansion: + "hello" == "world" + +------------------------------------------------------------------------------- +A METHOD_AS_TEST_CASE based test run that succeeds +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( s == "hello" ) +with expansion: + "hello" == "hello" + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2::m_a.size() == 1 ) +with expansion: + 0 == 1 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2::m_a.size() == 1 ) +with expansion: + 0 == 1 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2::m_a.size() == 1 ) +with expansion: + 0 == 1 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2::m_a.size() == 1 ) +with expansion: + 0 == 1 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2::m_a.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2::m_a.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2::m_a.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2::m_a.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - +Template_Foo_2 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2{}.m_a.size() < 2 ) +with expansion: + 6 < 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - +Template_Foo_2 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2{}.m_a.size() < 2 ) +with expansion: + 2 < 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2{}.m_a.size() < 2 ) +with expansion: + 6 < 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2{}.m_a.size() < 2 ) +with expansion: + 2 < 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - +Template_Foo_2 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2{}.m_a.size() >= 2 ) +with expansion: + 6 >= 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - +Template_Foo_2 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2{}.m_a.size() >= 2 ) +with expansion: + 2 >= 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std:: +array +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2{}.m_a.size() >= 2 ) +with expansion: + 6 >= 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std:: +array +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2{}.m_a.size() >= 2 ) +with expansion: + 2 >= 2 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD based test run that fails - double +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture::m_a == 2 ) +with expansion: + 1.0 == 2 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD based test run that fails - float +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture::m_a == 2 ) +with expansion: + 1.0f == 2 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD based test run that fails - int +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture::m_a == 2 ) +with expansion: + 1 == 2 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - double +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture::m_a == 1 ) +with expansion: + 1.0 == 1 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - float +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture::m_a == 1 ) +with expansion: + 1.0f == 1 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - int +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture::m_a == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Nttp_Fixture::value == 0 ) +with expansion: + 1 == 0 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Nttp_Fixture::value == 0 ) +with expansion: + 3 == 0 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Nttp_Fixture::value == 0 ) +with expansion: + 6 == 0 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Nttp_Fixture::value > 0 ) +with expansion: + 1 > 0 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 3 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Nttp_Fixture::value > 0 ) +with expansion: + 3 > 0 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 6 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Nttp_Fixture::value > 0 ) +with expansion: + 6 > 0 + +------------------------------------------------------------------------------- +A TEST_CASE_METHOD based test run that fails +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( m_a == 2 ) +with expansion: + 1 == 2 + +------------------------------------------------------------------------------- +A TEST_CASE_METHOD based test run that succeeds +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( m_a == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +A TEST_CASE_PERSISTENT_FIXTURE based test run that fails + First partial run +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( m_a++ == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A TEST_CASE_PERSISTENT_FIXTURE based test run that fails + Second partial run +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( m_a == 0 ) +with expansion: + 1 == 0 + +------------------------------------------------------------------------------- +A TEST_CASE_PERSISTENT_FIXTURE based test run that succeeds + First partial run +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( m_a++ == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A TEST_CASE_PERSISTENT_FIXTURE based test run that succeeds + Second partial run +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( m_a == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +A Template product test case - Foo +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( x.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A Template product test case - Foo +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( x.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A Template product test case - std::vector +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( x.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A Template product test case - std::vector +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( x.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A Template product test case with array signature - Bar +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( x.size() > 0 ) +with expansion: + 42 > 0 + +------------------------------------------------------------------------------- +A Template product test case with array signature - Bar +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( x.size() > 0 ) +with expansion: + 9 > 0 + +------------------------------------------------------------------------------- +A Template product test case with array signature - std::array +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( x.size() > 0 ) +with expansion: + 42 > 0 + +------------------------------------------------------------------------------- +A Template product test case with array signature - std::array +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( x.size() > 0 ) +with expansion: + 9 > 0 + +------------------------------------------------------------------------------- +A comparison that uses literals instead of the normal constructor +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( d == 1.23_a ) +with expansion: + 1.22999999999999998 + == + Approx( 1.22999999999999998 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d != 1.22_a ) +with expansion: + 1.22999999999999998 + != + Approx( 1.21999999999999997 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( -d == -1.23_a ) +with expansion: + -1.22999999999999998 + == + Approx( -1.22999999999999998 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d == 1.2_a .epsilon(.1) ) +with expansion: + 1.22999999999999998 + == + Approx( 1.19999999999999996 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d != 1.2_a .epsilon(.001) ) +with expansion: + 1.22999999999999998 + != + Approx( 1.19999999999999996 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d == 1_a .epsilon(.3) ) +with expansion: + 1.22999999999999998 == Approx( 1.0 ) + +------------------------------------------------------------------------------- +A couple of nested sections followed by a failure + Outer + Inner +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + that's not flying - that's failing in style + +------------------------------------------------------------------------------- +A couple of nested sections followed by a failure +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: +explicitly with message: + to infinity and beyond + +------------------------------------------------------------------------------- +A failing expression with a non streamable type is still captured +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: FAILED: + CHECK( &o1 == &o2 ) +with expansion: + 0x == 0x + +Tricky.tests.cpp:: FAILED: + CHECK( o1 == o2 ) +with expansion: + {?} == {?} + +------------------------------------------------------------------------------- +Absolute margin +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( 104.0 != Approx(100.0) ) +with expansion: + 104.0 != Approx( 100.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( 104.0 == Approx(100.0).margin(5) ) +with expansion: + 104.0 == Approx( 100.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( 104.0 == Approx(100.0).margin(4) ) +with expansion: + 104.0 == Approx( 100.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( 104.0 != Approx(100.0).margin(3) ) +with expansion: + 104.0 != Approx( 100.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( 100.3 != Approx(100.0) ) +with expansion: + 100.29999999999999716 != Approx( 100.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( 100.3 == Approx(100.0).margin(0.5) ) +with expansion: + 100.29999999999999716 == Approx( 100.0 ) + +------------------------------------------------------------------------------- +An empty test with no assertions +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + + +No assertions in test case 'An empty test with no assertions' + +------------------------------------------------------------------------------- +An expression with side-effects should only be evaluated once +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( i++ == 7 ) +with expansion: + 7 == 7 + +Tricky.tests.cpp:: PASSED: + REQUIRE( i++ == 8 ) +with expansion: + 8 == 8 + +------------------------------------------------------------------------------- +An unchecked exception reports the line of the last assertion +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: PASSED: + CHECK( 1 == 1 ) + +Exception.tests.cpp:: FAILED: + {Unknown expression after the reported line} +due to unexpected exception with message: + unexpected exception + +------------------------------------------------------------------------------- +Anonymous test case 1 +------------------------------------------------------------------------------- +VariadicMacros.tests.cpp: +............................................................................... + +VariadicMacros.tests.cpp:: PASSED: +with message: + anonymous test case + +------------------------------------------------------------------------------- +Approx setters validate their arguments +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE_NOTHROW( Approx(0).margin(0) ) + +Approx.tests.cpp:: PASSED: + REQUIRE_NOTHROW( Approx(0).margin(1234656) ) + +Approx.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( Approx(0).margin(-2), std::domain_error ) + +Approx.tests.cpp:: PASSED: + REQUIRE_NOTHROW( Approx(0).epsilon(0) ) + +Approx.tests.cpp:: PASSED: + REQUIRE_NOTHROW( Approx(0).epsilon(1) ) + +Approx.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( Approx(0).epsilon(-0.001), std::domain_error ) + +Approx.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( Approx(0).epsilon(1.0001), std::domain_error ) + +------------------------------------------------------------------------------- +Approx with exactly-representable margin +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + CHECK( 0.25f == Approx(0.0f).margin(0.25f) ) +with expansion: + 0.25f == Approx( 0.0 ) + +Approx.tests.cpp:: PASSED: + CHECK( 0.0f == Approx(0.25f).margin(0.25f) ) +with expansion: + 0.0f == Approx( 0.25 ) + +Approx.tests.cpp:: PASSED: + CHECK( 0.5f == Approx(0.25f).margin(0.25f) ) +with expansion: + 0.5f == Approx( 0.25 ) + +Approx.tests.cpp:: PASSED: + CHECK( 245.0f == Approx(245.25f).margin(0.25f) ) +with expansion: + 245.0f == Approx( 245.25 ) + +Approx.tests.cpp:: PASSED: + CHECK( 245.5f == Approx(245.25f).margin(0.25f) ) +with expansion: + 245.5f == Approx( 245.25 ) + +------------------------------------------------------------------------------- +Approximate PI +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) ) +with expansion: + 3.14285714285714279 + == + Approx( 3.14100000000000001 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) ) +with expansion: + 3.14285714285714279 + != + Approx( 3.14100000000000001 ) + +------------------------------------------------------------------------------- +Approximate comparisons with different epsilons +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( d != Approx( 1.231 ) ) +with expansion: + 1.22999999999999998 + != + Approx( 1.23100000000000009 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d == Approx( 1.231 ).epsilon( 0.1 ) ) +with expansion: + 1.22999999999999998 + == + Approx( 1.23100000000000009 ) + +------------------------------------------------------------------------------- +Approximate comparisons with floats +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( 1.23f == Approx( 1.23f ) ) +with expansion: + 1.230000019f + == + Approx( 1.23000001907348633 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( 0.0f == Approx( 0.0f ) ) +with expansion: + 0.0f == Approx( 0.0 ) + +------------------------------------------------------------------------------- +Approximate comparisons with ints +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( 1 == Approx( 1 ) ) +with expansion: + 1 == Approx( 1.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( 0 == Approx( 0 ) ) +with expansion: + 0 == Approx( 0.0 ) + +------------------------------------------------------------------------------- +Approximate comparisons with mixed numeric types +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( 1.0f == Approx( 1 ) ) +with expansion: + 1.0f == Approx( 1.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( 0 == Approx( dZero) ) +with expansion: + 0 == Approx( 0.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( 0 == Approx( dSmall ).margin( 0.001 ) ) +with expansion: + 0 == Approx( 0.00001 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( 1.234f == Approx( dMedium ) ) +with expansion: + 1.233999968f + == + Approx( 1.23399999999999999 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( dMedium == Approx( 1.234f ) ) +with expansion: + 1.23399999999999999 + == + Approx( 1.23399996757507324 ) + +------------------------------------------------------------------------------- +Arbitrary predicate matcher + Function pointer +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, Predicate( alwaysTrue, "always true" ) ) +with expansion: + 1 matches predicate: "always true" + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, !Predicate( alwaysFalse, "always false" ) ) +with expansion: + 1 not matches predicate: "always false" + +------------------------------------------------------------------------------- +Arbitrary predicate matcher + Lambdas + different type +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( "Hello olleH", Predicate( []( std::string const& str ) -> bool { return str.front() == str.back(); }, "First and last character should be equal" ) ) +with expansion: + "Hello olleH" matches predicate: "First and last character should be equal" + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( "This wouldn't pass", !Predicate( []( std::string const& str ) -> bool { return str.front() == str.back(); } ) ) +with expansion: + "This wouldn't pass" not matches undescribed predicate + +------------------------------------------------------------------------------- +Assertion macros support bit operators and bool conversions +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( lhs | rhs ) +with expansion: + Val: 1 | Val: 2 + +Compilation.tests.cpp:: PASSED: + REQUIRE_FALSE( lhs & rhs ) +with expansion: + !(Val: 1 & Val: 2) + +Compilation.tests.cpp:: PASSED: + REQUIRE( HasBitOperators{ 1 } & HasBitOperators{ 1 } ) +with expansion: + Val: 1 & Val: 1 + +Compilation.tests.cpp:: PASSED: + REQUIRE( lhs ^ rhs ) +with expansion: + Val: 1 ^ Val: 2 + +Compilation.tests.cpp:: PASSED: + REQUIRE_FALSE( lhs ^ lhs ) +with expansion: + !(Val: 1 ^ Val: 1) + +------------------------------------------------------------------------------- +Assertions then sections +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( true ) + +------------------------------------------------------------------------------- +Assertions then sections + A section +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( true ) + +------------------------------------------------------------------------------- +Assertions then sections + A section + Another section +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( true ) + +------------------------------------------------------------------------------- +Assertions then sections +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( true ) + +------------------------------------------------------------------------------- +Assertions then sections + A section +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( true ) + +------------------------------------------------------------------------------- +Assertions then sections + A section + Another other section +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( true ) + +------------------------------------------------------------------------------- +Basic use of the Contains range matcher + Different argument ranges, same element type, default comparison +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( a, Contains(1) ) +with expansion: + { 1, 2, 3 } contains element 1 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( b, Contains(1) ) +with expansion: + { 0, 1, 2 } contains element 1 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( c, !Contains(1) ) +with expansion: + { 4, 5, 6 } not contains element 1 + +------------------------------------------------------------------------------- +Basic use of the Contains range matcher + Different argument ranges, same element type, custom comparison +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( a, Contains(0, close_enough) ) +with expansion: + { 1, 2, 3 } contains element 0 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( b, Contains(0, close_enough) ) +with expansion: + { 0, 1, 2 } contains element 0 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( c, !Contains(0, close_enough) ) +with expansion: + { 4, 5, 6 } not contains element 0 + +------------------------------------------------------------------------------- +Basic use of the Contains range matcher + Different element type, custom comparisons +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( a, Contains(4, [](auto&& lhs, size_t sz) { return lhs.size() == sz; }) ) +with expansion: + { "abc", "abcd", "abcde" } contains element 4 + +------------------------------------------------------------------------------- +Basic use of the Contains range matcher + Can handle type that requires ADL-found free function begin and end +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( in, Contains(1) ) +with expansion: + { 1, 2, 3, 4, 5 } contains element 1 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( in, !Contains(8) ) +with expansion: + { 1, 2, 3, 4, 5 } not contains element 8 + +------------------------------------------------------------------------------- +Basic use of the Contains range matcher + Initialization with move only types +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( in, Contains(MoveOnlyTestElement{ 2 }) ) +with expansion: + { 1, 2, 3 } contains element 2 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( in, !Contains(MoveOnlyTestElement{ 9 }) ) +with expansion: + { 1, 2, 3 } not contains element 9 + +------------------------------------------------------------------------------- +Basic use of the Contains range matcher + Matching using matcher +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( in, Contains(Catch::Matchers::WithinAbs(0.5, 0.5)) ) +with expansion: + { 1.0, 2.0, 3.0, 0.0 } contains element matching is within 0.5 of 0.5 + +------------------------------------------------------------------------------- +Basic use of the Empty range matcher + Simple, std-provided containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( empty_array, IsEmpty() ) +with expansion: + { } is empty + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( non_empty_array, !IsEmpty() ) +with expansion: + { 0.0 } not is empty + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( empty_vec, IsEmpty() ) +with expansion: + { } is empty + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( non_empty_vec, !IsEmpty() ) +with expansion: + { 'a', 'b', 'c' } not is empty + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( inner_lists_are_empty, !IsEmpty() ) +with expansion: + { { } } not is empty + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( inner_lists_are_empty.front(), IsEmpty() ) +with expansion: + { } is empty + +------------------------------------------------------------------------------- +Basic use of the Empty range matcher + Type with empty +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( has_empty{}, !IsEmpty() ) +with expansion: + {?} not is empty + +------------------------------------------------------------------------------- +Basic use of the Empty range matcher + Type requires ADL found empty free function +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( unrelated::ADL_empty{}, IsEmpty() ) +with expansion: + {?} is empty + +------------------------------------------------------------------------------- +CAPTURE can deal with complex expressions +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: PASSED: +with messages: + a := 1 + b := 2 + c := 3 + a + b := 3 + a+b := 3 + c > b := true + a == 1 := true + +------------------------------------------------------------------------------- +CAPTURE can deal with complex expressions involving commas +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: PASSED: +with messages: + custom_index_op{1, 2, 3}[0, 1, 2] := 0 + custom_index_op{1, 2, 3}[(0, 1)] := 0 + custom_index_op{1, 2, 3}[0] := 0 + (helper_1436{12, -12}) := { 12, -12 } + (helper_1436(-12, 12)) := { -12, 12 } + (1, 2) := 2 + (2, 3) := 3 + +------------------------------------------------------------------------------- +CAPTURE parses string and character constants +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: PASSED: +with messages: + ("comma, in string", "escaped, \", ") := "escaped, ", " + "single quote in string,'," := "single quote in string,'," + "some escapes, \\,\\\\" := "some escapes, \,\\" + "some, ), unmatched, } prenheses {[<" := "some, ), unmatched, } prenheses {[ + <" + '"' := '"' + '\'' := ''' + ',' := ',' + '}' := '}' + ')' := ')' + '(' := '(' + '{' := '{' + +------------------------------------------------------------------------------- +Capture and info messages + Capture should stringify like assertions +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( true ) +with message: + i := 2 + +------------------------------------------------------------------------------- +Capture and info messages + Info should NOT stringify the way assertions do +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( true ) +with message: + 3 + +------------------------------------------------------------------------------- +CaseInsensitiveEqualsTo is case insensitive + Degenerate cases +------------------------------------------------------------------------------- +Details.tests.cpp: +............................................................................... + +Details.tests.cpp:: PASSED: + REQUIRE( eq( "", "" ) ) +with expansion: + true + +Details.tests.cpp:: PASSED: + REQUIRE_FALSE( eq( "", "a" ) ) +with expansion: + !false + +------------------------------------------------------------------------------- +CaseInsensitiveEqualsTo is case insensitive + Plain comparisons +------------------------------------------------------------------------------- +Details.tests.cpp: +............................................................................... + +Details.tests.cpp:: PASSED: + REQUIRE( eq( "a", "a" ) ) +with expansion: + true + +Details.tests.cpp:: PASSED: + REQUIRE( eq( "a", "A" ) ) +with expansion: + true + +Details.tests.cpp:: PASSED: + REQUIRE( eq( "A", "a" ) ) +with expansion: + true + +Details.tests.cpp:: PASSED: + REQUIRE( eq( "A", "A" ) ) +with expansion: + true + +Details.tests.cpp:: PASSED: + REQUIRE_FALSE( eq( "a", "b" ) ) +with expansion: + !false + +Details.tests.cpp:: PASSED: + REQUIRE_FALSE( eq( "a", "B" ) ) +with expansion: + !false + +------------------------------------------------------------------------------- +CaseInsensitiveLess is case insensitive + Degenerate cases +------------------------------------------------------------------------------- +Details.tests.cpp: +............................................................................... + +Details.tests.cpp:: PASSED: + REQUIRE( lt( "", "a" ) ) +with expansion: + true + +Details.tests.cpp:: PASSED: + REQUIRE_FALSE( lt( "a", "a" ) ) +with expansion: + !false + +Details.tests.cpp:: PASSED: + REQUIRE_FALSE( lt( "", "" ) ) +with expansion: + !false + +------------------------------------------------------------------------------- +CaseInsensitiveLess is case insensitive + Plain comparisons +------------------------------------------------------------------------------- +Details.tests.cpp: +............................................................................... + +Details.tests.cpp:: PASSED: + REQUIRE( lt( "a", "b" ) ) +with expansion: + true + +Details.tests.cpp:: PASSED: + REQUIRE( lt( "a", "B" ) ) +with expansion: + true + +Details.tests.cpp:: PASSED: + REQUIRE( lt( "A", "b" ) ) +with expansion: + true + +Details.tests.cpp:: PASSED: + REQUIRE( lt( "A", "B" ) ) +with expansion: + true + +------------------------------------------------------------------------------- +Character pretty printing + Specifically escaped +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify('\t') == "'\\t'" ) +with expansion: + "'\t'" == "'\t'" + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify('\n') == "'\\n'" ) +with expansion: + "'\n'" == "'\n'" + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify('\r') == "'\\r'" ) +with expansion: + "'\r'" == "'\r'" + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify('\f') == "'\\f'" ) +with expansion: + "'\f'" == "'\f'" + +------------------------------------------------------------------------------- +Character pretty printing + General chars +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( ' ' ) == "' '" ) +with expansion: + "' '" == "' '" + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( 'A' ) == "'A'" ) +with expansion: + "'A'" == "'A'" + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( 'z' ) == "'z'" ) +with expansion: + "'z'" == "'z'" + +------------------------------------------------------------------------------- +Character pretty printing + Low ASCII +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( '\0' ) == "0" ) +with expansion: + "0" == "0" + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( static_cast(2) ) == "2" ) +with expansion: + "2" == "2" + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( static_cast(5) ) == "5" ) +with expansion: + "5" == "5" + +------------------------------------------------------------------------------- +Clara::Arg does not crash on incomplete input +------------------------------------------------------------------------------- +Clara.tests.cpp: +............................................................................... + +Clara.tests.cpp:: PASSED: + CHECK( name.empty() ) +with expansion: + true + +Clara.tests.cpp:: PASSED: + CHECK( result ) +with expansion: + {?} + +Clara.tests.cpp:: PASSED: + CHECK( result.type() == Catch::Clara::Detail::ResultType::Ok ) +with expansion: + 0 == 0 + +Clara.tests.cpp:: PASSED: + CHECK( parsed.type() == Catch::Clara::ParseResultType::NoMatch ) +with expansion: + 1 == 1 + +Clara.tests.cpp:: PASSED: + CHECK( parsed.remainingTokens().count() == 2 ) +with expansion: + 2 == 2 + +Clara.tests.cpp:: PASSED: + CHECK( name.empty() ) +with expansion: + true + +------------------------------------------------------------------------------- +Clara::Arg supports single-arg parse the way Opt does +------------------------------------------------------------------------------- +Clara.tests.cpp: +............................................................................... + +Clara.tests.cpp:: PASSED: + CHECK( name.empty() ) +with expansion: + true + +Clara.tests.cpp:: PASSED: + REQUIRE( name == "foo" ) +with expansion: + "foo" == "foo" + +------------------------------------------------------------------------------- +Clara::Opt supports accept-many lambdas + Parsing fails on multiple options without accept_many +------------------------------------------------------------------------------- +Clara.tests.cpp: +............................................................................... + +Clara.tests.cpp:: PASSED: + CHECK_FALSE( parse_result ) +with expansion: + !{?} + +------------------------------------------------------------------------------- +Clara::Opt supports accept-many lambdas + Parsing succeeds on multiple options with accept_many +------------------------------------------------------------------------------- +Clara.tests.cpp: +............................................................................... + +Clara.tests.cpp:: PASSED: + CHECK( parse_result ) +with expansion: + {?} + +Clara.tests.cpp:: PASSED: + CHECK( res == std::vector{ "aaa", "bbb" } ) +with expansion: + { "aaa", "bbb" } == { "aaa", "bbb" } + +------------------------------------------------------------------------------- +ColourGuard behaviour + ColourGuard is disengaged by default +------------------------------------------------------------------------------- +ColourImpl.tests.cpp: +............................................................................... + +ColourImpl.tests.cpp:: PASSED: + REQUIRE( streamWrapper.str().empty() ) +with expansion: + true + +------------------------------------------------------------------------------- +ColourGuard behaviour + ColourGuard is engaged by op<< +------------------------------------------------------------------------------- +ColourImpl.tests.cpp: +............................................................................... + +ColourImpl.tests.cpp:: PASSED: + REQUIRE( streamWrapper.str() == "1\nUsing code: 2\n2\nUsing code: 0\n3\n" ) +with expansion: + "1 + Using code: 2 + 2 + Using code: 0 + 3 + " + == + "1 + Using code: 2 + 2 + Using code: 0 + 3 + " + +------------------------------------------------------------------------------- +ColourGuard behaviour + ColourGuard can be engaged explicitly +------------------------------------------------------------------------------- +ColourImpl.tests.cpp: +............................................................................... + +ColourImpl.tests.cpp:: PASSED: + REQUIRE( streamWrapper.str() == "Using code: 2\nA\nB\nUsing code: 0\nC\n" ) +with expansion: + "Using code: 2 + A + B + Using code: 0 + C + " + == + "Using code: 2 + A + B + Using code: 0 + C + " + +------------------------------------------------------------------------------- +Combining MatchAllOfGeneric does not nest +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same< decltype( ( MatcherA() && MatcherB() ) && MatcherC() ), Catch:: + Matchers::Detail:: MatchAllOfGeneric>::value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, ( MatcherA() && MatcherB() ) && MatcherC() ) +with expansion: + 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) + 1 ) + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same< decltype( MatcherA() && ( MatcherB() && MatcherC() ) ), Catch:: + Matchers::Detail:: MatchAllOfGeneric>::value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, MatcherA() && ( MatcherB() && MatcherC() ) ) +with expansion: + 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) + 1 ) + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same< decltype( ( MatcherA() && MatcherB() ) && ( MatcherC() && + MatcherD() ) ), Catch::Matchers::Detail:: MatchAllOfGeneric>:: value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, ( MatcherA() && MatcherB() ) && ( MatcherC() && MatcherD() ) ) +with expansion: + 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) + 1 and equals: true ) + +------------------------------------------------------------------------------- +Combining MatchAnyOfGeneric does not nest +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same< decltype( ( MatcherA() || MatcherB() ) || MatcherC() ), Catch:: + Matchers::Detail:: MatchAnyOfGeneric>::value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, ( MatcherA() || MatcherB() ) || MatcherC() ) +with expansion: + 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 + ) + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same< decltype( MatcherA() || ( MatcherB() || MatcherC() ) ), Catch:: + Matchers::Detail:: MatchAnyOfGeneric>::value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, MatcherA() || ( MatcherB() || MatcherC() ) ) +with expansion: + 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 + ) + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same< decltype( ( MatcherA() || MatcherB() ) || ( MatcherC() || + MatcherD() ) ), Catch::Matchers::Detail:: MatchAnyOfGeneric>:: value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, ( MatcherA() || MatcherB() ) || ( MatcherC() || MatcherD() ) ) +with expansion: + 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 + or equals: true ) + +------------------------------------------------------------------------------- +Combining MatchNotOfGeneric does not nest +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same< decltype( !MatcherA() ), Catch::Matchers::Detail:: + MatchNotOfGeneric>::value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0, !MatcherA() ) +with expansion: + 0 not equals: (int) 1 or (string) "1" + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same::value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, !!MatcherA() ) +with expansion: + 1 equals: (int) 1 or (string) "1" + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same< decltype( !!!MatcherA() ), Catch::Matchers::Detail:: + MatchNotOfGeneric>::value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0, !!!MatcherA() ) +with expansion: + 0 not equals: (int) 1 or (string) "1" + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same::value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, !!!!MatcherA() ) +with expansion: + 1 equals: (int) 1 or (string) "1" + +------------------------------------------------------------------------------- +Combining concrete matchers does not use templated matchers +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same>::value + +------------------------------------------------------------------------------- +Combining only templated matchers +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same>::value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, MatcherA() || MatcherB() ) +with expansion: + 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 ) + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same>::value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, MatcherA() && MatcherB() ) +with expansion: + 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 ) + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same< decltype( MatcherA() || !MatcherB() ), Catch::Matchers::Detail: + :MatchAnyOfGeneric< MatcherA, Catch::Matchers::Detail::MatchNotOfGeneric + >>::value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, MatcherA() || !MatcherB() ) +with expansion: + 1 ( equals: (int) 1 or (string) "1" or not equals: (long long) 1 ) + +------------------------------------------------------------------------------- +Combining templated and concrete matchers +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( vec, Predicate>( []( auto const& v ) { return std::all_of( v.begin(), v.end(), []( int elem ) { return elem % 2 == 1; } ); }, "All elements are odd" ) && !EqualsRange( a ) ) +with expansion: + { 1, 3, 5 } ( matches predicate: "All elements are odd" and not Equals: { 5, + 3, 1 } ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( str, StartsWith( "foo" ) && EqualsRange( arr ) && EndsWith( "bar" ) ) +with expansion: + "foobar" ( starts with: "foo" and Equals: { 'f', 'o', 'o', 'b', 'a', 'r' } + and ends with: "bar" ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( str, StartsWith( "foo" ) && !EqualsRange( bad_arr ) && EndsWith( "bar" ) ) +with expansion: + "foobar" ( starts with: "foo" and not Equals: { 'o', 'o', 'f', 'b', 'a', 'r' + } and ends with: "bar" ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( str, EqualsRange( arr ) && StartsWith( "foo" ) && EndsWith( "bar" ) ) +with expansion: + "foobar" ( Equals: { 'f', 'o', 'o', 'b', 'a', 'r' } and starts with: "foo" + and ends with: "bar" ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( str, !EqualsRange( bad_arr ) && StartsWith( "foo" ) && EndsWith( "bar" ) ) +with expansion: + "foobar" ( not Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } and starts with: + "foo" and ends with: "bar" ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( str, EqualsRange( bad_arr ) || ( StartsWith( "foo" ) && EndsWith( "bar" ) ) ) +with expansion: + "foobar" ( Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } or ( starts with: "foo" + and ends with: "bar" ) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( str, ( StartsWith( "foo" ) && EndsWith( "bar" ) ) || EqualsRange( bad_arr ) ) +with expansion: + "foobar" ( ( starts with: "foo" and ends with: "bar" ) or Equals: { 'o', 'o', + 'f', 'b', 'a', 'r' } ) + +------------------------------------------------------------------------------- +Combining templated matchers +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( container, EqualsRange( a ) || EqualsRange( b ) || EqualsRange( c ) ) +with expansion: + { 1, 2, 3 } ( Equals: { 1, 2, 3 } or Equals: { 0, 1, 2 } or Equals: { 4, 5, 6 + } ) + +------------------------------------------------------------------------------- +Commas in various macros are allowed +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE_THROWS( std::vector{constructor_throws{}, constructor_throws{}} ) + +Tricky.tests.cpp:: PASSED: + CHECK_THROWS( std::vector{constructor_throws{}, constructor_throws{}} ) + +Tricky.tests.cpp:: PASSED: + REQUIRE_NOTHROW( std::vector{1, 2, 3} == std::vector{1, 2, 3} ) + +Tricky.tests.cpp:: PASSED: + CHECK_NOTHROW( std::vector{1, 2, 3} == std::vector{1, 2, 3} ) + +Tricky.tests.cpp:: PASSED: + REQUIRE( std::vector{1, 2} == std::vector{1, 2} ) +with expansion: + { 1, 2 } == { 1, 2 } + +Tricky.tests.cpp:: PASSED: + CHECK( std::vector{1, 2} == std::vector{1, 2} ) +with expansion: + { 1, 2 } == { 1, 2 } + +Tricky.tests.cpp:: PASSED: + REQUIRE_FALSE( std::vector{1, 2} == std::vector{1, 2, 3} ) +with expansion: + !({ 1, 2 } == { 1, 2, 3 }) + +Tricky.tests.cpp:: PASSED: + CHECK_FALSE( std::vector{1, 2} == std::vector{1, 2, 3} ) +with expansion: + !({ 1, 2 } == { 1, 2, 3 }) + +Tricky.tests.cpp:: PASSED: + CHECK_NOFAIL( std::vector{1, 2} == std::vector{1, 2} ) +with expansion: + { 1, 2 } == { 1, 2 } + +Tricky.tests.cpp:: PASSED: + CHECKED_IF( std::vector{1, 2} == std::vector{1, 2} ) +with expansion: + { 1, 2 } == { 1, 2 } + +Tricky.tests.cpp:: PASSED: + REQUIRE( true ) + +Tricky.tests.cpp:: PASSED: + CHECKED_ELSE( std::vector{1, 2} == std::vector{1, 2} ) +with expansion: + { 1, 2 } == { 1, 2 } + +------------------------------------------------------------------------------- +Comparing function pointers +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( a ) +with expansion: + 0x + +Tricky.tests.cpp:: PASSED: + REQUIRE( a == &foo ) +with expansion: + 0x == 0x + +------------------------------------------------------------------------------- +Comparison ops +------------------------------------------------------------------------------- +RandomNumberGeneration.tests.cpp: +............................................................................... + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( SimplePcg32{} == SimplePcg32{} ) +with expansion: + {?} == {?} + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( SimplePcg32{ 0 } != SimplePcg32{} ) +with expansion: + {?} != {?} + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE_FALSE( SimplePcg32{ 1 } == SimplePcg32{ 2 } ) +with expansion: + !({?} == {?}) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE_FALSE( SimplePcg32{ 1 } != SimplePcg32{ 1 } ) +with expansion: + !({?} != {?}) + +------------------------------------------------------------------------------- +Comparison with explicitly convertible types +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( td == Approx(10.0) ) +with expansion: + StrongDoubleTypedef(10) == Approx( 10.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( Approx(10.0) == td ) +with expansion: + Approx( 10.0 ) == StrongDoubleTypedef(10) + +Approx.tests.cpp:: PASSED: + REQUIRE( td != Approx(11.0) ) +with expansion: + StrongDoubleTypedef(10) != Approx( 11.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( Approx(11.0) != td ) +with expansion: + Approx( 11.0 ) != StrongDoubleTypedef(10) + +Approx.tests.cpp:: PASSED: + REQUIRE( td <= Approx(10.0) ) +with expansion: + StrongDoubleTypedef(10) <= Approx( 10.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( td <= Approx(11.0) ) +with expansion: + StrongDoubleTypedef(10) <= Approx( 11.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( Approx(10.0) <= td ) +with expansion: + Approx( 10.0 ) <= StrongDoubleTypedef(10) + +Approx.tests.cpp:: PASSED: + REQUIRE( Approx(9.0) <= td ) +with expansion: + Approx( 9.0 ) <= StrongDoubleTypedef(10) + +Approx.tests.cpp:: PASSED: + REQUIRE( td >= Approx(9.0) ) +with expansion: + StrongDoubleTypedef(10) >= Approx( 9.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( td >= Approx(td) ) +with expansion: + StrongDoubleTypedef(10) >= Approx( 10.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( Approx(td) >= td ) +with expansion: + Approx( 10.0 ) >= StrongDoubleTypedef(10) + +Approx.tests.cpp:: PASSED: + REQUIRE( Approx(11.0) >= td ) +with expansion: + Approx( 11.0 ) >= StrongDoubleTypedef(10) + +------------------------------------------------------------------------------- +Comparisons between ints where one side is computed +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: PASSED: + CHECK( 54 == 6*9 ) +with expansion: + 54 == 54 + +------------------------------------------------------------------------------- +Comparisons between unsigned ints and negative signed ints match c++ standard +behaviour +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: PASSED: + CHECK( ( -1 > 2u ) ) +with expansion: + true + +Condition.tests.cpp:: PASSED: + CHECK( -1 > 2u ) +with expansion: + -1 > 2 + +Condition.tests.cpp:: PASSED: + CHECK( ( 2u < -1 ) ) +with expansion: + true + +Condition.tests.cpp:: PASSED: + CHECK( 2u < -1 ) +with expansion: + 2 < -1 + +Condition.tests.cpp:: PASSED: + CHECK( ( minInt > 2u ) ) +with expansion: + true + +Condition.tests.cpp:: PASSED: + CHECK( minInt > 2u ) +with expansion: + -2147483648 > 2 + +------------------------------------------------------------------------------- +Comparisons with int literals don't warn when mixing signed/ unsigned +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: PASSED: + REQUIRE( i == 1 ) +with expansion: + 1 == 1 + +Condition.tests.cpp:: PASSED: + REQUIRE( ui == 2 ) +with expansion: + 2 == 2 + +Condition.tests.cpp:: PASSED: + REQUIRE( l == 3 ) +with expansion: + 3 == 3 + +Condition.tests.cpp:: PASSED: + REQUIRE( ul == 4 ) +with expansion: + 4 == 4 + +Condition.tests.cpp:: PASSED: + REQUIRE( c == 5 ) +with expansion: + 5 == 5 + +Condition.tests.cpp:: PASSED: + REQUIRE( uc == 6 ) +with expansion: + 6 == 6 + +Condition.tests.cpp:: PASSED: + REQUIRE( 1 == i ) +with expansion: + 1 == 1 + +Condition.tests.cpp:: PASSED: + REQUIRE( 2 == ui ) +with expansion: + 2 == 2 + +Condition.tests.cpp:: PASSED: + REQUIRE( 3 == l ) +with expansion: + 3 == 3 + +Condition.tests.cpp:: PASSED: + REQUIRE( 4 == ul ) +with expansion: + 4 == 4 + +Condition.tests.cpp:: PASSED: + REQUIRE( 5 == c ) +with expansion: + 5 == 5 + +Condition.tests.cpp:: PASSED: + REQUIRE( 6 == uc ) +with expansion: + 6 == 6 + +Condition.tests.cpp:: PASSED: + REQUIRE( (std::numeric_limits::max)() > ul ) +with expansion: + 4294967295 (0x) > 4 + +------------------------------------------------------------------------------- +Composed generic matchers shortcircuit + MatchAllOf +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_FALSE( matcher.match( 1 ) ) +with expansion: + !false + +Matchers.tests.cpp:: PASSED: + REQUIRE( first.matchCalled ) +with expansion: + true + +Matchers.tests.cpp:: PASSED: + REQUIRE( !second.matchCalled ) +with expansion: + true + +------------------------------------------------------------------------------- +Composed generic matchers shortcircuit + MatchAnyOf +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK( matcher.match( 1 ) ) +with expansion: + true + +Matchers.tests.cpp:: PASSED: + REQUIRE( first.matchCalled ) +with expansion: + true + +Matchers.tests.cpp:: PASSED: + REQUIRE( !second.matchCalled ) +with expansion: + true + +------------------------------------------------------------------------------- +Composed matchers shortcircuit + MatchAllOf +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_FALSE( matcher.match( 1 ) ) +with expansion: + !false + +Matchers.tests.cpp:: PASSED: + REQUIRE( first.matchCalled ) +with expansion: + true + +Matchers.tests.cpp:: PASSED: + REQUIRE( !second.matchCalled ) +with expansion: + true + +------------------------------------------------------------------------------- +Composed matchers shortcircuit + MatchAnyOf +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK( matcher.match( 1 ) ) +with expansion: + true + +Matchers.tests.cpp:: PASSED: + REQUIRE( first.matchCalled ) +with expansion: + true + +Matchers.tests.cpp:: PASSED: + REQUIRE( !second.matchCalled ) +with expansion: + true + +------------------------------------------------------------------------------- +Contains string matcher +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "not there" (case + insensitive) + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "STRING" + +------------------------------------------------------------------------------- +Copy and then generate a range + from var and iterators +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + from var and iterators +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + from var and iterators +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + from var and iterators +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + from var and iterators +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + from var and iterators +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + From a temporary container +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + From a temporary container +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + From a temporary container +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + From a temporary container +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + From a temporary container +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + From a temporary container +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + Final validation +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( call_count == 1 ) +with expansion: + 1 == 1 + +Generators.tests.cpp:: PASSED: + REQUIRE( make_data().size() == test_count ) +with expansion: + 6 == 6 + +------------------------------------------------------------------------------- +Cout stream properly declares it writes to stdout +------------------------------------------------------------------------------- +Stream.tests.cpp: +............................................................................... + +Stream.tests.cpp:: PASSED: + REQUIRE( Catch::makeStream( "-" )->isConsole() ) +with expansion: + true + +------------------------------------------------------------------------------- +Custom exceptions can be translated when testing for nothrow +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + REQUIRE_NOTHROW( throwCustom() ) +due to unexpected exception with message: + custom exception - not std + +------------------------------------------------------------------------------- +Custom exceptions can be translated when testing for throwing as something else +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + REQUIRE_THROWS_AS( throwCustom(), std::exception ) +due to unexpected exception with message: + custom exception - not std + +------------------------------------------------------------------------------- +Custom std-exceptions can be custom translated +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with message: + custom std exception + +------------------------------------------------------------------------------- +Default scale is invisible to comparison +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( 101.000001 != Approx(100).epsilon(0.01) ) +with expansion: + 101.00000099999999748 != Approx( 100.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( std::pow(10, -5) != Approx(std::pow(10, -7)) ) +with expansion: + 0.00001 != Approx( 0.0000001 ) + +------------------------------------------------------------------------------- +Directly creating an EnumInfo +------------------------------------------------------------------------------- +ToString.tests.cpp: +............................................................................... + +ToString.tests.cpp:: PASSED: + CHECK( enumInfo->lookup(0) == "Value1" ) +with expansion: + Value1 == "Value1" + +ToString.tests.cpp:: PASSED: + CHECK( enumInfo->lookup(1) == "Value2" ) +with expansion: + Value2 == "Value2" + +ToString.tests.cpp:: PASSED: + CHECK( enumInfo->lookup(3) == "{** unexpected enum value **}" ) +with expansion: + {** unexpected enum value **} + == + "{** unexpected enum value **}" + +------------------------------------------------------------------------------- +Empty generators can SKIP in constructor +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: +explicitly with message: + This generator is empty + +------------------------------------------------------------------------------- +Empty stream name opens cout stream +------------------------------------------------------------------------------- +Stream.tests.cpp: +............................................................................... + +Stream.tests.cpp:: PASSED: + REQUIRE( Catch::makeStream( "" )->isConsole() ) +with expansion: + true + +------------------------------------------------------------------------------- +EndsWith string matcher +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), EndsWith( "Substring" ) ) +with expansion: + "this string contains 'abc' as a substring" ends with: "Substring" + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" ends with: "this" (case + insensitive) + +------------------------------------------------------------------------------- +Enums can quickly have stringification enabled using CATCH_REGISTER_ENUM +------------------------------------------------------------------------------- +EnumToString.tests.cpp: +............................................................................... + +EnumToString.tests.cpp:: PASSED: + REQUIRE( stringify( EnumClass3::Value1 ) == "Value1" ) +with expansion: + "Value1" == "Value1" + +EnumToString.tests.cpp:: PASSED: + REQUIRE( stringify( EnumClass3::Value2 ) == "Value2" ) +with expansion: + "Value2" == "Value2" + +EnumToString.tests.cpp:: PASSED: + REQUIRE( stringify( EnumClass3::Value3 ) == "Value3" ) +with expansion: + "Value3" == "Value3" + +EnumToString.tests.cpp:: PASSED: + REQUIRE( stringify( EnumClass3::Value4 ) == "{** unexpected enum value **}" ) +with expansion: + "{** unexpected enum value **}" + == + "{** unexpected enum value **}" + +EnumToString.tests.cpp:: PASSED: + REQUIRE( stringify( ec3 ) == "Value2" ) +with expansion: + "Value2" == "Value2" + +------------------------------------------------------------------------------- +Enums in namespaces can quickly have stringification enabled using +CATCH_REGISTER_ENUM +------------------------------------------------------------------------------- +EnumToString.tests.cpp: +............................................................................... + +EnumToString.tests.cpp:: PASSED: + REQUIRE( stringify( Bikeshed::Colours::Red ) == "Red" ) +with expansion: + "Red" == "Red" + +EnumToString.tests.cpp:: PASSED: + REQUIRE( stringify( Bikeshed::Colours::Blue ) == "Blue" ) +with expansion: + "Blue" == "Blue" + +------------------------------------------------------------------------------- +Epsilon only applies to Approx's value +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( 101.01 != Approx(100).epsilon(0.01) ) +with expansion: + 101.01000000000000512 != Approx( 100.0 ) + +------------------------------------------------------------------------------- +Equality checks that should fail +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven == 6 ) +with expansion: + 7 == 6 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven == 8 ) +with expansion: + 7 == 8 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven == 0 ) +with expansion: + 7 == 0 + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one == Approx( 9.11f ) ) +with expansion: + 9.100000381f + == + Approx( 9.10999965667724609 ) + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one == Approx( 9.0f ) ) +with expansion: + 9.100000381f == Approx( 9.0 ) + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one == Approx( 1 ) ) +with expansion: + 9.100000381f == Approx( 1.0 ) + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one == Approx( 0 ) ) +with expansion: + 9.100000381f == Approx( 0.0 ) + +Condition.tests.cpp:: FAILED: + CHECK( data.double_pi == Approx( 3.1415 ) ) +with expansion: + 3.14159265350000005 + == + Approx( 3.14150000000000018 ) + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello == "goodbye" ) +with expansion: + "hello" == "goodbye" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello == "hell" ) +with expansion: + "hello" == "hell" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello == "hello1" ) +with expansion: + "hello" == "hello1" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello.size() == 6 ) +with expansion: + 5 == 6 + +Condition.tests.cpp:: FAILED: + CHECK( x == Approx( 1.301 ) ) +with expansion: + 1.30000000000000027 + == + Approx( 1.30099999999999993 ) + +------------------------------------------------------------------------------- +Equality checks that should succeed +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: PASSED: + REQUIRE( data.int_seven == 7 ) +with expansion: + 7 == 7 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.float_nine_point_one == Approx( 9.1f ) ) +with expansion: + 9.100000381f + == + Approx( 9.10000038146972656 ) + +Condition.tests.cpp:: PASSED: + REQUIRE( data.double_pi == Approx( 3.1415926535 ) ) +with expansion: + 3.14159265350000005 + == + Approx( 3.14159265350000005 ) + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello == "hello" ) +with expansion: + "hello" == "hello" + +Condition.tests.cpp:: PASSED: + REQUIRE( "hello" == data.str_hello ) +with expansion: + "hello" == "hello" + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello.size() == 5 ) +with expansion: + 5 == 5 + +Condition.tests.cpp:: PASSED: + REQUIRE( x == Approx( 1.3 ) ) +with expansion: + 1.30000000000000027 + == + Approx( 1.30000000000000004 ) + +------------------------------------------------------------------------------- +Equals +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), Equals( "this string contains 'abc' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" equals: "this string contains + 'abc' as a substring" + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), Equals( "this string contains 'ABC' as a substring", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" equals: "this string contains + 'abc' as a substring" (case insensitive) + +------------------------------------------------------------------------------- +Equals string matcher +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), Equals( "this string contains 'ABC' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" equals: "this string contains + 'ABC' as a substring" + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" equals: "something else" (case + insensitive) + +------------------------------------------------------------------------------- +Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(WhatException{}) == "This exception has overridden what() method" ) +with expansion: + "This exception has overridden what() method" + == + "This exception has overridden what() method" + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(OperatorException{}) == "OperatorException" ) +with expansion: + "OperatorException" == "OperatorException" + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(StringMakerException{}) == "StringMakerException" ) +with expansion: + "StringMakerException" + == + "StringMakerException" + +------------------------------------------------------------------------------- +Exception matchers that fail + No exception +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) +because no exception was thrown where one was expected: + +Matchers.tests.cpp:: FAILED: + REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) +because no exception was thrown where one was expected: + +------------------------------------------------------------------------------- +Exception matchers that fail + Type mismatch +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) +due to unexpected exception with message: + Unknown exception + +Matchers.tests.cpp:: FAILED: + REQUIRE_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) +due to unexpected exception with message: + Unknown exception + +------------------------------------------------------------------------------- +Exception matchers that fail + Contents are wrong +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THROWS_MATCHES( throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } ) +with expansion: + SpecialException::what special exception has value of 1 + +Matchers.tests.cpp:: FAILED: + REQUIRE_THROWS_MATCHES( throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } ) +with expansion: + SpecialException::what special exception has value of 1 + +------------------------------------------------------------------------------- +Exception matchers that succeed +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THROWS_MATCHES( throwsSpecialException( 1 ), SpecialException, ExceptionMatcher{ 1 } ) +with expansion: + SpecialException::what special exception has value of 1 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_MATCHES( throwsSpecialException( 2 ), SpecialException, ExceptionMatcher{ 2 } ) +with expansion: + SpecialException::what special exception has value of 2 + +------------------------------------------------------------------------------- +Exception message can be matched +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_MATCHES( throwsDerivedException(), DerivedException, MessageMatches( StartsWith( "Derived" ) ) ) +with expansion: + DerivedException::what matches "starts with: "Derived"" + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_MATCHES( throwsDerivedException(), DerivedException, MessageMatches( EndsWith( "::what" ) ) ) +with expansion: + DerivedException::what matches "ends with: "::what"" + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_MATCHES( throwsDerivedException(), DerivedException, MessageMatches( !StartsWith( "::what" ) ) ) +with expansion: + DerivedException::what matches "not starts with: "::what"" + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_MATCHES( throwsSpecialException( 2 ), SpecialException, MessageMatches( StartsWith( "Special" ) ) ) +with expansion: + SpecialException::what matches "starts with: "Special"" + +------------------------------------------------------------------------------- +Exception messages can be tested for + exact match +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: PASSED: + REQUIRE_THROWS_WITH( thisThrows(), "expected exception" ) +with expansion: + "expected exception" equals: "expected exception" + +------------------------------------------------------------------------------- +Exception messages can be tested for + different case +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: PASSED: + REQUIRE_THROWS_WITH( thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) ) +with expansion: + "expected exception" equals: "expected exception" (case insensitive) + +------------------------------------------------------------------------------- +Exception messages can be tested for + wildcarded +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: PASSED: + REQUIRE_THROWS_WITH( thisThrows(), StartsWith( "expected" ) ) +with expansion: + "expected exception" starts with: "expected" + +Exception.tests.cpp:: PASSED: + REQUIRE_THROWS_WITH( thisThrows(), EndsWith( "exception" ) ) +with expansion: + "expected exception" ends with: "exception" + +Exception.tests.cpp:: PASSED: + REQUIRE_THROWS_WITH( thisThrows(), ContainsSubstring( "except" ) ) +with expansion: + "expected exception" contains: "except" + +Exception.tests.cpp:: PASSED: + REQUIRE_THROWS_WITH( thisThrows(), ContainsSubstring( "exCept", Catch::CaseSensitive::No ) ) +with expansion: + "expected exception" contains: "except" (case insensitive) + +------------------------------------------------------------------------------- +Exceptions matchers +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_MATCHES( throwsDerivedException(), DerivedException, Message( "DerivedException::what" ) ) +with expansion: + DerivedException::what exception message matches "DerivedException::what" + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_MATCHES( throwsDerivedException(), DerivedException, !Message( "derivedexception::what" ) ) +with expansion: + DerivedException::what not exception message matches "derivedexception::what" + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_MATCHES( throwsSpecialException( 2 ), SpecialException, !Message( "DerivedException::what" ) ) +with expansion: + SpecialException::what not exception message matches "DerivedException::what" + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_MATCHES( throwsSpecialException( 2 ), SpecialException, Message( "SpecialException::what" ) ) +with expansion: + SpecialException::what exception message matches "SpecialException::what" + +------------------------------------------------------------------------------- +Expected exceptions that don't throw or unexpected exceptions fail the test +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + CHECK_THROWS_AS( thisThrows(), std::string ) +due to unexpected exception with message: + expected exception + +Exception.tests.cpp:: FAILED: + CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error ) +because no exception was thrown where one was expected: + +Exception.tests.cpp:: FAILED: + CHECK_NOTHROW( thisThrows() ) +due to unexpected exception with message: + expected exception + +------------------------------------------------------------------------------- +FAIL aborts the test +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: +explicitly with message: + This is a failure + +------------------------------------------------------------------------------- +FAIL does not require an argument +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +FAIL_CHECK does not abort the test +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: +explicitly with message: + This is a failure + +Message.tests.cpp:: warning: + This message appears in the output + +------------------------------------------------------------------------------- +Factorials are computed +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( Factorial(0) == 1 ) +with expansion: + 1 == 1 + +Misc.tests.cpp:: PASSED: + REQUIRE( Factorial(1) == 1 ) +with expansion: + 1 == 1 + +Misc.tests.cpp:: PASSED: + REQUIRE( Factorial(2) == 2 ) +with expansion: + 2 == 2 + +Misc.tests.cpp:: PASSED: + REQUIRE( Factorial(3) == 6 ) +with expansion: + 6 == 6 + +Misc.tests.cpp:: PASSED: + REQUIRE( Factorial(10) == 3628800 ) +with expansion: + 3628800 (0x) == 3628800 (0x) + +------------------------------------------------------------------------------- +Filter generator throws exception for empty generator +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( filter( []( int ) { return false; }, value( 3 ) ), Catch::GeneratorException ) + +------------------------------------------------------------------------------- +Floating point matchers: double + Relative +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 10., WithinRel( 11.1, 0.1 ) ) +with expansion: + 10.0 and 11.09999999999999964 are within 10% of each other + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 10., !WithinRel( 11.2, 0.1 ) ) +with expansion: + 10.0 not and 11.19999999999999929 are within 10% of each other + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1., !WithinRel( 0., 0.99 ) ) +with expansion: + 1.0 not and 0.0 are within 99% of each other + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( -0., WithinRel( 0. ) ) +with expansion: + -0.0 and 0.0 are within 2.22045e-12% of each other + +------------------------------------------------------------------------------- +Floating point matchers: double + Relative + Some subnormal values +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( v1, WithinRel( v2 ) ) +with expansion: + 0.0 and 0.0 are within 2.22045e-12% of each other + +------------------------------------------------------------------------------- +Floating point matchers: double + Margin +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1., WithinAbs( 1., 0 ) ) +with expansion: + 1.0 is within 0.0 of 1.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0., WithinAbs( 1., 1 ) ) +with expansion: + 0.0 is within 1.0 of 1.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0., !WithinAbs( 1., 0.99 ) ) +with expansion: + 0.0 not is within 0.98999999999999999 of 1.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0., !WithinAbs( 1., 0.99 ) ) +with expansion: + 0.0 not is within 0.98999999999999999 of 1.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 11., !WithinAbs( 10., 0.5 ) ) +with expansion: + 11.0 not is within 0.5 of 10.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 10., !WithinAbs( 11., 0.5 ) ) +with expansion: + 10.0 not is within 0.5 of 11.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( -10., WithinAbs( -10., 0.5 ) ) +with expansion: + -10.0 is within 0.5 of -10.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( -10., WithinAbs( -9.6, 0.5 ) ) +with expansion: + -10.0 is within 0.5 of -9.59999999999999964 + +------------------------------------------------------------------------------- +Floating point matchers: double + ULPs +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1., WithinULP( 1., 0 ) ) +with expansion: + 1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1. + 0000000000000000e+00]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( nextafter( 1., 2. ), WithinULP( 1., 1 ) ) +with expansion: + 1.00000000000000022 is within 1 ULPs of 1.0000000000000000e+00 ([9. + 9999999999999989e-01, 1.0000000000000002e+00]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0., WithinULP( nextafter( 0., 1. ), 1 ) ) +with expansion: + 0.0 is within 1 ULPs of 4.9406564584124654e-324 ([0.0000000000000000e+00, 9. + 8813129168249309e-324]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1., WithinULP( nextafter( 1., 0. ), 1 ) ) +with expansion: + 1.0 is within 1 ULPs of 9.9999999999999989e-01 ([9.9999999999999978e-01, 1. + 0000000000000000e+00]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1., !WithinULP( nextafter( 1., 2. ), 0 ) ) +with expansion: + 1.0 not is within 0 ULPs of 1.0000000000000002e+00 ([1.0000000000000002e+00, + 1.0000000000000002e+00]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1., WithinULP( 1., 0 ) ) +with expansion: + 1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1. + 0000000000000000e+00]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( -0., WithinULP( 0., 0 ) ) +with expansion: + -0.0 is within 0 ULPs of 0.0000000000000000e+00 ([0.0000000000000000e+00, 0. + 0000000000000000e+00]) + +------------------------------------------------------------------------------- +Floating point matchers: double + Composed +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1., WithinAbs( 1., 0.5 ) || WithinULP( 2., 1 ) ) +with expansion: + 1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0000000000000000e+00 ([1. + 9999999999999998e+00, 2.0000000000000004e+00]) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1., WithinAbs( 2., 0.5 ) || WithinULP( 1., 0 ) ) +with expansion: + 1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0000000000000000e+00 ([1. + 0000000000000000e+00, 1.0000000000000000e+00]) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0.0001, WithinAbs( 0., 0.001 ) || WithinRel( 0., 0.1 ) ) +with expansion: + 0.0001 ( is within 0.001 of 0.0 or and 0.0 are within 10% of each other ) + +------------------------------------------------------------------------------- +Floating point matchers: double + Constructor validation +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_NOTHROW( WithinAbs( 1., 0. ) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( WithinAbs( 1., -1. ), std::domain_error ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_NOTHROW( WithinULP( 1., 0 ) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_NOTHROW( WithinRel( 1., 0. ) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( WithinRel( 1., -0.2 ), std::domain_error ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( WithinRel( 1., 1. ), std::domain_error ) + +------------------------------------------------------------------------------- +Floating point matchers: double + IsNaN +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1., !IsNaN() ) +with expansion: + 1.0 not is NaN + +------------------------------------------------------------------------------- +Floating point matchers: float + Relative +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 10.f, WithinRel( 11.1f, 0.1f ) ) +with expansion: + 10.0f and 11.10000038146972656 are within 10% of each other + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 10.f, !WithinRel( 11.2f, 0.1f ) ) +with expansion: + 10.0f not and 11.19999980926513672 are within 10% of each other + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1.f, !WithinRel( 0.f, 0.99f ) ) +with expansion: + 1.0f not and 0.0 are within 99% of each other + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( -0.f, WithinRel( 0.f ) ) +with expansion: + -0.0f and 0.0 are within 0.00119209% of each other + +------------------------------------------------------------------------------- +Floating point matchers: float + Relative + Some subnormal values +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( v1, WithinRel( v2 ) ) +with expansion: + 0.0f and 0.0 are within 0.00119209% of each other + +------------------------------------------------------------------------------- +Floating point matchers: float + Margin +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1.f, WithinAbs( 1.f, 0 ) ) +with expansion: + 1.0f is within 0.0 of 1.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0.f, WithinAbs( 1.f, 1 ) ) +with expansion: + 0.0f is within 1.0 of 1.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0.f, !WithinAbs( 1.f, 0.99f ) ) +with expansion: + 0.0f not is within 0.99000000953674316 of 1.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0.f, !WithinAbs( 1.f, 0.99f ) ) +with expansion: + 0.0f not is within 0.99000000953674316 of 1.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0.f, WithinAbs( -0.f, 0 ) ) +with expansion: + 0.0f is within 0.0 of -0.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 11.f, !WithinAbs( 10.f, 0.5f ) ) +with expansion: + 11.0f not is within 0.5 of 10.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 10.f, !WithinAbs( 11.f, 0.5f ) ) +with expansion: + 10.0f not is within 0.5 of 11.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( -10.f, WithinAbs( -10.f, 0.5f ) ) +with expansion: + -10.0f is within 0.5 of -10.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( -10.f, WithinAbs( -9.6f, 0.5f ) ) +with expansion: + -10.0f is within 0.5 of -9.60000038146972656 + +------------------------------------------------------------------------------- +Floating point matchers: float + ULPs +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1.f, WithinULP( 1.f, 0 ) ) +with expansion: + 1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( -1.f, WithinULP( -1.f, 0 ) ) +with expansion: + -1.0f is within 0 ULPs of -1.00000000e+00f ([-1.00000000e+00, -1.00000000e+ + 00]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( nextafter( 1.f, 2.f ), WithinULP( 1.f, 1 ) ) +with expansion: + 1.000000119f is within 1 ULPs of 1.00000000e+00f ([9.99999940e-01, 1. + 00000012e+00]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0.f, WithinULP( nextafter( 0.f, 1.f ), 1 ) ) +with expansion: + 0.0f is within 1 ULPs of 1.40129846e-45f ([0.00000000e+00, 2.80259693e-45]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1.f, WithinULP( nextafter( 1.f, 0.f ), 1 ) ) +with expansion: + 1.0f is within 1 ULPs of 9.99999940e-01f ([9.99999881e-01, 1.00000000e+00]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1.f, !WithinULP( nextafter( 1.f, 2.f ), 0 ) ) +with expansion: + 1.0f not is within 0 ULPs of 1.00000012e+00f ([1.00000012e+00, 1.00000012e+ + 00]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1.f, WithinULP( 1.f, 0 ) ) +with expansion: + 1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( -0.f, WithinULP( 0.f, 0 ) ) +with expansion: + -0.0f is within 0 ULPs of 0.00000000e+00f ([0.00000000e+00, 0.00000000e+00]) + +------------------------------------------------------------------------------- +Floating point matchers: float + Composed +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1.f, WithinAbs( 1.f, 0.5 ) || WithinULP( 1.f, 1 ) ) +with expansion: + 1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.00000000e+00f ([9. + 99999940e-01, 1.00000012e+00]) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1.f, WithinAbs( 2.f, 0.5 ) || WithinULP( 1.f, 0 ) ) +with expansion: + 1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.00000000e+00f ([1. + 00000000e+00, 1.00000000e+00]) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0.0001f, WithinAbs( 0.f, 0.001f ) || WithinRel( 0.f, 0.1f ) ) +with expansion: + 0.0001f ( is within 0.00100000004749745 of 0.0 or and 0.0 are within 10% of + each other ) + +------------------------------------------------------------------------------- +Floating point matchers: float + Constructor validation +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_NOTHROW( WithinAbs( 1.f, 0.f ) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( WithinAbs( 1.f, -1.f ), std::domain_error ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_NOTHROW( WithinULP( 1.f, 0 ) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( WithinULP( 1.f, static_cast( -1 ) ), std::domain_error ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_NOTHROW( WithinRel( 1.f, 0.f ) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( WithinRel( 1.f, -0.2f ), std::domain_error ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( WithinRel( 1.f, 1.f ), std::domain_error ) + +------------------------------------------------------------------------------- +Floating point matchers: float + IsNaN +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1., !IsNaN() ) +with expansion: + 1.0 not is NaN + +------------------------------------------------------------------------------- +GENERATE can combine literals and generators +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +GENERATE can combine literals and generators +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +GENERATE can combine literals and generators +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +GENERATE can combine literals and generators +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Filtering by predicate + Basic usage +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Filtering by predicate + Basic usage +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Filtering by predicate + Basic usage +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Filtering by predicate + Throws if there are no matching values +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( filter([] (int) {return false; }, value(1)), Catch::GeneratorException ) + +------------------------------------------------------------------------------- +Generators -- adapters + Shortening a range +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i < 4 ) +with expansion: + 1 < 4 + +------------------------------------------------------------------------------- +Generators -- adapters + Shortening a range +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i < 4 ) +with expansion: + 2 < 4 + +------------------------------------------------------------------------------- +Generators -- adapters + Shortening a range +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i < 4 ) +with expansion: + 3 < 4 + +------------------------------------------------------------------------------- +Generators -- adapters + Transforming elements + Same type +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Transforming elements + Same type +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Transforming elements + Same type +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Transforming elements + Different type +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i.size() == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Generators -- adapters + Transforming elements + Different type +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i.size() == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Generators -- adapters + Transforming elements + Different type +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i.size() == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Generators -- adapters + Transforming elements + Different deduced type +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i.size() == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Generators -- adapters + Transforming elements + Different deduced type +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i.size() == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Generators -- adapters + Transforming elements + Different deduced type +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i.size() == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Generators -- adapters + Repeating a generator +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j > 0 ) +with expansion: + 1 > 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Repeating a generator +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j > 0 ) +with expansion: + 2 > 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Repeating a generator +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j > 0 ) +with expansion: + 3 > 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Repeating a generator +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j > 0 ) +with expansion: + 1 > 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Repeating a generator +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j > 0 ) +with expansion: + 2 > 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Repeating a generator +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j > 0 ) +with expansion: + 3 > 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Chunking a generator into sized pieces + Number of elements in source is divisible by chunk size +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.size() == 2 ) +with expansion: + 2 == 2 + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.front() == chunk2.back() ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Generators -- adapters + Chunking a generator into sized pieces + Number of elements in source is divisible by chunk size +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.size() == 2 ) +with expansion: + 2 == 2 + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.front() == chunk2.back() ) +with expansion: + 2 == 2 + +------------------------------------------------------------------------------- +Generators -- adapters + Chunking a generator into sized pieces + Number of elements in source is divisible by chunk size +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.size() == 2 ) +with expansion: + 2 == 2 + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.front() == chunk2.back() ) +with expansion: + 3 == 3 + +------------------------------------------------------------------------------- +Generators -- adapters + Chunking a generator into sized pieces + Number of elements in source is not divisible by chunk size +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.size() == 2 ) +with expansion: + 2 == 2 + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.front() == chunk2.back() ) +with expansion: + 1 == 1 + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.front() < 3 ) +with expansion: + 1 < 3 + +------------------------------------------------------------------------------- +Generators -- adapters + Chunking a generator into sized pieces + Number of elements in source is not divisible by chunk size +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.size() == 2 ) +with expansion: + 2 == 2 + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.front() == chunk2.back() ) +with expansion: + 2 == 2 + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.front() < 3 ) +with expansion: + 2 < 3 + +------------------------------------------------------------------------------- +Generators -- adapters + Chunking a generator into sized pieces + Chunk size of zero +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Chunking a generator into sized pieces + Chunk size of zero +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Chunking a generator into sized pieces + Chunk size of zero +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Chunking a generator into sized pieces + Throws on too small generators +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( chunk(2, value(1)), Catch::GeneratorException ) + +------------------------------------------------------------------------------- +Generators -- simple + one +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j < i ) +with expansion: + -3 < 1 + +------------------------------------------------------------------------------- +Generators -- simple + one +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j < i ) +with expansion: + -2 < 1 + +------------------------------------------------------------------------------- +Generators -- simple + one +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j < i ) +with expansion: + -1 < 1 + +------------------------------------------------------------------------------- +Generators -- simple + two +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( 4u * i > str.size() ) +with expansion: + 4 > 1 + +------------------------------------------------------------------------------- +Generators -- simple + two +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( 4u * i > str.size() ) +with expansion: + 4 > 2 + +------------------------------------------------------------------------------- +Generators -- simple + two +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( 4u * i > str.size() ) +with expansion: + 4 > 3 + +------------------------------------------------------------------------------- +Generators -- simple + one +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j < i ) +with expansion: + -3 < 2 + +------------------------------------------------------------------------------- +Generators -- simple + one +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j < i ) +with expansion: + -2 < 2 + +------------------------------------------------------------------------------- +Generators -- simple + one +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j < i ) +with expansion: + -1 < 2 + +------------------------------------------------------------------------------- +Generators -- simple + two +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( 4u * i > str.size() ) +with expansion: + 8 > 1 + +------------------------------------------------------------------------------- +Generators -- simple + two +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( 4u * i > str.size() ) +with expansion: + 8 > 2 + +------------------------------------------------------------------------------- +Generators -- simple + two +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( 4u * i > str.size() ) +with expansion: + 8 > 3 + +------------------------------------------------------------------------------- +Generators -- simple + one +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j < i ) +with expansion: + -3 < 3 + +------------------------------------------------------------------------------- +Generators -- simple + one +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j < i ) +with expansion: + -2 < 3 + +------------------------------------------------------------------------------- +Generators -- simple + one +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j < i ) +with expansion: + -1 < 3 + +------------------------------------------------------------------------------- +Generators -- simple + two +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( 4u * i > str.size() ) +with expansion: + 12 > 1 + +------------------------------------------------------------------------------- +Generators -- simple + two +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( 4u * i > str.size() ) +with expansion: + 12 > 2 + +------------------------------------------------------------------------------- +Generators -- simple + two +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( 4u * i > str.size() ) +with expansion: + 12 > 3 + +------------------------------------------------------------------------------- +Generators internals + Single value +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 123 ) +with expansion: + 123 == 123 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Preset values +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 1 ) +with expansion: + 1 == 1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 3 ) +with expansion: + 3 == 3 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 5 ) +with expansion: + 5 == 5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Generator combinator +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 1 ) +with expansion: + 1 == 1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 5 ) +with expansion: + 5 == 5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 4 ) +with expansion: + 4 == 4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 0 ) +with expansion: + 0 == 0 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Explicitly typed generator sequence +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get().size() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == "aa" ) +with expansion: + "aa" == "aa" + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == "bb" ) +with expansion: + "bb" == "bb" + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == "cc" ) +with expansion: + "cc" == "cc" + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Filter generator + Simple filtering +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 1 ) +with expansion: + 1 == 1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 3 ) +with expansion: + 3 == 3 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Filter generator + Filter out multiple elements at the start and end +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 1 ) +with expansion: + 1 == 1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 3 ) +with expansion: + 3 == 3 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Filter generator + Throws on construction if it can't get initial element +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( filter([](int) { return false; }, value(1)), Catch::GeneratorException ) + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( filter([](int) { return false; }, values({ 1, 2, 3 })), Catch::GeneratorException ) + +------------------------------------------------------------------------------- +Generators internals + Take generator + Take less +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 1 ) +with expansion: + 1 == 1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Take generator + Take more +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 1 ) +with expansion: + 1 == 1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Map with explicit return type +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2.0 ) +with expansion: + 2.0 == 2.0 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 4.0 ) +with expansion: + 4.0 == 4.0 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 6.0 ) +with expansion: + 6.0 == 6.0 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Map with deduced return type +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2.0 ) +with expansion: + 2.0 == 2.0 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 4.0 ) +with expansion: + 4.0 == 4.0 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 6.0 ) +with expansion: + 6.0 == 6.0 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Repeat + Singular repeat +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 3 ) +with expansion: + 3 == 3 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Repeat + Actual repeat +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 1 ) +with expansion: + 1 == 1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 3 ) +with expansion: + 3 == 3 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 1 ) +with expansion: + 1 == 1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 3 ) +with expansion: + 3 == 3 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Range + Positive auto step + Integer +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -2 ) +with expansion: + -2 == -2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -1 ) +with expansion: + -1 == -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 0 ) +with expansion: + 0 == 0 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 1 ) +with expansion: + 1 == 1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Range + Negative auto step + Integer +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 1 ) +with expansion: + 1 == 1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 0 ) +with expansion: + 0 == 0 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -1 ) +with expansion: + -1 == -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Range + Positive manual step + Integer + Exact +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -7 ) +with expansion: + -7 == -7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -4 ) +with expansion: + -4 == -4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -1 ) +with expansion: + -1 == -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Range + Positive manual step + Integer + Slightly over end +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -7 ) +with expansion: + -7 == -7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -4 ) +with expansion: + -4 == -4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -1 ) +with expansion: + -1 == -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Range + Positive manual step + Integer + Slightly under end +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -7 ) +with expansion: + -7 == -7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -4 ) +with expansion: + -4 == -4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -1 ) +with expansion: + -1 == -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 5 ) +with expansion: + 5 == 5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Range + Positive manual step + Floating Point + Exact +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -1.0 == Approx( -1.0 ) +with message: + Current expected value is -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.90000000000000002 + == + Approx( -0.90000000000000002 ) +with message: + Current expected value is -0.9 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.9 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.80000000000000004 + == + Approx( -0.80000000000000004 ) +with message: + Current expected value is -0.8 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.8 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.70000000000000007 + == + Approx( -0.70000000000000007 ) +with message: + Current expected value is -0.7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.60000000000000009 + == + Approx( -0.60000000000000009 ) +with message: + Current expected value is -0.6 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.6 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.50000000000000011 + == + Approx( -0.50000000000000011 ) +with message: + Current expected value is -0.5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.40000000000000013 + == + Approx( -0.40000000000000013 ) +with message: + Current expected value is -0.4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.30000000000000016 + == + Approx( -0.30000000000000016 ) +with message: + Current expected value is -0.3 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.3 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.20000000000000015 + == + Approx( -0.20000000000000015 ) +with message: + Current expected value is -0.2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.10000000000000014 + == + Approx( -0.10000000000000014 ) +with message: + Current expected value is -0.1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.00000000000000014 + == + Approx( -0.00000000000000014 ) +with message: + Current expected value is -1.38778e-16 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -1.38778e-16 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.09999999999999987 + == + Approx( 0.09999999999999987 ) +with message: + Current expected value is 0.1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.19999999999999987 + == + Approx( 0.19999999999999987 ) +with message: + Current expected value is 0.2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.29999999999999988 + == + Approx( 0.29999999999999988 ) +with message: + Current expected value is 0.3 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.3 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.39999999999999991 + == + Approx( 0.39999999999999991 ) +with message: + Current expected value is 0.4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.49999999999999989 + == + Approx( 0.49999999999999989 ) +with message: + Current expected value is 0.5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.59999999999999987 + == + Approx( 0.59999999999999987 ) +with message: + Current expected value is 0.6 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.6 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.69999999999999984 + == + Approx( 0.69999999999999984 ) +with message: + Current expected value is 0.7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.79999999999999982 + == + Approx( 0.79999999999999982 ) +with message: + Current expected value is 0.8 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.8 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.8999999999999998 + == + Approx( 0.8999999999999998 ) +with message: + Current expected value is 0.9 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.9 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx( rangeEnd ) ) +with expansion: + 0.99999999999999978 == Approx( 1.0 ) + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Range + Positive manual step + Floating Point + Slightly over end +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -1.0 == Approx( -1.0 ) +with message: + Current expected value is -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.69999999999999996 + == + Approx( -0.69999999999999996 ) +with message: + Current expected value is -0.7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.39999999999999997 + == + Approx( -0.39999999999999997 ) +with message: + Current expected value is -0.4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.09999999999999998 + == + Approx( -0.09999999999999998 ) +with message: + Current expected value is -0.1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.20000000000000001 + == + Approx( 0.20000000000000001 ) +with message: + Current expected value is 0.2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.5 == Approx( 0.5 ) +with message: + Current expected value is 0.5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Range + Positive manual step + Floating Point + Slightly under end +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -1.0 == Approx( -1.0 ) +with message: + Current expected value is -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.69999999999999996 + == + Approx( -0.69999999999999996 ) +with message: + Current expected value is -0.7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.39999999999999997 + == + Approx( -0.39999999999999997 ) +with message: + Current expected value is -0.4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.09999999999999998 + == + Approx( -0.09999999999999998 ) +with message: + Current expected value is -0.1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.20000000000000001 + == + Approx( 0.20000000000000001 ) +with message: + Current expected value is 0.2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.5 == Approx( 0.5 ) +with message: + Current expected value is 0.5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Range + Negative manual step + Integer + Exact +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 5 ) +with expansion: + 5 == 5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -1 ) +with expansion: + -1 == -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -4 ) +with expansion: + -4 == -4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Range + Negative manual step + Integer + Slightly over end +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 5 ) +with expansion: + 5 == 5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -1 ) +with expansion: + -1 == -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -4 ) +with expansion: + -4 == -4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Range + Negative manual step + Integer + Slightly under end +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 5 ) +with expansion: + 5 == 5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -1 ) +with expansion: + -1 == -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -4 ) +with expansion: + -4 == -4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -7 ) +with expansion: + -7 == -7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Greater-than inequalities with different epsilons +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( d >= Approx( 1.22 ) ) +with expansion: + 1.22999999999999998 + >= + Approx( 1.21999999999999997 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d >= Approx( 1.23 ) ) +with expansion: + 1.22999999999999998 + >= + Approx( 1.22999999999999998 ) + +Approx.tests.cpp:: PASSED: + REQUIRE_FALSE( d >= Approx( 1.24 ) ) +with expansion: + !(1.22999999999999998 + >= + Approx( 1.23999999999999999 )) + +Approx.tests.cpp:: PASSED: + REQUIRE( d >= Approx( 1.24 ).epsilon(0.1) ) +with expansion: + 1.22999999999999998 + >= + Approx( 1.23999999999999999 ) + +------------------------------------------------------------------------------- +Hashers with different seed produce different hash with same test case +------------------------------------------------------------------------------- +TestCaseInfoHasher.tests.cpp: +............................................................................... + +TestCaseInfoHasher.tests.cpp:: PASSED: + REQUIRE( h1( dummy ) != h2( dummy ) ) +with expansion: + 3422778688 (0x) + != + 130711275 (0x) + +------------------------------------------------------------------------------- +Hashers with same seed produce same hash +------------------------------------------------------------------------------- +TestCaseInfoHasher.tests.cpp: +............................................................................... + +TestCaseInfoHasher.tests.cpp:: PASSED: + REQUIRE( h1( dummy ) == h2( dummy ) ) +with expansion: + 3422778688 (0x) + == + 3422778688 (0x) + +------------------------------------------------------------------------------- +Hashing different test cases produces different result + Different test name +------------------------------------------------------------------------------- +TestCaseInfoHasher.tests.cpp: +............................................................................... + +TestCaseInfoHasher.tests.cpp:: PASSED: + REQUIRE( h( dummy1 ) != h( dummy2 ) ) +with expansion: + 2903002874 (0x) + != + 2668622104 (0x) + +------------------------------------------------------------------------------- +Hashing different test cases produces different result + Different classname +------------------------------------------------------------------------------- +TestCaseInfoHasher.tests.cpp: +............................................................................... + +TestCaseInfoHasher.tests.cpp:: PASSED: + REQUIRE( h( dummy1 ) != h( dummy2 ) ) +with expansion: + 2673152918 (0x) + != + 3916075712 (0x) + +------------------------------------------------------------------------------- +Hashing different test cases produces different result + Different tags +------------------------------------------------------------------------------- +TestCaseInfoHasher.tests.cpp: +............................................................................... + +TestCaseInfoHasher.tests.cpp:: PASSED: + REQUIRE( h( dummy1 ) != h( dummy2 ) ) +with expansion: + 2074929312 (0x) + != + 3429949824 (0x) + +------------------------------------------------------------------------------- +Hashing test case produces same hash across multiple calls +------------------------------------------------------------------------------- +TestCaseInfoHasher.tests.cpp: +............................................................................... + +TestCaseInfoHasher.tests.cpp:: PASSED: + REQUIRE( h( dummy ) == h( dummy ) ) +with expansion: + 3422778688 (0x) + == + 3422778688 (0x) + +------------------------------------------------------------------------------- +INFO and UNSCOPED_INFO can stream multiple arguments +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: +explicitly with messages: + This info has multiple parts. + This unscoped info has multiple parts. + Show infos! + +------------------------------------------------------------------------------- +INFO and WARN do not abort tests +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: warning: + this is a message + this is a warning + + +No assertions in test case 'INFO and WARN do not abort tests' + +------------------------------------------------------------------------------- +INFO gets logged on failure +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: + REQUIRE( a == 1 ) +with expansion: + 2 == 1 +with messages: + this message should be logged + so should this + +------------------------------------------------------------------------------- +INFO gets logged on failure, even if captured before successful assertions +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: PASSED: + CHECK( a == 2 ) +with expansion: + 2 == 2 +with message: + this message may be logged later + +Message.tests.cpp:: FAILED: + CHECK( a == 1 ) +with expansion: + 2 == 1 +with messages: + this message may be logged later + this message should be logged + +Message.tests.cpp:: FAILED: + CHECK( a == 0 ) +with expansion: + 2 == 0 +with messages: + this message may be logged later + this message should be logged + and this, but later + +Message.tests.cpp:: PASSED: + CHECK( a == 2 ) +with expansion: + 2 == 2 +with messages: + this message may be logged later + this message should be logged + and this, but later + but not this + +------------------------------------------------------------------------------- +INFO is reset for each loop +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: PASSED: + REQUIRE( i < 10 ) +with expansion: + 0 < 10 +with messages: + current counter 0 + i := 0 + +Message.tests.cpp:: PASSED: + REQUIRE( i < 10 ) +with expansion: + 1 < 10 +with messages: + current counter 1 + i := 1 + +Message.tests.cpp:: PASSED: + REQUIRE( i < 10 ) +with expansion: + 2 < 10 +with messages: + current counter 2 + i := 2 + +Message.tests.cpp:: PASSED: + REQUIRE( i < 10 ) +with expansion: + 3 < 10 +with messages: + current counter 3 + i := 3 + +Message.tests.cpp:: PASSED: + REQUIRE( i < 10 ) +with expansion: + 4 < 10 +with messages: + current counter 4 + i := 4 + +Message.tests.cpp:: PASSED: + REQUIRE( i < 10 ) +with expansion: + 5 < 10 +with messages: + current counter 5 + i := 5 + +Message.tests.cpp:: PASSED: + REQUIRE( i < 10 ) +with expansion: + 6 < 10 +with messages: + current counter 6 + i := 6 + +Message.tests.cpp:: PASSED: + REQUIRE( i < 10 ) +with expansion: + 7 < 10 +with messages: + current counter 7 + i := 7 + +Message.tests.cpp:: PASSED: + REQUIRE( i < 10 ) +with expansion: + 8 < 10 +with messages: + current counter 8 + i := 8 + +Message.tests.cpp:: PASSED: + REQUIRE( i < 10 ) +with expansion: + 9 < 10 +with messages: + current counter 9 + i := 9 + +Message.tests.cpp:: FAILED: + REQUIRE( i < 10 ) +with expansion: + 10 < 10 +with messages: + current counter 10 + i := 10 + +------------------------------------------------------------------------------- +Incomplete AssertionHandler +------------------------------------------------------------------------------- +AssertionHandler.tests.cpp: +............................................................................... + +AssertionHandler.tests.cpp:: FAILED: + REQUIRE( Dummy ) +due to unexpected exception with message: + Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE + +------------------------------------------------------------------------------- +Inequality checks that should fail +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven != 7 ) +with expansion: + 7 != 7 + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one != Approx( 9.1f ) ) +with expansion: + 9.100000381f + != + Approx( 9.10000038146972656 ) + +Condition.tests.cpp:: FAILED: + CHECK( data.double_pi != Approx( 3.1415926535 ) ) +with expansion: + 3.14159265350000005 + != + Approx( 3.14159265350000005 ) + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello != "hello" ) +with expansion: + "hello" != "hello" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello.size() != 5 ) +with expansion: + 5 != 5 + +------------------------------------------------------------------------------- +Inequality checks that should succeed +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: PASSED: + REQUIRE( data.int_seven != 6 ) +with expansion: + 7 != 6 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.int_seven != 8 ) +with expansion: + 7 != 8 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.float_nine_point_one != Approx( 9.11f ) ) +with expansion: + 9.100000381f + != + Approx( 9.10999965667724609 ) + +Condition.tests.cpp:: PASSED: + REQUIRE( data.float_nine_point_one != Approx( 9.0f ) ) +with expansion: + 9.100000381f != Approx( 9.0 ) + +Condition.tests.cpp:: PASSED: + REQUIRE( data.float_nine_point_one != Approx( 1 ) ) +with expansion: + 9.100000381f != Approx( 1.0 ) + +Condition.tests.cpp:: PASSED: + REQUIRE( data.float_nine_point_one != Approx( 0 ) ) +with expansion: + 9.100000381f != Approx( 0.0 ) + +Condition.tests.cpp:: PASSED: + REQUIRE( data.double_pi != Approx( 3.1415 ) ) +with expansion: + 3.14159265350000005 + != + Approx( 3.14150000000000018 ) + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello != "goodbye" ) +with expansion: + "hello" != "goodbye" + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello != "hell" ) +with expansion: + "hello" != "hell" + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello != "hello1" ) +with expansion: + "hello" != "hello1" + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello.size() != 6 ) +with expansion: + 5 != 6 + +------------------------------------------------------------------------------- +JsonWriter + Newly constructed JsonWriter does nothing +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( stream.str() == "" ) +with expansion: + "" == "" + +------------------------------------------------------------------------------- +JsonWriter + Calling writeObject will create an empty pair of braces +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( stream.str() == "{\n}" ) +with expansion: + "{ + }" + == + "{ + }" + +------------------------------------------------------------------------------- +JsonWriter + Calling writeObject with key will create an object to write the value +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE_THAT( stream.str(), ContainsSubstring( "\"int\": 1," ) && ContainsSubstring( "\"double\": 1.5," ) && ContainsSubstring( "\"true\": true," ) && ContainsSubstring( "\"false\": false," ) && ContainsSubstring( "\"string\": \"this is a string\"," ) && ContainsSubstring( "\"array\": [\n 1,\n 2\n ]\n}" ) ) +with expansion: + "{ + "int": 1, + "double": 1.5, + "true": true, + "false": false, + "string": "this is a string", + "array": [ + 1, + 2 + ] + }" ( contains: ""int": 1," and contains: ""double": 1.5," and contains: + ""true": true," and contains: ""false": false," and contains: ""string": + "this is a string"," and contains: ""array": [ + 1, + 2 + ] + }" ) + +------------------------------------------------------------------------------- +JsonWriter + nesting objects +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE_THAT( stream.str(), ContainsSubstring( "\"empty_object\": {\n }," ) && ContainsSubstring( "\"fully_object\": {\n \"key\": 1\n }" ) ) +with expansion: + "{ + "empty_object": { + }, + "fully_object": { + "key": 1 + } + }" ( contains: ""empty_object": { + }," and contains: ""fully_object": { + "key": 1 + }" ) + +------------------------------------------------------------------------------- +JsonWriter + Calling writeArray will create an empty pair of braces +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( stream.str() == "[\n]" ) +with expansion: + "[ + ]" + == + "[ + ]" + +------------------------------------------------------------------------------- +JsonWriter + Calling writeArray creates array to write the values to +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( stream.str() == "[\n 1,\n 1.5,\n true,\n false,\n \"this is a string\",\n {\n \"object\": 42\n },\n [\n \"array\",\n 42.5\n ]\n]" ) +with expansion: + "[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] + ]" + == + "[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] + ]" + +------------------------------------------------------------------------------- +JsonWriter + Moved from JsonObjectWriter shall not insert superfluous brace +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( stream.str() == "{\n}" ) +with expansion: + "{ + }" + == + "{ + }" + +------------------------------------------------------------------------------- +JsonWriter + Moved from JsonArrayWriter shall not insert superfluous bracket +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( stream.str() == "[\n]" ) +with expansion: + "[ + ]" + == + "[ + ]" + +------------------------------------------------------------------------------- +JsonWriter + Custom class shall be quoted +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( stream.str() == "\"custom\"" ) +with expansion: + ""custom"" == ""custom"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + Quote in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( sstream.str() == "\"\\\"\"" ) +with expansion: + ""\""" == ""\""" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + Backslash in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( sstream.str() == "\"\\\\\"" ) +with expansion: + ""\\"" == ""\\"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + Forward slash in a string is **not** escaped +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( sstream.str() == "\"/\"" ) +with expansion: + ""/"" == ""/"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + Backspace in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( sstream.str() == "\"\\b\"" ) +with expansion: + ""\b"" == ""\b"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + Formfeed in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( sstream.str() == "\"\\f\"" ) +with expansion: + ""\f"" == ""\f"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + linefeed in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( sstream.str() == "\"\\n\"" ) +with expansion: + ""\n"" == ""\n"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + carriage return in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( sstream.str() == "\"\\r\"" ) +with expansion: + ""\r"" == ""\r"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + tab in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( sstream.str() == "\"\\t\"" ) +with expansion: + ""\t"" == ""\t"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + combination of characters is escaped +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( sstream.str() == "\"\\\\/\\t\\r\\n\"" ) +with expansion: + ""\\/\t\r\n"" == ""\\/\t\r\n"" + +------------------------------------------------------------------------------- +Lambdas in assertions +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( []() { return true; }() ) +with expansion: + true + +------------------------------------------------------------------------------- +Less-than inequalities with different epsilons +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( d <= Approx( 1.24 ) ) +with expansion: + 1.22999999999999998 + <= + Approx( 1.23999999999999999 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d <= Approx( 1.23 ) ) +with expansion: + 1.22999999999999998 + <= + Approx( 1.22999999999999998 ) + +Approx.tests.cpp:: PASSED: + REQUIRE_FALSE( d <= Approx( 1.22 ) ) +with expansion: + !(1.22999999999999998 + <= + Approx( 1.21999999999999997 )) + +Approx.tests.cpp:: PASSED: + REQUIRE( d <= Approx( 1.22 ).epsilon(0.1) ) +with expansion: + 1.22999999999999998 + <= + Approx( 1.21999999999999997 ) + +------------------------------------------------------------------------------- +ManuallyRegistered +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + was called + +------------------------------------------------------------------------------- +Matchers can be (AllOf) composed with the && operator +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), ContainsSubstring( "string" ) && ContainsSubstring( "abc" ) && ContainsSubstring( "substring" ) && ContainsSubstring( "contains" ) ) +with expansion: + "this string contains 'abc' as a substring" ( contains: "string" and + contains: "abc" and contains: "substring" and contains: "contains" ) + +------------------------------------------------------------------------------- +Matchers can be (AnyOf) composed with the || operator +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) ) +with expansion: + "this string contains 'abc' as a substring" ( contains: "string" or contains: + "different" or contains: "random" ) + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching2(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) ) +with expansion: + "some completely different text that contains one common word" ( contains: + "string" or contains: "different" or contains: "random" ) + +------------------------------------------------------------------------------- +Matchers can be composed with both && and || +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "substring" ) ) +with expansion: + "this string contains 'abc' as a substring" ( ( contains: "string" or + contains: "different" ) and contains: "substring" ) + +------------------------------------------------------------------------------- +Matchers can be composed with both && and || - failing +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) ) +with expansion: + "this string contains 'abc' as a substring" ( ( contains: "string" or + contains: "different" ) and contains: "random" ) + +------------------------------------------------------------------------------- +Matchers can be negated (Not) with the ! operator +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), !ContainsSubstring( "different" ) ) +with expansion: + "this string contains 'abc' as a substring" not contains: "different" + +------------------------------------------------------------------------------- +Matchers can be negated (Not) with the ! operator - failing +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) ) +with expansion: + "this string contains 'abc' as a substring" not contains: "substring" + +------------------------------------------------------------------------------- +Mayfail test case with nested sections + A + 1 +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +Mayfail test case with nested sections + A + 2 +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +Mayfail test case with nested sections + B + 1 +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +Mayfail test case with nested sections + B + 2 +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +Mismatching exception messages failing the test +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: PASSED: + REQUIRE_THROWS_WITH( thisThrows(), "expected exception" ) +with expansion: + "expected exception" equals: "expected exception" + +Exception.tests.cpp:: FAILED: + REQUIRE_THROWS_WITH( thisThrows(), "should fail" ) +with expansion: + "expected exception" equals: "should fail" + +------------------------------------------------------------------------------- +Multireporter calls reporters and listeners in correct order +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE( records == expected ) +with expansion: + { "Hello", "world", "Goodbye", "world" } + == + { "Hello", "world", "Goodbye", "world" } + +------------------------------------------------------------------------------- +Multireporter updates ReporterPreferences properly +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == false ) +with expansion: + false == false + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Multireporter updates ReporterPreferences properly + Adding listeners +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == false ) +with expansion: + false == false + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == true ) +with expansion: + true == true + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == true ) +with expansion: + true == true + +------------------------------------------------------------------------------- +Multireporter updates ReporterPreferences properly +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == false ) +with expansion: + false == false + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Multireporter updates ReporterPreferences properly + Adding reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == false ) +with expansion: + false == false + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == true ) +with expansion: + true == true + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == true ) +with expansion: + true == true + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 3 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 4 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 5 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 6 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + -5 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + -4 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 90 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 91 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 92 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 93 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 94 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 95 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 96 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 97 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 98 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 99 > -6 + +------------------------------------------------------------------------------- +Nice descriptive name +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: warning: + This one ran + + +No assertions in test case 'Nice descriptive name' + +------------------------------------------------------------------------------- +Non-std exceptions can be translated +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with message: + custom exception + +------------------------------------------------------------------------------- +Objects that evaluated in boolean contexts can be checked +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + CHECK( True ) +with expansion: + {?} + +Tricky.tests.cpp:: PASSED: + CHECK( !False ) +with expansion: + true + +Tricky.tests.cpp:: PASSED: + CHECK_FALSE( False ) +with expansion: + !{?} + +------------------------------------------------------------------------------- +Optionally static assertions +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: +with message: + std::is_void::value + +Compilation.tests.cpp:: PASSED: +with message: + !(std::is_void::value) + +Compilation.tests.cpp:: PASSED: +with message: + std::is_void::value + +Compilation.tests.cpp:: PASSED: +with message: + !(std::is_void::value) + +------------------------------------------------------------------------------- +Ordering comparison checks that should fail +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven > 7 ) +with expansion: + 7 > 7 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven < 7 ) +with expansion: + 7 < 7 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven > 8 ) +with expansion: + 7 > 8 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven < 6 ) +with expansion: + 7 < 6 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven < 0 ) +with expansion: + 7 < 0 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven < -1 ) +with expansion: + 7 < -1 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven >= 8 ) +with expansion: + 7 >= 8 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven <= 6 ) +with expansion: + 7 <= 6 + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one < 9 ) +with expansion: + 9.100000381f < 9 + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one > 10 ) +with expansion: + 9.100000381f > 10 + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one > 9.2 ) +with expansion: + 9.100000381f > 9.19999999999999929 + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello > "hello" ) +with expansion: + "hello" > "hello" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello < "hello" ) +with expansion: + "hello" < "hello" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello > "hellp" ) +with expansion: + "hello" > "hellp" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello > "z" ) +with expansion: + "hello" > "z" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello < "hellm" ) +with expansion: + "hello" < "hellm" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello < "a" ) +with expansion: + "hello" < "a" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello >= "z" ) +with expansion: + "hello" >= "z" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello <= "a" ) +with expansion: + "hello" <= "a" + +------------------------------------------------------------------------------- +Ordering comparison checks that should succeed +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: PASSED: + REQUIRE( data.int_seven < 8 ) +with expansion: + 7 < 8 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.int_seven > 6 ) +with expansion: + 7 > 6 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.int_seven > 0 ) +with expansion: + 7 > 0 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.int_seven > -1 ) +with expansion: + 7 > -1 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.int_seven >= 7 ) +with expansion: + 7 >= 7 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.int_seven >= 6 ) +with expansion: + 7 >= 6 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.int_seven <= 7 ) +with expansion: + 7 <= 7 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.int_seven <= 8 ) +with expansion: + 7 <= 8 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.float_nine_point_one > 9 ) +with expansion: + 9.100000381f > 9 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.float_nine_point_one < 10 ) +with expansion: + 9.100000381f < 10 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.float_nine_point_one < 9.2 ) +with expansion: + 9.100000381f < 9.19999999999999929 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello <= "hello" ) +with expansion: + "hello" <= "hello" + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello >= "hello" ) +with expansion: + "hello" >= "hello" + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello < "hellp" ) +with expansion: + "hello" < "hellp" + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello < "zebra" ) +with expansion: + "hello" < "zebra" + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello > "hellm" ) +with expansion: + "hello" > "hellm" + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello > "a" ) +with expansion: + "hello" > "a" + +------------------------------------------------------------------------------- +Our PCG implementation provides expected results for known seeds + Default seeded +------------------------------------------------------------------------------- +RandomNumberGeneration.tests.cpp: +............................................................................... + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 4242248763 (0x) + == + 4242248763 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 1867888929 (0x) + == + 1867888929 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 1276619030 (0x) + == + 1276619030 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 1911218783 (0x) + == + 1911218783 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 1827115164 (0x) + == + 1827115164 (0x) + +------------------------------------------------------------------------------- +Our PCG implementation provides expected results for known seeds + Specific seed +------------------------------------------------------------------------------- +RandomNumberGeneration.tests.cpp: +............................................................................... + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 1472234645 (0x) + == + 1472234645 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 868832940 (0x) + == + 868832940 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 570883446 (0x) + == + 570883446 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 889299803 (0x) + == + 889299803 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 4261393167 (0x) + == + 4261393167 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 1472234645 (0x) + == + 1472234645 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 868832940 (0x) + == + 868832940 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 570883446 (0x) + == + 570883446 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 889299803 (0x) + == + 889299803 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 4261393167 (0x) + == + 4261393167 (0x) + +------------------------------------------------------------------------------- +Output from all sections is reported + one +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: +explicitly with message: + Message from section one + +------------------------------------------------------------------------------- +Output from all sections is reported + two +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: +explicitly with message: + Message from section two + +------------------------------------------------------------------------------- +Overloaded comma or address-of operators are not used +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( ( EvilMatcher(), EvilMatcher() ), EvilCommaOperatorUsed ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( &EvilMatcher(), EvilAddressOfOperatorUsed ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_NOTHROW( EvilMatcher() || ( EvilMatcher() && !EvilMatcher() ) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_NOTHROW( ( EvilMatcher() && EvilMatcher() ) || !EvilMatcher() ) + +------------------------------------------------------------------------------- +Parse uints + proper inputs +------------------------------------------------------------------------------- +Parse.tests.cpp: +............................................................................... + +Parse.tests.cpp:: PASSED: + REQUIRE( parseUInt( "0" ) == Optional{ 0 } ) +with expansion: + {?} == {?} + +Parse.tests.cpp:: PASSED: + REQUIRE( parseUInt( "100" ) == Optional{ 100 } ) +with expansion: + {?} == {?} + +Parse.tests.cpp:: PASSED: + REQUIRE( parseUInt( "4294967295" ) == Optional{ 4294967295 } ) +with expansion: + {?} == {?} + +Parse.tests.cpp:: PASSED: + REQUIRE( parseUInt( "0x", 16 ) == Optional{ 255 } ) +with expansion: + {?} == {?} + +------------------------------------------------------------------------------- +Parse uints + Bad inputs +------------------------------------------------------------------------------- +Parse.tests.cpp: +............................................................................... + +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "" ) ) +with expansion: + !{?} + +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "!!KJHF*#" ) ) +with expansion: + !{?} + +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "-1" ) ) +with expansion: + !{?} + +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "4294967296" ) ) +with expansion: + !{?} + +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "42949672964294967296429496729642949672964294967296" ) ) +with expansion: + !{?} + +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "2 4" ) ) +with expansion: + !{?} + +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "0x", 10 ) ) +with expansion: + !{?} + +------------------------------------------------------------------------------- +Parsed tags are matched case insensitive +------------------------------------------------------------------------------- +TestSpecParser.tests.cpp: +............................................................................... + +TestSpecParser.tests.cpp:: PASSED: + REQUIRE( spec.hasFilters() ) +with expansion: + true + +TestSpecParser.tests.cpp:: PASSED: + REQUIRE( spec.getInvalidSpecs().empty() ) +with expansion: + true + +TestSpecParser.tests.cpp:: PASSED: + REQUIRE( spec.matches( testCase ) ) +with expansion: + true + +------------------------------------------------------------------------------- +Parsing sharding-related cli flags + shard-count +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "--shard-count=8" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.shardCount == 8 ) +with expansion: + 8 == 8 + +------------------------------------------------------------------------------- +Parsing sharding-related cli flags + Negative shard count reports error +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK_FALSE( result ) +with expansion: + !{?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE_THAT( result.errorMessage(), ContainsSubstring( "Could not parse '-1' as shard count" ) ) +with expansion: + "Could not parse '-1' as shard count" contains: "Could not parse '-1' as + shard count" + +------------------------------------------------------------------------------- +Parsing sharding-related cli flags + Zero shard count reports error +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK_FALSE( result ) +with expansion: + !{?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE_THAT( result.errorMessage(), ContainsSubstring( "Shard count must be positive" ) ) +with expansion: + "Shard count must be positive" contains: "Shard count must be positive" + +------------------------------------------------------------------------------- +Parsing sharding-related cli flags + shard-index +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "--shard-index=2" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.shardIndex == 2 ) +with expansion: + 2 == 2 + +------------------------------------------------------------------------------- +Parsing sharding-related cli flags + Negative shard index reports error +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK_FALSE( result ) +with expansion: + !{?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE_THAT( result.errorMessage(), ContainsSubstring( "Could not parse '-12' as shard index" ) ) +with expansion: + "Could not parse '-12' as shard index" contains: "Could not parse '-12' as + shard index" + +------------------------------------------------------------------------------- +Parsing sharding-related cli flags + Shard index 0 is accepted +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "--shard-index=0" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.shardIndex == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Parsing tags with non-alphabetical characters is pass-through +------------------------------------------------------------------------------- +TestSpecParser.tests.cpp: +............................................................................... + +TestSpecParser.tests.cpp:: PASSED: + REQUIRE( spec.hasFilters() ) +with expansion: + true +with message: + tagString := "[tag with spaces]" + +TestSpecParser.tests.cpp:: PASSED: + REQUIRE( spec.getInvalidSpecs().empty() ) +with expansion: + true +with message: + tagString := "[tag with spaces]" + +TestSpecParser.tests.cpp:: PASSED: + REQUIRE( spec.matches( testCase ) ) +with expansion: + true +with message: + tagString := "[tag with spaces]" + +------------------------------------------------------------------------------- +Parsing tags with non-alphabetical characters is pass-through +------------------------------------------------------------------------------- +TestSpecParser.tests.cpp: +............................................................................... + +TestSpecParser.tests.cpp:: PASSED: + REQUIRE( spec.hasFilters() ) +with expansion: + true +with message: + tagString := "[I said "good day" sir!]" + +TestSpecParser.tests.cpp:: PASSED: + REQUIRE( spec.getInvalidSpecs().empty() ) +with expansion: + true +with message: + tagString := "[I said "good day" sir!]" + +TestSpecParser.tests.cpp:: PASSED: + REQUIRE( spec.matches( testCase ) ) +with expansion: + true +with message: + tagString := "[I said "good day" sir!]" + +------------------------------------------------------------------------------- +Parsing warnings + NoAssertions +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + REQUIRE( cli.parse( { "test", "-w", "NoAssertions" } ) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.warnings == WarnAbout::NoAssertions ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Parsing warnings + NoTests is no longer supported +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + REQUIRE_FALSE( cli.parse( { "test", "-w", "NoTests" } ) ) +with expansion: + !{?} + +------------------------------------------------------------------------------- +Parsing warnings + Combining multiple warnings +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + REQUIRE( cli.parse( { "test", "--warn", "NoAssertions", "--warn", "UnmatchedTestSpec" } ) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.warnings == ( WarnAbout::NoAssertions | WarnAbout::UnmatchedTestSpec ) ) +with expansion: + 3 == 3 + +------------------------------------------------------------------------------- +Pointers can be compared to null +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: PASSED: + REQUIRE( p == 0 ) +with expansion: + 0 == 0 + +Condition.tests.cpp:: PASSED: + REQUIRE( p == pNULL ) +with expansion: + 0 == 0 + +Condition.tests.cpp:: PASSED: + REQUIRE( p != 0 ) +with expansion: + 0x != 0 + +Condition.tests.cpp:: PASSED: + REQUIRE( cp != 0 ) +with expansion: + 0x != 0 + +Condition.tests.cpp:: PASSED: + REQUIRE( cpc != 0 ) +with expansion: + 0x != 0 + +Condition.tests.cpp:: PASSED: + REQUIRE( returnsNull() == 0 ) +with expansion: + {null string} == 0 + +Condition.tests.cpp:: PASSED: + REQUIRE( returnsConstNull() == 0 ) +with expansion: + {null string} == 0 + +Condition.tests.cpp:: PASSED: + REQUIRE( 0 != p ) +with expansion: + 0 != 0x + +------------------------------------------------------------------------------- +Precision of floating point stringification can be set + Floats +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( str1.size() == 3 + 5 ) +with expansion: + 8 == 8 + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( str2.size() == 3 + 10 ) +with expansion: + 13 == 13 + +------------------------------------------------------------------------------- +Precision of floating point stringification can be set + Double +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( str1.size() == 2 + 5 ) +with expansion: + 7 == 7 + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( str2.size() == 2 + 15 ) +with expansion: + 17 == 17 + +------------------------------------------------------------------------------- +Predicate matcher can accept const char* +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( "foo", Predicate( []( const char* const& ) { return true; } ) ) +with expansion: + "foo" matches undescribed predicate + +------------------------------------------------------------------------------- +Process can be configured on command line + empty args don't cause a crash +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( result ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + CHECK( config.processName == "" ) +with expansion: + "" == "" + +------------------------------------------------------------------------------- +Process can be configured on command line + default - no arguments +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( result ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + CHECK( config.processName == "test" ) +with expansion: + "test" == "test" + +CmdLine.tests.cpp:: PASSED: + CHECK( config.shouldDebugBreak == false ) +with expansion: + false == false + +CmdLine.tests.cpp:: PASSED: + CHECK( config.abortAfter == -1 ) +with expansion: + -1 == -1 + +CmdLine.tests.cpp:: PASSED: + CHECK( config.noThrow == false ) +with expansion: + false == false + +CmdLine.tests.cpp:: PASSED: + CHECK( config.reporterSpecifications.empty() ) +with expansion: + true + +CmdLine.tests.cpp:: PASSED: + CHECK_FALSE( cfg.hasTestFilters() ) +with expansion: + !false + +CmdLine.tests.cpp:: PASSED: + CHECK( cfg.getReporterSpecs().size() == 1 ) +with expansion: + 1 == 1 + +CmdLine.tests.cpp:: PASSED: + CHECK( cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, {}, {}, {} } ) +with expansion: + {?} == {?} + +CmdLine.tests.cpp:: PASSED: + CHECK( cfg.getProcessedReporterSpecs().size() == 1 ) +with expansion: + 1 == 1 + +CmdLine.tests.cpp:: PASSED: + CHECK( cfg.getProcessedReporterSpecs()[0] == Catch::ProcessedReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} } ) +with expansion: + {?} == {?} + +------------------------------------------------------------------------------- +Process can be configured on command line + test lists + Specify one test case using +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( result ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( cfg.hasTestFilters() ) +with expansion: + true + +CmdLine.tests.cpp:: PASSED: + REQUIRE( cfg.testSpec().matches(*fakeTestCase("notIncluded")) == false ) +with expansion: + false == false + +CmdLine.tests.cpp:: PASSED: + REQUIRE( cfg.testSpec().matches(*fakeTestCase("test1")) ) +with expansion: + true + +------------------------------------------------------------------------------- +Process can be configured on command line + test lists + Specify one test case exclusion using exclude: +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( result ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( cfg.hasTestFilters() ) +with expansion: + true + +CmdLine.tests.cpp:: PASSED: + REQUIRE( cfg.testSpec().matches(*fakeTestCase("test1")) == false ) +with expansion: + false == false + +CmdLine.tests.cpp:: PASSED: + REQUIRE( cfg.testSpec().matches(*fakeTestCase("alwaysIncluded")) ) +with expansion: + true + +------------------------------------------------------------------------------- +Process can be configured on command line + test lists + Specify one test case exclusion using ~ +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( result ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( cfg.hasTestFilters() ) +with expansion: + true + +CmdLine.tests.cpp:: PASSED: + REQUIRE( cfg.testSpec().matches(*fakeTestCase("test1")) == false ) +with expansion: + false == false + +CmdLine.tests.cpp:: PASSED: + REQUIRE( cfg.testSpec().matches(*fakeTestCase("alwaysIncluded")) ) +with expansion: + true + +------------------------------------------------------------------------------- +Process can be configured on command line + reporter + -r/console +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( result ) +with expansion: + {?} +with message: + result.errorMessage() := "" + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.reporterSpecifications == vec_Specs{ { "console", {}, {}, {} } } ) +with expansion: + { {?} } == { {?} } +with message: + result.errorMessage() := "" + +------------------------------------------------------------------------------- +Process can be configured on command line + reporter + -r/xml +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( result ) +with expansion: + {?} +with message: + result.errorMessage() := "" + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.reporterSpecifications == vec_Specs{ { "xml", {}, {}, {} } } ) +with expansion: + { {?} } == { {?} } +with message: + result.errorMessage() := "" + +------------------------------------------------------------------------------- +Process can be configured on command line + reporter + --reporter/junit +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( result ) +with expansion: + {?} +with message: + result.errorMessage() := "" + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.reporterSpecifications == vec_Specs{ { "junit", {}, {}, {} } } ) +with expansion: + { {?} } == { {?} } +with message: + result.errorMessage() := "" + +------------------------------------------------------------------------------- +Process can be configured on command line + reporter + must match one of the available ones +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( !result ) +with expansion: + true + +CmdLine.tests.cpp:: PASSED: + REQUIRE_THAT( result.errorMessage(), ContainsSubstring("Unrecognized reporter") ) +with expansion: + "Unrecognized reporter, 'unsupported'. Check available with --list-reporters" + contains: "Unrecognized reporter" + +------------------------------------------------------------------------------- +Process can be configured on command line + reporter + With output file +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( result ) +with expansion: + {?} +with message: + result.errorMessage() := "" + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.reporterSpecifications == vec_Specs{ { "console", "out.txt"s, {}, {} } } ) +with expansion: + { {?} } == { {?} } +with message: + result.errorMessage() := "" + +------------------------------------------------------------------------------- +Process can be configured on command line + reporter + With Windows-like absolute path as output file +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( result ) +with expansion: + {?} +with message: + result.errorMessage() := "" + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.reporterSpecifications == vec_Specs{ { "console", "C:\\Temp\\out.txt"s, {}, {} } } ) +with expansion: + { {?} } == { {?} } +with message: + result.errorMessage() := "" + +------------------------------------------------------------------------------- +Process can be configured on command line + reporter + Multiple reporters + All with output files +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "-r", "xml::out=output.xml", "-r", "junit::out=output-junit.xml" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.reporterSpecifications == vec_Specs{ { "xml", "output.xml"s, {}, {} }, { "junit", "output-junit.xml"s, {}, {} } } ) +with expansion: + { {?}, {?} } == { {?}, {?} } + +------------------------------------------------------------------------------- +Process can be configured on command line + reporter + Multiple reporters + Mixed output files and default output +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "-r", "xml::out=output.xml", "-r", "console" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.reporterSpecifications == vec_Specs{ { "xml", "output.xml"s, {}, {} }, { "console", {}, {}, {} } } ) +with expansion: + { {?}, {?} } == { {?}, {?} } + +------------------------------------------------------------------------------- +Process can be configured on command line + reporter + Multiple reporters + cannot have multiple reporters with default output +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( !result ) +with expansion: + true + +CmdLine.tests.cpp:: PASSED: + REQUIRE_THAT( result.errorMessage(), ContainsSubstring("Only one reporter may have unspecified output file.") ) +with expansion: + "Only one reporter may have unspecified output file." contains: "Only one + reporter may have unspecified output file." + +------------------------------------------------------------------------------- +Process can be configured on command line + debugger + -b +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "-b"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.shouldDebugBreak == true ) +with expansion: + true == true + +------------------------------------------------------------------------------- +Process can be configured on command line + debugger + --break +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "--break"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.shouldDebugBreak ) +with expansion: + true + +------------------------------------------------------------------------------- +Process can be configured on command line + abort + -a aborts after first failure +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "-a"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.abortAfter == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Process can be configured on command line + abort + -x 2 aborts after two failures +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "-x", "2"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.abortAfter == 2 ) +with expansion: + 2 == 2 + +------------------------------------------------------------------------------- +Process can be configured on command line + abort + -x must be numeric +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( !result ) +with expansion: + true + +CmdLine.tests.cpp:: PASSED: + REQUIRE_THAT( result.errorMessage(), ContainsSubstring("convert") && ContainsSubstring("oops") ) +with expansion: + "Unable to convert 'oops' to destination type" ( contains: "convert" and + contains: "oops" ) + +------------------------------------------------------------------------------- +Process can be configured on command line + abort + wait-for-keypress + Accepted options +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.waitForKeypress == std::get<1>(input) ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Process can be configured on command line + abort + wait-for-keypress + Accepted options +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.waitForKeypress == std::get<1>(input) ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Process can be configured on command line + abort + wait-for-keypress + Accepted options +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.waitForKeypress == std::get<1>(input) ) +with expansion: + 2 == 2 + +------------------------------------------------------------------------------- +Process can be configured on command line + abort + wait-for-keypress + Accepted options +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.waitForKeypress == std::get<1>(input) ) +with expansion: + 3 == 3 + +------------------------------------------------------------------------------- +Process can be configured on command line + abort + wait-for-keypress + invalid options are reported +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( !result ) +with expansion: + true + +CmdLine.tests.cpp:: PASSED: + REQUIRE_THAT( result.errorMessage(), ContainsSubstring("never") && ContainsSubstring("both") ) +with expansion: + "keypress argument must be one of: never, start, exit or both. 'sometimes' + not recognised" ( contains: "never" and contains: "both" ) + +------------------------------------------------------------------------------- +Process can be configured on command line + nothrow + -e +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "-e"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.noThrow ) +with expansion: + true + +------------------------------------------------------------------------------- +Process can be configured on command line + nothrow + --nothrow +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "--nothrow"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.noThrow ) +with expansion: + true + +------------------------------------------------------------------------------- +Process can be configured on command line + output filename + -o filename +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "-o", "filename.ext"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.defaultOutputFilename == "filename.ext" ) +with expansion: + "filename.ext" == "filename.ext" + +------------------------------------------------------------------------------- +Process can be configured on command line + output filename + --out +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "--out", "filename.ext"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.defaultOutputFilename == "filename.ext" ) +with expansion: + "filename.ext" == "filename.ext" + +------------------------------------------------------------------------------- +Process can be configured on command line + combinations + Single character flags can be combined +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "-abe"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + CHECK( config.abortAfter == 1 ) +with expansion: + 1 == 1 + +CmdLine.tests.cpp:: PASSED: + CHECK( config.shouldDebugBreak ) +with expansion: + true + +CmdLine.tests.cpp:: PASSED: + CHECK( config.noThrow == true ) +with expansion: + true == true + +------------------------------------------------------------------------------- +Process can be configured on command line + use-colour + without option +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.defaultColourMode == ColourMode::PlatformDefault ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Process can be configured on command line + use-colour + auto +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse( { "test", "--colour-mode", "default" } ) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.defaultColourMode == ColourMode::PlatformDefault ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Process can be configured on command line + use-colour + yes +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "--colour-mode", "ansi"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.defaultColourMode == ColourMode::ANSI ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Process can be configured on command line + use-colour + no +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "--colour-mode", "none"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.defaultColourMode == ColourMode::None ) +with expansion: + 3 == 3 + +------------------------------------------------------------------------------- +Process can be configured on command line + use-colour + error +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( !result ) +with expansion: + true + +CmdLine.tests.cpp:: PASSED: + CHECK_THAT( result.errorMessage(), ContainsSubstring( "colour mode must be one of" ) ) +with expansion: + "colour mode must be one of: default, ansi, win32, or none. 'wrong' is not + recognised" contains: "colour mode must be one of" + +------------------------------------------------------------------------------- +Process can be configured on command line + Benchmark options + samples +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "--benchmark-samples=200" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.benchmarkSamples == 200 ) +with expansion: + 200 == 200 + +------------------------------------------------------------------------------- +Process can be configured on command line + Benchmark options + resamples +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "--benchmark-resamples=20000" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.benchmarkResamples == 20000 ) +with expansion: + 20000 (0x) == 20000 (0x) + +------------------------------------------------------------------------------- +Process can be configured on command line + Benchmark options + confidence-interval +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "--benchmark-confidence-interval=0.99" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.benchmarkConfidenceInterval == Catch::Approx(0.99) ) +with expansion: + 0.98999999999999999 + == + Approx( 0.98999999999999999 ) + +------------------------------------------------------------------------------- +Process can be configured on command line + Benchmark options + no-analysis +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "--benchmark-no-analysis" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.benchmarkNoAnalysis ) +with expansion: + true + +------------------------------------------------------------------------------- +Process can be configured on command line + Benchmark options + warmup-time +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "--benchmark-warmup-time=10" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.benchmarkWarmupTime == 10 ) +with expansion: + 10 == 10 + +------------------------------------------------------------------------------- +Product with differing arities - std::tuple +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( std::tuple_size::value >= 1 ) +with expansion: + 3 >= 1 + +------------------------------------------------------------------------------- +Product with differing arities - std::tuple +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( std::tuple_size::value >= 1 ) +with expansion: + 2 >= 1 + +------------------------------------------------------------------------------- +Product with differing arities - std::tuple +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( std::tuple_size::value >= 1 ) +with expansion: + 1 >= 1 + +------------------------------------------------------------------------------- +Random seed generation accepts known methods +------------------------------------------------------------------------------- +RandomNumberGeneration.tests.cpp: +............................................................................... + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE_NOTHROW( Catch::generateRandomSeed(method) ) + +------------------------------------------------------------------------------- +Random seed generation accepts known methods +------------------------------------------------------------------------------- +RandomNumberGeneration.tests.cpp: +............................................................................... + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE_NOTHROW( Catch::generateRandomSeed(method) ) + +------------------------------------------------------------------------------- +Random seed generation accepts known methods +------------------------------------------------------------------------------- +RandomNumberGeneration.tests.cpp: +............................................................................... + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE_NOTHROW( Catch::generateRandomSeed(method) ) + +------------------------------------------------------------------------------- +Random seed generation reports unknown methods +------------------------------------------------------------------------------- +RandomNumberGeneration.tests.cpp: +............................................................................... + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE_THROWS( Catch::generateRandomSeed(static_cast(77)) ) + +------------------------------------------------------------------------------- +Range type with sentinel +------------------------------------------------------------------------------- +ToString.tests.cpp: +............................................................................... + +ToString.tests.cpp:: PASSED: + CHECK( Catch::Detail::stringify(UsesSentinel{}) == "{ }" ) +with expansion: + "{ }" == "{ }" + +------------------------------------------------------------------------------- +Reconstruction should be based on stringification: #914 +------------------------------------------------------------------------------- +Decomposition.tests.cpp: +............................................................................... + +Decomposition.tests.cpp:: FAILED: + CHECK( truthy(false) ) +with expansion: + Hey, its truthy! + +------------------------------------------------------------------------------- +Regex string matcher +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), Matches( "this STRING contains 'abc' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" matches "this STRING contains + 'abc' as a substring" case sensitively + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), Matches( "contains 'abc' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" matches "contains 'abc' as a + substring" case sensitively + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), Matches( "this string contains 'abc' as a" ) ) +with expansion: + "this string contains 'abc' as a substring" matches "this string contains + 'abc' as a" case sensitively + +------------------------------------------------------------------------------- +Registering reporter with '::' in name fails +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THROWS_WITH( registry.registerReporter( "with::doublecolons", Catch::Detail::make_unique() ), "'::' is not allowed in reporter name: 'with::doublecolons'" ) +with expansion: + "'::' is not allowed in reporter name: 'with::doublecolons'" equals: "'::' is + not allowed in reporter name: 'with::doublecolons'" + +------------------------------------------------------------------------------- +Regression test #1 +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( actual, !UnorderedEquals( expected ) ) +with expansion: + { 'a', 'b' } not UnorderedEquals: { 'c', 'b' } + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + Automake reporter lists tags +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) ) +with expansion: + "All available tags: + 1 [fakeTag] + 1 tag + +" contains: "fakeTag" +with message: + Tested reporter: Automake + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + Automake reporter lists reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) ) +with expansion: + "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" +with message: + Tested reporter: Automake + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + Automake reporter lists tests +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ) +with expansion: + "All available test cases: + fake test name + [fakeTestTag] + 1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) +with message: + Tested reporter: Automake + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + compact reporter lists tags +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) ) +with expansion: + "All available tags: + 1 [fakeTag] + 1 tag + +" contains: "fakeTag" +with message: + Tested reporter: compact + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + compact reporter lists reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) ) +with expansion: + "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" +with message: + Tested reporter: compact + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + compact reporter lists tests +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ) +with expansion: + "All available test cases: + fake test name + [fakeTestTag] + 1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) +with message: + Tested reporter: compact + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + console reporter lists tags +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) ) +with expansion: + "All available tags: + 1 [fakeTag] + 1 tag + +" contains: "fakeTag" +with message: + Tested reporter: console + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + console reporter lists reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) ) +with expansion: + "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" +with message: + Tested reporter: console + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + console reporter lists tests +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ) +with expansion: + "All available test cases: + fake test name + [fakeTestTag] + 1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) +with message: + Tested reporter: console + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + JSON reporter lists tags +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) ) +with expansion: + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "" + }, + "listings": { + "tags": [ + { + "aliases": [ + "fakeTag" + ], + "count": 1 + } + ]" contains: "fakeTag" +with message: + Tested reporter: JSON + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + JSON reporter lists reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) ) +with expansion: + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "" + }, + "listings": { + "reporters": [ + { + "name": "fake reporter", + "description": "fake description" + } + ]" contains: "fake reporter" +with message: + Tested reporter: JSON + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + JSON reporter lists tests +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ) +with expansion: + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "" + }, + "listings": { + "tests": [ + { + "name": "fake test name", + "class-name": "", + "tags": [ + "fakeTestTag" + ], + "source-location": { + "filename": "fake-file.cpp", + "line": 123456789 + } + } + ]" ( contains: "fake test name" and contains: "fakeTestTag" ) +with message: + Tested reporter: JSON + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + JUnit reporter lists tags +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) ) +with expansion: + " + All available tags: + 1 [fakeTag] + 1 tag + +" contains: "fakeTag" +with message: + Tested reporter: JUnit + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + JUnit reporter lists reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) ) +with expansion: + " + Available reporters: + fake reporter: fake description + +" contains: "fake reporter" +with message: + Tested reporter: JUnit + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + JUnit reporter lists tests +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ) +with expansion: + " + All available test cases: + fake test name + [fakeTestTag] + 1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) +with message: + Tested reporter: JUnit + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + SonarQube reporter lists tags +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) ) +with expansion: + " + All available tags: + 1 [fakeTag] + 1 tag + +" contains: "fakeTag" +with message: + Tested reporter: SonarQube + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + SonarQube reporter lists reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) ) +with expansion: + " + Available reporters: + fake reporter: fake description + +" contains: "fake reporter" +with message: + Tested reporter: SonarQube + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + SonarQube reporter lists tests +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ) +with expansion: + " + All available test cases: + fake test name + [fakeTestTag] + 1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) +with message: + Tested reporter: SonarQube + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + TAP reporter lists tags +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) ) +with expansion: + "All available tags: + 1 [fakeTag] + 1 tag + +" contains: "fakeTag" +with message: + Tested reporter: TAP + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + TAP reporter lists reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) ) +with expansion: + "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" +with message: + Tested reporter: TAP + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + TAP reporter lists tests +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ) +with expansion: + "All available test cases: + fake test name + [fakeTestTag] + 1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) +with message: + Tested reporter: TAP + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + TeamCity reporter lists tags +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) ) +with expansion: + "All available tags: + 1 [fakeTag] + 1 tag + +" contains: "fakeTag" +with message: + Tested reporter: TeamCity + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + TeamCity reporter lists reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) ) +with expansion: + "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" +with message: + Tested reporter: TeamCity + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + TeamCity reporter lists tests +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ) +with expansion: + "All available test cases: + fake test name + [fakeTestTag] + 1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) +with message: + Tested reporter: TeamCity + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + XML reporter lists tags +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) ) +with expansion: + " + + + 1 + + fakeTag + + + " contains: "fakeTag" +with message: + Tested reporter: XML + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + XML reporter lists reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) ) +with expansion: + " + + + fake reporter + fake description + + " contains: "fake reporter" +with message: + Tested reporter: XML + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + XML reporter lists tests +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ) +with expansion: + " + + + fake test name + + [fakeTestTag] + + fake-file.cpp + 123456789 + + + " ( contains: "fake test name" and contains: "fakeTestTag" ) +with message: + Tested reporter: XML + +------------------------------------------------------------------------------- +Reproducer for #2309 - a very long description past 80 chars (default console +width) with a late colon : blablabla +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +SUCCEED counts as a test pass +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: PASSED: +with message: + this is a success + +------------------------------------------------------------------------------- +SUCCEED does not require an argument +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or + methods + Given: No operations precede me +------------------------------------------------------------------------------- +BDD.tests.cpp: +............................................................................... + +BDD.tests.cpp:: PASSED: + REQUIRE( before == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or + methods + Given: No operations precede me + When: We get the count + Then: Subsequently values are higher +------------------------------------------------------------------------------- +BDD.tests.cpp: +............................................................................... + +BDD.tests.cpp:: PASSED: + REQUIRE( after > before ) +with expansion: + 1 > 0 + +------------------------------------------------------------------------------- +Scenario: Do that thing with the thing + Given: This stuff exists + And given: And some assumption + When: I do this + Then: it should do this +------------------------------------------------------------------------------- +BDD.tests.cpp: +............................................................................... + +BDD.tests.cpp:: PASSED: + REQUIRE( itDoesThis() ) +with expansion: + true + +------------------------------------------------------------------------------- +Scenario: Do that thing with the thing + Given: This stuff exists + And given: And some assumption + When: I do this + Then: it should do this + And: do that +------------------------------------------------------------------------------- +BDD.tests.cpp: +............................................................................... + +BDD.tests.cpp:: PASSED: + REQUIRE( itDoesThat() ) +with expansion: + true + +------------------------------------------------------------------------------- +Scenario: This is a really long scenario name to see how the list command deals + with wrapping + Given: A section name that is so long that it cannot fit in a single + console width + When: The test headers are printed as part of the normal running of the + scenario + Then: The, deliberately very long and overly verbose (you see what I did + there?) section names must wrap, along with an indent +------------------------------------------------------------------------------- +BDD.tests.cpp: +............................................................................... + +BDD.tests.cpp:: PASSED: +with message: + boo! + +------------------------------------------------------------------------------- +Scenario: Vector resizing affects size and capacity + Given: an empty vector +------------------------------------------------------------------------------- +BDD.tests.cpp: +............................................................................... + +BDD.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Scenario: Vector resizing affects size and capacity + Given: an empty vector + When: it is made larger + Then: the size and capacity go up +------------------------------------------------------------------------------- +BDD.tests.cpp: +............................................................................... + +BDD.tests.cpp:: PASSED: + REQUIRE( v.size() == 10 ) +with expansion: + 10 == 10 + +BDD.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +Scenario: Vector resizing affects size and capacity + Given: an empty vector + When: it is made larger + Then: the size and capacity go up + And when: it is made smaller again + Then: the size goes down but the capacity stays the same +------------------------------------------------------------------------------- +BDD.tests.cpp: +............................................................................... + +BDD.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +BDD.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +Scenario: Vector resizing affects size and capacity + Given: an empty vector +------------------------------------------------------------------------------- +BDD.tests.cpp: +............................................................................... + +BDD.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Scenario: Vector resizing affects size and capacity + Given: an empty vector + When: we reserve more space + Then: The capacity is increased but the size remains the same +------------------------------------------------------------------------------- +BDD.tests.cpp: +............................................................................... + +BDD.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +BDD.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +A string sent directly to stdout +A string sent directly to stderr +A string sent to stderr via clog +------------------------------------------------------------------------------- +Sends stuff to stdout and stderr +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + + +No assertions in test case 'Sends stuff to stdout and stderr' + +------------------------------------------------------------------------------- +Some simple comparisons between doubles +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( d == Approx( 1.23 ) ) +with expansion: + 1.22999999999999998 + == + Approx( 1.22999999999999998 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d != Approx( 1.22 ) ) +with expansion: + 1.22999999999999998 + != + Approx( 1.21999999999999997 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d != Approx( 1.24 ) ) +with expansion: + 1.22999999999999998 + != + Approx( 1.23999999999999999 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d == 1.23_a ) +with expansion: + 1.22999999999999998 + == + Approx( 1.22999999999999998 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d != 1.22_a ) +with expansion: + 1.22999999999999998 + != + Approx( 1.21999999999999997 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( Approx( d ) == 1.23 ) +with expansion: + Approx( 1.22999999999999998 ) + == + 1.22999999999999998 + +Approx.tests.cpp:: PASSED: + REQUIRE( Approx( d ) != 1.22 ) +with expansion: + Approx( 1.22999999999999998 ) + != + 1.21999999999999997 + +Approx.tests.cpp:: PASSED: + REQUIRE( Approx( d ) != 1.24 ) +with expansion: + Approx( 1.22999999999999998 ) + != + 1.23999999999999999 + +Message from section one +------------------------------------------------------------------------------- +Standard output from all sections is reported + one +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + + +No assertions in section 'one' + +Message from section two +------------------------------------------------------------------------------- +Standard output from all sections is reported + two +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + + +No assertions in section 'two' + +------------------------------------------------------------------------------- +StartsWith string matcher +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), StartsWith( "This String" ) ) +with expansion: + "this string contains 'abc' as a substring" starts with: "This String" + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" starts with: "string" (case + insensitive) + +------------------------------------------------------------------------------- +Static arrays are convertible to string + Single item +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify(singular) == "{ 1 }" ) +with expansion: + "{ 1 }" == "{ 1 }" + +------------------------------------------------------------------------------- +Static arrays are convertible to string + Multiple +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify(arr) == "{ 3, 2, 1 }" ) +with expansion: + "{ 3, 2, 1 }" == "{ 3, 2, 1 }" + +------------------------------------------------------------------------------- +Static arrays are convertible to string + Non-trivial inner items +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify(arr) == R"({ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } })" ) +with expansion: + "{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }" + == + "{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }" + +------------------------------------------------------------------------------- +String matchers +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( testStringForMatching(), ContainsSubstring( "string" ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "string" + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( testStringForMatching(), ContainsSubstring( "string", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "string" (case + insensitive) + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), ContainsSubstring( "abc" ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "abc" + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), ContainsSubstring( "aBC", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "abc" (case + insensitive) + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), StartsWith( "this" ) ) +with expansion: + "this string contains 'abc' as a substring" starts with: "this" + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), StartsWith( "THIS", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" starts with: "this" (case + insensitive) + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), EndsWith( "substring" ) ) +with expansion: + "this string contains 'abc' as a substring" ends with: "substring" + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), EndsWith( " SuBsTrInG", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" ends with: " substring" (case + insensitive) + +------------------------------------------------------------------------------- +StringRef + Empty string +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( empty.empty() ) +with expansion: + true + +String.tests.cpp:: PASSED: + REQUIRE( empty.size() == 0 ) +with expansion: + 0 == 0 + +String.tests.cpp:: PASSED: + REQUIRE( std::strcmp( empty.data(), "" ) == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +StringRef + From string literal +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( s.empty() == false ) +with expansion: + false == false + +String.tests.cpp:: PASSED: + REQUIRE( s.size() == 5 ) +with expansion: + 5 == 5 + +String.tests.cpp:: PASSED: + REQUIRE( std::strcmp( rawChars, "hello" ) == 0 ) +with expansion: + 0 == 0 + +String.tests.cpp:: PASSED: + REQUIRE( s.data() == rawChars ) +with expansion: + "hello" == "hello" + +------------------------------------------------------------------------------- +StringRef + From sub-string +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( original == "original" ) + +String.tests.cpp:: PASSED: + REQUIRE_NOTHROW( original.data() ) + +------------------------------------------------------------------------------- +StringRef + Copy construction is shallow +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( original.begin() == copy.begin() ) +with expansion: + "original string" == "original string" + +------------------------------------------------------------------------------- +StringRef + Copy assignment is shallow +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( original.begin() == copy.begin() ) +with expansion: + "original string" == "original string" + +------------------------------------------------------------------------------- +StringRef + Substrings + zero-based substring +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( ss.empty() == false ) +with expansion: + false == false + +String.tests.cpp:: PASSED: + REQUIRE( ss.size() == 5 ) +with expansion: + 5 == 5 + +String.tests.cpp:: PASSED: + REQUIRE( std::strncmp( ss.data(), "hello", 5 ) == 0 ) +with expansion: + 0 == 0 + +String.tests.cpp:: PASSED: + REQUIRE( ss == "hello" ) +with expansion: + hello == "hello" + +------------------------------------------------------------------------------- +StringRef + Substrings + non-zero-based substring +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( ss.size() == 6 ) +with expansion: + 6 == 6 + +String.tests.cpp:: PASSED: + REQUIRE( std::strcmp( ss.data(), "world!" ) == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +StringRef + Substrings + Pointer values of full refs should match +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( s.data() == s2.data() ) +with expansion: + "hello world!" == "hello world!" + +------------------------------------------------------------------------------- +StringRef + Substrings + Pointer values of substring refs should also match +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( s.data() == ss.data() ) +with expansion: + "hello world!" == "hello world!" + +------------------------------------------------------------------------------- +StringRef + Substrings + Past the end substring +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( s.substr(s.size() + 1, 123).empty() ) +with expansion: + true + +------------------------------------------------------------------------------- +StringRef + Substrings + Substring off the end are trimmed +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( std::strcmp(ss.data(), "world!") == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +StringRef + Substrings + substring start after the end is empty +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( s.substr(1'000'000, 1).empty() ) +with expansion: + true + +------------------------------------------------------------------------------- +StringRef + Comparisons are deep +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + CHECK( reinterpret_cast(buffer1) != reinterpret_cast(buffer2) ) +with expansion: + "Hello" != "Hello" + +String.tests.cpp:: PASSED: + REQUIRE( left == right ) +with expansion: + Hello == Hello + +String.tests.cpp:: PASSED: + REQUIRE( left != left.substr(0, 3) ) +with expansion: + Hello != Hel + +------------------------------------------------------------------------------- +StringRef + from std::string + implicitly constructed +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( sr == "a standard string" ) +with expansion: + a standard string == "a standard string" + +String.tests.cpp:: PASSED: + REQUIRE( sr.size() == stdStr.size() ) +with expansion: + 17 == 17 + +------------------------------------------------------------------------------- +StringRef + from std::string + explicitly constructed +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( sr == "a standard string" ) +with expansion: + a standard string == "a standard string" + +String.tests.cpp:: PASSED: + REQUIRE( sr.size() == stdStr.size() ) +with expansion: + 17 == 17 + +------------------------------------------------------------------------------- +StringRef + from std::string + assigned +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( sr == "a standard string" ) +with expansion: + a standard string == "a standard string" + +String.tests.cpp:: PASSED: + REQUIRE( sr.size() == stdStr.size() ) +with expansion: + 17 == 17 + +------------------------------------------------------------------------------- +StringRef + to std::string + explicitly constructed +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( stdStr == "a stringref" ) +with expansion: + "a stringref" == "a stringref" + +String.tests.cpp:: PASSED: + REQUIRE( stdStr.size() == sr.size() ) +with expansion: + 11 == 11 + +------------------------------------------------------------------------------- +StringRef + to std::string + assigned +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( stdStr == "a stringref" ) +with expansion: + "a stringref" == "a stringref" + +String.tests.cpp:: PASSED: + REQUIRE( stdStr.size() == sr.size() ) +with expansion: + 11 == 11 + +------------------------------------------------------------------------------- +StringRef + std::string += StringRef +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( lhs == "some string += the stringref contents" ) +with expansion: + "some string += the stringref contents" + == + "some string += the stringref contents" + +------------------------------------------------------------------------------- +StringRef + StringRef + StringRef +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( together == "abrakadabra" ) +with expansion: + "abrakadabra" == "abrakadabra" + +------------------------------------------------------------------------------- +StringRef at compilation time + Simple constructors +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: +with message: + empty.size() == 0 + +String.tests.cpp:: PASSED: +with message: + empty.begin() == empty.end() + +String.tests.cpp:: PASSED: +with message: + stringref.size() == 3 + +String.tests.cpp:: PASSED: +with message: + stringref.data() == abc + +String.tests.cpp:: PASSED: +with message: + stringref.begin() == abc + +String.tests.cpp:: PASSED: +with message: + stringref.begin() != stringref.end() + +String.tests.cpp:: PASSED: +with message: + stringref.substr(10, 0).empty() + +String.tests.cpp:: PASSED: +with message: + stringref.substr(2, 1).data() == abc + 2 + +String.tests.cpp:: PASSED: +with message: + stringref[1] == 'b' + +String.tests.cpp:: PASSED: +with message: + shortened.size() == 2 + +String.tests.cpp:: PASSED: +with message: + shortened.data() == abc + +String.tests.cpp:: PASSED: +with message: + shortened.begin() != shortened.end() + +------------------------------------------------------------------------------- +StringRef at compilation time + UDL construction +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: +with message: + !(sr1.empty()) + +String.tests.cpp:: PASSED: +with message: + sr1.size() == 3 + +String.tests.cpp:: PASSED: +with message: + sr2.empty() + +String.tests.cpp:: PASSED: +with message: + sr2.size() == 0 + +------------------------------------------------------------------------------- +Stringifying char arrays with statically known sizes - char +------------------------------------------------------------------------------- +ToString.tests.cpp: +............................................................................... + +ToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s ) +with expansion: + ""abc"" == ""abc"" + +ToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s ) +with expansion: + ""abc"" == ""abc"" + +------------------------------------------------------------------------------- +Stringifying char arrays with statically known sizes - signed char +------------------------------------------------------------------------------- +ToString.tests.cpp: +............................................................................... + +ToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s ) +with expansion: + ""abc"" == ""abc"" + +ToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s ) +with expansion: + ""abc"" == ""abc"" + +------------------------------------------------------------------------------- +Stringifying char arrays with statically known sizes - unsigned char +------------------------------------------------------------------------------- +ToString.tests.cpp: +............................................................................... + +ToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s ) +with expansion: + ""abc"" == ""abc"" + +ToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s ) +with expansion: + ""abc"" == ""abc"" + +------------------------------------------------------------------------------- +Stringifying std::chrono::duration helpers +------------------------------------------------------------------------------- +ToStringChrono.tests.cpp: +............................................................................... + +ToStringChrono.tests.cpp:: PASSED: + REQUIRE( minute == seconds ) +with expansion: + 1 m == 60 s + +ToStringChrono.tests.cpp:: PASSED: + REQUIRE( hour != seconds ) +with expansion: + 1 h != 60 s + +ToStringChrono.tests.cpp:: PASSED: + REQUIRE( micro != milli ) +with expansion: + 1 us != 1 ms + +ToStringChrono.tests.cpp:: PASSED: + REQUIRE( nano != micro ) +with expansion: + 1 ns != 1 us + +------------------------------------------------------------------------------- +Stringifying std::chrono::duration with weird ratios +------------------------------------------------------------------------------- +ToStringChrono.tests.cpp: +............................................................................... + +ToStringChrono.tests.cpp:: PASSED: + REQUIRE( half_minute != femto_second ) +with expansion: + 1 [30/1]s != 1 fs + +ToStringChrono.tests.cpp:: PASSED: + REQUIRE( pico_second != atto_second ) +with expansion: + 1 ps != 1 as + +------------------------------------------------------------------------------- +Stringifying std::chrono::time_point +------------------------------------------------------------------------------- +ToStringChrono.tests.cpp: +............................................................................... + +ToStringChrono.tests.cpp:: PASSED: + REQUIRE( now != later ) +with expansion: + {iso8601-timestamp} + != + {iso8601-timestamp} + +------------------------------------------------------------------------------- +Tabs and newlines show in output +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + CHECK( s1 == s2 ) +with expansion: + "if ($b == 10) { + $a = 20; + }" + == + "if ($b == 10) { + $a = 20; + } + " + +------------------------------------------------------------------------------- +Tag alias can be registered against tag patterns + The same tag alias can only be registered once +------------------------------------------------------------------------------- +Tag.tests.cpp: +............................................................................... + +Tag.tests.cpp:: PASSED: + CHECK_THAT( what, ContainsSubstring( "[@zzz]" ) ) +with expansion: + "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "[@zzz]" + +Tag.tests.cpp:: PASSED: + CHECK_THAT( what, ContainsSubstring( "file" ) ) +with expansion: + "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "file" + +Tag.tests.cpp:: PASSED: + CHECK_THAT( what, ContainsSubstring( "2" ) ) +with expansion: + "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "2" + +Tag.tests.cpp:: PASSED: + CHECK_THAT( what, ContainsSubstring( "10" ) ) +with expansion: + "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "10" + +------------------------------------------------------------------------------- +Tag alias can be registered against tag patterns + Tag aliases must be of the form [@name] +------------------------------------------------------------------------------- +Tag.tests.cpp: +............................................................................... + +Tag.tests.cpp:: PASSED: + CHECK_THROWS( registry.add( "[no ampersat]", "", Catch::SourceLineInfo( "file", 3 ) ) ) + +Tag.tests.cpp:: PASSED: + CHECK_THROWS( registry.add( "[the @ is not at the start]", "", Catch::SourceLineInfo( "file", 3 ) ) ) + +Tag.tests.cpp:: PASSED: + CHECK_THROWS( registry.add( "@no square bracket at start]", "", Catch::SourceLineInfo( "file", 3 ) ) ) + +Tag.tests.cpp:: PASSED: + CHECK_THROWS( registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) ) ) + +------------------------------------------------------------------------------- +Tags with spaces and non-alphanumerical characters are accepted +------------------------------------------------------------------------------- +Tag.tests.cpp: +............................................................................... + +Tag.tests.cpp:: PASSED: + REQUIRE( testCase.tags.size() == 2 ) +with expansion: + 2 == 2 + +Tag.tests.cpp:: PASSED: + REQUIRE_THAT( testCase.tags, VectorContains( Tag( "tag with spaces" ) ) && VectorContains( Tag( "I said \"good day\" sir!"_catch_sr ) ) ) +with expansion: + { {?}, {?} } ( Contains: {?} and Contains: {?} ) + +------------------------------------------------------------------------------- +Template test case method with test types specified inside std::tuple - MyTypes +- 0 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture::m_a == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Template test case method with test types specified inside std::tuple - MyTypes +- 1 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture::m_a == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Template test case method with test types specified inside std::tuple - MyTypes +- 2 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture::m_a == 1 ) +with expansion: + 1.0 == 1 + +------------------------------------------------------------------------------- +Template test case with test types specified inside non-copyable and non- +movable std::tuple - NonCopyableAndNonMovableTypes - 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( std::is_default_constructible::value ) +with expansion: + true + +------------------------------------------------------------------------------- +Template test case with test types specified inside non-copyable and non- +movable std::tuple - NonCopyableAndNonMovableTypes - 1 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( std::is_default_constructible::value ) +with expansion: + true + +------------------------------------------------------------------------------- +Template test case with test types specified inside non-default-constructible +std::tuple - MyNonDefaultConstructibleTypes - 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( std::is_trivially_copyable::value ) +with expansion: + true + +------------------------------------------------------------------------------- +Template test case with test types specified inside non-default-constructible +std::tuple - MyNonDefaultConstructibleTypes - 1 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( std::is_trivially_copyable::value ) +with expansion: + true + +------------------------------------------------------------------------------- +Template test case with test types specified inside std::tuple - MyTypes - 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( std::is_arithmetic::value ) +with expansion: + true + +------------------------------------------------------------------------------- +Template test case with test types specified inside std::tuple - MyTypes - 1 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( std::is_arithmetic::value ) +with expansion: + true + +------------------------------------------------------------------------------- +Template test case with test types specified inside std::tuple - MyTypes - 2 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( std::is_arithmetic::value ) +with expansion: + true + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - float +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - float + resizing bigger changes size and capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 10 ) +with expansion: + 10 == 10 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - float +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - float + resizing smaller changes size but not capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - float + resizing smaller changes size but not capacity + We can use the 'swap trick' to reset the capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - float +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - float + reserving bigger changes capacity but not size +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - float +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - float + reserving smaller does not change size or capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - int +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - int + resizing bigger changes size and capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 10 ) +with expansion: + 10 == 10 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - int +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - int + resizing smaller changes size but not capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - int + resizing smaller changes size but not capacity + We can use the 'swap trick' to reset the capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - int +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - int + reserving bigger changes capacity but not size +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - int +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - int + reserving smaller does not change size or capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::string +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::string + resizing bigger changes size and capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 10 ) +with expansion: + 10 == 10 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::string +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::string + resizing smaller changes size but not capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::string + resizing smaller changes size but not capacity + We can use the 'swap trick' to reset the capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::string +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::string + reserving bigger changes capacity but not size +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::string +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::string + reserving smaller does not change size or capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::tuple +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::tuple + resizing bigger changes size and capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 10 ) +with expansion: + 10 == 10 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::tuple +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::tuple + resizing smaller changes size but not capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::tuple + resizing smaller changes size but not capacity + We can use the 'swap trick' to reset the capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::tuple +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::tuple + reserving bigger changes capacity but not size +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::tuple +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::tuple + reserving smaller does not change size or capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 6 == 6 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 6 >= 6 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 + resizing bigger changes size and capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 2 * V ) +with expansion: + 12 == 12 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 2 * V ) +with expansion: + 12 >= 12 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 6 == 6 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 6 >= 6 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 + resizing smaller changes size but not capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 6 >= 6 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 + resizing smaller changes size but not capacity + We can use the 'swap trick' to reset the capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 6 == 6 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 6 >= 6 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 + reserving bigger changes capacity but not size +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 6 == 6 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 2 * V ) +with expansion: + 12 >= 12 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 6 == 6 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 6 >= 6 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 + reserving smaller does not change size or capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 6 == 6 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 6 >= 6 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - float,4 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 4 == 4 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 4 >= 4 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - float,4 + resizing bigger changes size and capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 2 * V ) +with expansion: + 8 == 8 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 2 * V ) +with expansion: + 8 >= 8 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - float,4 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 4 == 4 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 4 >= 4 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - float,4 + resizing smaller changes size but not capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 4 >= 4 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - float,4 + resizing smaller changes size but not capacity + We can use the 'swap trick' to reset the capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - float,4 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 4 == 4 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 4 >= 4 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - float,4 + reserving bigger changes capacity but not size +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 4 == 4 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 2 * V ) +with expansion: + 8 >= 8 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - float,4 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 4 == 4 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 4 >= 4 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - float,4 + reserving smaller does not change size or capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 4 == 4 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 4 >= 4 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - int,5 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - int,5 + resizing bigger changes size and capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 2 * V ) +with expansion: + 10 == 10 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 2 * V ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - int,5 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - int,5 + resizing smaller changes size but not capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - int,5 + resizing smaller changes size but not capacity + We can use the 'swap trick' to reset the capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - int,5 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - int,5 + reserving bigger changes capacity but not size +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 2 * V ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - int,5 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - int,5 + reserving smaller does not change size or capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - std::string,15 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 15 == 15 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 15 >= 15 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - std::string,15 + resizing bigger changes size and capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 2 * V ) +with expansion: + 30 == 30 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 2 * V ) +with expansion: + 30 >= 30 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - std::string,15 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 15 == 15 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 15 >= 15 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - std::string,15 + resizing smaller changes size but not capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 15 >= 15 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - std::string,15 + resizing smaller changes size but not capacity + We can use the 'swap trick' to reset the capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - std::string,15 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 15 == 15 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 15 >= 15 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - std::string,15 + reserving bigger changes capacity but not size +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 15 == 15 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 2 * V ) +with expansion: + 30 >= 30 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - std::string,15 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 15 == 15 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 15 >= 15 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - std::string,15 + reserving smaller does not change size or capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 15 == 15 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 15 >= 15 + +------------------------------------------------------------------------------- +Test case with identical tags keeps just one +------------------------------------------------------------------------------- +Tag.tests.cpp: +............................................................................... + +Tag.tests.cpp:: PASSED: + REQUIRE( testCase.tags.size() == 1 ) +with expansion: + 1 == 1 + +Tag.tests.cpp:: PASSED: + REQUIRE( testCase.tags[0] == Tag( "tag1" ) ) +with expansion: + {?} == {?} + +------------------------------------------------------------------------------- +Test case with one argument +------------------------------------------------------------------------------- +VariadicMacros.tests.cpp: +............................................................................... + +VariadicMacros.tests.cpp:: PASSED: +with message: + no assertions + +------------------------------------------------------------------------------- +Test enum bit values +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( 0x == bit30and31 ) +with expansion: + 3221225472 (0x) == 3221225472 + +------------------------------------------------------------------------------- +Test with special, characters "in name +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +Testing checked-if +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECKED_IF( true ) + +Misc.tests.cpp:: PASSED: + +Misc.tests.cpp:: FAILED - but was ok: + CHECKED_IF( false ) + +Misc.tests.cpp:: PASSED: + CHECKED_ELSE( true ) + +Misc.tests.cpp:: FAILED - but was ok: + CHECKED_ELSE( false ) + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +Testing checked-if 2 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECKED_IF( true ) + +Misc.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +Testing checked-if 3 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED - but was ok: + CHECKED_ELSE( false ) + +Misc.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +Testing checked-if 4 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECKED_ELSE( true ) + +Misc.tests.cpp:: FAILED: + {Unknown expression after the reported line} +due to unexpected exception with message: + Uncaught exception should fail! + +------------------------------------------------------------------------------- +Testing checked-if 5 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED - but was ok: + CHECKED_ELSE( false ) + +Misc.tests.cpp:: FAILED: + {Unknown expression after the reported line} +due to unexpected exception with message: + Uncaught exception should fail! + +------------------------------------------------------------------------------- +The NO_FAIL macro reports a failure but does not fail the test +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED - but was ok: + CHECK_NOFAIL( 1 == 2 ) + + +No assertions in test case 'The NO_FAIL macro reports a failure but does not fail the test' + +------------------------------------------------------------------------------- +The default listing implementation write to provided stream + Listing tags +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("[fakeTag]"s) ) +with expansion: + "All available tags: + 1 [fakeTag] + 1 tag + +" contains: "[fakeTag]" + +------------------------------------------------------------------------------- +The default listing implementation write to provided stream + Listing reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake reporter"s ) && ContainsSubstring( "fake description"s ) ) +with expansion: + "Available reporters: + fake reporter: fake description + +" ( contains: "fake reporter" and contains: "fake description" ) + +------------------------------------------------------------------------------- +The default listing implementation write to provided stream + Listing tests +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ) +with expansion: + "All available test cases: + fake test name + [fakeTestTag] + 1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) + +------------------------------------------------------------------------------- +The default listing implementation write to provided stream + Listing listeners +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fakeListener"s ) && ContainsSubstring( "fake description"s ) ) +with expansion: + "Registered listeners: + fakeListener: fake description + +" ( contains: "fakeListener" and contains: "fake description" ) + +------------------------------------------------------------------------------- +This test 'should' fail but doesn't +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + oops! + +------------------------------------------------------------------------------- +Thrown string literals are translated +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with message: + For some reason someone is throwing a string literal! + +------------------------------------------------------------------------------- +Tracker +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isOpen() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker + successfully close one section +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isSuccessfullyCompleted() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isComplete() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( ctx.completedCycle() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isSuccessfullyCompleted() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isOpen() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker + fail one section +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isComplete() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isSuccessfullyCompleted() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isComplete() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( ctx.completedCycle() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isSuccessfullyCompleted() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + fail one section + re-enter after failed section +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase2.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1b.isOpen() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( ctx.completedCycle() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isComplete() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isSuccessfullyCompleted() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isOpen() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker + fail one section +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isComplete() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isSuccessfullyCompleted() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isComplete() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( ctx.completedCycle() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isSuccessfullyCompleted() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + fail one section + re-enter after failed section and find next section +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase2.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1b.isOpen() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s2.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( ctx.completedCycle() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isComplete() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isSuccessfullyCompleted() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isOpen() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker + successfully close one section, then find another +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s2.isOpen() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isComplete() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + successfully close one section, then find another + Re-enter - skips S1 and enters S2 +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase2.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1b.isOpen() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s2b.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( ctx.completedCycle() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + successfully close one section, then find another + Re-enter - skips S1 and enters S2 + Successfully close S2 +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( ctx.completedCycle() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s2b.isSuccessfullyCompleted() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase2.isComplete() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase2.isSuccessfullyCompleted() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isOpen() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker + successfully close one section, then find another +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s2.isOpen() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isComplete() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + successfully close one section, then find another + Re-enter - skips S1 and enters S2 +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase2.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1b.isOpen() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s2b.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( ctx.completedCycle() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + successfully close one section, then find another + Re-enter - skips S1 and enters S2 + fail S2 +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( ctx.completedCycle() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s2b.isComplete() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s2b.isSuccessfullyCompleted() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase2.isSuccessfullyCompleted() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase3.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1c.isOpen() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s2c.isOpen() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase3.isSuccessfullyCompleted() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isOpen() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker + open a nested section +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s2.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s2.isComplete() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isComplete() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isComplete() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isComplete() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isComplete() ) +with expansion: + true + +------------------------------------------------------------------------------- +Trim strings +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + REQUIRE( trim(std::string(no_whitespace)) == no_whitespace ) +with expansion: + "There is no extra whitespace here" + == + "There is no extra whitespace here" + +StringManip.tests.cpp:: PASSED: + REQUIRE( trim(std::string(leading_whitespace)) == no_whitespace ) +with expansion: + "There is no extra whitespace here" + == + "There is no extra whitespace here" + +StringManip.tests.cpp:: PASSED: + REQUIRE( trim(std::string(trailing_whitespace)) == no_whitespace ) +with expansion: + "There is no extra whitespace here" + == + "There is no extra whitespace here" + +StringManip.tests.cpp:: PASSED: + REQUIRE( trim(std::string(whitespace_at_both_ends)) == no_whitespace ) +with expansion: + "There is no extra whitespace here" + == + "There is no extra whitespace here" + +StringManip.tests.cpp:: PASSED: + REQUIRE( trim(StringRef(no_whitespace)) == StringRef(no_whitespace) ) +with expansion: + There is no extra whitespace here + == + There is no extra whitespace here + +StringManip.tests.cpp:: PASSED: + REQUIRE( trim(StringRef(leading_whitespace)) == StringRef(no_whitespace) ) +with expansion: + There is no extra whitespace here + == + There is no extra whitespace here + +StringManip.tests.cpp:: PASSED: + REQUIRE( trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace) ) +with expansion: + There is no extra whitespace here + == + There is no extra whitespace here + +StringManip.tests.cpp:: PASSED: + REQUIRE( trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace) ) +with expansion: + There is no extra whitespace here + == + There is no extra whitespace here + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Container conversions + Two equal containers of different container types +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_int_a, RangeEquals( c_array ) ) +with expansion: + { 1, 2, 3 } elements are { 1, 2, 3 } + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_int_a, UnorderedRangeEquals( c_array ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Container conversions + Two equal containers of different container types (differ in array N) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_int_3, !RangeEquals( array_int_4 ) ) +with expansion: + { 1, 2, 3 } not elements are { 1, 2, 3, 4 } + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_int_3, !UnorderedRangeEquals( array_int_4 ) ) +with expansion: + { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Container conversions + Two equal containers of different container types and value types +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_int_a, RangeEquals( vector_char_a ) ) +with expansion: + { 1, 2, 3 } elements are { 1, 2, 3 } + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_int_a, UnorderedRangeEquals( vector_char_a ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Container conversions + Two equal containers, one random access, one not +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: +with message: + ContainerIsRandomAccess( array_int_a ) != ContainerIsRandomAccess( + list_char_a ) + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_int_a, RangeEquals( list_char_a ) ) +with expansion: + { 1, 2, 3 } elements are { 1, 2, 3 } + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_int_a, UnorderedRangeEquals( list_char_a ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Value type + Two equal containers of different value types +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_int_a, RangeEquals( vector_char_a ) ) +with expansion: + { 1, 2, 3 } elements are { 1, 2, 3 } + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_int_a, UnorderedRangeEquals( vector_char_a ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Value type + Two non-equal containers of different value types +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_int_a, !RangeEquals( vector_char_b ) ) +with expansion: + { 1, 2, 3 } not elements are { 1, 2, 2 } + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_int_a, !UnorderedRangeEquals( vector_char_b ) ) +with expansion: + { 1, 2, 3 } not unordered elements are { 1, 2, 2 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Ranges with begin that needs ADL +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( a, !RangeEquals( b ) ) +with expansion: + { 1, 2, 3 } not elements are { 3, 2, 1 } + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( a, UnorderedRangeEquals( b ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 3, 2, 1 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Custom predicate + Two equal non-empty containers (close enough) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_a, RangeEquals( array_a_plus_1, close_enough ) ) +with expansion: + { 1, 2, 3 } elements are { 2, 3, 4 } + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_a, UnorderedRangeEquals( array_a_plus_1, close_enough ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 2, 3, 4 } + +------------------------------------------------------------------------------- +Unexpected exceptions can be translated +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with message: + 3.14000000000000012 + +------------------------------------------------------------------------------- +Upcasting special member functions + Move constructor +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( bptr->i == 3 ) +with expansion: + 3 == 3 + +------------------------------------------------------------------------------- +Upcasting special member functions + move assignment +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( bptr->i == 3 ) +with expansion: + 3 == 3 + +------------------------------------------------------------------------------- +Usage of AllMatch range matcher + Basic usage +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, AllMatch(SizeIs(5)) ) +with expansion: + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 + }, { 1, 0, 0, -1, 5 } } all match has size == 5 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !AllMatch(Contains(0) && Contains(1)) ) +with expansion: + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 + }, { 1, 0, 0, -1, 5 } } not all match ( contains element 0 and contains + element 1 ) + +------------------------------------------------------------------------------- +Usage of AllMatch range matcher + Type requires ADL found begin and end +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( needs_adl, AllMatch( Predicate( []( int elem ) { return elem < 6; } ) ) ) +with expansion: + { 1, 2, 3, 4, 5 } all match matches undescribed predicate + +------------------------------------------------------------------------------- +Usage of AllMatch range matcher + Shortcircuiting + All are read +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, allMatch ) +with expansion: + { 1, 2, 3, 4, 5 } all match matches undescribed predicate + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[3] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[4] ) +with expansion: + true + +------------------------------------------------------------------------------- +Usage of AllMatch range matcher + Shortcircuiting + Short-circuited +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, !allMatch ) +with expansion: + { 1, 2, 3, 4, 5 } not all match matches undescribed predicate + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[3] ) +with expansion: + !false + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[4] ) +with expansion: + !false + +------------------------------------------------------------------------------- +Usage of AllTrue range matcher + Basic usage + All true evaluates to true +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, AllTrue() ) +with expansion: + { true, true, true, true, true } contains only true + +------------------------------------------------------------------------------- +Usage of AllTrue range matcher + Basic usage + Empty evaluates to true +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, AllTrue() ) +with expansion: + { } contains only true + +------------------------------------------------------------------------------- +Usage of AllTrue range matcher + Basic usage + One false evaluates to false +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !AllTrue() ) +with expansion: + { true, true, false, true, true } not contains only true + +------------------------------------------------------------------------------- +Usage of AllTrue range matcher + Basic usage + All false evaluates to false +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !AllTrue() ) +with expansion: + { false, false, false, false, false } not contains only true + +------------------------------------------------------------------------------- +Usage of AllTrue range matcher + Contained type is convertible to bool + All true evaluates to true +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, AllTrue() ) +with expansion: + { true, true, true, true, true } contains only true + +------------------------------------------------------------------------------- +Usage of AllTrue range matcher + Contained type is convertible to bool + One false evaluates to false +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !AllTrue() ) +with expansion: + { true, true, false, true, true } not contains only true + +------------------------------------------------------------------------------- +Usage of AllTrue range matcher + Contained type is convertible to bool + All false evaluates to false +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !AllTrue() ) +with expansion: + { false, false, false, false, false } not contains only true + +------------------------------------------------------------------------------- +Usage of AllTrue range matcher + Shortcircuiting + All are read +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, AllTrue() ) +with expansion: + { true, true, true, true, true } contains only true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[3] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[4] ) +with expansion: + true + +------------------------------------------------------------------------------- +Usage of AllTrue range matcher + Shortcircuiting + Short-circuited +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, !AllTrue() ) +with expansion: + { true, true, false, true, true } not contains only true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[3] ) +with expansion: + !false + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[4] ) +with expansion: + !false + +------------------------------------------------------------------------------- +Usage of AnyMatch range matcher + Basic usage +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, AnyMatch(SizeIs(5)) ) +with expansion: + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 + }, { 1, 0, 0, -1, 5 } } any match has size == 5 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !AnyMatch(Contains(0) && Contains(10)) ) +with expansion: + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 + }, { 1, 0, 0, -1, 5 } } not any match ( contains element 0 and contains + element 10 ) + +------------------------------------------------------------------------------- +Usage of AnyMatch range matcher + Type requires ADL found begin and end +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( needs_adl, AnyMatch( Predicate( []( int elem ) { return elem < 3; } ) ) ) +with expansion: + { 1, 2, 3, 4, 5 } any match matches undescribed predicate + +------------------------------------------------------------------------------- +Usage of AnyMatch range matcher + Shortcircuiting + All are read +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, !anyMatch ) +with expansion: + { 1, 2, 3, 4, 5 } not any match matches undescribed predicate + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[3] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[4] ) +with expansion: + true + +------------------------------------------------------------------------------- +Usage of AnyMatch range matcher + Shortcircuiting + Short-circuited +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, anyMatch ) +with expansion: + { 1, 2, 3, 4, 5 } any match matches undescribed predicate + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[1] ) +with expansion: + !false + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[2] ) +with expansion: + !false + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[3] ) +with expansion: + !false + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[4] ) +with expansion: + !false + +------------------------------------------------------------------------------- +Usage of AnyTrue range matcher + Basic usage + All true evaluates to true +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, AnyTrue() ) +with expansion: + { true, true, true, true, true } contains at least one true + +------------------------------------------------------------------------------- +Usage of AnyTrue range matcher + Basic usage + Empty evaluates to false +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !AnyTrue() ) +with expansion: + { } not contains at least one true + +------------------------------------------------------------------------------- +Usage of AnyTrue range matcher + Basic usage + One true evaluates to true +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, AnyTrue() ) +with expansion: + { false, false, true, false, false } contains at least one true + +------------------------------------------------------------------------------- +Usage of AnyTrue range matcher + Basic usage + All false evaluates to false +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !AnyTrue() ) +with expansion: + { false, false, false, false, false } not contains at least one true + +------------------------------------------------------------------------------- +Usage of AnyTrue range matcher + Contained type is convertible to bool + All true evaluates to true +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, AnyTrue() ) +with expansion: + { true, true, true, true, true } contains at least one true + +------------------------------------------------------------------------------- +Usage of AnyTrue range matcher + Contained type is convertible to bool + One true evaluates to true +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, AnyTrue() ) +with expansion: + { false, false, true, false, false } contains at least one true + +------------------------------------------------------------------------------- +Usage of AnyTrue range matcher + Contained type is convertible to bool + All false evaluates to false +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !AnyTrue() ) +with expansion: + { false, false, false, false, false } not contains at least one true + +------------------------------------------------------------------------------- +Usage of AnyTrue range matcher + Shortcircuiting + All are read +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, AnyTrue() ) +with expansion: + { false, false, false, false, true } contains at least one true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[3] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[4] ) +with expansion: + true + +------------------------------------------------------------------------------- +Usage of AnyTrue range matcher + Shortcircuiting + Short-circuited +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, AnyTrue() ) +with expansion: + { false, false, true, true, true } contains at least one true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[3] ) +with expansion: + !false + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[4] ) +with expansion: + !false + +------------------------------------------------------------------------------- +Usage of NoneMatch range matcher + Basic usage +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, NoneMatch(SizeIs(6)) ) +with expansion: + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 + }, { 1, 0, 0, -1, 5 } } none match has size == 6 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !NoneMatch(Contains(0) && Contains(1)) ) +with expansion: + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 + }, { 1, 0, 0, -1, 5 } } not none match ( contains element 0 and contains + element 1 ) + +------------------------------------------------------------------------------- +Usage of NoneMatch range matcher + Type requires ADL found begin and end +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( needs_adl, NoneMatch( Predicate( []( int elem ) { return elem > 6; } ) ) ) +with expansion: + { 1, 2, 3, 4, 5 } none match matches undescribed predicate + +------------------------------------------------------------------------------- +Usage of NoneMatch range matcher + Shortcircuiting + All are read +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, noneMatch ) +with expansion: + { 1, 2, 3, 4, 5 } none match matches undescribed predicate + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[3] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[4] ) +with expansion: + true + +------------------------------------------------------------------------------- +Usage of NoneMatch range matcher + Shortcircuiting + Short-circuited +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, !noneMatch ) +with expansion: + { 1, 2, 3, 4, 5 } not none match matches undescribed predicate + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[1] ) +with expansion: + !false + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[2] ) +with expansion: + !false + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[3] ) +with expansion: + !false + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[4] ) +with expansion: + !false + +------------------------------------------------------------------------------- +Usage of NoneTrue range matcher + Basic usage + All true evaluates to false +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !NoneTrue() ) +with expansion: + { true, true, true, true, true } not contains no true + +------------------------------------------------------------------------------- +Usage of NoneTrue range matcher + Basic usage + Empty evaluates to true +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, NoneTrue() ) +with expansion: + { } contains no true + +------------------------------------------------------------------------------- +Usage of NoneTrue range matcher + Basic usage + One true evaluates to false +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !NoneTrue() ) +with expansion: + { false, false, true, false, false } not contains no true + +------------------------------------------------------------------------------- +Usage of NoneTrue range matcher + Basic usage + All false evaluates to true +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, NoneTrue() ) +with expansion: + { false, false, false, false, false } contains no true + +------------------------------------------------------------------------------- +Usage of NoneTrue range matcher + Contained type is convertible to bool + All true evaluates to false +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !NoneTrue() ) +with expansion: + { true, true, true, true, true } not contains no true + +------------------------------------------------------------------------------- +Usage of NoneTrue range matcher + Contained type is convertible to bool + One true evaluates to false +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !NoneTrue() ) +with expansion: + { false, false, true, false, false } not contains no true + +------------------------------------------------------------------------------- +Usage of NoneTrue range matcher + Contained type is convertible to bool + All false evaluates to true +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, NoneTrue() ) +with expansion: + { false, false, false, false, false } contains no true + +------------------------------------------------------------------------------- +Usage of NoneTrue range matcher + Shortcircuiting + All are read +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, NoneTrue() ) +with expansion: + { false, false, false, false, false } contains no true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[3] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[4] ) +with expansion: + true + +------------------------------------------------------------------------------- +Usage of NoneTrue range matcher + Shortcircuiting + Short-circuited +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, !NoneTrue() ) +with expansion: + { false, false, true, true, true } not contains no true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[3] ) +with expansion: + !false + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[4] ) +with expansion: + !false + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Empty container matches empty container +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( empty_vector, RangeEquals( empty_vector ) ) +with expansion: + { } elements are { } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Empty container does not match non-empty container +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( empty_vector, !RangeEquals( non_empty_vector ) ) +with expansion: + { } not elements are { 1 } + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( non_empty_vector, !RangeEquals( empty_vector ) ) +with expansion: + { 1 } not elements are { } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Two equal 1-length non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( non_empty_array, RangeEquals( non_empty_array ) ) +with expansion: + { 1 } elements are { 1 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Two equal-sized, equal, non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_a, RangeEquals( array_a ) ) +with expansion: + { 1, 2, 3 } elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Two equal-sized, non-equal, non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_a, !RangeEquals( array_b ) ) +with expansion: + { 1, 2, 3 } not elements are { 2, 2, 3 } + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_a, !RangeEquals( array_c ) ) +with expansion: + { 1, 2, 3 } not elements are { 1, 2, 2 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Two non-equal-sized, non-empty containers (with same first elements) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_a, !RangeEquals( vector_b ) ) +with expansion: + { 1, 2, 3 } not elements are { 1, 2, 3, 4 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Custom predicate + Two equal non-empty containers (close enough) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_a, RangeEquals( vector_a_plus_1, close_enough ) ) +with expansion: + { 1, 2, 3 } elements are { 2, 3, 4 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Custom predicate + Two non-equal non-empty containers (close enough) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_a, !RangeEquals( vector_b, close_enough ) ) +with expansion: + { 1, 2, 3 } not elements are { 3, 3, 4 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Ranges that need ADL begin/end +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( needs_adl1, RangeEquals( needs_adl2 ) ) +with expansion: + { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 } + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } ) ) +with expansion: + { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Compare against std::initializer_list +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( array_a, RangeEquals( { 1, 2, 3 } ) ) +with expansion: + { 1, 2, 3 } elements are { 1, 2, 3 } + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( array_a, RangeEquals( { 2, 4, 6 }, []( int l, int r ) { return l * 2 == r; } ) ) +with expansion: + { 1, 2, 3 } elements are { 2, 4, 6 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Check short-circuiting behaviour + Check short-circuits on failure +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked1, !RangeEquals( arr ) ) +with expansion: + { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 } + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked1.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked1.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked1.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked1.m_derefed[3] ) +with expansion: + !false + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Check short-circuiting behaviour + All elements are checked on success +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked1, RangeEquals( arr ) ) +with expansion: + { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 } + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked1.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked1.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked1.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked1.m_derefed[3] ) +with expansion: + true + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Empty container matches empty container +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( empty_vector, UnorderedRangeEquals( empty_vector ) ) +with expansion: + { } unordered elements are { } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Empty container does not match non-empty container +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( empty_vector, !UnorderedRangeEquals( non_empty_vector ) ) +with expansion: + { } not unordered elements are { 1 } + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( non_empty_vector, !UnorderedRangeEquals( empty_vector ) ) +with expansion: + { 1 } not unordered elements are { } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Two equal 1-length non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( non_empty_array, UnorderedRangeEquals( non_empty_array ) ) +with expansion: + { 1 } unordered elements are { 1 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Two equal-sized, equal, non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_a, UnorderedRangeEquals( array_a ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Two equal-sized, non-equal, non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_a, !UnorderedRangeEquals( array_b ) ) +with expansion: + { 1, 2, 3 } not unordered elements are { 2, 2, 3 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Two non-equal-sized, non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_a, !UnorderedRangeEquals( vector_b ) ) +with expansion: + { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Custom predicate + Two equal non-empty containers (close enough) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_a, UnorderedRangeEquals( vector_a_plus_1, close_enough ) ) +with expansion: + { 1, 10, 20 } unordered elements are { 11, 21, 2 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Custom predicate + Two non-equal non-empty containers (close enough) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_a, !UnorderedRangeEquals( vector_b, close_enough ) ) +with expansion: + { 1, 10, 21 } not unordered elements are { 11, 21, 3 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Ranges that need ADL begin/end +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( needs_adl1, UnorderedRangeEquals( needs_adl2 ) ) +with expansion: + { 1, 2, 3, 4, 5 } unordered elements are { 1, 2, 3, 4, 5 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Compare against std::initializer_list +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( array_a, UnorderedRangeEquals( { 10, 20, 1 } ) ) +with expansion: + { 1, 10, 20 } unordered elements are { 10, 20, 1 } + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( array_a, UnorderedRangeEquals( { 11, 21, 2 }, []( int l, int r ) { return std::abs( l - r ) <= 1; } ) ) +with expansion: + { 1, 10, 20 } unordered elements are { 11, 21, 2 } + +------------------------------------------------------------------------------- +Usage of the SizeIs range matcher + Some with stdlib containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( empty_vec, SizeIs(0) ) +with expansion: + { } has size == 0 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( empty_vec, !SizeIs(2) ) +with expansion: + { } not has size == 2 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( empty_vec, SizeIs(Lt(2)) ) +with expansion: + { } size matches is less than 2 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( arr, SizeIs(2) ) +with expansion: + { 0, 0 } has size == 2 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( arr, SizeIs( Lt(3)) ) +with expansion: + { 0, 0 } size matches is less than 3 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( arr, !SizeIs(!Lt(3)) ) +with expansion: + { 0, 0 } not size matches not is less than 3 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( map, SizeIs(3) ) +with expansion: + { {?}, {?}, {?} } has size == 3 + +------------------------------------------------------------------------------- +Usage of the SizeIs range matcher + Type requires ADL found size free function +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( unrelated::ADL_size{}, SizeIs(12) ) +with expansion: + {?} has size == 12 + +------------------------------------------------------------------------------- +Usage of the SizeIs range matcher + Type has size member +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( has_size{}, SizeIs(13) ) +with expansion: + {?} has size == 13 + +------------------------------------------------------------------------------- +Use a custom approx +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( d == approx( 1.23 ) ) +with expansion: + 1.22999999999999998 + == + Approx( 1.22999999999999998 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d == approx( 1.22 ) ) +with expansion: + 1.22999999999999998 + == + Approx( 1.21999999999999997 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d == approx( 1.24 ) ) +with expansion: + 1.22999999999999998 + == + Approx( 1.23999999999999999 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d != approx( 1.25 ) ) +with expansion: + 1.22999999999999998 != Approx( 1.25 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( approx( d ) == 1.23 ) +with expansion: + Approx( 1.22999999999999998 ) + == + 1.22999999999999998 + +Approx.tests.cpp:: PASSED: + REQUIRE( approx( d ) == 1.22 ) +with expansion: + Approx( 1.22999999999999998 ) + == + 1.21999999999999997 + +Approx.tests.cpp:: PASSED: + REQUIRE( approx( d ) == 1.24 ) +with expansion: + Approx( 1.22999999999999998 ) + == + 1.23999999999999999 + +Approx.tests.cpp:: PASSED: + REQUIRE( approx( d ) != 1.25 ) +with expansion: + Approx( 1.22999999999999998 ) != 1.25 + +------------------------------------------------------------------------------- +Variadic macros + Section with one argument +------------------------------------------------------------------------------- +VariadicMacros.tests.cpp: +............................................................................... + +VariadicMacros.tests.cpp:: PASSED: +with message: + no assertions + +------------------------------------------------------------------------------- +Vector Approx matcher + Empty vector is roughly equal to an empty vector +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( empty, Approx( empty ) ) +with expansion: + { } is approx: { } + +------------------------------------------------------------------------------- +Vector Approx matcher + Vectors with elements + A vector is approx equal to itself +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( v1, Approx( v1 ) ) +with expansion: + { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( v1, Approx( { 1., 2., 3. } ) ) +with expansion: + { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } + +------------------------------------------------------------------------------- +Vector Approx matcher + Vectors with elements + Different length +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( v1, !Approx( temp ) ) +with expansion: + { 1.0, 2.0, 3.0 } not is approx: { 1.0, 2.0, 3.0, 4.0 } + +------------------------------------------------------------------------------- +Vector Approx matcher + Vectors with elements + Same length, different elements +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( v1, !Approx( v2 ) ) +with expansion: + { 1.0, 2.0, 3.0 } not is approx: { 1.5, 2.5, 3.5 } + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( v1, Approx( v2 ).margin( 0.5 ) ) +with expansion: + { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( v1, Approx( v2 ).epsilon( 0.5 ) ) +with expansion: + { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( v1, Approx( v2 ).epsilon( 0.1 ).scale( 500 ) ) +with expansion: + { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } + +------------------------------------------------------------------------------- +Vector Approx matcher -- failing + Empty and non empty vectors are not approx equal +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( empty, Approx( t1 ) ) +with expansion: + { } is approx: { 1.0, 2.0 } + +------------------------------------------------------------------------------- +Vector Approx matcher -- failing + Just different vectors +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( v1, Approx( v2 ) ) +with expansion: + { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 } + +------------------------------------------------------------------------------- +Vector matchers + Contains (element) +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, VectorContains( 1 ) ) +with expansion: + { 1, 2, 3 } Contains: 1 + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, VectorContains( 2 ) ) +with expansion: + { 1, 2, 3 } Contains: 2 + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v5, ( VectorContains>( 2 ) ) ) +with expansion: + { 1, 2, 3 } Contains: 2 + +------------------------------------------------------------------------------- +Vector matchers + Contains (vector) +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, Contains( v2 ) ) +with expansion: + { 1, 2, 3 } Contains: { 1, 2 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, Contains( { 1, 2 } ) ) +with expansion: + { 1, 2, 3 } Contains: { 1, 2 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v5, ( Contains, CustomAllocator>( v2 ) ) ) +with expansion: + { 1, 2, 3 } Contains: { 1, 2 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, Contains( v2 ) ) +with expansion: + { 1, 2, 3 } Contains: { 1, 2, 3 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, Contains( empty ) ) +with expansion: + { 1, 2, 3 } Contains: { } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( empty, Contains( empty ) ) +with expansion: + { } Contains: { } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v5, ( Contains, CustomAllocator>( v2 ) ) ) +with expansion: + { 1, 2, 3 } Contains: { 1, 2, 3 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v5, Contains( v6 ) ) +with expansion: + { 1, 2, 3 } Contains: { 1, 2 } + +------------------------------------------------------------------------------- +Vector matchers + Contains (element), composed +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, VectorContains( 1 ) && VectorContains( 2 ) ) +with expansion: + { 1, 2, 3 } ( Contains: 1 and Contains: 2 ) + +------------------------------------------------------------------------------- +Vector matchers + Equals +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, Equals( v ) ) +with expansion: + { 1, 2, 3 } Equals: { 1, 2, 3 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( empty, Equals( empty ) ) +with expansion: + { } Equals: { } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, Equals( { 1, 2, 3 } ) ) +with expansion: + { 1, 2, 3 } Equals: { 1, 2, 3 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, Equals( v2 ) ) +with expansion: + { 1, 2, 3 } Equals: { 1, 2, 3 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v5, ( Equals, CustomAllocator>( v2 ) ) ) +with expansion: + { 1, 2, 3 } Equals: { 1, 2, 3 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v5, Equals( v6 ) ) +with expansion: + { 1, 2, 3 } Equals: { 1, 2, 3 } + +------------------------------------------------------------------------------- +Vector matchers + UnorderedEquals +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, UnorderedEquals( v ) ) +with expansion: + { 1, 2, 3 } UnorderedEquals: { 1, 2, 3 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, UnorderedEquals( { 3, 2, 1 } ) ) +with expansion: + { 1, 2, 3 } UnorderedEquals: { 3, 2, 1 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( empty, UnorderedEquals( empty ) ) +with expansion: + { } UnorderedEquals: { } + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( permuted, UnorderedEquals( v ) ) +with expansion: + { 1, 3, 2 } UnorderedEquals: { 1, 2, 3 } + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( permuted, UnorderedEquals( v ) ) +with expansion: + { 2, 3, 1 } UnorderedEquals: { 1, 2, 3 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v5, ( UnorderedEquals, CustomAllocator>( permuted ) ) ) +with expansion: + { 1, 2, 3 } UnorderedEquals: { 2, 3, 1 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v5_permuted, UnorderedEquals( v5 ) ) +with expansion: + { 1, 3, 2 } UnorderedEquals: { 1, 2, 3 } + +------------------------------------------------------------------------------- +Vector matchers that fail + Contains (element) +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( v, VectorContains( -1 ) ) +with expansion: + { 1, 2, 3 } Contains: -1 + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( empty, VectorContains( 1 ) ) +with expansion: + { } Contains: 1 + +------------------------------------------------------------------------------- +Vector matchers that fail + Contains (vector) +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( empty, Contains( v ) ) +with expansion: + { } Contains: { 1, 2, 3 } + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( v, Contains( v2 ) ) +with expansion: + { 1, 2, 3 } Contains: { 1, 2, 4 } + +------------------------------------------------------------------------------- +Vector matchers that fail + Equals +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( v, Equals( v2 ) ) +with expansion: + { 1, 2, 3 } Equals: { 1, 2 } + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( v2, Equals( v ) ) +with expansion: + { 1, 2 } Equals: { 1, 2, 3 } + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( empty, Equals( v ) ) +with expansion: + { } Equals: { 1, 2, 3 } + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( v, Equals( empty ) ) +with expansion: + { 1, 2, 3 } Equals: { } + +------------------------------------------------------------------------------- +Vector matchers that fail + UnorderedEquals +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( v, UnorderedEquals( empty ) ) +with expansion: + { 1, 2, 3 } UnorderedEquals: { } + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( empty, UnorderedEquals( v ) ) +with expansion: + { } UnorderedEquals: { 1, 2, 3 } + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( permuted, UnorderedEquals( v ) ) +with expansion: + { 1, 3 } UnorderedEquals: { 1, 2, 3 } + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( permuted, UnorderedEquals( v ) ) +with expansion: + { 3, 1 } UnorderedEquals: { 1, 2, 3 } + +------------------------------------------------------------------------------- +When checked exceptions are thrown they can be expected or unexpected +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( thisThrows(), std::domain_error ) + +Exception.tests.cpp:: PASSED: + REQUIRE_NOTHROW( thisDoesntThrow() ) + +Exception.tests.cpp:: PASSED: + REQUIRE_THROWS( thisThrows() ) + +------------------------------------------------------------------------------- +When unchecked exceptions are thrown directly they are always failures +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with message: + unexpected exception + +------------------------------------------------------------------------------- +When unchecked exceptions are thrown during a CHECK the test should continue +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + CHECK( thisThrows() == 0 ) +due to unexpected exception with message: + expected exception + +------------------------------------------------------------------------------- +When unchecked exceptions are thrown during a REQUIRE the test should abort +fail +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + REQUIRE( thisThrows() == 0 ) +due to unexpected exception with message: + expected exception + +------------------------------------------------------------------------------- +When unchecked exceptions are thrown from functions they are always failures +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + CHECK( thisThrows() == 0 ) +due to unexpected exception with message: + expected exception + +------------------------------------------------------------------------------- +When unchecked exceptions are thrown from sections they are always failures + section name +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with message: + unexpected exception + +------------------------------------------------------------------------------- +When unchecked exceptions are thrown, but caught, they do not affect the test +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + + +No assertions in test case 'When unchecked exceptions are thrown, but caught, they do not affect the test' + +------------------------------------------------------------------------------- +X/level/0/a +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +X/level/0/b +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +X/level/1/a +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +X/level/1/b +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +XmlEncode + normal string +------------------------------------------------------------------------------- +Xml.tests.cpp: +............................................................................... + +Xml.tests.cpp:: PASSED: + REQUIRE( encode( "normal string" ) == "normal string" ) +with expansion: + "normal string" == "normal string" + +------------------------------------------------------------------------------- +XmlEncode + empty string +------------------------------------------------------------------------------- +Xml.tests.cpp: +............................................................................... + +Xml.tests.cpp:: PASSED: + REQUIRE( encode( "" ) == "" ) +with expansion: + "" == "" + +------------------------------------------------------------------------------- +XmlEncode + string with ampersand +------------------------------------------------------------------------------- +Xml.tests.cpp: +............................................................................... + +Xml.tests.cpp:: PASSED: + REQUIRE( encode( "smith & jones" ) == "smith & jones" ) +with expansion: + "smith & jones" == "smith & jones" + +------------------------------------------------------------------------------- +XmlEncode + string with less-than +------------------------------------------------------------------------------- +Xml.tests.cpp: +............................................................................... + +Xml.tests.cpp:: PASSED: + REQUIRE( encode( "smith < jones" ) == "smith < jones" ) +with expansion: + "smith < jones" == "smith < jones" + +------------------------------------------------------------------------------- +XmlEncode + string with greater-than +------------------------------------------------------------------------------- +Xml.tests.cpp: +............................................................................... + +Xml.tests.cpp:: PASSED: + REQUIRE( encode( "smith > jones" ) == "smith > jones" ) +with expansion: + "smith > jones" == "smith > jones" + +Xml.tests.cpp:: PASSED: + REQUIRE( encode( "smith ]]> jones" ) == "smith ]]> jones" ) +with expansion: + "smith ]]> jones" + == + "smith ]]> jones" + +------------------------------------------------------------------------------- +XmlEncode + string with quotes +------------------------------------------------------------------------------- +Xml.tests.cpp: +............................................................................... + +Xml.tests.cpp:: PASSED: + REQUIRE( encode( stringWithQuotes ) == stringWithQuotes ) +with expansion: + "don't "quote" me on that" + == + "don't "quote" me on that" + +Xml.tests.cpp:: PASSED: + REQUIRE( encode( stringWithQuotes, Catch::XmlEncode::ForAttributes ) == "don't "quote" me on that" ) +with expansion: + "don't "quote" me on that" + == + "don't "quote" me on that" + +------------------------------------------------------------------------------- +XmlEncode + string with control char (1) +------------------------------------------------------------------------------- +Xml.tests.cpp: +............................................................................... + +Xml.tests.cpp:: PASSED: + REQUIRE( encode( "[\x01]" ) == "[\\x01]" ) +with expansion: + "[\x01]" == "[\x01]" + +------------------------------------------------------------------------------- +XmlEncode + string with control char (x7F) +------------------------------------------------------------------------------- +Xml.tests.cpp: +............................................................................... + +Xml.tests.cpp:: PASSED: + REQUIRE( encode( "[\x7F]" ) == "[\\x7F]" ) +with expansion: + "[\x7F]" == "[\x7F]" + +------------------------------------------------------------------------------- +XmlWriter writes boolean attributes as true/false +------------------------------------------------------------------------------- +Xml.tests.cpp: +............................................................................... + +Xml.tests.cpp:: PASSED: + REQUIRE_THAT( stream.str(), ContainsSubstring(R"(attr1="true")") && ContainsSubstring(R"(attr2="false")") ) +with expansion: + " + + " ( contains: "attr1="true"" and contains: "attr2="false"" ) + +------------------------------------------------------------------------------- +a succeeding test can still be skipped +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: PASSED: + +Skip.tests.cpp:: SKIPPED: + +------------------------------------------------------------------------------- +analyse no analysis +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.mean.point.count() == 23 ) +with expansion: + 23.0 == 23 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.mean.lower_bound.count() == 23 ) +with expansion: + 23.0 == 23 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.mean.upper_bound.count() == 23 ) +with expansion: + 23.0 == 23 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.standard_deviation.point.count() == 0 ) +with expansion: + 0.0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.standard_deviation.lower_bound.count() == 0 ) +with expansion: + 0.0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.standard_deviation.upper_bound.count() == 0 ) +with expansion: + 0.0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.outliers.total() == 0 ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.outliers.low_mild == 0 ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.outliers.low_severe == 0 ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.outliers.high_mild == 0 ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.outliers.high_severe == 0 ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.outliers.samples_seen == 0 ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.outlier_variance == 0 ) +with expansion: + 0.0 == 0 + +------------------------------------------------------------------------------- +array -> toString +------------------------------------------------------------------------------- +ToStringVector.tests.cpp: +............................................................................... + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify( empty ) == "{ }" ) +with expansion: + "{ }" == "{ }" + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify( oneValue ) == "{ 42 }" ) +with expansion: + "{ 42 }" == "{ 42 }" + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify( twoValues ) == "{ 42, 250 }" ) +with expansion: + "{ 42, 250 }" == "{ 42, 250 }" + +------------------------------------------------------------------------------- +benchmark function call + without chronometer +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( model.started == 1 ) +with expansion: + 1 == 1 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( model.finished == 0 ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( model.started == 1 ) +with expansion: + 1 == 1 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( model.finished == 1 ) +with expansion: + 1 == 1 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( called == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +benchmark function call + with chronometer +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( model.started == 0 ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( model.finished == 0 ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( model.started == 0 ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( model.finished == 0 ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( called == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +boolean member +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( obj.prop != 0 ) +with expansion: + 0x != 0 + +------------------------------------------------------------------------------- +checkedElse +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECKED_ELSE( flag ) +with expansion: + true + +Misc.tests.cpp:: PASSED: + REQUIRE( testCheckedElse( true ) ) +with expansion: + true + +------------------------------------------------------------------------------- +checkedElse, failing +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED - but was ok: + CHECKED_ELSE( flag ) +with expansion: + false + +Misc.tests.cpp:: FAILED: + REQUIRE( testCheckedElse( false ) ) +with expansion: + false + +------------------------------------------------------------------------------- +checkedIf +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECKED_IF( flag ) +with expansion: + true + +Misc.tests.cpp:: PASSED: + REQUIRE( testCheckedIf( true ) ) +with expansion: + true + +------------------------------------------------------------------------------- +checkedIf, failing +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED - but was ok: + CHECKED_IF( flag ) +with expansion: + false + +Misc.tests.cpp:: FAILED: + REQUIRE( testCheckedIf( false ) ) +with expansion: + false + +------------------------------------------------------------------------------- +classify_outliers + none +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.samples_seen == static_cast(x.size()) ) +with expansion: + 6 == 6 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_severe == los ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_mild == lom ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_mild == him ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_severe == his ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.total() == los + lom + him + his ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +classify_outliers + low severe +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.samples_seen == static_cast(x.size()) ) +with expansion: + 6 == 6 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_severe == los ) +with expansion: + 1 == 1 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_mild == lom ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_mild == him ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_severe == his ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.total() == los + lom + him + his ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +classify_outliers + low mild +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.samples_seen == static_cast(x.size()) ) +with expansion: + 6 == 6 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_severe == los ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_mild == lom ) +with expansion: + 1 == 1 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_mild == him ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_severe == his ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.total() == los + lom + him + his ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +classify_outliers + high mild +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.samples_seen == static_cast(x.size()) ) +with expansion: + 6 == 6 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_severe == los ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_mild == lom ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_mild == him ) +with expansion: + 1 == 1 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_severe == his ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.total() == los + lom + him + his ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +classify_outliers + high severe +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.samples_seen == static_cast(x.size()) ) +with expansion: + 6 == 6 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_severe == los ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_mild == lom ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_mild == him ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_severe == his ) +with expansion: + 1 == 1 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.total() == los + lom + him + his ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +classify_outliers + mixed +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.samples_seen == static_cast(x.size()) ) +with expansion: + 6 == 6 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_severe == los ) +with expansion: + 1 == 1 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_mild == lom ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_mild == him ) +with expansion: + 1 == 1 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_severe == his ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.total() == los + lom + him + his ) +with expansion: + 2 == 2 + +------------------------------------------------------------------------------- +comparisons between const int variables +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: PASSED: + REQUIRE( unsigned_char_var == 1 ) +with expansion: + 1 == 1 + +Condition.tests.cpp:: PASSED: + REQUIRE( unsigned_short_var == 1 ) +with expansion: + 1 == 1 + +Condition.tests.cpp:: PASSED: + REQUIRE( unsigned_int_var == 1 ) +with expansion: + 1 == 1 + +Condition.tests.cpp:: PASSED: + REQUIRE( unsigned_long_var == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +comparisons between int variables +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: PASSED: + REQUIRE( long_var == unsigned_char_var ) +with expansion: + 1 == 1 + +Condition.tests.cpp:: PASSED: + REQUIRE( long_var == unsigned_short_var ) +with expansion: + 1 == 1 + +Condition.tests.cpp:: PASSED: + REQUIRE( long_var == unsigned_int_var ) +with expansion: + 1 == 1 + +Condition.tests.cpp:: PASSED: + REQUIRE( long_var == unsigned_long_var ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +convertToBits +------------------------------------------------------------------------------- +FloatingPoint.tests.cpp: +............................................................................... + +FloatingPoint.tests.cpp:: PASSED: + CHECK( convertToBits( 0.f ) == 0 ) +with expansion: + 0 == 0 + +FloatingPoint.tests.cpp:: PASSED: + CHECK( convertToBits( -0.f ) == ( 1ULL << 31 ) ) +with expansion: + 2147483648 (0x) + == + 2147483648 (0x) + +FloatingPoint.tests.cpp:: PASSED: + CHECK( convertToBits( 0. ) == 0 ) +with expansion: + 0 == 0 + +FloatingPoint.tests.cpp:: PASSED: + CHECK( convertToBits( -0. ) == ( 1ULL << 63 ) ) +with expansion: + 9223372036854775808 (0x) + == + 9223372036854775808 (0x) + +FloatingPoint.tests.cpp:: PASSED: + CHECK( convertToBits( std::numeric_limits::denorm_min() ) == 1 ) +with expansion: + 1 == 1 + +FloatingPoint.tests.cpp:: PASSED: + CHECK( convertToBits( std::numeric_limits::denorm_min() ) == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +dynamic skipping works with generators +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: +explicitly with message: + skipping because answer = 41 + +------------------------------------------------------------------------------- +dynamic skipping works with generators +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +dynamic skipping works with generators +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: +explicitly with message: + skipping because answer = 43 + +------------------------------------------------------------------------------- +empty tags are not allowed +------------------------------------------------------------------------------- +Tag.tests.cpp: +............................................................................... + +Tag.tests.cpp:: PASSED: + REQUIRE_THROWS( Catch::TestCaseInfo("", { "test with an empty tag", "[]" }, dummySourceLineInfo) ) + +------------------------------------------------------------------------------- +erfc_inv +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( erfc_inv(1.103560) == Approx(-0.09203687623843015) ) +with expansion: + -0.09203687623843014 + == + Approx( -0.09203687623843015 ) + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( erfc_inv(1.067400) == Approx(-0.05980291115763361) ) +with expansion: + -0.05980291115763361 + == + Approx( -0.05980291115763361 ) + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( erfc_inv(0.050000) == Approx(1.38590382434967796) ) +with expansion: + 1.38590382434967774 + == + Approx( 1.38590382434967796 ) + +------------------------------------------------------------------------------- +estimate_clock_resolution +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res.mean.count() == rate ) +with expansion: + 2000.0 == 2000 (0x) + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res.outliers.total() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +even more nested SECTION tests + c + d (leaf) +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +even more nested SECTION tests + c + e (leaf) +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +even more nested SECTION tests + f (leaf) +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +failed assertions before SKIP cause test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: FAILED: + CHECK( 3 == 4 ) + +Skip.tests.cpp:: SKIPPED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: + +------------------------------------------------------------------------------- +failing in some unskipped sections causes entire test case to fail + skipped +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: + +------------------------------------------------------------------------------- +failing in some unskipped sections causes entire test case to fail + not skipped +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +first tag +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + + +No assertions in test case 'first tag' + +loose text artifact +------------------------------------------------------------------------------- +has printf +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + + +No assertions in test case 'has printf' + +------------------------------------------------------------------------------- +is_unary_function +------------------------------------------------------------------------------- +Clara.tests.cpp: +............................................................................... + +Clara.tests.cpp:: PASSED: +with message: + Catch::Clara::Detail::is_unary_function::value + +Clara.tests.cpp:: PASSED: +with message: + Catch::Clara::Detail::is_unary_function::value + +Clara.tests.cpp:: PASSED: +with message: + Catch::Clara::Detail::is_unary_function::value + +Clara.tests.cpp:: PASSED: +with message: + Catch::Clara::Detail::is_unary_function::value + +Clara.tests.cpp:: PASSED: +with message: + Catch::Clara::Detail::is_unary_function::value + +Clara.tests.cpp:: PASSED: +with message: + Catch::Clara::Detail::is_unary_function::value + +Clara.tests.cpp:: PASSED: +with message: + !(Catch::Clara::Detail::is_unary_function::value) + +Clara.tests.cpp:: PASSED: +with message: + !(Catch::Clara::Detail::is_unary_function::value) + +Clara.tests.cpp:: PASSED: +with message: + !(Catch::Clara::Detail::is_unary_function::value) + +Clara.tests.cpp:: PASSED: +with message: + !(Catch::Clara::Detail::is_unary_function::value) + +Clara.tests.cpp:: PASSED: +with message: + !(Catch::Clara::Detail::is_unary_function::value) + +Clara.tests.cpp:: PASSED: +with message: + !(Catch::Clara::Detail::is_unary_function::value) + +------------------------------------------------------------------------------- +just failure +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: +explicitly with message: + Previous info should not be seen + +------------------------------------------------------------------------------- +just failure after unscoped info +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: +explicitly with message: + previous unscoped info SHOULD not be seen + +------------------------------------------------------------------------------- +just info +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + + +No assertions in test case 'just info' + +------------------------------------------------------------------------------- +just unscoped info +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + + +No assertions in test case 'just unscoped info' + +------------------------------------------------------------------------------- +long long +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( l == std::numeric_limits::max() ) +with expansion: + 9223372036854775807 (0x) + == + 9223372036854775807 (0x) + +------------------------------------------------------------------------------- +looped SECTION tests + b is currently: 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + CHECK( b > a ) +with expansion: + 0 > 1 + +------------------------------------------------------------------------------- +looped SECTION tests + b is currently: 1 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + CHECK( b > a ) +with expansion: + 1 > 1 + +------------------------------------------------------------------------------- +looped SECTION tests + b is currently: 2 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( b > a ) +with expansion: + 2 > 1 + +------------------------------------------------------------------------------- +looped SECTION tests + b is currently: 3 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( b > a ) +with expansion: + 3 > 1 + +------------------------------------------------------------------------------- +looped SECTION tests + b is currently: 4 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( b > a ) +with expansion: + 4 > 1 + +------------------------------------------------------------------------------- +looped SECTION tests + b is currently: 5 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( b > a ) +with expansion: + 5 > 1 + +------------------------------------------------------------------------------- +looped SECTION tests + b is currently: 6 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( b > a ) +with expansion: + 6 > 1 + +------------------------------------------------------------------------------- +looped SECTION tests + b is currently: 7 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( b > a ) +with expansion: + 7 > 1 + +------------------------------------------------------------------------------- +looped SECTION tests + b is currently: 8 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( b > a ) +with expansion: + 8 > 1 + +------------------------------------------------------------------------------- +looped SECTION tests + b is currently: 9 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( b > a ) +with expansion: + 9 > 1 + +------------------------------------------------------------------------------- +looped tests +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[0] (1) is even + +Misc.tests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[1] (1) is even + +Misc.tests.cpp:: PASSED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 0 == 0 +with message: + Testing if fib[2] (2) is even + +Misc.tests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[3] (3) is even + +Misc.tests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[4] (5) is even + +Misc.tests.cpp:: PASSED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 0 == 0 +with message: + Testing if fib[5] (8) is even + +Misc.tests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[6] (13) is even + +Misc.tests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[7] (21) is even + +------------------------------------------------------------------------------- +makeStream recognizes %debug stream name +------------------------------------------------------------------------------- +Stream.tests.cpp: +............................................................................... + +Stream.tests.cpp:: PASSED: + REQUIRE_NOTHROW( Catch::makeStream( "%debug" ) ) + +------------------------------------------------------------------------------- +make_unique reimplementation + From lvalue copies +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE_FALSE( lval.has_moved ) +with expansion: + !false + +------------------------------------------------------------------------------- +make_unique reimplementation + From rvalue moves +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( rval.has_moved ) +with expansion: + true + +------------------------------------------------------------------------------- +make_unique reimplementation + Variadic constructor +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( *ptr == std::tuple{1, 2., 3} ) +with expansion: + {?} == {?} + +------------------------------------------------------------------------------- +mean +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( m == 19. ) +with expansion: + 19.0 == 19.0 + +------------------------------------------------------------------------------- +measure +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( x == 17 ) +with expansion: + 17 == 17 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( x == 23 ) +with expansion: + 23 == 23 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( r.elapsed.count() == 42 ) +with expansion: + 42 == 42 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( r.result == 23 ) +with expansion: + 23 == 23 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( r.iterations == 1 ) +with expansion: + 1 == 1 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( s.elapsed.count() == 69 ) +with expansion: + 69 == 69 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( s.result == 17 ) +with expansion: + 17 == 17 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( s.iterations == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +mix info, unscoped info and warning +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: warning: + info + unscoped info + and warn may mix + +Message.tests.cpp:: warning: + info + unscoped info + they are not cleared after warnings + + +No assertions in test case 'mix info, unscoped info and warning' + +------------------------------------------------------------------------------- +more nested SECTION tests + doesn't equal + equal +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + REQUIRE( a == b ) +with expansion: + 1 == 2 + +------------------------------------------------------------------------------- +more nested SECTION tests + doesn't equal + not equal +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( a != b ) +with expansion: + 1 != 2 + +------------------------------------------------------------------------------- +more nested SECTION tests + doesn't equal + less than +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( a < b ) +with expansion: + 1 < 2 + +------------------------------------------------------------------------------- +nested SECTION tests + doesn't equal +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( a != b ) +with expansion: + 1 != 2 + +Misc.tests.cpp:: PASSED: + REQUIRE( b != a ) +with expansion: + 2 != 1 + +------------------------------------------------------------------------------- +nested SECTION tests + doesn't equal + not equal +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( a != b ) +with expansion: + 1 != 2 + +a------------------------------------------------------------------------------- +nested sections can be skipped dynamically at runtime + A +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + + +No assertions in section 'A' + +! +b1------------------------------------------------------------------------------- +nested sections can be skipped dynamically at runtime + B + B1 +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + + +No assertions in section 'B1' + +! +------------------------------------------------------------------------------- +nested sections can be skipped dynamically at runtime + B + B2 +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: + +! +------------------------------------------------------------------------------- +non streamable - with conv. op +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( s == "7" ) +with expansion: + "7" == "7" + +------------------------------------------------------------------------------- +non-copyable objects +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + CHECK( ti == typeid(int) ) +with expansion: + {?} == {?} + +------------------------------------------------------------------------------- +normal_quantile +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( normal_quantile(0.551780) == Approx(0.13015979861484198) ) +with expansion: + 0.13015979861484195 + == + Approx( 0.13015979861484198 ) + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( normal_quantile(0.533700) == Approx(0.08457408802851875) ) +with expansion: + 0.08457408802851875 + == + Approx( 0.08457408802851875 ) + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( normal_quantile(0.025000) == Approx(-1.95996398454005449) ) +with expansion: + -1.95996398454005405 + == + Approx( -1.95996398454005449 ) + +------------------------------------------------------------------------------- +not allowed +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +not prints unscoped info from previous failures +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: PASSED: + REQUIRE( true ) +with message: + this MAY be seen only for the FIRST assertion IF info is printed for passing + assertions + +Message.tests.cpp:: PASSED: + REQUIRE( true ) +with message: + this MAY be seen only for the SECOND assertion IF info is printed for passing + assertions + +Message.tests.cpp:: FAILED: + REQUIRE( false ) +with message: + this SHOULD be seen + +------------------------------------------------------------------------------- +null strings +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( makeString( false ) != static_cast(0) ) +with expansion: + "valid string" != {null string} + +Misc.tests.cpp:: PASSED: + REQUIRE( makeString( true ) == static_cast(0) ) +with expansion: + {null string} == {null string} + +------------------------------------------------------------------------------- +null_ptr +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( ptr.get() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +pair > -> toString +------------------------------------------------------------------------------- +ToStringPair.tests.cpp: +............................................................................... + +ToStringPair.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify( pair ) == "{ { 42, \"Arthur\" }, { \"Ford\", 24 } }" ) +with expansion: + "{ { 42, "Arthur" }, { "Ford", 24 } }" + == + "{ { 42, "Arthur" }, { "Ford", 24 } }" + +------------------------------------------------------------------------------- +parseEnums + No enums +------------------------------------------------------------------------------- +ToString.tests.cpp: +............................................................................... + +ToString.tests.cpp:: PASSED: + CHECK_THAT( parseEnums( "" ), Equals( std::vector{} ) ) +with expansion: + { } Equals: { } + +------------------------------------------------------------------------------- +parseEnums + One enum value +------------------------------------------------------------------------------- +ToString.tests.cpp: +............................................................................... + +ToString.tests.cpp:: PASSED: + CHECK_THAT( parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector{"Value1"} ) ) +with expansion: + { Value1 } Equals: { Value1 } + +ToString.tests.cpp:: PASSED: + CHECK_THAT( parseEnums( "Value1" ), Equals( std::vector{"Value1"} ) ) +with expansion: + { Value1 } Equals: { Value1 } + +ToString.tests.cpp:: PASSED: + CHECK_THAT( parseEnums( "EnumName::Value1" ), Equals(std::vector{"Value1"} ) ) +with expansion: + { Value1 } Equals: { Value1 } + +------------------------------------------------------------------------------- +parseEnums + Multiple enum values +------------------------------------------------------------------------------- +ToString.tests.cpp: +............................................................................... + +ToString.tests.cpp:: PASSED: + CHECK_THAT( parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector{"Value1", "Value2"} ) ) +with expansion: + { Value1, Value2 } Equals: { Value1, Value2 } + +ToString.tests.cpp:: PASSED: + CHECK_THAT( parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector{"Value1", "Value2", "Value3"} ) ) +with expansion: + { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 } + +ToString.tests.cpp:: PASSED: + CHECK_THAT( parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector{"Value1", "Value2", "Value3"} ) ) +with expansion: + { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 } + +------------------------------------------------------------------------------- +pointer to class +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( p == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +print unscoped info if passing unscoped info is printed +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: PASSED: + REQUIRE( true ) +with message: + this MAY be seen IF info is printed for passing assertions + +------------------------------------------------------------------------------- +prints unscoped info on failure +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: + REQUIRE( false ) +with messages: + this SHOULD be seen + this SHOULD also be seen + +------------------------------------------------------------------------------- +prints unscoped info only for the first assertion +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: + CHECK( false ) +with message: + this SHOULD be seen only ONCE + +Message.tests.cpp:: PASSED: + CHECK( true ) + +Message.tests.cpp:: PASSED: + CHECK( true ) +with message: + this MAY also be seen only ONCE IF info is printed for passing assertions + +Message.tests.cpp:: PASSED: + CHECK( true ) + +------------------------------------------------------------------------------- +random SECTION tests + doesn't equal +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( a != b ) +with expansion: + 1 != 2 + +Misc.tests.cpp:: PASSED: + REQUIRE( b != a ) +with expansion: + 2 != 1 + +------------------------------------------------------------------------------- +random SECTION tests + not equal +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( a != b ) +with expansion: + 1 != 2 + +------------------------------------------------------------------------------- +replaceInPlace + replace single char +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + CHECK( Catch::replaceInPlace(letters, "b", "z") ) +with expansion: + true + +StringManip.tests.cpp:: PASSED: + CHECK( letters == "azcdefcg" ) +with expansion: + "azcdefcg" == "azcdefcg" + +------------------------------------------------------------------------------- +replaceInPlace + replace two chars +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + CHECK( Catch::replaceInPlace(letters, "c", "z") ) +with expansion: + true + +StringManip.tests.cpp:: PASSED: + CHECK( letters == "abzdefzg" ) +with expansion: + "abzdefzg" == "abzdefzg" + +------------------------------------------------------------------------------- +replaceInPlace + replace first char +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + CHECK( Catch::replaceInPlace(letters, "a", "z") ) +with expansion: + true + +StringManip.tests.cpp:: PASSED: + CHECK( letters == "zbcdefcg" ) +with expansion: + "zbcdefcg" == "zbcdefcg" + +------------------------------------------------------------------------------- +replaceInPlace + replace last char +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + CHECK( Catch::replaceInPlace(letters, "g", "z") ) +with expansion: + true + +StringManip.tests.cpp:: PASSED: + CHECK( letters == "abcdefcz" ) +with expansion: + "abcdefcz" == "abcdefcz" + +------------------------------------------------------------------------------- +replaceInPlace + replace all chars +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + CHECK( Catch::replaceInPlace(letters, letters, "replaced") ) +with expansion: + true + +StringManip.tests.cpp:: PASSED: + CHECK( letters == "replaced" ) +with expansion: + "replaced" == "replaced" + +------------------------------------------------------------------------------- +replaceInPlace + replace no chars +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + CHECK_FALSE( Catch::replaceInPlace(letters, "x", "z") ) +with expansion: + !false + +StringManip.tests.cpp:: PASSED: + CHECK( letters == letters ) +with expansion: + "abcdefcg" == "abcdefcg" + +------------------------------------------------------------------------------- +replaceInPlace + no replace in already-replaced string + lengthening +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + CHECK( Catch::replaceInPlace(letters, "c", "cc") ) +with expansion: + true + +StringManip.tests.cpp:: PASSED: + CHECK( letters == "abccdefccg" ) +with expansion: + "abccdefccg" == "abccdefccg" + +------------------------------------------------------------------------------- +replaceInPlace + no replace in already-replaced string + shortening +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + CHECK( Catch::replaceInPlace(s, "--", "-") ) +with expansion: + true + +StringManip.tests.cpp:: PASSED: + CHECK( s == "--" ) +with expansion: + "--" == "--" + +------------------------------------------------------------------------------- +replaceInPlace + escape ' +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + CHECK( Catch::replaceInPlace(s, "'", "|'") ) +with expansion: + true + +StringManip.tests.cpp:: PASSED: + CHECK( s == "didn|'t" ) +with expansion: + "didn|'t" == "didn|'t" + +------------------------------------------------------------------------------- +request an unknown %-starting stream fails +------------------------------------------------------------------------------- +Stream.tests.cpp: +............................................................................... + +Stream.tests.cpp:: PASSED: + REQUIRE_THROWS( Catch::makeStream( "%somestream" ) ) + +------------------------------------------------------------------------------- +resolution +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res.size() == count ) +with expansion: + 10 == 10 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res[i] == rate ) +with expansion: + 1000.0 == 1000 (0x) + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res[i] == rate ) +with expansion: + 1000.0 == 1000 (0x) + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res[i] == rate ) +with expansion: + 1000.0 == 1000 (0x) + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res[i] == rate ) +with expansion: + 1000.0 == 1000 (0x) + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res[i] == rate ) +with expansion: + 1000.0 == 1000 (0x) + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res[i] == rate ) +with expansion: + 1000.0 == 1000 (0x) + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res[i] == rate ) +with expansion: + 1000.0 == 1000 (0x) + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res[i] == rate ) +with expansion: + 1000.0 == 1000 (0x) + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res[i] == rate ) +with expansion: + 1000.0 == 1000 (0x) + +------------------------------------------------------------------------------- +run_for_at_least, chronometer +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( meter.runs() >= old_runs ) +with expansion: + 1 >= 1 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( meter.runs() >= old_runs ) +with expansion: + 2 >= 1 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( meter.runs() >= old_runs ) +with expansion: + 4 >= 2 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( meter.runs() >= old_runs ) +with expansion: + 8 >= 4 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( meter.runs() >= old_runs ) +with expansion: + 16 >= 8 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( meter.runs() >= old_runs ) +with expansion: + 32 >= 16 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( meter.runs() >= old_runs ) +with expansion: + 64 >= 32 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( meter.runs() >= old_runs ) +with expansion: + 128 >= 64 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( Timing.elapsed >= time ) +with expansion: + 128 ns >= 100 ns + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( Timing.result == Timing.iterations + 17 ) +with expansion: + 145 == 145 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( Timing.iterations >= time.count() ) +with expansion: + 128 >= 100 + +------------------------------------------------------------------------------- +run_for_at_least, int +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( x >= old_x ) +with expansion: + 1 >= 1 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( x >= old_x ) +with expansion: + 2 >= 1 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( x >= old_x ) +with expansion: + 4 >= 2 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( x >= old_x ) +with expansion: + 8 >= 4 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( x >= old_x ) +with expansion: + 16 >= 8 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( x >= old_x ) +with expansion: + 32 >= 16 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( x >= old_x ) +with expansion: + 64 >= 32 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( x >= old_x ) +with expansion: + 128 >= 64 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( Timing.elapsed >= time ) +with expansion: + 128 ns >= 100 ns + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( Timing.result == Timing.iterations + 17 ) +with expansion: + 145 == 145 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( Timing.iterations >= time.count() ) +with expansion: + 128 >= 100 + +------------------------------------------------------------------------------- +second tag +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + + +No assertions in test case 'second tag' + +------------------------------------------------------------------------------- +sections can be skipped dynamically at runtime + not skipped +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +sections can be skipped dynamically at runtime + skipped +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: + +------------------------------------------------------------------------------- +sections can be skipped dynamically at runtime + also not skipped +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +send a single char to INFO +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + REQUIRE( false ) +with message: + 3 + +------------------------------------------------------------------------------- +sends information to INFO +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: + REQUIRE( false ) +with messages: + hi + i := 7 + +------------------------------------------------------------------------------- +shortened hide tags are split apart +------------------------------------------------------------------------------- +Tag.tests.cpp: +............................................................................... + +Tag.tests.cpp:: PASSED: + REQUIRE_THAT( testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "."_catch_sr ) ) ) +with expansion: + { {?}, {?} } ( Contains: {?} and Contains: {?} ) + +------------------------------------------------------------------------------- +skipped tests can optionally provide a reason +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: +explicitly with message: + skipping because answer = 43 + +------------------------------------------------------------------------------- +splitString +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + CHECK_THAT( splitStringRef("", ','), Equals(std::vector()) ) +with expansion: + { } Equals: { } + +StringManip.tests.cpp:: PASSED: + CHECK_THAT( splitStringRef("abc", ','), Equals(std::vector{"abc"}) ) +with expansion: + { abc } Equals: { abc } + +StringManip.tests.cpp:: PASSED: + CHECK_THAT( splitStringRef("abc,def", ','), Equals(std::vector{"abc", "def"}) ) +with expansion: + { abc, def } Equals: { abc, def } + +------------------------------------------------------------------------------- +stacks unscoped info in loops +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: + CHECK( false ) +with messages: + Count 1 to 3... + 1 + 2 + 3 + +Message.tests.cpp:: FAILED: + CHECK( false ) +with messages: + Count 4 to 6... + 4 + 5 + 6 + +------------------------------------------------------------------------------- +startsWith +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + CHECK_FALSE( startsWith("", 'c') ) +with expansion: + !false + +StringManip.tests.cpp:: PASSED: + CHECK( startsWith(std::string("abc"), 'a') ) +with expansion: + true + +StringManip.tests.cpp:: PASSED: + CHECK( startsWith("def"_catch_sr, 'd') ) +with expansion: + true + +------------------------------------------------------------------------------- +std::map is convertible string + empty +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify( emptyMap ) == "{ }" ) +with expansion: + "{ }" == "{ }" + +------------------------------------------------------------------------------- +std::map is convertible string + single item +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify( map ) == "{ { \"one\", 1 } }" ) +with expansion: + "{ { "one", 1 } }" == "{ { "one", 1 } }" + +------------------------------------------------------------------------------- +std::map is convertible string + several items +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify( map ) == "{ { \"abc\", 1 }, { \"def\", 2 }, { \"ghi\", 3 } }" ) +with expansion: + "{ { "abc", 1 }, { "def", 2 }, { "ghi", 3 } }" + == + "{ { "abc", 1 }, { "def", 2 }, { "ghi", 3 } }" + +------------------------------------------------------------------------------- +std::pair -> toString +------------------------------------------------------------------------------- +ToStringPair.tests.cpp: +............................................................................... + +ToStringPair.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(value) == "{ 34, \"xyzzy\" }" ) +with expansion: + "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" + +------------------------------------------------------------------------------- +std::pair -> toString +------------------------------------------------------------------------------- +ToStringPair.tests.cpp: +............................................................................... + +ToStringPair.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify( value ) == "{ 34, \"xyzzy\" }" ) +with expansion: + "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" + +------------------------------------------------------------------------------- +std::set is convertible string + empty +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify( emptySet ) == "{ }" ) +with expansion: + "{ }" == "{ }" + +------------------------------------------------------------------------------- +std::set is convertible string + single item +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify( set ) == "{ \"one\" }" ) +with expansion: + "{ "one" }" == "{ "one" }" + +------------------------------------------------------------------------------- +std::set is convertible string + several items +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify( set ) == "{ \"abc\", \"def\", \"ghi\" }" ) +with expansion: + "{ "abc", "def", "ghi" }" + == + "{ "abc", "def", "ghi" }" + +------------------------------------------------------------------------------- +std::vector > -> toString +------------------------------------------------------------------------------- +ToStringPair.tests.cpp: +............................................................................... + +ToStringPair.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify( pr ) == "{ { \"green\", 55 } }" ) +with expansion: + "{ { "green", 55 } }" + == + "{ { "green", 55 } }" + +------------------------------------------------------------------------------- +stdout and stderr streams have %-starting name +------------------------------------------------------------------------------- +Stream.tests.cpp: +............................................................................... + +Stream.tests.cpp:: PASSED: + REQUIRE( Catch::makeStream( "%stderr" )->isConsole() ) +with expansion: + true + +Stream.tests.cpp:: PASSED: + REQUIRE( Catch::makeStream( "%stdout" )->isConsole() ) +with expansion: + true + +------------------------------------------------------------------------------- +stringify ranges +------------------------------------------------------------------------------- +ToStringWhich.tests.cpp: +............................................................................... + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(streamable_range{}) == "op<<(streamable_range)" ) +with expansion: + "op<<(streamable_range)" + == + "op<<(streamable_range)" + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(stringmaker_range{}) == "stringmaker(streamable_range)" ) +with expansion: + "stringmaker(streamable_range)" + == + "stringmaker(streamable_range)" + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(just_range{}) == "{ 1, 2, 3, 4 }" ) +with expansion: + "{ 1, 2, 3, 4 }" == "{ 1, 2, 3, 4 }" + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(disabled_range{}) == "{?}" ) +with expansion: + "{?}" == "{?}" + +------------------------------------------------------------------------------- +stringify( has_maker ) +------------------------------------------------------------------------------- +ToStringWhich.tests.cpp: +............................................................................... + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify( item ) == "StringMaker" ) +with expansion: + "StringMaker" + == + "StringMaker" + +------------------------------------------------------------------------------- +stringify( has_maker_and_operator ) +------------------------------------------------------------------------------- +ToStringWhich.tests.cpp: +............................................................................... + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify( item ) == "StringMaker" ) +with expansion: + "StringMaker" + == + "StringMaker" + +------------------------------------------------------------------------------- +stringify( has_neither ) +------------------------------------------------------------------------------- +ToStringWhich.tests.cpp: +............................................................................... + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(item) == "{?}" ) +with expansion: + "{?}" == "{?}" + +------------------------------------------------------------------------------- +stringify( has_operator ) +------------------------------------------------------------------------------- +ToStringWhich.tests.cpp: +............................................................................... + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify( item ) == "operator<<( has_operator )" ) +with expansion: + "operator<<( has_operator )" + == + "operator<<( has_operator )" + +------------------------------------------------------------------------------- +stringify( has_template_operator ) +------------------------------------------------------------------------------- +ToStringWhich.tests.cpp: +............................................................................... + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify( item ) == "operator<<( has_template_operator )" ) +with expansion: + "operator<<( has_template_operator )" + == + "operator<<( has_template_operator )" + +------------------------------------------------------------------------------- +stringify( vectors ) +------------------------------------------------------------------------------- +ToStringWhich.tests.cpp: +............................................................................... + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify( v ) == "{ StringMaker }" ) +with expansion: + "{ StringMaker }" + == + "{ StringMaker }" + +------------------------------------------------------------------------------- +stringify( vectors ) +------------------------------------------------------------------------------- +ToStringWhich.tests.cpp: +............................................................................... + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify( v ) == "{ StringMaker }" ) +with expansion: + "{ StringMaker }" + == + "{ StringMaker }" + +------------------------------------------------------------------------------- +stringify( vectors ) +------------------------------------------------------------------------------- +ToStringWhich.tests.cpp: +............................................................................... + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify( v ) == "{ operator<<( has_operator ) }" ) +with expansion: + "{ operator<<( has_operator ) }" + == + "{ operator<<( has_operator ) }" + +------------------------------------------------------------------------------- +strlen3 +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( data.str.size() == data.len ) +with expansion: + 3 == 3 + +------------------------------------------------------------------------------- +strlen3 +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( data.str.size() == data.len ) +with expansion: + 3 == 3 + +------------------------------------------------------------------------------- +strlen3 +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( data.str.size() == data.len ) +with expansion: + 5 == 5 + +------------------------------------------------------------------------------- +strlen3 +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( data.str.size() == data.len ) +with expansion: + 4 == 4 + +------------------------------------------------------------------------------- +tables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) ) +with expansion: + 5 == 5 + +------------------------------------------------------------------------------- +tables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) ) +with expansion: + 6 == 6 + +------------------------------------------------------------------------------- +tables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) ) +with expansion: + 5 == 5 + +------------------------------------------------------------------------------- +tables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) ) +with expansion: + 6 == 6 + +------------------------------------------------------------------------------- +tags with dots in later positions are not parsed as hidden +------------------------------------------------------------------------------- +Tag.tests.cpp: +............................................................................... + +Tag.tests.cpp:: PASSED: + REQUIRE( testcase.tags.size() == 1 ) +with expansion: + 1 == 1 + +Tag.tests.cpp:: PASSED: + REQUIRE( testcase.tags[0].original == "magic.tag"_catch_sr ) +with expansion: + magic.tag == magic.tag + +------------------------------------------------------------------------------- +tests can be skipped dynamically at runtime +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: + +------------------------------------------------------------------------------- +thrown std::strings are translated +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with message: + Why would you throw a std::string? + +------------------------------------------------------------------------------- +toString on const wchar_t const pointer returns the string contents +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( result == "\"wide load\"" ) +with expansion: + ""wide load"" == ""wide load"" + +------------------------------------------------------------------------------- +toString on const wchar_t pointer returns the string contents +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( result == "\"wide load\"" ) +with expansion: + ""wide load"" == ""wide load"" + +------------------------------------------------------------------------------- +toString on wchar_t const pointer returns the string contents +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( result == "\"wide load\"" ) +with expansion: + ""wide load"" == ""wide load"" + +------------------------------------------------------------------------------- +toString on wchar_t returns the string contents +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( result == "\"wide load\"" ) +with expansion: + ""wide load"" == ""wide load"" + +------------------------------------------------------------------------------- +toString(enum class w/operator<<) +------------------------------------------------------------------------------- +EnumToString.tests.cpp: +............................................................................... + +EnumToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify(e0) == "E2/V0" ) +with expansion: + "E2/V0" == "E2/V0" + +EnumToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify(e1) == "E2/V1" ) +with expansion: + "E2/V1" == "E2/V1" + +EnumToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify(e3) == "Unknown enum value 10" ) +with expansion: + "Unknown enum value 10" + == + "Unknown enum value 10" + +------------------------------------------------------------------------------- +toString(enum class) +------------------------------------------------------------------------------- +EnumToString.tests.cpp: +............................................................................... + +EnumToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify(e0) == "0" ) +with expansion: + "0" == "0" + +EnumToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify(e1) == "1" ) +with expansion: + "1" == "1" + +------------------------------------------------------------------------------- +toString(enum w/operator<<) +------------------------------------------------------------------------------- +EnumToString.tests.cpp: +............................................................................... + +EnumToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify(e0) == "E2{0}" ) +with expansion: + "E2{0}" == "E2{0}" + +EnumToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify(e1) == "E2{1}" ) +with expansion: + "E2{1}" == "E2{1}" + +------------------------------------------------------------------------------- +toString(enum) +------------------------------------------------------------------------------- +EnumToString.tests.cpp: +............................................................................... + +EnumToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify(e0) == "0" ) +with expansion: + "0" == "0" + +EnumToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify(e1) == "1" ) +with expansion: + "1" == "1" + +------------------------------------------------------------------------------- +tuple<> +------------------------------------------------------------------------------- +ToStringTuple.tests.cpp: +............................................................................... + +ToStringTuple.tests.cpp:: PASSED: + CHECK( "{ }" == ::Catch::Detail::stringify(type{}) ) +with expansion: + "{ }" == "{ }" + +ToStringTuple.tests.cpp:: PASSED: + CHECK( "{ }" == ::Catch::Detail::stringify(value) ) +with expansion: + "{ }" == "{ }" + +------------------------------------------------------------------------------- +tuple +------------------------------------------------------------------------------- +ToStringTuple.tests.cpp: +............................................................................... + +ToStringTuple.tests.cpp:: PASSED: + CHECK( "1.5f" == ::Catch::Detail::stringify(float(1.5)) ) +with expansion: + "1.5f" == "1.5f" + +ToStringTuple.tests.cpp:: PASSED: + CHECK( "{ 1.5f, 0 }" == ::Catch::Detail::stringify(type{1.5f,0}) ) +with expansion: + "{ 1.5f, 0 }" == "{ 1.5f, 0 }" + +------------------------------------------------------------------------------- +tuple +------------------------------------------------------------------------------- +ToStringTuple.tests.cpp: +............................................................................... + +ToStringTuple.tests.cpp:: PASSED: + CHECK( "{ 0 }" == ::Catch::Detail::stringify(type{0}) ) +with expansion: + "{ 0 }" == "{ 0 }" + +------------------------------------------------------------------------------- +tuple +------------------------------------------------------------------------------- +ToStringTuple.tests.cpp: +............................................................................... + +ToStringTuple.tests.cpp:: PASSED: + CHECK( "{ \"hello\", \"world\" }" == ::Catch::Detail::stringify(type{"hello","world"}) ) +with expansion: + "{ "hello", "world" }" + == + "{ "hello", "world" }" + +------------------------------------------------------------------------------- +tuple,tuple<>,float> +------------------------------------------------------------------------------- +ToStringTuple.tests.cpp: +............................................................................... + +ToStringTuple.tests.cpp:: PASSED: + CHECK( "{ { 42 }, { }, 1.5f }" == ::Catch::Detail::stringify(value) ) +with expansion: + "{ { 42 }, { }, 1.5f }" + == + "{ { 42 }, { }, 1.5f }" + +------------------------------------------------------------------------------- +uniform samples +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( e.point == 23 ) +with expansion: + 23.0 == 23 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( e.upper_bound == 23 ) +with expansion: + 23.0 == 23 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( e.lower_bound == 23 ) +with expansion: + 23.0 == 23 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( e.confidence_interval == 0.95 ) +with expansion: + 0.94999999999999996 == 0.94999999999999996 + +------------------------------------------------------------------------------- +uniform_integer_distribution can return the bounds +------------------------------------------------------------------------------- +RandomNumberGeneration.tests.cpp: +............................................................................... + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( dist.a() == -10 ) +with expansion: + -10 == -10 + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( dist.b() == 10 ) +with expansion: + 10 == 10 + +------------------------------------------------------------------------------- +unique_ptr reimplementation: basic functionality + Default constructed unique_ptr is empty +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE_FALSE( ptr ) +with expansion: + !{?} + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( ptr.get() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +unique_ptr reimplementation: basic functionality + Take ownership of allocation +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( ptr ) +with expansion: + {?} + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( *ptr == 0 ) +with expansion: + 0 == 0 + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( ptr.get() == naked_ptr ) +with expansion: + 0x == 0x + +------------------------------------------------------------------------------- +unique_ptr reimplementation: basic functionality + Take ownership of allocation + Plain reset deallocates +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE_FALSE( ptr ) +with expansion: + !{?} + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( ptr.get() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +unique_ptr reimplementation: basic functionality + Take ownership of allocation +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( ptr ) +with expansion: + {?} + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( *ptr == 0 ) +with expansion: + 0 == 0 + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( ptr.get() == naked_ptr ) +with expansion: + 0x == 0x + +------------------------------------------------------------------------------- +unique_ptr reimplementation: basic functionality + Take ownership of allocation + Reset replaces ownership +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( ptr ) +with expansion: + {?} + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( ptr.get() != 0 ) +with expansion: + 0x != 0 + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( *ptr == 2 ) +with expansion: + 2 == 2 + +------------------------------------------------------------------------------- +unique_ptr reimplementation: basic functionality + Release releases ownership +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + CHECK_FALSE( ptr ) +with expansion: + !{?} + +UniquePtr.tests.cpp:: PASSED: + CHECK( ptr.get() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +unique_ptr reimplementation: basic functionality + Move constructor +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE_FALSE( ptr1 ) +with expansion: + !{?} + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( ptr2 ) +with expansion: + {?} + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( *ptr2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +unique_ptr reimplementation: basic functionality + Move assignment +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE_FALSE( ptr2 ) +with expansion: + !{?} + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( ptr1 ) +with expansion: + {?} + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( *ptr1 == 2 ) +with expansion: + 2 == 2 + +------------------------------------------------------------------------------- +unique_ptr reimplementation: basic functionality + free swap +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( *ptr1 == 2 ) +with expansion: + 2 == 2 + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( *ptr2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +vec> -> toString +------------------------------------------------------------------------------- +ToStringVector.tests.cpp: +............................................................................... + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(v) == "{ }" ) +with expansion: + "{ }" == "{ }" + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(v) == "{ { \"hello\" }, { \"world\" } }" ) +with expansion: + "{ { "hello" }, { "world" } }" + == + "{ { "hello" }, { "world" } }" + +------------------------------------------------------------------------------- +vector -> toString +------------------------------------------------------------------------------- +ToStringVector.tests.cpp: +............................................................................... + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(bools) == "{ }" ) +with expansion: + "{ }" == "{ }" + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(bools) == "{ true }" ) +with expansion: + "{ true }" == "{ true }" + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(bools) == "{ true, false }" ) +with expansion: + "{ true, false }" == "{ true, false }" + +------------------------------------------------------------------------------- +vector -> toString +------------------------------------------------------------------------------- +ToStringVector.tests.cpp: +............................................................................... + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(vv) == "{ }" ) +with expansion: + "{ }" == "{ }" + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(vv) == "{ 42 }" ) +with expansion: + "{ 42 }" == "{ 42 }" + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(vv) == "{ 42, 250 }" ) +with expansion: + "{ 42, 250 }" == "{ 42, 250 }" + +------------------------------------------------------------------------------- +vector -> toString +------------------------------------------------------------------------------- +ToStringVector.tests.cpp: +............................................................................... + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(vv) == "{ }" ) +with expansion: + "{ }" == "{ }" + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(vv) == "{ 42 }" ) +with expansion: + "{ 42 }" == "{ 42 }" + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(vv) == "{ 42, 250 }" ) +with expansion: + "{ 42, 250 }" == "{ 42, 250 }" + +------------------------------------------------------------------------------- +vector -> toString +------------------------------------------------------------------------------- +ToStringVector.tests.cpp: +............................................................................... + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(vv) == "{ }" ) +with expansion: + "{ }" == "{ }" + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(vv) == "{ \"hello\" }" ) +with expansion: + "{ "hello" }" == "{ "hello" }" + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(vv) == "{ \"hello\", \"world\" }" ) +with expansion: + "{ "hello", "world" }" + == + "{ "hello", "world" }" + +------------------------------------------------------------------------------- +vectors can be sized and resized +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +vectors can be sized and resized + resizing bigger changes size and capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 10 ) +with expansion: + 10 == 10 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +vectors can be sized and resized +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +vectors can be sized and resized + resizing smaller changes size but not capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +vectors can be sized and resized + resizing smaller changes size but not capacity + We can use the 'swap trick' to reset the capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +vectors can be sized and resized +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +vectors can be sized and resized + reserving bigger changes capacity but not size +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +vectors can be sized and resized +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +vectors can be sized and resized + reserving smaller does not change size or capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +warmup +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( (iterations * rate) > Catch::Benchmark::Detail::warmup_time.count() ) +with expansion: + 160000000 (0x) > 100 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( (end - start) > Catch::Benchmark::Detail::warmup_time ) +with expansion: + 310016000 ns > 100 ms + +------------------------------------------------------------------------------- +weighted_average_quantile +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( q1 == 14.5 ) +with expansion: + 14.5 == 14.5 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( med == 18. ) +with expansion: + 18.0 == 18.0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( q3 == 23. ) +with expansion: + 23.0 == 23.0 + +------------------------------------------------------------------------------- +xmlentitycheck + embedded xml: it should be possible to embed xml characters, such as <, + " or &, or even whole documents within an attribute + +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +xmlentitycheck + encoded chars: these should all be encoded: &&&"""<<<&"<<&" +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +=============================================================================== +test cases: 419 | 313 passed | 86 failed | 6 skipped | 14 failed as expected +assertions: 2269 | 2087 passed | 147 failed | 35 failed as expected + diff --git a/tests/SelfTest/Baselines/console.sw.multi.approved.txt b/tests/SelfTest/Baselines/console.sw.multi.approved.txt new file mode 100644 index 0000000..418ccf7 --- /dev/null +++ b/tests/SelfTest/Baselines/console.sw.multi.approved.txt @@ -0,0 +1,19006 @@ +Filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals] +Randomness seeded to: 1 + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + is a Catch2 v host application. +Run with -? for options + +------------------------------------------------------------------------------- +# A test name that starts with a # +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + yay + +------------------------------------------------------------------------------- +#1027: Bitfields can be captured +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( y.v == 0 ) +with expansion: + 0 == 0 + +Compilation.tests.cpp:: PASSED: + REQUIRE( 0 == y.v ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +#1147 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( t1 == t2 ) +with expansion: + {?} == {?} + +Compilation.tests.cpp:: PASSED: + REQUIRE( t1 != t2 ) +with expansion: + {?} != {?} + +Compilation.tests.cpp:: PASSED: + REQUIRE( t1 < t2 ) +with expansion: + {?} < {?} + +Compilation.tests.cpp:: PASSED: + REQUIRE( t1 > t2 ) +with expansion: + {?} > {?} + +Compilation.tests.cpp:: PASSED: + REQUIRE( t1 <= t2 ) +with expansion: + {?} <= {?} + +Compilation.tests.cpp:: PASSED: + REQUIRE( t1 >= t2 ) +with expansion: + {?} >= {?} + +------------------------------------------------------------------------------- +#1175 - Hidden Test +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +#1238 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( std::memcmp(uarr, "123", sizeof(uarr)) == 0 ) +with expansion: + 0 == 0 +with messages: + uarr := "123" + sarr := "456" + +Compilation.tests.cpp:: PASSED: + REQUIRE( std::memcmp(sarr, "456", sizeof(sarr)) == 0 ) +with expansion: + 0 == 0 +with messages: + uarr := "123" + sarr := "456" + +------------------------------------------------------------------------------- +#1245 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +#1319: Sections can have description (even if it is not saved + SectionName +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +#1403 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( h1 == h2 ) +with expansion: + [1403 helper] == [1403 helper] + +------------------------------------------------------------------------------- +#1455 - INFO and WARN can start with a linebreak +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: warning: + +This info message starts with a linebreak + +This warning message starts with a linebreak + + +No assertions in test case '#1455 - INFO and WARN can start with a linebreak' + +------------------------------------------------------------------------------- +#1514: stderr/stdout is not captured in tests aborted by an exception +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: FAILED: +explicitly with message: + 1514 + +------------------------------------------------------------------------------- +#1548 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( std::is_same, TypeList>::value ) +with expansion: + true + +------------------------------------------------------------------------------- +#1905 -- test spec parser properly clears internal state between compound tests +------------------------------------------------------------------------------- +TestSpec.tests.cpp: +............................................................................... + +TestSpec.tests.cpp:: PASSED: + REQUIRE( spec.matches(*fakeTestCase("spec . char")) ) +with expansion: + true + +TestSpec.tests.cpp:: PASSED: + REQUIRE( spec.matches(*fakeTestCase("spec , char")) ) +with expansion: + true + +TestSpec.tests.cpp:: PASSED: + REQUIRE_FALSE( spec.matches(*fakeTestCase(R"(spec \, char)")) ) +with expansion: + !false + +------------------------------------------------------------------------------- +#1912 -- test spec parser handles escaping + Various parentheses +------------------------------------------------------------------------------- +TestSpec.tests.cpp: +............................................................................... + +TestSpec.tests.cpp:: PASSED: + REQUIRE( spec.matches(*fakeTestCase(R"(spec {a} char)")) ) +with expansion: + true + +TestSpec.tests.cpp:: PASSED: + REQUIRE( spec.matches(*fakeTestCase(R"(spec [a] char)")) ) +with expansion: + true + +TestSpec.tests.cpp:: PASSED: + REQUIRE_FALSE( spec.matches(*fakeTestCase("differs but has similar tag", "[a]")) ) +with expansion: + !false + +------------------------------------------------------------------------------- +#1912 -- test spec parser handles escaping + backslash in test name +------------------------------------------------------------------------------- +TestSpec.tests.cpp: +............................................................................... + +TestSpec.tests.cpp:: PASSED: + REQUIRE( spec.matches(*fakeTestCase(R"(spec \ char)")) ) +with expansion: + true + +------------------------------------------------------------------------------- +#1913 - GENERATE inside a for loop should not keep recreating the generator +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( counter < 7 ) +with expansion: + 3 < 7 + +------------------------------------------------------------------------------- +#1913 - GENERATE inside a for loop should not keep recreating the generator +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( counter < 7 ) +with expansion: + 6 < 7 + +------------------------------------------------------------------------------- +#1913 - GENERATEs can share a line +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i != j ) +with expansion: + 1 != 3 + +------------------------------------------------------------------------------- +#1913 - GENERATEs can share a line +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i != j ) +with expansion: + 1 != 4 + +------------------------------------------------------------------------------- +#1913 - GENERATEs can share a line +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i != j ) +with expansion: + 2 != 3 + +------------------------------------------------------------------------------- +#1913 - GENERATEs can share a line +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i != j ) +with expansion: + 2 != 4 + +------------------------------------------------------------------------------- +#1938 - GENERATE after a section + A +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with message: + A + +------------------------------------------------------------------------------- +#1938 - GENERATE after a section + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - GENERATE after a section + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - GENERATE after a section + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - Section followed by flat generate + A +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( 1 ) + +------------------------------------------------------------------------------- +#1938 - Section followed by flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - Section followed by flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + A +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with message: + A + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 1 + j := 3 + k := 5 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with message: + B + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 1 + j := 3 + k := 6 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with message: + B + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 1 + j := 4 + k := 5 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 1 + j := 4 + k := 6 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + A +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with message: + A + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 2 + j := 3 + k := 5 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with message: + B + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 2 + j := 3 + k := 6 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with message: + B + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 2 + j := 4 + k := 5 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 2 + j := 4 + k := 6 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 1 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 1 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 1 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 2 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 2 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 2 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 3 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 3 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 3 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +#1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +#1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +#2152 - ULP checks between differently signed values were wrong - double +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) ) +with expansion: + 0.0 is within 2 ULPs of -4.9406564584124654e-324 ([-1.4821969375237396e-323, + 4.9406564584124654e-324]) + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) ) +with expansion: + 0.0 not is within 1 ULPs of -4.9406564584124654e-324 ([-9.8813129168249309e- + 324, -0.0000000000000000e+00]) + +------------------------------------------------------------------------------- +#2152 - ULP checks between differently signed values were wrong - float +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) ) +with expansion: + 0.0f is within 2 ULPs of -1.40129846e-45f ([-4.20389539e-45, 1.40129846e-45]) + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) ) +with expansion: + 0.0f not is within 1 ULPs of -1.40129846e-45f ([-2.80259693e-45, -0. + 00000000e+00]) + +------------------------------------------------------------------------------- +#2615 - Throwing in constructor generator fails test case but does not abort +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: FAILED: +due to unexpected exception with message: + failure to init + +------------------------------------------------------------------------------- +#748 - captures with unexpected exceptions + outside assertions +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with messages: + answer := 42 + expected exception + +------------------------------------------------------------------------------- +#748 - captures with unexpected exceptions + inside REQUIRE_NOTHROW +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + REQUIRE_NOTHROW( thisThrows() ) +due to unexpected exception with messages: + answer := 42 + expected exception + +------------------------------------------------------------------------------- +#748 - captures with unexpected exceptions + inside REQUIRE_THROWS +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: PASSED: + REQUIRE_THROWS( thisThrows() ) +with message: + answer := 42 + +------------------------------------------------------------------------------- +#809 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( 42 == f ) +with expansion: + 42 == {?} + +------------------------------------------------------------------------------- +#833 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( a == t ) +with expansion: + 3 == 3 + +Compilation.tests.cpp:: PASSED: + CHECK( a == t ) +with expansion: + 3 == 3 + +Compilation.tests.cpp:: PASSED: + REQUIRE_THROWS( throws_int(true) ) + +Compilation.tests.cpp:: PASSED: + CHECK_THROWS_AS( throws_int(true), int ) + +Compilation.tests.cpp:: PASSED: + REQUIRE_NOTHROW( throws_int(false) ) + +Compilation.tests.cpp:: PASSED: + REQUIRE_THAT( "aaa", Catch::Matchers::EndsWith("aaa") ) +with expansion: + "aaa" ends with: "aaa" + +Compilation.tests.cpp:: PASSED: + REQUIRE( templated_tests(3) ) +with expansion: + true + +------------------------------------------------------------------------------- +#835 -- errno should not be touched by Catch2 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + CHECK( f() == 0 ) +with expansion: + 1 == 0 + +Misc.tests.cpp:: PASSED: + REQUIRE( errno_after == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +#872 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( x == 4 ) +with expansion: + {?} == 4 +with message: + dummy := 0 + +------------------------------------------------------------------------------- +#961 -- Dynamically created sections should all be reported + Looped section 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + Everything is OK + +------------------------------------------------------------------------------- +#961 -- Dynamically created sections should all be reported + Looped section 1 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + Everything is OK + +------------------------------------------------------------------------------- +#961 -- Dynamically created sections should all be reported + Looped section 2 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + Everything is OK + +------------------------------------------------------------------------------- +#961 -- Dynamically created sections should all be reported + Looped section 3 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + Everything is OK + +------------------------------------------------------------------------------- +#961 -- Dynamically created sections should all be reported + Looped section 4 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + Everything is OK + +------------------------------------------------------------------------------- +'Not' checks that should fail +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + CHECK( false != false ) + +Condition.tests.cpp:: FAILED: + CHECK( true != true ) + +Condition.tests.cpp:: FAILED: + CHECK( !true ) +with expansion: + false + +Condition.tests.cpp:: FAILED: + CHECK_FALSE( true ) +with expansion: + !true + +Condition.tests.cpp:: FAILED: + CHECK( !trueValue ) +with expansion: + false + +Condition.tests.cpp:: FAILED: + CHECK_FALSE( trueValue ) +with expansion: + !true + +Condition.tests.cpp:: FAILED: + CHECK( !(1 == 1) ) +with expansion: + false + +Condition.tests.cpp:: FAILED: + CHECK_FALSE( 1 == 1 ) + +------------------------------------------------------------------------------- +'Not' checks that should succeed +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: PASSED: + REQUIRE( false == false ) + +Condition.tests.cpp:: PASSED: + REQUIRE( true == true ) + +Condition.tests.cpp:: PASSED: + REQUIRE( !false ) +with expansion: + true + +Condition.tests.cpp:: PASSED: + REQUIRE_FALSE( false ) +with expansion: + !false + +Condition.tests.cpp:: PASSED: + REQUIRE( !falseValue ) +with expansion: + true + +Condition.tests.cpp:: PASSED: + REQUIRE_FALSE( falseValue ) +with expansion: + !false + +Condition.tests.cpp:: PASSED: + REQUIRE( !(1 == 2) ) +with expansion: + true + +Condition.tests.cpp:: PASSED: + REQUIRE_FALSE( 1 == 2 ) + +------------------------------------------------------------------------------- +(unimplemented) static bools can be evaluated + compare to true +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( is_true::value == true ) +with expansion: + true == true + +Tricky.tests.cpp:: PASSED: + REQUIRE( true == is_true::value ) +with expansion: + true == true + +------------------------------------------------------------------------------- +(unimplemented) static bools can be evaluated + compare to false +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( is_true::value == false ) +with expansion: + false == false + +Tricky.tests.cpp:: PASSED: + REQUIRE( false == is_true::value ) +with expansion: + false == false + +------------------------------------------------------------------------------- +(unimplemented) static bools can be evaluated + negation +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( !is_true::value ) +with expansion: + true + +------------------------------------------------------------------------------- +(unimplemented) static bools can be evaluated + double negation +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( !!is_true::value ) +with expansion: + true + +------------------------------------------------------------------------------- +(unimplemented) static bools can be evaluated + direct +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( is_true::value ) +with expansion: + true + +Tricky.tests.cpp:: PASSED: + REQUIRE_FALSE( is_true::value ) +with expansion: + !false + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 1 < 4 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 4 < 7 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 1 < 7 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 1 < 4 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 4 < 8 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 1 < 8 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 1 < 4 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 4 < 9 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 1 < 9 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 1 < 5 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 5 < 7 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 1 < 7 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 1 < 5 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 5 < 8 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 1 < 8 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 1 < 5 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 5 < 9 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 1 < 9 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 1 < 6 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 6 < 7 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 1 < 7 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 1 < 6 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 6 < 8 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 1 < 8 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 1 < 6 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 6 < 9 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 1 < 9 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 2 < 4 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 4 < 7 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 2 < 7 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 2 < 4 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 4 < 8 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 2 < 8 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 2 < 4 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 4 < 9 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 2 < 9 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 2 < 5 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 5 < 7 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 2 < 7 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 2 < 5 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 5 < 8 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 2 < 8 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 2 < 5 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 5 < 9 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 2 < 9 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 2 < 6 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 6 < 7 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 2 < 7 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 2 < 6 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 6 < 8 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 2 < 8 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 2 < 6 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 6 < 9 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 2 < 9 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 3 < 4 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 4 < 7 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 3 < 7 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 3 < 4 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 4 < 8 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 3 < 8 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 3 < 4 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 4 < 9 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 3 < 9 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 3 < 5 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 5 < 7 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 3 < 7 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 3 < 5 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 5 < 8 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 3 < 8 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 3 < 5 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 5 < 9 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 3 < 9 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 3 < 6 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 6 < 7 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 3 < 7 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 3 < 6 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 6 < 8 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 3 < 8 + +------------------------------------------------------------------------------- +3x3x3 ints +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + CHECK( x < y ) +with expansion: + 3 < 6 + +Generators.tests.cpp:: PASSED: + CHECK( y < z ) +with expansion: + 6 < 9 + +Generators.tests.cpp:: PASSED: + REQUIRE( x < z ) +with expansion: + 3 < 9 + +------------------------------------------------------------------------------- +A METHOD_AS_TEST_CASE based test run that fails +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( s == "world" ) +with expansion: + "hello" == "world" + +------------------------------------------------------------------------------- +A METHOD_AS_TEST_CASE based test run that succeeds +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( s == "hello" ) +with expansion: + "hello" == "hello" + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2::m_a.size() == 1 ) +with expansion: + 0 == 1 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2::m_a.size() == 1 ) +with expansion: + 0 == 1 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2::m_a.size() == 1 ) +with expansion: + 0 == 1 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2::m_a.size() == 1 ) +with expansion: + 0 == 1 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2::m_a.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2::m_a.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2::m_a.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2::m_a.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - +Template_Foo_2 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2{}.m_a.size() < 2 ) +with expansion: + 6 < 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - +Template_Foo_2 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2{}.m_a.size() < 2 ) +with expansion: + 2 < 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2{}.m_a.size() < 2 ) +with expansion: + 6 < 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array + +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture_2{}.m_a.size() < 2 ) +with expansion: + 2 < 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - +Template_Foo_2 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2{}.m_a.size() >= 2 ) +with expansion: + 6 >= 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - +Template_Foo_2 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2{}.m_a.size() >= 2 ) +with expansion: + 2 >= 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std:: +array +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2{}.m_a.size() >= 2 ) +with expansion: + 6 >= 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std:: +array +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2{}.m_a.size() >= 2 ) +with expansion: + 2 >= 2 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD based test run that fails - double +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture::m_a == 2 ) +with expansion: + 1.0 == 2 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD based test run that fails - float +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture::m_a == 2 ) +with expansion: + 1.0f == 2 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD based test run that fails - int +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Template_Fixture::m_a == 2 ) +with expansion: + 1 == 2 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - double +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture::m_a == 1 ) +with expansion: + 1.0 == 1 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - float +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture::m_a == 1 ) +with expansion: + 1.0f == 1 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - int +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture::m_a == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Nttp_Fixture::value == 0 ) +with expansion: + 1 == 0 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Nttp_Fixture::value == 0 ) +with expansion: + 3 == 0 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( Nttp_Fixture::value == 0 ) +with expansion: + 6 == 0 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Nttp_Fixture::value > 0 ) +with expansion: + 1 > 0 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 3 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Nttp_Fixture::value > 0 ) +with expansion: + 3 > 0 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 6 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Nttp_Fixture::value > 0 ) +with expansion: + 6 > 0 + +------------------------------------------------------------------------------- +A TEST_CASE_METHOD based test run that fails +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( m_a == 2 ) +with expansion: + 1 == 2 + +------------------------------------------------------------------------------- +A TEST_CASE_METHOD based test run that succeeds +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( m_a == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +A TEST_CASE_PERSISTENT_FIXTURE based test run that fails + First partial run +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( m_a++ == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A TEST_CASE_PERSISTENT_FIXTURE based test run that fails + Second partial run +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: FAILED: + REQUIRE( m_a == 0 ) +with expansion: + 1 == 0 + +------------------------------------------------------------------------------- +A TEST_CASE_PERSISTENT_FIXTURE based test run that succeeds + First partial run +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( m_a++ == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A TEST_CASE_PERSISTENT_FIXTURE based test run that succeeds + Second partial run +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( m_a == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +A Template product test case - Foo +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( x.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A Template product test case - Foo +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( x.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A Template product test case - std::vector +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( x.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A Template product test case - std::vector +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( x.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A Template product test case with array signature - Bar +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( x.size() > 0 ) +with expansion: + 42 > 0 + +------------------------------------------------------------------------------- +A Template product test case with array signature - Bar +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( x.size() > 0 ) +with expansion: + 9 > 0 + +------------------------------------------------------------------------------- +A Template product test case with array signature - std::array +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( x.size() > 0 ) +with expansion: + 42 > 0 + +------------------------------------------------------------------------------- +A Template product test case with array signature - std::array +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( x.size() > 0 ) +with expansion: + 9 > 0 + +------------------------------------------------------------------------------- +A comparison that uses literals instead of the normal constructor +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( d == 1.23_a ) +with expansion: + 1.22999999999999998 + == + Approx( 1.22999999999999998 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d != 1.22_a ) +with expansion: + 1.22999999999999998 + != + Approx( 1.21999999999999997 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( -d == -1.23_a ) +with expansion: + -1.22999999999999998 + == + Approx( -1.22999999999999998 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d == 1.2_a .epsilon(.1) ) +with expansion: + 1.22999999999999998 + == + Approx( 1.19999999999999996 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d != 1.2_a .epsilon(.001) ) +with expansion: + 1.22999999999999998 + != + Approx( 1.19999999999999996 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d == 1_a .epsilon(.3) ) +with expansion: + 1.22999999999999998 == Approx( 1.0 ) + +------------------------------------------------------------------------------- +A couple of nested sections followed by a failure + Outer + Inner +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + that's not flying - that's failing in style + +------------------------------------------------------------------------------- +A couple of nested sections followed by a failure +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: +explicitly with message: + to infinity and beyond + +------------------------------------------------------------------------------- +A failing expression with a non streamable type is still captured +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: FAILED: + CHECK( &o1 == &o2 ) +with expansion: + 0x == 0x + +Tricky.tests.cpp:: FAILED: + CHECK( o1 == o2 ) +with expansion: + {?} == {?} + +------------------------------------------------------------------------------- +Absolute margin +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( 104.0 != Approx(100.0) ) +with expansion: + 104.0 != Approx( 100.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( 104.0 == Approx(100.0).margin(5) ) +with expansion: + 104.0 == Approx( 100.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( 104.0 == Approx(100.0).margin(4) ) +with expansion: + 104.0 == Approx( 100.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( 104.0 != Approx(100.0).margin(3) ) +with expansion: + 104.0 != Approx( 100.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( 100.3 != Approx(100.0) ) +with expansion: + 100.29999999999999716 != Approx( 100.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( 100.3 == Approx(100.0).margin(0.5) ) +with expansion: + 100.29999999999999716 == Approx( 100.0 ) + +------------------------------------------------------------------------------- +An empty test with no assertions +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + + +No assertions in test case 'An empty test with no assertions' + +------------------------------------------------------------------------------- +An expression with side-effects should only be evaluated once +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( i++ == 7 ) +with expansion: + 7 == 7 + +Tricky.tests.cpp:: PASSED: + REQUIRE( i++ == 8 ) +with expansion: + 8 == 8 + +------------------------------------------------------------------------------- +An unchecked exception reports the line of the last assertion +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: PASSED: + CHECK( 1 == 1 ) + +Exception.tests.cpp:: FAILED: + {Unknown expression after the reported line} +due to unexpected exception with message: + unexpected exception + +------------------------------------------------------------------------------- +Anonymous test case 1 +------------------------------------------------------------------------------- +VariadicMacros.tests.cpp: +............................................................................... + +VariadicMacros.tests.cpp:: PASSED: +with message: + anonymous test case + +------------------------------------------------------------------------------- +Approx setters validate their arguments +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE_NOTHROW( Approx(0).margin(0) ) + +Approx.tests.cpp:: PASSED: + REQUIRE_NOTHROW( Approx(0).margin(1234656) ) + +Approx.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( Approx(0).margin(-2), std::domain_error ) + +Approx.tests.cpp:: PASSED: + REQUIRE_NOTHROW( Approx(0).epsilon(0) ) + +Approx.tests.cpp:: PASSED: + REQUIRE_NOTHROW( Approx(0).epsilon(1) ) + +Approx.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( Approx(0).epsilon(-0.001), std::domain_error ) + +Approx.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( Approx(0).epsilon(1.0001), std::domain_error ) + +------------------------------------------------------------------------------- +Approx with exactly-representable margin +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + CHECK( 0.25f == Approx(0.0f).margin(0.25f) ) +with expansion: + 0.25f == Approx( 0.0 ) + +Approx.tests.cpp:: PASSED: + CHECK( 0.0f == Approx(0.25f).margin(0.25f) ) +with expansion: + 0.0f == Approx( 0.25 ) + +Approx.tests.cpp:: PASSED: + CHECK( 0.5f == Approx(0.25f).margin(0.25f) ) +with expansion: + 0.5f == Approx( 0.25 ) + +Approx.tests.cpp:: PASSED: + CHECK( 245.0f == Approx(245.25f).margin(0.25f) ) +with expansion: + 245.0f == Approx( 245.25 ) + +Approx.tests.cpp:: PASSED: + CHECK( 245.5f == Approx(245.25f).margin(0.25f) ) +with expansion: + 245.5f == Approx( 245.25 ) + +------------------------------------------------------------------------------- +Approximate PI +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) ) +with expansion: + 3.14285714285714279 + == + Approx( 3.14100000000000001 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) ) +with expansion: + 3.14285714285714279 + != + Approx( 3.14100000000000001 ) + +------------------------------------------------------------------------------- +Approximate comparisons with different epsilons +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( d != Approx( 1.231 ) ) +with expansion: + 1.22999999999999998 + != + Approx( 1.23100000000000009 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d == Approx( 1.231 ).epsilon( 0.1 ) ) +with expansion: + 1.22999999999999998 + == + Approx( 1.23100000000000009 ) + +------------------------------------------------------------------------------- +Approximate comparisons with floats +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( 1.23f == Approx( 1.23f ) ) +with expansion: + 1.230000019f + == + Approx( 1.23000001907348633 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( 0.0f == Approx( 0.0f ) ) +with expansion: + 0.0f == Approx( 0.0 ) + +------------------------------------------------------------------------------- +Approximate comparisons with ints +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( 1 == Approx( 1 ) ) +with expansion: + 1 == Approx( 1.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( 0 == Approx( 0 ) ) +with expansion: + 0 == Approx( 0.0 ) + +------------------------------------------------------------------------------- +Approximate comparisons with mixed numeric types +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( 1.0f == Approx( 1 ) ) +with expansion: + 1.0f == Approx( 1.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( 0 == Approx( dZero) ) +with expansion: + 0 == Approx( 0.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( 0 == Approx( dSmall ).margin( 0.001 ) ) +with expansion: + 0 == Approx( 0.00001 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( 1.234f == Approx( dMedium ) ) +with expansion: + 1.233999968f + == + Approx( 1.23399999999999999 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( dMedium == Approx( 1.234f ) ) +with expansion: + 1.23399999999999999 + == + Approx( 1.23399996757507324 ) + +------------------------------------------------------------------------------- +Arbitrary predicate matcher + Function pointer +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, Predicate( alwaysTrue, "always true" ) ) +with expansion: + 1 matches predicate: "always true" + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, !Predicate( alwaysFalse, "always false" ) ) +with expansion: + 1 not matches predicate: "always false" + +------------------------------------------------------------------------------- +Arbitrary predicate matcher + Lambdas + different type +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( "Hello olleH", Predicate( []( std::string const& str ) -> bool { return str.front() == str.back(); }, "First and last character should be equal" ) ) +with expansion: + "Hello olleH" matches predicate: "First and last character should be equal" + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( "This wouldn't pass", !Predicate( []( std::string const& str ) -> bool { return str.front() == str.back(); } ) ) +with expansion: + "This wouldn't pass" not matches undescribed predicate + +------------------------------------------------------------------------------- +Assertion macros support bit operators and bool conversions +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( lhs | rhs ) +with expansion: + Val: 1 | Val: 2 + +Compilation.tests.cpp:: PASSED: + REQUIRE_FALSE( lhs & rhs ) +with expansion: + !(Val: 1 & Val: 2) + +Compilation.tests.cpp:: PASSED: + REQUIRE( HasBitOperators{ 1 } & HasBitOperators{ 1 } ) +with expansion: + Val: 1 & Val: 1 + +Compilation.tests.cpp:: PASSED: + REQUIRE( lhs ^ rhs ) +with expansion: + Val: 1 ^ Val: 2 + +Compilation.tests.cpp:: PASSED: + REQUIRE_FALSE( lhs ^ lhs ) +with expansion: + !(Val: 1 ^ Val: 1) + +------------------------------------------------------------------------------- +Assertions then sections +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( true ) + +------------------------------------------------------------------------------- +Assertions then sections + A section +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( true ) + +------------------------------------------------------------------------------- +Assertions then sections + A section + Another section +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( true ) + +------------------------------------------------------------------------------- +Assertions then sections +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( true ) + +------------------------------------------------------------------------------- +Assertions then sections + A section +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( true ) + +------------------------------------------------------------------------------- +Assertions then sections + A section + Another other section +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( true ) + +------------------------------------------------------------------------------- +Basic use of the Contains range matcher + Different argument ranges, same element type, default comparison +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( a, Contains(1) ) +with expansion: + { 1, 2, 3 } contains element 1 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( b, Contains(1) ) +with expansion: + { 0, 1, 2 } contains element 1 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( c, !Contains(1) ) +with expansion: + { 4, 5, 6 } not contains element 1 + +------------------------------------------------------------------------------- +Basic use of the Contains range matcher + Different argument ranges, same element type, custom comparison +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( a, Contains(0, close_enough) ) +with expansion: + { 1, 2, 3 } contains element 0 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( b, Contains(0, close_enough) ) +with expansion: + { 0, 1, 2 } contains element 0 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( c, !Contains(0, close_enough) ) +with expansion: + { 4, 5, 6 } not contains element 0 + +------------------------------------------------------------------------------- +Basic use of the Contains range matcher + Different element type, custom comparisons +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( a, Contains(4, [](auto&& lhs, size_t sz) { return lhs.size() == sz; }) ) +with expansion: + { "abc", "abcd", "abcde" } contains element 4 + +------------------------------------------------------------------------------- +Basic use of the Contains range matcher + Can handle type that requires ADL-found free function begin and end +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( in, Contains(1) ) +with expansion: + { 1, 2, 3, 4, 5 } contains element 1 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( in, !Contains(8) ) +with expansion: + { 1, 2, 3, 4, 5 } not contains element 8 + +------------------------------------------------------------------------------- +Basic use of the Contains range matcher + Initialization with move only types +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( in, Contains(MoveOnlyTestElement{ 2 }) ) +with expansion: + { 1, 2, 3 } contains element 2 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( in, !Contains(MoveOnlyTestElement{ 9 }) ) +with expansion: + { 1, 2, 3 } not contains element 9 + +------------------------------------------------------------------------------- +Basic use of the Contains range matcher + Matching using matcher +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( in, Contains(Catch::Matchers::WithinAbs(0.5, 0.5)) ) +with expansion: + { 1.0, 2.0, 3.0, 0.0 } contains element matching is within 0.5 of 0.5 + +------------------------------------------------------------------------------- +Basic use of the Empty range matcher + Simple, std-provided containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( empty_array, IsEmpty() ) +with expansion: + { } is empty + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( non_empty_array, !IsEmpty() ) +with expansion: + { 0.0 } not is empty + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( empty_vec, IsEmpty() ) +with expansion: + { } is empty + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( non_empty_vec, !IsEmpty() ) +with expansion: + { 'a', 'b', 'c' } not is empty + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( inner_lists_are_empty, !IsEmpty() ) +with expansion: + { { } } not is empty + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( inner_lists_are_empty.front(), IsEmpty() ) +with expansion: + { } is empty + +------------------------------------------------------------------------------- +Basic use of the Empty range matcher + Type with empty +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( has_empty{}, !IsEmpty() ) +with expansion: + {?} not is empty + +------------------------------------------------------------------------------- +Basic use of the Empty range matcher + Type requires ADL found empty free function +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( unrelated::ADL_empty{}, IsEmpty() ) +with expansion: + {?} is empty + +------------------------------------------------------------------------------- +CAPTURE can deal with complex expressions +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: PASSED: +with messages: + a := 1 + b := 2 + c := 3 + a + b := 3 + a+b := 3 + c > b := true + a == 1 := true + +------------------------------------------------------------------------------- +CAPTURE can deal with complex expressions involving commas +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: PASSED: +with messages: + custom_index_op{1, 2, 3}[0, 1, 2] := 0 + custom_index_op{1, 2, 3}[(0, 1)] := 0 + custom_index_op{1, 2, 3}[0] := 0 + (helper_1436{12, -12}) := { 12, -12 } + (helper_1436(-12, 12)) := { -12, 12 } + (1, 2) := 2 + (2, 3) := 3 + +------------------------------------------------------------------------------- +CAPTURE parses string and character constants +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: PASSED: +with messages: + ("comma, in string", "escaped, \", ") := "escaped, ", " + "single quote in string,'," := "single quote in string,'," + "some escapes, \\,\\\\" := "some escapes, \,\\" + "some, ), unmatched, } prenheses {[<" := "some, ), unmatched, } prenheses {[ + <" + '"' := '"' + '\'' := ''' + ',' := ',' + '}' := '}' + ')' := ')' + '(' := '(' + '{' := '{' + +------------------------------------------------------------------------------- +Capture and info messages + Capture should stringify like assertions +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( true ) +with message: + i := 2 + +------------------------------------------------------------------------------- +Capture and info messages + Info should NOT stringify the way assertions do +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( true ) +with message: + 3 + +------------------------------------------------------------------------------- +CaseInsensitiveEqualsTo is case insensitive + Degenerate cases +------------------------------------------------------------------------------- +Details.tests.cpp: +............................................................................... + +Details.tests.cpp:: PASSED: + REQUIRE( eq( "", "" ) ) +with expansion: + true + +Details.tests.cpp:: PASSED: + REQUIRE_FALSE( eq( "", "a" ) ) +with expansion: + !false + +------------------------------------------------------------------------------- +CaseInsensitiveEqualsTo is case insensitive + Plain comparisons +------------------------------------------------------------------------------- +Details.tests.cpp: +............................................................................... + +Details.tests.cpp:: PASSED: + REQUIRE( eq( "a", "a" ) ) +with expansion: + true + +Details.tests.cpp:: PASSED: + REQUIRE( eq( "a", "A" ) ) +with expansion: + true + +Details.tests.cpp:: PASSED: + REQUIRE( eq( "A", "a" ) ) +with expansion: + true + +Details.tests.cpp:: PASSED: + REQUIRE( eq( "A", "A" ) ) +with expansion: + true + +Details.tests.cpp:: PASSED: + REQUIRE_FALSE( eq( "a", "b" ) ) +with expansion: + !false + +Details.tests.cpp:: PASSED: + REQUIRE_FALSE( eq( "a", "B" ) ) +with expansion: + !false + +------------------------------------------------------------------------------- +CaseInsensitiveLess is case insensitive + Degenerate cases +------------------------------------------------------------------------------- +Details.tests.cpp: +............................................................................... + +Details.tests.cpp:: PASSED: + REQUIRE( lt( "", "a" ) ) +with expansion: + true + +Details.tests.cpp:: PASSED: + REQUIRE_FALSE( lt( "a", "a" ) ) +with expansion: + !false + +Details.tests.cpp:: PASSED: + REQUIRE_FALSE( lt( "", "" ) ) +with expansion: + !false + +------------------------------------------------------------------------------- +CaseInsensitiveLess is case insensitive + Plain comparisons +------------------------------------------------------------------------------- +Details.tests.cpp: +............................................................................... + +Details.tests.cpp:: PASSED: + REQUIRE( lt( "a", "b" ) ) +with expansion: + true + +Details.tests.cpp:: PASSED: + REQUIRE( lt( "a", "B" ) ) +with expansion: + true + +Details.tests.cpp:: PASSED: + REQUIRE( lt( "A", "b" ) ) +with expansion: + true + +Details.tests.cpp:: PASSED: + REQUIRE( lt( "A", "B" ) ) +with expansion: + true + +------------------------------------------------------------------------------- +Character pretty printing + Specifically escaped +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify('\t') == "'\\t'" ) +with expansion: + "'\t'" == "'\t'" + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify('\n') == "'\\n'" ) +with expansion: + "'\n'" == "'\n'" + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify('\r') == "'\\r'" ) +with expansion: + "'\r'" == "'\r'" + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify('\f') == "'\\f'" ) +with expansion: + "'\f'" == "'\f'" + +------------------------------------------------------------------------------- +Character pretty printing + General chars +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( ' ' ) == "' '" ) +with expansion: + "' '" == "' '" + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( 'A' ) == "'A'" ) +with expansion: + "'A'" == "'A'" + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( 'z' ) == "'z'" ) +with expansion: + "'z'" == "'z'" + +------------------------------------------------------------------------------- +Character pretty printing + Low ASCII +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( '\0' ) == "0" ) +with expansion: + "0" == "0" + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( static_cast(2) ) == "2" ) +with expansion: + "2" == "2" + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( static_cast(5) ) == "5" ) +with expansion: + "5" == "5" + +------------------------------------------------------------------------------- +Clara::Arg does not crash on incomplete input +------------------------------------------------------------------------------- +Clara.tests.cpp: +............................................................................... + +Clara.tests.cpp:: PASSED: + CHECK( name.empty() ) +with expansion: + true + +Clara.tests.cpp:: PASSED: + CHECK( result ) +with expansion: + {?} + +Clara.tests.cpp:: PASSED: + CHECK( result.type() == Catch::Clara::Detail::ResultType::Ok ) +with expansion: + 0 == 0 + +Clara.tests.cpp:: PASSED: + CHECK( parsed.type() == Catch::Clara::ParseResultType::NoMatch ) +with expansion: + 1 == 1 + +Clara.tests.cpp:: PASSED: + CHECK( parsed.remainingTokens().count() == 2 ) +with expansion: + 2 == 2 + +Clara.tests.cpp:: PASSED: + CHECK( name.empty() ) +with expansion: + true + +------------------------------------------------------------------------------- +Clara::Arg supports single-arg parse the way Opt does +------------------------------------------------------------------------------- +Clara.tests.cpp: +............................................................................... + +Clara.tests.cpp:: PASSED: + CHECK( name.empty() ) +with expansion: + true + +Clara.tests.cpp:: PASSED: + REQUIRE( name == "foo" ) +with expansion: + "foo" == "foo" + +------------------------------------------------------------------------------- +Clara::Opt supports accept-many lambdas + Parsing fails on multiple options without accept_many +------------------------------------------------------------------------------- +Clara.tests.cpp: +............................................................................... + +Clara.tests.cpp:: PASSED: + CHECK_FALSE( parse_result ) +with expansion: + !{?} + +------------------------------------------------------------------------------- +Clara::Opt supports accept-many lambdas + Parsing succeeds on multiple options with accept_many +------------------------------------------------------------------------------- +Clara.tests.cpp: +............................................................................... + +Clara.tests.cpp:: PASSED: + CHECK( parse_result ) +with expansion: + {?} + +Clara.tests.cpp:: PASSED: + CHECK( res == std::vector{ "aaa", "bbb" } ) +with expansion: + { "aaa", "bbb" } == { "aaa", "bbb" } + +------------------------------------------------------------------------------- +ColourGuard behaviour + ColourGuard is disengaged by default +------------------------------------------------------------------------------- +ColourImpl.tests.cpp: +............................................................................... + +ColourImpl.tests.cpp:: PASSED: + REQUIRE( streamWrapper.str().empty() ) +with expansion: + true + +------------------------------------------------------------------------------- +ColourGuard behaviour + ColourGuard is engaged by op<< +------------------------------------------------------------------------------- +ColourImpl.tests.cpp: +............................................................................... + +ColourImpl.tests.cpp:: PASSED: + REQUIRE( streamWrapper.str() == "1\nUsing code: 2\n2\nUsing code: 0\n3\n" ) +with expansion: + "1 + Using code: 2 + 2 + Using code: 0 + 3 + " + == + "1 + Using code: 2 + 2 + Using code: 0 + 3 + " + +------------------------------------------------------------------------------- +ColourGuard behaviour + ColourGuard can be engaged explicitly +------------------------------------------------------------------------------- +ColourImpl.tests.cpp: +............................................................................... + +ColourImpl.tests.cpp:: PASSED: + REQUIRE( streamWrapper.str() == "Using code: 2\nA\nB\nUsing code: 0\nC\n" ) +with expansion: + "Using code: 2 + A + B + Using code: 0 + C + " + == + "Using code: 2 + A + B + Using code: 0 + C + " + +------------------------------------------------------------------------------- +Combining MatchAllOfGeneric does not nest +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same< decltype( ( MatcherA() && MatcherB() ) && MatcherC() ), Catch:: + Matchers::Detail:: MatchAllOfGeneric>::value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, ( MatcherA() && MatcherB() ) && MatcherC() ) +with expansion: + 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) + 1 ) + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same< decltype( MatcherA() && ( MatcherB() && MatcherC() ) ), Catch:: + Matchers::Detail:: MatchAllOfGeneric>::value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, MatcherA() && ( MatcherB() && MatcherC() ) ) +with expansion: + 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) + 1 ) + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same< decltype( ( MatcherA() && MatcherB() ) && ( MatcherC() && + MatcherD() ) ), Catch::Matchers::Detail:: MatchAllOfGeneric>:: value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, ( MatcherA() && MatcherB() ) && ( MatcherC() && MatcherD() ) ) +with expansion: + 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) + 1 and equals: true ) + +------------------------------------------------------------------------------- +Combining MatchAnyOfGeneric does not nest +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same< decltype( ( MatcherA() || MatcherB() ) || MatcherC() ), Catch:: + Matchers::Detail:: MatchAnyOfGeneric>::value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, ( MatcherA() || MatcherB() ) || MatcherC() ) +with expansion: + 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 + ) + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same< decltype( MatcherA() || ( MatcherB() || MatcherC() ) ), Catch:: + Matchers::Detail:: MatchAnyOfGeneric>::value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, MatcherA() || ( MatcherB() || MatcherC() ) ) +with expansion: + 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 + ) + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same< decltype( ( MatcherA() || MatcherB() ) || ( MatcherC() || + MatcherD() ) ), Catch::Matchers::Detail:: MatchAnyOfGeneric>:: value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, ( MatcherA() || MatcherB() ) || ( MatcherC() || MatcherD() ) ) +with expansion: + 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 + or equals: true ) + +------------------------------------------------------------------------------- +Combining MatchNotOfGeneric does not nest +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same< decltype( !MatcherA() ), Catch::Matchers::Detail:: + MatchNotOfGeneric>::value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0, !MatcherA() ) +with expansion: + 0 not equals: (int) 1 or (string) "1" + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same::value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, !!MatcherA() ) +with expansion: + 1 equals: (int) 1 or (string) "1" + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same< decltype( !!!MatcherA() ), Catch::Matchers::Detail:: + MatchNotOfGeneric>::value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0, !!!MatcherA() ) +with expansion: + 0 not equals: (int) 1 or (string) "1" + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same::value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, !!!!MatcherA() ) +with expansion: + 1 equals: (int) 1 or (string) "1" + +------------------------------------------------------------------------------- +Combining concrete matchers does not use templated matchers +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same>::value + +------------------------------------------------------------------------------- +Combining only templated matchers +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same>::value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, MatcherA() || MatcherB() ) +with expansion: + 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 ) + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same>::value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, MatcherA() && MatcherB() ) +with expansion: + 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 ) + +Matchers.tests.cpp:: PASSED: +with message: + std::is_same< decltype( MatcherA() || !MatcherB() ), Catch::Matchers::Detail: + :MatchAnyOfGeneric< MatcherA, Catch::Matchers::Detail::MatchNotOfGeneric + >>::value + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1, MatcherA() || !MatcherB() ) +with expansion: + 1 ( equals: (int) 1 or (string) "1" or not equals: (long long) 1 ) + +------------------------------------------------------------------------------- +Combining templated and concrete matchers +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( vec, Predicate>( []( auto const& v ) { return std::all_of( v.begin(), v.end(), []( int elem ) { return elem % 2 == 1; } ); }, "All elements are odd" ) && !EqualsRange( a ) ) +with expansion: + { 1, 3, 5 } ( matches predicate: "All elements are odd" and not Equals: { 5, + 3, 1 } ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( str, StartsWith( "foo" ) && EqualsRange( arr ) && EndsWith( "bar" ) ) +with expansion: + "foobar" ( starts with: "foo" and Equals: { 'f', 'o', 'o', 'b', 'a', 'r' } + and ends with: "bar" ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( str, StartsWith( "foo" ) && !EqualsRange( bad_arr ) && EndsWith( "bar" ) ) +with expansion: + "foobar" ( starts with: "foo" and not Equals: { 'o', 'o', 'f', 'b', 'a', 'r' + } and ends with: "bar" ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( str, EqualsRange( arr ) && StartsWith( "foo" ) && EndsWith( "bar" ) ) +with expansion: + "foobar" ( Equals: { 'f', 'o', 'o', 'b', 'a', 'r' } and starts with: "foo" + and ends with: "bar" ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( str, !EqualsRange( bad_arr ) && StartsWith( "foo" ) && EndsWith( "bar" ) ) +with expansion: + "foobar" ( not Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } and starts with: + "foo" and ends with: "bar" ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( str, EqualsRange( bad_arr ) || ( StartsWith( "foo" ) && EndsWith( "bar" ) ) ) +with expansion: + "foobar" ( Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } or ( starts with: "foo" + and ends with: "bar" ) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( str, ( StartsWith( "foo" ) && EndsWith( "bar" ) ) || EqualsRange( bad_arr ) ) +with expansion: + "foobar" ( ( starts with: "foo" and ends with: "bar" ) or Equals: { 'o', 'o', + 'f', 'b', 'a', 'r' } ) + +------------------------------------------------------------------------------- +Combining templated matchers +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( container, EqualsRange( a ) || EqualsRange( b ) || EqualsRange( c ) ) +with expansion: + { 1, 2, 3 } ( Equals: { 1, 2, 3 } or Equals: { 0, 1, 2 } or Equals: { 4, 5, 6 + } ) + +------------------------------------------------------------------------------- +Commas in various macros are allowed +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE_THROWS( std::vector{constructor_throws{}, constructor_throws{}} ) + +Tricky.tests.cpp:: PASSED: + CHECK_THROWS( std::vector{constructor_throws{}, constructor_throws{}} ) + +Tricky.tests.cpp:: PASSED: + REQUIRE_NOTHROW( std::vector{1, 2, 3} == std::vector{1, 2, 3} ) + +Tricky.tests.cpp:: PASSED: + CHECK_NOTHROW( std::vector{1, 2, 3} == std::vector{1, 2, 3} ) + +Tricky.tests.cpp:: PASSED: + REQUIRE( std::vector{1, 2} == std::vector{1, 2} ) +with expansion: + { 1, 2 } == { 1, 2 } + +Tricky.tests.cpp:: PASSED: + CHECK( std::vector{1, 2} == std::vector{1, 2} ) +with expansion: + { 1, 2 } == { 1, 2 } + +Tricky.tests.cpp:: PASSED: + REQUIRE_FALSE( std::vector{1, 2} == std::vector{1, 2, 3} ) +with expansion: + !({ 1, 2 } == { 1, 2, 3 }) + +Tricky.tests.cpp:: PASSED: + CHECK_FALSE( std::vector{1, 2} == std::vector{1, 2, 3} ) +with expansion: + !({ 1, 2 } == { 1, 2, 3 }) + +Tricky.tests.cpp:: PASSED: + CHECK_NOFAIL( std::vector{1, 2} == std::vector{1, 2} ) +with expansion: + { 1, 2 } == { 1, 2 } + +Tricky.tests.cpp:: PASSED: + CHECKED_IF( std::vector{1, 2} == std::vector{1, 2} ) +with expansion: + { 1, 2 } == { 1, 2 } + +Tricky.tests.cpp:: PASSED: + REQUIRE( true ) + +Tricky.tests.cpp:: PASSED: + CHECKED_ELSE( std::vector{1, 2} == std::vector{1, 2} ) +with expansion: + { 1, 2 } == { 1, 2 } + +------------------------------------------------------------------------------- +Comparing function pointers +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( a ) +with expansion: + 0x + +Tricky.tests.cpp:: PASSED: + REQUIRE( a == &foo ) +with expansion: + 0x == 0x + +------------------------------------------------------------------------------- +Comparison ops +------------------------------------------------------------------------------- +RandomNumberGeneration.tests.cpp: +............................................................................... + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( SimplePcg32{} == SimplePcg32{} ) +with expansion: + {?} == {?} + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( SimplePcg32{ 0 } != SimplePcg32{} ) +with expansion: + {?} != {?} + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE_FALSE( SimplePcg32{ 1 } == SimplePcg32{ 2 } ) +with expansion: + !({?} == {?}) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE_FALSE( SimplePcg32{ 1 } != SimplePcg32{ 1 } ) +with expansion: + !({?} != {?}) + +------------------------------------------------------------------------------- +Comparison with explicitly convertible types +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( td == Approx(10.0) ) +with expansion: + StrongDoubleTypedef(10) == Approx( 10.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( Approx(10.0) == td ) +with expansion: + Approx( 10.0 ) == StrongDoubleTypedef(10) + +Approx.tests.cpp:: PASSED: + REQUIRE( td != Approx(11.0) ) +with expansion: + StrongDoubleTypedef(10) != Approx( 11.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( Approx(11.0) != td ) +with expansion: + Approx( 11.0 ) != StrongDoubleTypedef(10) + +Approx.tests.cpp:: PASSED: + REQUIRE( td <= Approx(10.0) ) +with expansion: + StrongDoubleTypedef(10) <= Approx( 10.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( td <= Approx(11.0) ) +with expansion: + StrongDoubleTypedef(10) <= Approx( 11.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( Approx(10.0) <= td ) +with expansion: + Approx( 10.0 ) <= StrongDoubleTypedef(10) + +Approx.tests.cpp:: PASSED: + REQUIRE( Approx(9.0) <= td ) +with expansion: + Approx( 9.0 ) <= StrongDoubleTypedef(10) + +Approx.tests.cpp:: PASSED: + REQUIRE( td >= Approx(9.0) ) +with expansion: + StrongDoubleTypedef(10) >= Approx( 9.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( td >= Approx(td) ) +with expansion: + StrongDoubleTypedef(10) >= Approx( 10.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( Approx(td) >= td ) +with expansion: + Approx( 10.0 ) >= StrongDoubleTypedef(10) + +Approx.tests.cpp:: PASSED: + REQUIRE( Approx(11.0) >= td ) +with expansion: + Approx( 11.0 ) >= StrongDoubleTypedef(10) + +------------------------------------------------------------------------------- +Comparisons between ints where one side is computed +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: PASSED: + CHECK( 54 == 6*9 ) +with expansion: + 54 == 54 + +------------------------------------------------------------------------------- +Comparisons between unsigned ints and negative signed ints match c++ standard +behaviour +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: PASSED: + CHECK( ( -1 > 2u ) ) +with expansion: + true + +Condition.tests.cpp:: PASSED: + CHECK( -1 > 2u ) +with expansion: + -1 > 2 + +Condition.tests.cpp:: PASSED: + CHECK( ( 2u < -1 ) ) +with expansion: + true + +Condition.tests.cpp:: PASSED: + CHECK( 2u < -1 ) +with expansion: + 2 < -1 + +Condition.tests.cpp:: PASSED: + CHECK( ( minInt > 2u ) ) +with expansion: + true + +Condition.tests.cpp:: PASSED: + CHECK( minInt > 2u ) +with expansion: + -2147483648 > 2 + +------------------------------------------------------------------------------- +Comparisons with int literals don't warn when mixing signed/ unsigned +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: PASSED: + REQUIRE( i == 1 ) +with expansion: + 1 == 1 + +Condition.tests.cpp:: PASSED: + REQUIRE( ui == 2 ) +with expansion: + 2 == 2 + +Condition.tests.cpp:: PASSED: + REQUIRE( l == 3 ) +with expansion: + 3 == 3 + +Condition.tests.cpp:: PASSED: + REQUIRE( ul == 4 ) +with expansion: + 4 == 4 + +Condition.tests.cpp:: PASSED: + REQUIRE( c == 5 ) +with expansion: + 5 == 5 + +Condition.tests.cpp:: PASSED: + REQUIRE( uc == 6 ) +with expansion: + 6 == 6 + +Condition.tests.cpp:: PASSED: + REQUIRE( 1 == i ) +with expansion: + 1 == 1 + +Condition.tests.cpp:: PASSED: + REQUIRE( 2 == ui ) +with expansion: + 2 == 2 + +Condition.tests.cpp:: PASSED: + REQUIRE( 3 == l ) +with expansion: + 3 == 3 + +Condition.tests.cpp:: PASSED: + REQUIRE( 4 == ul ) +with expansion: + 4 == 4 + +Condition.tests.cpp:: PASSED: + REQUIRE( 5 == c ) +with expansion: + 5 == 5 + +Condition.tests.cpp:: PASSED: + REQUIRE( 6 == uc ) +with expansion: + 6 == 6 + +Condition.tests.cpp:: PASSED: + REQUIRE( (std::numeric_limits::max)() > ul ) +with expansion: + 4294967295 (0x) > 4 + +------------------------------------------------------------------------------- +Composed generic matchers shortcircuit + MatchAllOf +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_FALSE( matcher.match( 1 ) ) +with expansion: + !false + +Matchers.tests.cpp:: PASSED: + REQUIRE( first.matchCalled ) +with expansion: + true + +Matchers.tests.cpp:: PASSED: + REQUIRE( !second.matchCalled ) +with expansion: + true + +------------------------------------------------------------------------------- +Composed generic matchers shortcircuit + MatchAnyOf +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK( matcher.match( 1 ) ) +with expansion: + true + +Matchers.tests.cpp:: PASSED: + REQUIRE( first.matchCalled ) +with expansion: + true + +Matchers.tests.cpp:: PASSED: + REQUIRE( !second.matchCalled ) +with expansion: + true + +------------------------------------------------------------------------------- +Composed matchers shortcircuit + MatchAllOf +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_FALSE( matcher.match( 1 ) ) +with expansion: + !false + +Matchers.tests.cpp:: PASSED: + REQUIRE( first.matchCalled ) +with expansion: + true + +Matchers.tests.cpp:: PASSED: + REQUIRE( !second.matchCalled ) +with expansion: + true + +------------------------------------------------------------------------------- +Composed matchers shortcircuit + MatchAnyOf +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK( matcher.match( 1 ) ) +with expansion: + true + +Matchers.tests.cpp:: PASSED: + REQUIRE( first.matchCalled ) +with expansion: + true + +Matchers.tests.cpp:: PASSED: + REQUIRE( !second.matchCalled ) +with expansion: + true + +------------------------------------------------------------------------------- +Contains string matcher +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "not there" (case + insensitive) + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "STRING" + +------------------------------------------------------------------------------- +Copy and then generate a range + from var and iterators +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + from var and iterators +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + from var and iterators +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + from var and iterators +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + from var and iterators +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + from var and iterators +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + From a temporary container +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + From a temporary container +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + From a temporary container +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + From a temporary container +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + From a temporary container +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + From a temporary container +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( elem % 2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Copy and then generate a range + Final validation +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( call_count == 1 ) +with expansion: + 1 == 1 + +Generators.tests.cpp:: PASSED: + REQUIRE( make_data().size() == test_count ) +with expansion: + 6 == 6 + +------------------------------------------------------------------------------- +Cout stream properly declares it writes to stdout +------------------------------------------------------------------------------- +Stream.tests.cpp: +............................................................................... + +Stream.tests.cpp:: PASSED: + REQUIRE( Catch::makeStream( "-" )->isConsole() ) +with expansion: + true + +------------------------------------------------------------------------------- +Custom exceptions can be translated when testing for nothrow +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + REQUIRE_NOTHROW( throwCustom() ) +due to unexpected exception with message: + custom exception - not std + +------------------------------------------------------------------------------- +Custom exceptions can be translated when testing for throwing as something else +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + REQUIRE_THROWS_AS( throwCustom(), std::exception ) +due to unexpected exception with message: + custom exception - not std + +------------------------------------------------------------------------------- +Custom std-exceptions can be custom translated +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with message: + custom std exception + +------------------------------------------------------------------------------- +Default scale is invisible to comparison +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( 101.000001 != Approx(100).epsilon(0.01) ) +with expansion: + 101.00000099999999748 != Approx( 100.0 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( std::pow(10, -5) != Approx(std::pow(10, -7)) ) +with expansion: + 0.00001 != Approx( 0.0000001 ) + +------------------------------------------------------------------------------- +Directly creating an EnumInfo +------------------------------------------------------------------------------- +ToString.tests.cpp: +............................................................................... + +ToString.tests.cpp:: PASSED: + CHECK( enumInfo->lookup(0) == "Value1" ) +with expansion: + Value1 == "Value1" + +ToString.tests.cpp:: PASSED: + CHECK( enumInfo->lookup(1) == "Value2" ) +with expansion: + Value2 == "Value2" + +ToString.tests.cpp:: PASSED: + CHECK( enumInfo->lookup(3) == "{** unexpected enum value **}" ) +with expansion: + {** unexpected enum value **} + == + "{** unexpected enum value **}" + +------------------------------------------------------------------------------- +Empty generators can SKIP in constructor +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: +explicitly with message: + This generator is empty + +------------------------------------------------------------------------------- +Empty stream name opens cout stream +------------------------------------------------------------------------------- +Stream.tests.cpp: +............................................................................... + +Stream.tests.cpp:: PASSED: + REQUIRE( Catch::makeStream( "" )->isConsole() ) +with expansion: + true + +------------------------------------------------------------------------------- +EndsWith string matcher +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), EndsWith( "Substring" ) ) +with expansion: + "this string contains 'abc' as a substring" ends with: "Substring" + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" ends with: "this" (case + insensitive) + +------------------------------------------------------------------------------- +Enums can quickly have stringification enabled using CATCH_REGISTER_ENUM +------------------------------------------------------------------------------- +EnumToString.tests.cpp: +............................................................................... + +EnumToString.tests.cpp:: PASSED: + REQUIRE( stringify( EnumClass3::Value1 ) == "Value1" ) +with expansion: + "Value1" == "Value1" + +EnumToString.tests.cpp:: PASSED: + REQUIRE( stringify( EnumClass3::Value2 ) == "Value2" ) +with expansion: + "Value2" == "Value2" + +EnumToString.tests.cpp:: PASSED: + REQUIRE( stringify( EnumClass3::Value3 ) == "Value3" ) +with expansion: + "Value3" == "Value3" + +EnumToString.tests.cpp:: PASSED: + REQUIRE( stringify( EnumClass3::Value4 ) == "{** unexpected enum value **}" ) +with expansion: + "{** unexpected enum value **}" + == + "{** unexpected enum value **}" + +EnumToString.tests.cpp:: PASSED: + REQUIRE( stringify( ec3 ) == "Value2" ) +with expansion: + "Value2" == "Value2" + +------------------------------------------------------------------------------- +Enums in namespaces can quickly have stringification enabled using +CATCH_REGISTER_ENUM +------------------------------------------------------------------------------- +EnumToString.tests.cpp: +............................................................................... + +EnumToString.tests.cpp:: PASSED: + REQUIRE( stringify( Bikeshed::Colours::Red ) == "Red" ) +with expansion: + "Red" == "Red" + +EnumToString.tests.cpp:: PASSED: + REQUIRE( stringify( Bikeshed::Colours::Blue ) == "Blue" ) +with expansion: + "Blue" == "Blue" + +------------------------------------------------------------------------------- +Epsilon only applies to Approx's value +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( 101.01 != Approx(100).epsilon(0.01) ) +with expansion: + 101.01000000000000512 != Approx( 100.0 ) + +------------------------------------------------------------------------------- +Equality checks that should fail +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven == 6 ) +with expansion: + 7 == 6 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven == 8 ) +with expansion: + 7 == 8 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven == 0 ) +with expansion: + 7 == 0 + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one == Approx( 9.11f ) ) +with expansion: + 9.100000381f + == + Approx( 9.10999965667724609 ) + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one == Approx( 9.0f ) ) +with expansion: + 9.100000381f == Approx( 9.0 ) + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one == Approx( 1 ) ) +with expansion: + 9.100000381f == Approx( 1.0 ) + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one == Approx( 0 ) ) +with expansion: + 9.100000381f == Approx( 0.0 ) + +Condition.tests.cpp:: FAILED: + CHECK( data.double_pi == Approx( 3.1415 ) ) +with expansion: + 3.14159265350000005 + == + Approx( 3.14150000000000018 ) + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello == "goodbye" ) +with expansion: + "hello" == "goodbye" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello == "hell" ) +with expansion: + "hello" == "hell" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello == "hello1" ) +with expansion: + "hello" == "hello1" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello.size() == 6 ) +with expansion: + 5 == 6 + +Condition.tests.cpp:: FAILED: + CHECK( x == Approx( 1.301 ) ) +with expansion: + 1.30000000000000027 + == + Approx( 1.30099999999999993 ) + +------------------------------------------------------------------------------- +Equality checks that should succeed +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: PASSED: + REQUIRE( data.int_seven == 7 ) +with expansion: + 7 == 7 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.float_nine_point_one == Approx( 9.1f ) ) +with expansion: + 9.100000381f + == + Approx( 9.10000038146972656 ) + +Condition.tests.cpp:: PASSED: + REQUIRE( data.double_pi == Approx( 3.1415926535 ) ) +with expansion: + 3.14159265350000005 + == + Approx( 3.14159265350000005 ) + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello == "hello" ) +with expansion: + "hello" == "hello" + +Condition.tests.cpp:: PASSED: + REQUIRE( "hello" == data.str_hello ) +with expansion: + "hello" == "hello" + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello.size() == 5 ) +with expansion: + 5 == 5 + +Condition.tests.cpp:: PASSED: + REQUIRE( x == Approx( 1.3 ) ) +with expansion: + 1.30000000000000027 + == + Approx( 1.30000000000000004 ) + +------------------------------------------------------------------------------- +Equals +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), Equals( "this string contains 'abc' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" equals: "this string contains + 'abc' as a substring" + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), Equals( "this string contains 'ABC' as a substring", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" equals: "this string contains + 'abc' as a substring" (case insensitive) + +------------------------------------------------------------------------------- +Equals string matcher +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), Equals( "this string contains 'ABC' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" equals: "this string contains + 'ABC' as a substring" + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" equals: "something else" (case + insensitive) + +------------------------------------------------------------------------------- +Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(WhatException{}) == "This exception has overridden what() method" ) +with expansion: + "This exception has overridden what() method" + == + "This exception has overridden what() method" + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(OperatorException{}) == "OperatorException" ) +with expansion: + "OperatorException" == "OperatorException" + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(StringMakerException{}) == "StringMakerException" ) +with expansion: + "StringMakerException" + == + "StringMakerException" + +------------------------------------------------------------------------------- +Exception matchers that fail + No exception +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) +because no exception was thrown where one was expected: + +Matchers.tests.cpp:: FAILED: + REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) +because no exception was thrown where one was expected: + +------------------------------------------------------------------------------- +Exception matchers that fail + Type mismatch +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) +due to unexpected exception with message: + Unknown exception + +Matchers.tests.cpp:: FAILED: + REQUIRE_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) +due to unexpected exception with message: + Unknown exception + +------------------------------------------------------------------------------- +Exception matchers that fail + Contents are wrong +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THROWS_MATCHES( throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } ) +with expansion: + SpecialException::what special exception has value of 1 + +Matchers.tests.cpp:: FAILED: + REQUIRE_THROWS_MATCHES( throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } ) +with expansion: + SpecialException::what special exception has value of 1 + +------------------------------------------------------------------------------- +Exception matchers that succeed +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THROWS_MATCHES( throwsSpecialException( 1 ), SpecialException, ExceptionMatcher{ 1 } ) +with expansion: + SpecialException::what special exception has value of 1 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_MATCHES( throwsSpecialException( 2 ), SpecialException, ExceptionMatcher{ 2 } ) +with expansion: + SpecialException::what special exception has value of 2 + +------------------------------------------------------------------------------- +Exception message can be matched +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_MATCHES( throwsDerivedException(), DerivedException, MessageMatches( StartsWith( "Derived" ) ) ) +with expansion: + DerivedException::what matches "starts with: "Derived"" + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_MATCHES( throwsDerivedException(), DerivedException, MessageMatches( EndsWith( "::what" ) ) ) +with expansion: + DerivedException::what matches "ends with: "::what"" + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_MATCHES( throwsDerivedException(), DerivedException, MessageMatches( !StartsWith( "::what" ) ) ) +with expansion: + DerivedException::what matches "not starts with: "::what"" + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_MATCHES( throwsSpecialException( 2 ), SpecialException, MessageMatches( StartsWith( "Special" ) ) ) +with expansion: + SpecialException::what matches "starts with: "Special"" + +------------------------------------------------------------------------------- +Exception messages can be tested for + exact match +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: PASSED: + REQUIRE_THROWS_WITH( thisThrows(), "expected exception" ) +with expansion: + "expected exception" equals: "expected exception" + +------------------------------------------------------------------------------- +Exception messages can be tested for + different case +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: PASSED: + REQUIRE_THROWS_WITH( thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) ) +with expansion: + "expected exception" equals: "expected exception" (case insensitive) + +------------------------------------------------------------------------------- +Exception messages can be tested for + wildcarded +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: PASSED: + REQUIRE_THROWS_WITH( thisThrows(), StartsWith( "expected" ) ) +with expansion: + "expected exception" starts with: "expected" + +Exception.tests.cpp:: PASSED: + REQUIRE_THROWS_WITH( thisThrows(), EndsWith( "exception" ) ) +with expansion: + "expected exception" ends with: "exception" + +Exception.tests.cpp:: PASSED: + REQUIRE_THROWS_WITH( thisThrows(), ContainsSubstring( "except" ) ) +with expansion: + "expected exception" contains: "except" + +Exception.tests.cpp:: PASSED: + REQUIRE_THROWS_WITH( thisThrows(), ContainsSubstring( "exCept", Catch::CaseSensitive::No ) ) +with expansion: + "expected exception" contains: "except" (case insensitive) + +------------------------------------------------------------------------------- +Exceptions matchers +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_MATCHES( throwsDerivedException(), DerivedException, Message( "DerivedException::what" ) ) +with expansion: + DerivedException::what exception message matches "DerivedException::what" + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_MATCHES( throwsDerivedException(), DerivedException, !Message( "derivedexception::what" ) ) +with expansion: + DerivedException::what not exception message matches "derivedexception::what" + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_MATCHES( throwsSpecialException( 2 ), SpecialException, !Message( "DerivedException::what" ) ) +with expansion: + SpecialException::what not exception message matches "DerivedException::what" + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_MATCHES( throwsSpecialException( 2 ), SpecialException, Message( "SpecialException::what" ) ) +with expansion: + SpecialException::what exception message matches "SpecialException::what" + +------------------------------------------------------------------------------- +Expected exceptions that don't throw or unexpected exceptions fail the test +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + CHECK_THROWS_AS( thisThrows(), std::string ) +due to unexpected exception with message: + expected exception + +Exception.tests.cpp:: FAILED: + CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error ) +because no exception was thrown where one was expected: + +Exception.tests.cpp:: FAILED: + CHECK_NOTHROW( thisThrows() ) +due to unexpected exception with message: + expected exception + +------------------------------------------------------------------------------- +FAIL aborts the test +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: +explicitly with message: + This is a failure + +------------------------------------------------------------------------------- +FAIL does not require an argument +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +FAIL_CHECK does not abort the test +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: +explicitly with message: + This is a failure + +Message.tests.cpp:: warning: + This message appears in the output + +------------------------------------------------------------------------------- +Factorials are computed +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( Factorial(0) == 1 ) +with expansion: + 1 == 1 + +Misc.tests.cpp:: PASSED: + REQUIRE( Factorial(1) == 1 ) +with expansion: + 1 == 1 + +Misc.tests.cpp:: PASSED: + REQUIRE( Factorial(2) == 2 ) +with expansion: + 2 == 2 + +Misc.tests.cpp:: PASSED: + REQUIRE( Factorial(3) == 6 ) +with expansion: + 6 == 6 + +Misc.tests.cpp:: PASSED: + REQUIRE( Factorial(10) == 3628800 ) +with expansion: + 3628800 (0x) == 3628800 (0x) + +------------------------------------------------------------------------------- +Filter generator throws exception for empty generator +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( filter( []( int ) { return false; }, value( 3 ) ), Catch::GeneratorException ) + +------------------------------------------------------------------------------- +Floating point matchers: double + Relative +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 10., WithinRel( 11.1, 0.1 ) ) +with expansion: + 10.0 and 11.09999999999999964 are within 10% of each other + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 10., !WithinRel( 11.2, 0.1 ) ) +with expansion: + 10.0 not and 11.19999999999999929 are within 10% of each other + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1., !WithinRel( 0., 0.99 ) ) +with expansion: + 1.0 not and 0.0 are within 99% of each other + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( -0., WithinRel( 0. ) ) +with expansion: + -0.0 and 0.0 are within 2.22045e-12% of each other + +------------------------------------------------------------------------------- +Floating point matchers: double + Relative + Some subnormal values +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( v1, WithinRel( v2 ) ) +with expansion: + 0.0 and 0.0 are within 2.22045e-12% of each other + +------------------------------------------------------------------------------- +Floating point matchers: double + Margin +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1., WithinAbs( 1., 0 ) ) +with expansion: + 1.0 is within 0.0 of 1.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0., WithinAbs( 1., 1 ) ) +with expansion: + 0.0 is within 1.0 of 1.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0., !WithinAbs( 1., 0.99 ) ) +with expansion: + 0.0 not is within 0.98999999999999999 of 1.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0., !WithinAbs( 1., 0.99 ) ) +with expansion: + 0.0 not is within 0.98999999999999999 of 1.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 11., !WithinAbs( 10., 0.5 ) ) +with expansion: + 11.0 not is within 0.5 of 10.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 10., !WithinAbs( 11., 0.5 ) ) +with expansion: + 10.0 not is within 0.5 of 11.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( -10., WithinAbs( -10., 0.5 ) ) +with expansion: + -10.0 is within 0.5 of -10.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( -10., WithinAbs( -9.6, 0.5 ) ) +with expansion: + -10.0 is within 0.5 of -9.59999999999999964 + +------------------------------------------------------------------------------- +Floating point matchers: double + ULPs +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1., WithinULP( 1., 0 ) ) +with expansion: + 1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1. + 0000000000000000e+00]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( nextafter( 1., 2. ), WithinULP( 1., 1 ) ) +with expansion: + 1.00000000000000022 is within 1 ULPs of 1.0000000000000000e+00 ([9. + 9999999999999989e-01, 1.0000000000000002e+00]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0., WithinULP( nextafter( 0., 1. ), 1 ) ) +with expansion: + 0.0 is within 1 ULPs of 4.9406564584124654e-324 ([0.0000000000000000e+00, 9. + 8813129168249309e-324]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1., WithinULP( nextafter( 1., 0. ), 1 ) ) +with expansion: + 1.0 is within 1 ULPs of 9.9999999999999989e-01 ([9.9999999999999978e-01, 1. + 0000000000000000e+00]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1., !WithinULP( nextafter( 1., 2. ), 0 ) ) +with expansion: + 1.0 not is within 0 ULPs of 1.0000000000000002e+00 ([1.0000000000000002e+00, + 1.0000000000000002e+00]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1., WithinULP( 1., 0 ) ) +with expansion: + 1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1. + 0000000000000000e+00]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( -0., WithinULP( 0., 0 ) ) +with expansion: + -0.0 is within 0 ULPs of 0.0000000000000000e+00 ([0.0000000000000000e+00, 0. + 0000000000000000e+00]) + +------------------------------------------------------------------------------- +Floating point matchers: double + Composed +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1., WithinAbs( 1., 0.5 ) || WithinULP( 2., 1 ) ) +with expansion: + 1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0000000000000000e+00 ([1. + 9999999999999998e+00, 2.0000000000000004e+00]) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1., WithinAbs( 2., 0.5 ) || WithinULP( 1., 0 ) ) +with expansion: + 1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0000000000000000e+00 ([1. + 0000000000000000e+00, 1.0000000000000000e+00]) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0.0001, WithinAbs( 0., 0.001 ) || WithinRel( 0., 0.1 ) ) +with expansion: + 0.0001 ( is within 0.001 of 0.0 or and 0.0 are within 10% of each other ) + +------------------------------------------------------------------------------- +Floating point matchers: double + Constructor validation +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_NOTHROW( WithinAbs( 1., 0. ) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( WithinAbs( 1., -1. ), std::domain_error ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_NOTHROW( WithinULP( 1., 0 ) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_NOTHROW( WithinRel( 1., 0. ) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( WithinRel( 1., -0.2 ), std::domain_error ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( WithinRel( 1., 1. ), std::domain_error ) + +------------------------------------------------------------------------------- +Floating point matchers: double + IsNaN +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1., !IsNaN() ) +with expansion: + 1.0 not is NaN + +------------------------------------------------------------------------------- +Floating point matchers: float + Relative +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 10.f, WithinRel( 11.1f, 0.1f ) ) +with expansion: + 10.0f and 11.10000038146972656 are within 10% of each other + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 10.f, !WithinRel( 11.2f, 0.1f ) ) +with expansion: + 10.0f not and 11.19999980926513672 are within 10% of each other + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1.f, !WithinRel( 0.f, 0.99f ) ) +with expansion: + 1.0f not and 0.0 are within 99% of each other + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( -0.f, WithinRel( 0.f ) ) +with expansion: + -0.0f and 0.0 are within 0.00119209% of each other + +------------------------------------------------------------------------------- +Floating point matchers: float + Relative + Some subnormal values +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( v1, WithinRel( v2 ) ) +with expansion: + 0.0f and 0.0 are within 0.00119209% of each other + +------------------------------------------------------------------------------- +Floating point matchers: float + Margin +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1.f, WithinAbs( 1.f, 0 ) ) +with expansion: + 1.0f is within 0.0 of 1.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0.f, WithinAbs( 1.f, 1 ) ) +with expansion: + 0.0f is within 1.0 of 1.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0.f, !WithinAbs( 1.f, 0.99f ) ) +with expansion: + 0.0f not is within 0.99000000953674316 of 1.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0.f, !WithinAbs( 1.f, 0.99f ) ) +with expansion: + 0.0f not is within 0.99000000953674316 of 1.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0.f, WithinAbs( -0.f, 0 ) ) +with expansion: + 0.0f is within 0.0 of -0.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 11.f, !WithinAbs( 10.f, 0.5f ) ) +with expansion: + 11.0f not is within 0.5 of 10.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 10.f, !WithinAbs( 11.f, 0.5f ) ) +with expansion: + 10.0f not is within 0.5 of 11.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( -10.f, WithinAbs( -10.f, 0.5f ) ) +with expansion: + -10.0f is within 0.5 of -10.0 + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( -10.f, WithinAbs( -9.6f, 0.5f ) ) +with expansion: + -10.0f is within 0.5 of -9.60000038146972656 + +------------------------------------------------------------------------------- +Floating point matchers: float + ULPs +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1.f, WithinULP( 1.f, 0 ) ) +with expansion: + 1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( -1.f, WithinULP( -1.f, 0 ) ) +with expansion: + -1.0f is within 0 ULPs of -1.00000000e+00f ([-1.00000000e+00, -1.00000000e+ + 00]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( nextafter( 1.f, 2.f ), WithinULP( 1.f, 1 ) ) +with expansion: + 1.000000119f is within 1 ULPs of 1.00000000e+00f ([9.99999940e-01, 1. + 00000012e+00]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0.f, WithinULP( nextafter( 0.f, 1.f ), 1 ) ) +with expansion: + 0.0f is within 1 ULPs of 1.40129846e-45f ([0.00000000e+00, 2.80259693e-45]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1.f, WithinULP( nextafter( 1.f, 0.f ), 1 ) ) +with expansion: + 1.0f is within 1 ULPs of 9.99999940e-01f ([9.99999881e-01, 1.00000000e+00]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1.f, !WithinULP( nextafter( 1.f, 2.f ), 0 ) ) +with expansion: + 1.0f not is within 0 ULPs of 1.00000012e+00f ([1.00000012e+00, 1.00000012e+ + 00]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1.f, WithinULP( 1.f, 0 ) ) +with expansion: + 1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( -0.f, WithinULP( 0.f, 0 ) ) +with expansion: + -0.0f is within 0 ULPs of 0.00000000e+00f ([0.00000000e+00, 0.00000000e+00]) + +------------------------------------------------------------------------------- +Floating point matchers: float + Composed +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1.f, WithinAbs( 1.f, 0.5 ) || WithinULP( 1.f, 1 ) ) +with expansion: + 1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.00000000e+00f ([9. + 99999940e-01, 1.00000012e+00]) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1.f, WithinAbs( 2.f, 0.5 ) || WithinULP( 1.f, 0 ) ) +with expansion: + 1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.00000000e+00f ([1. + 00000000e+00, 1.00000000e+00]) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 0.0001f, WithinAbs( 0.f, 0.001f ) || WithinRel( 0.f, 0.1f ) ) +with expansion: + 0.0001f ( is within 0.00100000004749745 of 0.0 or and 0.0 are within 10% of + each other ) + +------------------------------------------------------------------------------- +Floating point matchers: float + Constructor validation +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_NOTHROW( WithinAbs( 1.f, 0.f ) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( WithinAbs( 1.f, -1.f ), std::domain_error ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_NOTHROW( WithinULP( 1.f, 0 ) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( WithinULP( 1.f, static_cast( -1 ) ), std::domain_error ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_NOTHROW( WithinRel( 1.f, 0.f ) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( WithinRel( 1.f, -0.2f ), std::domain_error ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( WithinRel( 1.f, 1.f ), std::domain_error ) + +------------------------------------------------------------------------------- +Floating point matchers: float + IsNaN +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( 1., !IsNaN() ) +with expansion: + 1.0 not is NaN + +------------------------------------------------------------------------------- +GENERATE can combine literals and generators +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +GENERATE can combine literals and generators +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +GENERATE can combine literals and generators +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +GENERATE can combine literals and generators +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Filtering by predicate + Basic usage +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Filtering by predicate + Basic usage +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Filtering by predicate + Basic usage +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Filtering by predicate + Throws if there are no matching values +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( filter([] (int) {return false; }, value(1)), Catch::GeneratorException ) + +------------------------------------------------------------------------------- +Generators -- adapters + Shortening a range +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i < 4 ) +with expansion: + 1 < 4 + +------------------------------------------------------------------------------- +Generators -- adapters + Shortening a range +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i < 4 ) +with expansion: + 2 < 4 + +------------------------------------------------------------------------------- +Generators -- adapters + Shortening a range +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i < 4 ) +with expansion: + 3 < 4 + +------------------------------------------------------------------------------- +Generators -- adapters + Transforming elements + Same type +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Transforming elements + Same type +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Transforming elements + Same type +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Transforming elements + Different type +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i.size() == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Generators -- adapters + Transforming elements + Different type +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i.size() == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Generators -- adapters + Transforming elements + Different type +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i.size() == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Generators -- adapters + Transforming elements + Different deduced type +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i.size() == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Generators -- adapters + Transforming elements + Different deduced type +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i.size() == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Generators -- adapters + Transforming elements + Different deduced type +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i.size() == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Generators -- adapters + Repeating a generator +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j > 0 ) +with expansion: + 1 > 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Repeating a generator +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j > 0 ) +with expansion: + 2 > 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Repeating a generator +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j > 0 ) +with expansion: + 3 > 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Repeating a generator +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j > 0 ) +with expansion: + 1 > 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Repeating a generator +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j > 0 ) +with expansion: + 2 > 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Repeating a generator +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j > 0 ) +with expansion: + 3 > 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Chunking a generator into sized pieces + Number of elements in source is divisible by chunk size +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.size() == 2 ) +with expansion: + 2 == 2 + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.front() == chunk2.back() ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Generators -- adapters + Chunking a generator into sized pieces + Number of elements in source is divisible by chunk size +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.size() == 2 ) +with expansion: + 2 == 2 + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.front() == chunk2.back() ) +with expansion: + 2 == 2 + +------------------------------------------------------------------------------- +Generators -- adapters + Chunking a generator into sized pieces + Number of elements in source is divisible by chunk size +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.size() == 2 ) +with expansion: + 2 == 2 + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.front() == chunk2.back() ) +with expansion: + 3 == 3 + +------------------------------------------------------------------------------- +Generators -- adapters + Chunking a generator into sized pieces + Number of elements in source is not divisible by chunk size +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.size() == 2 ) +with expansion: + 2 == 2 + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.front() == chunk2.back() ) +with expansion: + 1 == 1 + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.front() < 3 ) +with expansion: + 1 < 3 + +------------------------------------------------------------------------------- +Generators -- adapters + Chunking a generator into sized pieces + Number of elements in source is not divisible by chunk size +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.size() == 2 ) +with expansion: + 2 == 2 + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.front() == chunk2.back() ) +with expansion: + 2 == 2 + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.front() < 3 ) +with expansion: + 2 < 3 + +------------------------------------------------------------------------------- +Generators -- adapters + Chunking a generator into sized pieces + Chunk size of zero +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Chunking a generator into sized pieces + Chunk size of zero +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Chunking a generator into sized pieces + Chunk size of zero +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( chunk2.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Generators -- adapters + Chunking a generator into sized pieces + Throws on too small generators +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( chunk(2, value(1)), Catch::GeneratorException ) + +------------------------------------------------------------------------------- +Generators -- simple + one +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j < i ) +with expansion: + -3 < 1 + +------------------------------------------------------------------------------- +Generators -- simple + one +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j < i ) +with expansion: + -2 < 1 + +------------------------------------------------------------------------------- +Generators -- simple + one +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j < i ) +with expansion: + -1 < 1 + +------------------------------------------------------------------------------- +Generators -- simple + two +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( 4u * i > str.size() ) +with expansion: + 4 > 1 + +------------------------------------------------------------------------------- +Generators -- simple + two +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( 4u * i > str.size() ) +with expansion: + 4 > 2 + +------------------------------------------------------------------------------- +Generators -- simple + two +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( 4u * i > str.size() ) +with expansion: + 4 > 3 + +------------------------------------------------------------------------------- +Generators -- simple + one +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j < i ) +with expansion: + -3 < 2 + +------------------------------------------------------------------------------- +Generators -- simple + one +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j < i ) +with expansion: + -2 < 2 + +------------------------------------------------------------------------------- +Generators -- simple + one +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j < i ) +with expansion: + -1 < 2 + +------------------------------------------------------------------------------- +Generators -- simple + two +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( 4u * i > str.size() ) +with expansion: + 8 > 1 + +------------------------------------------------------------------------------- +Generators -- simple + two +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( 4u * i > str.size() ) +with expansion: + 8 > 2 + +------------------------------------------------------------------------------- +Generators -- simple + two +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( 4u * i > str.size() ) +with expansion: + 8 > 3 + +------------------------------------------------------------------------------- +Generators -- simple + one +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j < i ) +with expansion: + -3 < 3 + +------------------------------------------------------------------------------- +Generators -- simple + one +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j < i ) +with expansion: + -2 < 3 + +------------------------------------------------------------------------------- +Generators -- simple + one +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( j < i ) +with expansion: + -1 < 3 + +------------------------------------------------------------------------------- +Generators -- simple + two +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( 4u * i > str.size() ) +with expansion: + 12 > 1 + +------------------------------------------------------------------------------- +Generators -- simple + two +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( 4u * i > str.size() ) +with expansion: + 12 > 2 + +------------------------------------------------------------------------------- +Generators -- simple + two +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( 4u * i > str.size() ) +with expansion: + 12 > 3 + +------------------------------------------------------------------------------- +Generators internals + Single value +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 123 ) +with expansion: + 123 == 123 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Preset values +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 1 ) +with expansion: + 1 == 1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 3 ) +with expansion: + 3 == 3 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 5 ) +with expansion: + 5 == 5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Generator combinator +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 1 ) +with expansion: + 1 == 1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 5 ) +with expansion: + 5 == 5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 4 ) +with expansion: + 4 == 4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 0 ) +with expansion: + 0 == 0 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Explicitly typed generator sequence +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get().size() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == "aa" ) +with expansion: + "aa" == "aa" + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == "bb" ) +with expansion: + "bb" == "bb" + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == "cc" ) +with expansion: + "cc" == "cc" + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Filter generator + Simple filtering +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 1 ) +with expansion: + 1 == 1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 3 ) +with expansion: + 3 == 3 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Filter generator + Filter out multiple elements at the start and end +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 1 ) +with expansion: + 1 == 1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 3 ) +with expansion: + 3 == 3 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Filter generator + Throws on construction if it can't get initial element +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( filter([](int) { return false; }, value(1)), Catch::GeneratorException ) + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( filter([](int) { return false; }, values({ 1, 2, 3 })), Catch::GeneratorException ) + +------------------------------------------------------------------------------- +Generators internals + Take generator + Take less +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 1 ) +with expansion: + 1 == 1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Take generator + Take more +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 1 ) +with expansion: + 1 == 1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Map with explicit return type +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2.0 ) +with expansion: + 2.0 == 2.0 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 4.0 ) +with expansion: + 4.0 == 4.0 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 6.0 ) +with expansion: + 6.0 == 6.0 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Map with deduced return type +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2.0 ) +with expansion: + 2.0 == 2.0 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 4.0 ) +with expansion: + 4.0 == 4.0 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 6.0 ) +with expansion: + 6.0 == 6.0 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Repeat + Singular repeat +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 3 ) +with expansion: + 3 == 3 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Repeat + Actual repeat +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 1 ) +with expansion: + 1 == 1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 3 ) +with expansion: + 3 == 3 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 1 ) +with expansion: + 1 == 1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 3 ) +with expansion: + 3 == 3 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Range + Positive auto step + Integer +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -2 ) +with expansion: + -2 == -2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -1 ) +with expansion: + -1 == -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 0 ) +with expansion: + 0 == 0 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 1 ) +with expansion: + 1 == 1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Range + Negative auto step + Integer +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 1 ) +with expansion: + 1 == 1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 0 ) +with expansion: + 0 == 0 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -1 ) +with expansion: + -1 == -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Range + Positive manual step + Integer + Exact +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -7 ) +with expansion: + -7 == -7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -4 ) +with expansion: + -4 == -4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -1 ) +with expansion: + -1 == -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Range + Positive manual step + Integer + Slightly over end +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -7 ) +with expansion: + -7 == -7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -4 ) +with expansion: + -4 == -4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -1 ) +with expansion: + -1 == -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Range + Positive manual step + Integer + Slightly under end +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -7 ) +with expansion: + -7 == -7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -4 ) +with expansion: + -4 == -4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -1 ) +with expansion: + -1 == -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 5 ) +with expansion: + 5 == 5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Range + Positive manual step + Floating Point + Exact +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -1.0 == Approx( -1.0 ) +with message: + Current expected value is -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.90000000000000002 + == + Approx( -0.90000000000000002 ) +with message: + Current expected value is -0.9 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.9 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.80000000000000004 + == + Approx( -0.80000000000000004 ) +with message: + Current expected value is -0.8 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.8 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.70000000000000007 + == + Approx( -0.70000000000000007 ) +with message: + Current expected value is -0.7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.60000000000000009 + == + Approx( -0.60000000000000009 ) +with message: + Current expected value is -0.6 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.6 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.50000000000000011 + == + Approx( -0.50000000000000011 ) +with message: + Current expected value is -0.5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.40000000000000013 + == + Approx( -0.40000000000000013 ) +with message: + Current expected value is -0.4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.30000000000000016 + == + Approx( -0.30000000000000016 ) +with message: + Current expected value is -0.3 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.3 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.20000000000000015 + == + Approx( -0.20000000000000015 ) +with message: + Current expected value is -0.2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.10000000000000014 + == + Approx( -0.10000000000000014 ) +with message: + Current expected value is -0.1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.00000000000000014 + == + Approx( -0.00000000000000014 ) +with message: + Current expected value is -1.38778e-16 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -1.38778e-16 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.09999999999999987 + == + Approx( 0.09999999999999987 ) +with message: + Current expected value is 0.1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.19999999999999987 + == + Approx( 0.19999999999999987 ) +with message: + Current expected value is 0.2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.29999999999999988 + == + Approx( 0.29999999999999988 ) +with message: + Current expected value is 0.3 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.3 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.39999999999999991 + == + Approx( 0.39999999999999991 ) +with message: + Current expected value is 0.4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.49999999999999989 + == + Approx( 0.49999999999999989 ) +with message: + Current expected value is 0.5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.59999999999999987 + == + Approx( 0.59999999999999987 ) +with message: + Current expected value is 0.6 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.6 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.69999999999999984 + == + Approx( 0.69999999999999984 ) +with message: + Current expected value is 0.7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.79999999999999982 + == + Approx( 0.79999999999999982 ) +with message: + Current expected value is 0.8 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.8 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.8999999999999998 + == + Approx( 0.8999999999999998 ) +with message: + Current expected value is 0.9 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.9 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx( rangeEnd ) ) +with expansion: + 0.99999999999999978 == Approx( 1.0 ) + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Range + Positive manual step + Floating Point + Slightly over end +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -1.0 == Approx( -1.0 ) +with message: + Current expected value is -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.69999999999999996 + == + Approx( -0.69999999999999996 ) +with message: + Current expected value is -0.7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.39999999999999997 + == + Approx( -0.39999999999999997 ) +with message: + Current expected value is -0.4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.09999999999999998 + == + Approx( -0.09999999999999998 ) +with message: + Current expected value is -0.1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.20000000000000001 + == + Approx( 0.20000000000000001 ) +with message: + Current expected value is 0.2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.5 == Approx( 0.5 ) +with message: + Current expected value is 0.5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Range + Positive manual step + Floating Point + Slightly under end +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -1.0 == Approx( -1.0 ) +with message: + Current expected value is -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.69999999999999996 + == + Approx( -0.69999999999999996 ) +with message: + Current expected value is -0.7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.39999999999999997 + == + Approx( -0.39999999999999997 ) +with message: + Current expected value is -0.4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + -0.09999999999999998 + == + Approx( -0.09999999999999998 ) +with message: + Current expected value is -0.1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is -0.1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.20000000000000001 + == + Approx( 0.20000000000000001 ) +with message: + Current expected value is 0.2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == Approx(expected) ) +with expansion: + 0.5 == Approx( 0.5 ) +with message: + Current expected value is 0.5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true +with message: + Current expected value is 0.5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Range + Negative manual step + Integer + Exact +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 5 ) +with expansion: + 5 == 5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -1 ) +with expansion: + -1 == -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -4 ) +with expansion: + -4 == -4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Range + Negative manual step + Integer + Slightly over end +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 5 ) +with expansion: + 5 == 5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -1 ) +with expansion: + -1 == -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -4 ) +with expansion: + -4 == -4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Generators internals + Range + Negative manual step + Integer + Slightly under end +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp: +............................................................................... + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 5 ) +with expansion: + 5 == 5 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == 2 ) +with expansion: + 2 == 2 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -1 ) +with expansion: + -1 == -1 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -4 ) +with expansion: + -4 == -4 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.next() ) +with expansion: + true + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE( gen.get() == -7 ) +with expansion: + -7 == -7 + +GeneratorsImpl.tests.cpp:: PASSED: + REQUIRE_FALSE( gen.next() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Greater-than inequalities with different epsilons +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( d >= Approx( 1.22 ) ) +with expansion: + 1.22999999999999998 + >= + Approx( 1.21999999999999997 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d >= Approx( 1.23 ) ) +with expansion: + 1.22999999999999998 + >= + Approx( 1.22999999999999998 ) + +Approx.tests.cpp:: PASSED: + REQUIRE_FALSE( d >= Approx( 1.24 ) ) +with expansion: + !(1.22999999999999998 + >= + Approx( 1.23999999999999999 )) + +Approx.tests.cpp:: PASSED: + REQUIRE( d >= Approx( 1.24 ).epsilon(0.1) ) +with expansion: + 1.22999999999999998 + >= + Approx( 1.23999999999999999 ) + +------------------------------------------------------------------------------- +Hashers with different seed produce different hash with same test case +------------------------------------------------------------------------------- +TestCaseInfoHasher.tests.cpp: +............................................................................... + +TestCaseInfoHasher.tests.cpp:: PASSED: + REQUIRE( h1( dummy ) != h2( dummy ) ) +with expansion: + 3422778688 (0x) + != + 130711275 (0x) + +------------------------------------------------------------------------------- +Hashers with same seed produce same hash +------------------------------------------------------------------------------- +TestCaseInfoHasher.tests.cpp: +............................................................................... + +TestCaseInfoHasher.tests.cpp:: PASSED: + REQUIRE( h1( dummy ) == h2( dummy ) ) +with expansion: + 3422778688 (0x) + == + 3422778688 (0x) + +------------------------------------------------------------------------------- +Hashing different test cases produces different result + Different test name +------------------------------------------------------------------------------- +TestCaseInfoHasher.tests.cpp: +............................................................................... + +TestCaseInfoHasher.tests.cpp:: PASSED: + REQUIRE( h( dummy1 ) != h( dummy2 ) ) +with expansion: + 2903002874 (0x) + != + 2668622104 (0x) + +------------------------------------------------------------------------------- +Hashing different test cases produces different result + Different classname +------------------------------------------------------------------------------- +TestCaseInfoHasher.tests.cpp: +............................................................................... + +TestCaseInfoHasher.tests.cpp:: PASSED: + REQUIRE( h( dummy1 ) != h( dummy2 ) ) +with expansion: + 2673152918 (0x) + != + 3916075712 (0x) + +------------------------------------------------------------------------------- +Hashing different test cases produces different result + Different tags +------------------------------------------------------------------------------- +TestCaseInfoHasher.tests.cpp: +............................................................................... + +TestCaseInfoHasher.tests.cpp:: PASSED: + REQUIRE( h( dummy1 ) != h( dummy2 ) ) +with expansion: + 2074929312 (0x) + != + 3429949824 (0x) + +------------------------------------------------------------------------------- +Hashing test case produces same hash across multiple calls +------------------------------------------------------------------------------- +TestCaseInfoHasher.tests.cpp: +............................................................................... + +TestCaseInfoHasher.tests.cpp:: PASSED: + REQUIRE( h( dummy ) == h( dummy ) ) +with expansion: + 3422778688 (0x) + == + 3422778688 (0x) + +------------------------------------------------------------------------------- +INFO and UNSCOPED_INFO can stream multiple arguments +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: +explicitly with messages: + This info has multiple parts. + This unscoped info has multiple parts. + Show infos! + +------------------------------------------------------------------------------- +INFO and WARN do not abort tests +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: warning: + this is a message + this is a warning + + +No assertions in test case 'INFO and WARN do not abort tests' + +------------------------------------------------------------------------------- +INFO gets logged on failure +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: + REQUIRE( a == 1 ) +with expansion: + 2 == 1 +with messages: + this message should be logged + so should this + +------------------------------------------------------------------------------- +INFO gets logged on failure, even if captured before successful assertions +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: PASSED: + CHECK( a == 2 ) +with expansion: + 2 == 2 +with message: + this message may be logged later + +Message.tests.cpp:: FAILED: + CHECK( a == 1 ) +with expansion: + 2 == 1 +with messages: + this message may be logged later + this message should be logged + +Message.tests.cpp:: FAILED: + CHECK( a == 0 ) +with expansion: + 2 == 0 +with messages: + this message may be logged later + this message should be logged + and this, but later + +Message.tests.cpp:: PASSED: + CHECK( a == 2 ) +with expansion: + 2 == 2 +with messages: + this message may be logged later + this message should be logged + and this, but later + but not this + +------------------------------------------------------------------------------- +INFO is reset for each loop +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: PASSED: + REQUIRE( i < 10 ) +with expansion: + 0 < 10 +with messages: + current counter 0 + i := 0 + +Message.tests.cpp:: PASSED: + REQUIRE( i < 10 ) +with expansion: + 1 < 10 +with messages: + current counter 1 + i := 1 + +Message.tests.cpp:: PASSED: + REQUIRE( i < 10 ) +with expansion: + 2 < 10 +with messages: + current counter 2 + i := 2 + +Message.tests.cpp:: PASSED: + REQUIRE( i < 10 ) +with expansion: + 3 < 10 +with messages: + current counter 3 + i := 3 + +Message.tests.cpp:: PASSED: + REQUIRE( i < 10 ) +with expansion: + 4 < 10 +with messages: + current counter 4 + i := 4 + +Message.tests.cpp:: PASSED: + REQUIRE( i < 10 ) +with expansion: + 5 < 10 +with messages: + current counter 5 + i := 5 + +Message.tests.cpp:: PASSED: + REQUIRE( i < 10 ) +with expansion: + 6 < 10 +with messages: + current counter 6 + i := 6 + +Message.tests.cpp:: PASSED: + REQUIRE( i < 10 ) +with expansion: + 7 < 10 +with messages: + current counter 7 + i := 7 + +Message.tests.cpp:: PASSED: + REQUIRE( i < 10 ) +with expansion: + 8 < 10 +with messages: + current counter 8 + i := 8 + +Message.tests.cpp:: PASSED: + REQUIRE( i < 10 ) +with expansion: + 9 < 10 +with messages: + current counter 9 + i := 9 + +Message.tests.cpp:: FAILED: + REQUIRE( i < 10 ) +with expansion: + 10 < 10 +with messages: + current counter 10 + i := 10 + +------------------------------------------------------------------------------- +Incomplete AssertionHandler +------------------------------------------------------------------------------- +AssertionHandler.tests.cpp: +............................................................................... + +AssertionHandler.tests.cpp:: FAILED: + REQUIRE( Dummy ) +due to unexpected exception with message: + Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE + +------------------------------------------------------------------------------- +Inequality checks that should fail +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven != 7 ) +with expansion: + 7 != 7 + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one != Approx( 9.1f ) ) +with expansion: + 9.100000381f + != + Approx( 9.10000038146972656 ) + +Condition.tests.cpp:: FAILED: + CHECK( data.double_pi != Approx( 3.1415926535 ) ) +with expansion: + 3.14159265350000005 + != + Approx( 3.14159265350000005 ) + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello != "hello" ) +with expansion: + "hello" != "hello" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello.size() != 5 ) +with expansion: + 5 != 5 + +------------------------------------------------------------------------------- +Inequality checks that should succeed +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: PASSED: + REQUIRE( data.int_seven != 6 ) +with expansion: + 7 != 6 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.int_seven != 8 ) +with expansion: + 7 != 8 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.float_nine_point_one != Approx( 9.11f ) ) +with expansion: + 9.100000381f + != + Approx( 9.10999965667724609 ) + +Condition.tests.cpp:: PASSED: + REQUIRE( data.float_nine_point_one != Approx( 9.0f ) ) +with expansion: + 9.100000381f != Approx( 9.0 ) + +Condition.tests.cpp:: PASSED: + REQUIRE( data.float_nine_point_one != Approx( 1 ) ) +with expansion: + 9.100000381f != Approx( 1.0 ) + +Condition.tests.cpp:: PASSED: + REQUIRE( data.float_nine_point_one != Approx( 0 ) ) +with expansion: + 9.100000381f != Approx( 0.0 ) + +Condition.tests.cpp:: PASSED: + REQUIRE( data.double_pi != Approx( 3.1415 ) ) +with expansion: + 3.14159265350000005 + != + Approx( 3.14150000000000018 ) + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello != "goodbye" ) +with expansion: + "hello" != "goodbye" + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello != "hell" ) +with expansion: + "hello" != "hell" + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello != "hello1" ) +with expansion: + "hello" != "hello1" + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello.size() != 6 ) +with expansion: + 5 != 6 + +------------------------------------------------------------------------------- +JsonWriter + Newly constructed JsonWriter does nothing +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( stream.str() == "" ) +with expansion: + "" == "" + +------------------------------------------------------------------------------- +JsonWriter + Calling writeObject will create an empty pair of braces +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( stream.str() == "{\n}" ) +with expansion: + "{ + }" + == + "{ + }" + +------------------------------------------------------------------------------- +JsonWriter + Calling writeObject with key will create an object to write the value +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE_THAT( stream.str(), ContainsSubstring( "\"int\": 1," ) && ContainsSubstring( "\"double\": 1.5," ) && ContainsSubstring( "\"true\": true," ) && ContainsSubstring( "\"false\": false," ) && ContainsSubstring( "\"string\": \"this is a string\"," ) && ContainsSubstring( "\"array\": [\n 1,\n 2\n ]\n}" ) ) +with expansion: + "{ + "int": 1, + "double": 1.5, + "true": true, + "false": false, + "string": "this is a string", + "array": [ + 1, + 2 + ] + }" ( contains: ""int": 1," and contains: ""double": 1.5," and contains: + ""true": true," and contains: ""false": false," and contains: ""string": + "this is a string"," and contains: ""array": [ + 1, + 2 + ] + }" ) + +------------------------------------------------------------------------------- +JsonWriter + nesting objects +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE_THAT( stream.str(), ContainsSubstring( "\"empty_object\": {\n }," ) && ContainsSubstring( "\"fully_object\": {\n \"key\": 1\n }" ) ) +with expansion: + "{ + "empty_object": { + }, + "fully_object": { + "key": 1 + } + }" ( contains: ""empty_object": { + }," and contains: ""fully_object": { + "key": 1 + }" ) + +------------------------------------------------------------------------------- +JsonWriter + Calling writeArray will create an empty pair of braces +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( stream.str() == "[\n]" ) +with expansion: + "[ + ]" + == + "[ + ]" + +------------------------------------------------------------------------------- +JsonWriter + Calling writeArray creates array to write the values to +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( stream.str() == "[\n 1,\n 1.5,\n true,\n false,\n \"this is a string\",\n {\n \"object\": 42\n },\n [\n \"array\",\n 42.5\n ]\n]" ) +with expansion: + "[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] + ]" + == + "[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] + ]" + +------------------------------------------------------------------------------- +JsonWriter + Moved from JsonObjectWriter shall not insert superfluous brace +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( stream.str() == "{\n}" ) +with expansion: + "{ + }" + == + "{ + }" + +------------------------------------------------------------------------------- +JsonWriter + Moved from JsonArrayWriter shall not insert superfluous bracket +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( stream.str() == "[\n]" ) +with expansion: + "[ + ]" + == + "[ + ]" + +------------------------------------------------------------------------------- +JsonWriter + Custom class shall be quoted +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( stream.str() == "\"custom\"" ) +with expansion: + ""custom"" == ""custom"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + Quote in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( sstream.str() == "\"\\\"\"" ) +with expansion: + ""\""" == ""\""" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + Backslash in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( sstream.str() == "\"\\\\\"" ) +with expansion: + ""\\"" == ""\\"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + Forward slash in a string is **not** escaped +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( sstream.str() == "\"/\"" ) +with expansion: + ""/"" == ""/"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + Backspace in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( sstream.str() == "\"\\b\"" ) +with expansion: + ""\b"" == ""\b"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + Formfeed in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( sstream.str() == "\"\\f\"" ) +with expansion: + ""\f"" == ""\f"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + linefeed in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( sstream.str() == "\"\\n\"" ) +with expansion: + ""\n"" == ""\n"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + carriage return in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( sstream.str() == "\"\\r\"" ) +with expansion: + ""\r"" == ""\r"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + tab in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( sstream.str() == "\"\\t\"" ) +with expansion: + ""\t"" == ""\t"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + combination of characters is escaped +------------------------------------------------------------------------------- +Json.tests.cpp: +............................................................................... + +Json.tests.cpp:: PASSED: + REQUIRE( sstream.str() == "\"\\\\/\\t\\r\\n\"" ) +with expansion: + ""\\/\t\r\n"" == ""\\/\t\r\n"" + +------------------------------------------------------------------------------- +Lambdas in assertions +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( []() { return true; }() ) +with expansion: + true + +------------------------------------------------------------------------------- +Less-than inequalities with different epsilons +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( d <= Approx( 1.24 ) ) +with expansion: + 1.22999999999999998 + <= + Approx( 1.23999999999999999 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d <= Approx( 1.23 ) ) +with expansion: + 1.22999999999999998 + <= + Approx( 1.22999999999999998 ) + +Approx.tests.cpp:: PASSED: + REQUIRE_FALSE( d <= Approx( 1.22 ) ) +with expansion: + !(1.22999999999999998 + <= + Approx( 1.21999999999999997 )) + +Approx.tests.cpp:: PASSED: + REQUIRE( d <= Approx( 1.22 ).epsilon(0.1) ) +with expansion: + 1.22999999999999998 + <= + Approx( 1.21999999999999997 ) + +------------------------------------------------------------------------------- +ManuallyRegistered +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + was called + +------------------------------------------------------------------------------- +Matchers can be (AllOf) composed with the && operator +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), ContainsSubstring( "string" ) && ContainsSubstring( "abc" ) && ContainsSubstring( "substring" ) && ContainsSubstring( "contains" ) ) +with expansion: + "this string contains 'abc' as a substring" ( contains: "string" and + contains: "abc" and contains: "substring" and contains: "contains" ) + +------------------------------------------------------------------------------- +Matchers can be (AnyOf) composed with the || operator +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) ) +with expansion: + "this string contains 'abc' as a substring" ( contains: "string" or contains: + "different" or contains: "random" ) + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching2(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) ) +with expansion: + "some completely different text that contains one common word" ( contains: + "string" or contains: "different" or contains: "random" ) + +------------------------------------------------------------------------------- +Matchers can be composed with both && and || +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "substring" ) ) +with expansion: + "this string contains 'abc' as a substring" ( ( contains: "string" or + contains: "different" ) and contains: "substring" ) + +------------------------------------------------------------------------------- +Matchers can be composed with both && and || - failing +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) ) +with expansion: + "this string contains 'abc' as a substring" ( ( contains: "string" or + contains: "different" ) and contains: "random" ) + +------------------------------------------------------------------------------- +Matchers can be negated (Not) with the ! operator +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), !ContainsSubstring( "different" ) ) +with expansion: + "this string contains 'abc' as a substring" not contains: "different" + +------------------------------------------------------------------------------- +Matchers can be negated (Not) with the ! operator - failing +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) ) +with expansion: + "this string contains 'abc' as a substring" not contains: "substring" + +------------------------------------------------------------------------------- +Mayfail test case with nested sections + A + 1 +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +Mayfail test case with nested sections + A + 2 +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +Mayfail test case with nested sections + B + 1 +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +Mayfail test case with nested sections + B + 2 +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +Mismatching exception messages failing the test +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: PASSED: + REQUIRE_THROWS_WITH( thisThrows(), "expected exception" ) +with expansion: + "expected exception" equals: "expected exception" + +Exception.tests.cpp:: FAILED: + REQUIRE_THROWS_WITH( thisThrows(), "should fail" ) +with expansion: + "expected exception" equals: "should fail" + +------------------------------------------------------------------------------- +Multireporter calls reporters and listeners in correct order +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE( records == expected ) +with expansion: + { "Hello", "world", "Goodbye", "world" } + == + { "Hello", "world", "Goodbye", "world" } + +------------------------------------------------------------------------------- +Multireporter updates ReporterPreferences properly +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == false ) +with expansion: + false == false + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Multireporter updates ReporterPreferences properly + Adding listeners +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == false ) +with expansion: + false == false + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == true ) +with expansion: + true == true + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == true ) +with expansion: + true == true + +------------------------------------------------------------------------------- +Multireporter updates ReporterPreferences properly +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == false ) +with expansion: + false == false + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Multireporter updates ReporterPreferences properly + Adding reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == false ) +with expansion: + false == false + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == true ) +with expansion: + true == true + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ) +with expansion: + true == true + +Reporters.tests.cpp:: PASSED: + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == true ) +with expansion: + true == true + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 3 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 4 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 5 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 6 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + -5 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + -4 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 90 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 91 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 92 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 93 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 94 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 95 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 96 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 97 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 98 > -6 + +------------------------------------------------------------------------------- +Nested generators and captured variables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( values > -6 ) +with expansion: + 99 > -6 + +------------------------------------------------------------------------------- +Nice descriptive name +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: warning: + This one ran + + +No assertions in test case 'Nice descriptive name' + +------------------------------------------------------------------------------- +Non-std exceptions can be translated +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with message: + custom exception + +------------------------------------------------------------------------------- +Objects that evaluated in boolean contexts can be checked +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + CHECK( True ) +with expansion: + {?} + +Tricky.tests.cpp:: PASSED: + CHECK( !False ) +with expansion: + true + +Tricky.tests.cpp:: PASSED: + CHECK_FALSE( False ) +with expansion: + !{?} + +------------------------------------------------------------------------------- +Optionally static assertions +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: +with message: + std::is_void::value + +Compilation.tests.cpp:: PASSED: +with message: + !(std::is_void::value) + +Compilation.tests.cpp:: PASSED: +with message: + std::is_void::value + +Compilation.tests.cpp:: PASSED: +with message: + !(std::is_void::value) + +------------------------------------------------------------------------------- +Ordering comparison checks that should fail +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven > 7 ) +with expansion: + 7 > 7 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven < 7 ) +with expansion: + 7 < 7 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven > 8 ) +with expansion: + 7 > 8 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven < 6 ) +with expansion: + 7 < 6 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven < 0 ) +with expansion: + 7 < 0 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven < -1 ) +with expansion: + 7 < -1 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven >= 8 ) +with expansion: + 7 >= 8 + +Condition.tests.cpp:: FAILED: + CHECK( data.int_seven <= 6 ) +with expansion: + 7 <= 6 + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one < 9 ) +with expansion: + 9.100000381f < 9 + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one > 10 ) +with expansion: + 9.100000381f > 10 + +Condition.tests.cpp:: FAILED: + CHECK( data.float_nine_point_one > 9.2 ) +with expansion: + 9.100000381f > 9.19999999999999929 + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello > "hello" ) +with expansion: + "hello" > "hello" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello < "hello" ) +with expansion: + "hello" < "hello" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello > "hellp" ) +with expansion: + "hello" > "hellp" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello > "z" ) +with expansion: + "hello" > "z" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello < "hellm" ) +with expansion: + "hello" < "hellm" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello < "a" ) +with expansion: + "hello" < "a" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello >= "z" ) +with expansion: + "hello" >= "z" + +Condition.tests.cpp:: FAILED: + CHECK( data.str_hello <= "a" ) +with expansion: + "hello" <= "a" + +------------------------------------------------------------------------------- +Ordering comparison checks that should succeed +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: PASSED: + REQUIRE( data.int_seven < 8 ) +with expansion: + 7 < 8 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.int_seven > 6 ) +with expansion: + 7 > 6 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.int_seven > 0 ) +with expansion: + 7 > 0 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.int_seven > -1 ) +with expansion: + 7 > -1 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.int_seven >= 7 ) +with expansion: + 7 >= 7 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.int_seven >= 6 ) +with expansion: + 7 >= 6 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.int_seven <= 7 ) +with expansion: + 7 <= 7 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.int_seven <= 8 ) +with expansion: + 7 <= 8 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.float_nine_point_one > 9 ) +with expansion: + 9.100000381f > 9 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.float_nine_point_one < 10 ) +with expansion: + 9.100000381f < 10 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.float_nine_point_one < 9.2 ) +with expansion: + 9.100000381f < 9.19999999999999929 + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello <= "hello" ) +with expansion: + "hello" <= "hello" + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello >= "hello" ) +with expansion: + "hello" >= "hello" + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello < "hellp" ) +with expansion: + "hello" < "hellp" + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello < "zebra" ) +with expansion: + "hello" < "zebra" + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello > "hellm" ) +with expansion: + "hello" > "hellm" + +Condition.tests.cpp:: PASSED: + REQUIRE( data.str_hello > "a" ) +with expansion: + "hello" > "a" + +------------------------------------------------------------------------------- +Our PCG implementation provides expected results for known seeds + Default seeded +------------------------------------------------------------------------------- +RandomNumberGeneration.tests.cpp: +............................................................................... + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 4242248763 (0x) + == + 4242248763 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 1867888929 (0x) + == + 1867888929 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 1276619030 (0x) + == + 1276619030 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 1911218783 (0x) + == + 1911218783 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 1827115164 (0x) + == + 1827115164 (0x) + +------------------------------------------------------------------------------- +Our PCG implementation provides expected results for known seeds + Specific seed +------------------------------------------------------------------------------- +RandomNumberGeneration.tests.cpp: +............................................................................... + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 1472234645 (0x) + == + 1472234645 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 868832940 (0x) + == + 868832940 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 570883446 (0x) + == + 570883446 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 889299803 (0x) + == + 889299803 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 4261393167 (0x) + == + 4261393167 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 1472234645 (0x) + == + 1472234645 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 868832940 (0x) + == + 868832940 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 570883446 (0x) + == + 570883446 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 889299803 (0x) + == + 889299803 (0x) + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( rng() == 0x ) +with expansion: + 4261393167 (0x) + == + 4261393167 (0x) + +------------------------------------------------------------------------------- +Output from all sections is reported + one +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: +explicitly with message: + Message from section one + +------------------------------------------------------------------------------- +Output from all sections is reported + two +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: +explicitly with message: + Message from section two + +------------------------------------------------------------------------------- +Overloaded comma or address-of operators are not used +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( ( EvilMatcher(), EvilMatcher() ), EvilCommaOperatorUsed ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( &EvilMatcher(), EvilAddressOfOperatorUsed ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_NOTHROW( EvilMatcher() || ( EvilMatcher() && !EvilMatcher() ) ) + +Matchers.tests.cpp:: PASSED: + REQUIRE_NOTHROW( ( EvilMatcher() && EvilMatcher() ) || !EvilMatcher() ) + +------------------------------------------------------------------------------- +Parse uints + proper inputs +------------------------------------------------------------------------------- +Parse.tests.cpp: +............................................................................... + +Parse.tests.cpp:: PASSED: + REQUIRE( parseUInt( "0" ) == Optional{ 0 } ) +with expansion: + {?} == {?} + +Parse.tests.cpp:: PASSED: + REQUIRE( parseUInt( "100" ) == Optional{ 100 } ) +with expansion: + {?} == {?} + +Parse.tests.cpp:: PASSED: + REQUIRE( parseUInt( "4294967295" ) == Optional{ 4294967295 } ) +with expansion: + {?} == {?} + +Parse.tests.cpp:: PASSED: + REQUIRE( parseUInt( "0x", 16 ) == Optional{ 255 } ) +with expansion: + {?} == {?} + +------------------------------------------------------------------------------- +Parse uints + Bad inputs +------------------------------------------------------------------------------- +Parse.tests.cpp: +............................................................................... + +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "" ) ) +with expansion: + !{?} + +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "!!KJHF*#" ) ) +with expansion: + !{?} + +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "-1" ) ) +with expansion: + !{?} + +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "4294967296" ) ) +with expansion: + !{?} + +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "42949672964294967296429496729642949672964294967296" ) ) +with expansion: + !{?} + +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "2 4" ) ) +with expansion: + !{?} + +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "0x", 10 ) ) +with expansion: + !{?} + +------------------------------------------------------------------------------- +Parsed tags are matched case insensitive +------------------------------------------------------------------------------- +TestSpecParser.tests.cpp: +............................................................................... + +TestSpecParser.tests.cpp:: PASSED: + REQUIRE( spec.hasFilters() ) +with expansion: + true + +TestSpecParser.tests.cpp:: PASSED: + REQUIRE( spec.getInvalidSpecs().empty() ) +with expansion: + true + +TestSpecParser.tests.cpp:: PASSED: + REQUIRE( spec.matches( testCase ) ) +with expansion: + true + +------------------------------------------------------------------------------- +Parsing sharding-related cli flags + shard-count +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "--shard-count=8" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.shardCount == 8 ) +with expansion: + 8 == 8 + +------------------------------------------------------------------------------- +Parsing sharding-related cli flags + Negative shard count reports error +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK_FALSE( result ) +with expansion: + !{?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE_THAT( result.errorMessage(), ContainsSubstring( "Could not parse '-1' as shard count" ) ) +with expansion: + "Could not parse '-1' as shard count" contains: "Could not parse '-1' as + shard count" + +------------------------------------------------------------------------------- +Parsing sharding-related cli flags + Zero shard count reports error +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK_FALSE( result ) +with expansion: + !{?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE_THAT( result.errorMessage(), ContainsSubstring( "Shard count must be positive" ) ) +with expansion: + "Shard count must be positive" contains: "Shard count must be positive" + +------------------------------------------------------------------------------- +Parsing sharding-related cli flags + shard-index +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "--shard-index=2" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.shardIndex == 2 ) +with expansion: + 2 == 2 + +------------------------------------------------------------------------------- +Parsing sharding-related cli flags + Negative shard index reports error +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK_FALSE( result ) +with expansion: + !{?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE_THAT( result.errorMessage(), ContainsSubstring( "Could not parse '-12' as shard index" ) ) +with expansion: + "Could not parse '-12' as shard index" contains: "Could not parse '-12' as + shard index" + +------------------------------------------------------------------------------- +Parsing sharding-related cli flags + Shard index 0 is accepted +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "--shard-index=0" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.shardIndex == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Parsing tags with non-alphabetical characters is pass-through +------------------------------------------------------------------------------- +TestSpecParser.tests.cpp: +............................................................................... + +TestSpecParser.tests.cpp:: PASSED: + REQUIRE( spec.hasFilters() ) +with expansion: + true +with message: + tagString := "[tag with spaces]" + +TestSpecParser.tests.cpp:: PASSED: + REQUIRE( spec.getInvalidSpecs().empty() ) +with expansion: + true +with message: + tagString := "[tag with spaces]" + +TestSpecParser.tests.cpp:: PASSED: + REQUIRE( spec.matches( testCase ) ) +with expansion: + true +with message: + tagString := "[tag with spaces]" + +------------------------------------------------------------------------------- +Parsing tags with non-alphabetical characters is pass-through +------------------------------------------------------------------------------- +TestSpecParser.tests.cpp: +............................................................................... + +TestSpecParser.tests.cpp:: PASSED: + REQUIRE( spec.hasFilters() ) +with expansion: + true +with message: + tagString := "[I said "good day" sir!]" + +TestSpecParser.tests.cpp:: PASSED: + REQUIRE( spec.getInvalidSpecs().empty() ) +with expansion: + true +with message: + tagString := "[I said "good day" sir!]" + +TestSpecParser.tests.cpp:: PASSED: + REQUIRE( spec.matches( testCase ) ) +with expansion: + true +with message: + tagString := "[I said "good day" sir!]" + +------------------------------------------------------------------------------- +Parsing warnings + NoAssertions +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + REQUIRE( cli.parse( { "test", "-w", "NoAssertions" } ) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.warnings == WarnAbout::NoAssertions ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Parsing warnings + NoTests is no longer supported +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + REQUIRE_FALSE( cli.parse( { "test", "-w", "NoTests" } ) ) +with expansion: + !{?} + +------------------------------------------------------------------------------- +Parsing warnings + Combining multiple warnings +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + REQUIRE( cli.parse( { "test", "--warn", "NoAssertions", "--warn", "UnmatchedTestSpec" } ) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.warnings == ( WarnAbout::NoAssertions | WarnAbout::UnmatchedTestSpec ) ) +with expansion: + 3 == 3 + +------------------------------------------------------------------------------- +Pointers can be compared to null +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: PASSED: + REQUIRE( p == 0 ) +with expansion: + 0 == 0 + +Condition.tests.cpp:: PASSED: + REQUIRE( p == pNULL ) +with expansion: + 0 == 0 + +Condition.tests.cpp:: PASSED: + REQUIRE( p != 0 ) +with expansion: + 0x != 0 + +Condition.tests.cpp:: PASSED: + REQUIRE( cp != 0 ) +with expansion: + 0x != 0 + +Condition.tests.cpp:: PASSED: + REQUIRE( cpc != 0 ) +with expansion: + 0x != 0 + +Condition.tests.cpp:: PASSED: + REQUIRE( returnsNull() == 0 ) +with expansion: + {null string} == 0 + +Condition.tests.cpp:: PASSED: + REQUIRE( returnsConstNull() == 0 ) +with expansion: + {null string} == 0 + +Condition.tests.cpp:: PASSED: + REQUIRE( 0 != p ) +with expansion: + 0 != 0x + +------------------------------------------------------------------------------- +Precision of floating point stringification can be set + Floats +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( str1.size() == 3 + 5 ) +with expansion: + 8 == 8 + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( str2.size() == 3 + 10 ) +with expansion: + 13 == 13 + +------------------------------------------------------------------------------- +Precision of floating point stringification can be set + Double +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + CHECK( str1.size() == 2 + 5 ) +with expansion: + 7 == 7 + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( str2.size() == 2 + 15 ) +with expansion: + 17 == 17 + +------------------------------------------------------------------------------- +Predicate matcher can accept const char* +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( "foo", Predicate( []( const char* const& ) { return true; } ) ) +with expansion: + "foo" matches undescribed predicate + +------------------------------------------------------------------------------- +Process can be configured on command line + empty args don't cause a crash +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( result ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + CHECK( config.processName == "" ) +with expansion: + "" == "" + +------------------------------------------------------------------------------- +Process can be configured on command line + default - no arguments +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( result ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + CHECK( config.processName == "test" ) +with expansion: + "test" == "test" + +CmdLine.tests.cpp:: PASSED: + CHECK( config.shouldDebugBreak == false ) +with expansion: + false == false + +CmdLine.tests.cpp:: PASSED: + CHECK( config.abortAfter == -1 ) +with expansion: + -1 == -1 + +CmdLine.tests.cpp:: PASSED: + CHECK( config.noThrow == false ) +with expansion: + false == false + +CmdLine.tests.cpp:: PASSED: + CHECK( config.reporterSpecifications.empty() ) +with expansion: + true + +CmdLine.tests.cpp:: PASSED: + CHECK_FALSE( cfg.hasTestFilters() ) +with expansion: + !false + +CmdLine.tests.cpp:: PASSED: + CHECK( cfg.getReporterSpecs().size() == 1 ) +with expansion: + 1 == 1 + +CmdLine.tests.cpp:: PASSED: + CHECK( cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, {}, {}, {} } ) +with expansion: + {?} == {?} + +CmdLine.tests.cpp:: PASSED: + CHECK( cfg.getProcessedReporterSpecs().size() == 1 ) +with expansion: + 1 == 1 + +CmdLine.tests.cpp:: PASSED: + CHECK( cfg.getProcessedReporterSpecs()[0] == Catch::ProcessedReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} } ) +with expansion: + {?} == {?} + +------------------------------------------------------------------------------- +Process can be configured on command line + test lists + Specify one test case using +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( result ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( cfg.hasTestFilters() ) +with expansion: + true + +CmdLine.tests.cpp:: PASSED: + REQUIRE( cfg.testSpec().matches(*fakeTestCase("notIncluded")) == false ) +with expansion: + false == false + +CmdLine.tests.cpp:: PASSED: + REQUIRE( cfg.testSpec().matches(*fakeTestCase("test1")) ) +with expansion: + true + +------------------------------------------------------------------------------- +Process can be configured on command line + test lists + Specify one test case exclusion using exclude: +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( result ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( cfg.hasTestFilters() ) +with expansion: + true + +CmdLine.tests.cpp:: PASSED: + REQUIRE( cfg.testSpec().matches(*fakeTestCase("test1")) == false ) +with expansion: + false == false + +CmdLine.tests.cpp:: PASSED: + REQUIRE( cfg.testSpec().matches(*fakeTestCase("alwaysIncluded")) ) +with expansion: + true + +------------------------------------------------------------------------------- +Process can be configured on command line + test lists + Specify one test case exclusion using ~ +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( result ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( cfg.hasTestFilters() ) +with expansion: + true + +CmdLine.tests.cpp:: PASSED: + REQUIRE( cfg.testSpec().matches(*fakeTestCase("test1")) == false ) +with expansion: + false == false + +CmdLine.tests.cpp:: PASSED: + REQUIRE( cfg.testSpec().matches(*fakeTestCase("alwaysIncluded")) ) +with expansion: + true + +------------------------------------------------------------------------------- +Process can be configured on command line + reporter + -r/console +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( result ) +with expansion: + {?} +with message: + result.errorMessage() := "" + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.reporterSpecifications == vec_Specs{ { "console", {}, {}, {} } } ) +with expansion: + { {?} } == { {?} } +with message: + result.errorMessage() := "" + +------------------------------------------------------------------------------- +Process can be configured on command line + reporter + -r/xml +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( result ) +with expansion: + {?} +with message: + result.errorMessage() := "" + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.reporterSpecifications == vec_Specs{ { "xml", {}, {}, {} } } ) +with expansion: + { {?} } == { {?} } +with message: + result.errorMessage() := "" + +------------------------------------------------------------------------------- +Process can be configured on command line + reporter + --reporter/junit +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( result ) +with expansion: + {?} +with message: + result.errorMessage() := "" + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.reporterSpecifications == vec_Specs{ { "junit", {}, {}, {} } } ) +with expansion: + { {?} } == { {?} } +with message: + result.errorMessage() := "" + +------------------------------------------------------------------------------- +Process can be configured on command line + reporter + must match one of the available ones +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( !result ) +with expansion: + true + +CmdLine.tests.cpp:: PASSED: + REQUIRE_THAT( result.errorMessage(), ContainsSubstring("Unrecognized reporter") ) +with expansion: + "Unrecognized reporter, 'unsupported'. Check available with --list-reporters" + contains: "Unrecognized reporter" + +------------------------------------------------------------------------------- +Process can be configured on command line + reporter + With output file +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( result ) +with expansion: + {?} +with message: + result.errorMessage() := "" + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.reporterSpecifications == vec_Specs{ { "console", "out.txt"s, {}, {} } } ) +with expansion: + { {?} } == { {?} } +with message: + result.errorMessage() := "" + +------------------------------------------------------------------------------- +Process can be configured on command line + reporter + With Windows-like absolute path as output file +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( result ) +with expansion: + {?} +with message: + result.errorMessage() := "" + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.reporterSpecifications == vec_Specs{ { "console", "C:\\Temp\\out.txt"s, {}, {} } } ) +with expansion: + { {?} } == { {?} } +with message: + result.errorMessage() := "" + +------------------------------------------------------------------------------- +Process can be configured on command line + reporter + Multiple reporters + All with output files +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "-r", "xml::out=output.xml", "-r", "junit::out=output-junit.xml" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.reporterSpecifications == vec_Specs{ { "xml", "output.xml"s, {}, {} }, { "junit", "output-junit.xml"s, {}, {} } } ) +with expansion: + { {?}, {?} } == { {?}, {?} } + +------------------------------------------------------------------------------- +Process can be configured on command line + reporter + Multiple reporters + Mixed output files and default output +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "-r", "xml::out=output.xml", "-r", "console" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.reporterSpecifications == vec_Specs{ { "xml", "output.xml"s, {}, {} }, { "console", {}, {}, {} } } ) +with expansion: + { {?}, {?} } == { {?}, {?} } + +------------------------------------------------------------------------------- +Process can be configured on command line + reporter + Multiple reporters + cannot have multiple reporters with default output +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( !result ) +with expansion: + true + +CmdLine.tests.cpp:: PASSED: + REQUIRE_THAT( result.errorMessage(), ContainsSubstring("Only one reporter may have unspecified output file.") ) +with expansion: + "Only one reporter may have unspecified output file." contains: "Only one + reporter may have unspecified output file." + +------------------------------------------------------------------------------- +Process can be configured on command line + debugger + -b +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "-b"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.shouldDebugBreak == true ) +with expansion: + true == true + +------------------------------------------------------------------------------- +Process can be configured on command line + debugger + --break +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "--break"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.shouldDebugBreak ) +with expansion: + true + +------------------------------------------------------------------------------- +Process can be configured on command line + abort + -a aborts after first failure +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "-a"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.abortAfter == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Process can be configured on command line + abort + -x 2 aborts after two failures +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "-x", "2"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.abortAfter == 2 ) +with expansion: + 2 == 2 + +------------------------------------------------------------------------------- +Process can be configured on command line + abort + -x must be numeric +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( !result ) +with expansion: + true + +CmdLine.tests.cpp:: PASSED: + REQUIRE_THAT( result.errorMessage(), ContainsSubstring("convert") && ContainsSubstring("oops") ) +with expansion: + "Unable to convert 'oops' to destination type" ( contains: "convert" and + contains: "oops" ) + +------------------------------------------------------------------------------- +Process can be configured on command line + abort + wait-for-keypress + Accepted options +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.waitForKeypress == std::get<1>(input) ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Process can be configured on command line + abort + wait-for-keypress + Accepted options +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.waitForKeypress == std::get<1>(input) ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Process can be configured on command line + abort + wait-for-keypress + Accepted options +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.waitForKeypress == std::get<1>(input) ) +with expansion: + 2 == 2 + +------------------------------------------------------------------------------- +Process can be configured on command line + abort + wait-for-keypress + Accepted options +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.waitForKeypress == std::get<1>(input) ) +with expansion: + 3 == 3 + +------------------------------------------------------------------------------- +Process can be configured on command line + abort + wait-for-keypress + invalid options are reported +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( !result ) +with expansion: + true + +CmdLine.tests.cpp:: PASSED: + REQUIRE_THAT( result.errorMessage(), ContainsSubstring("never") && ContainsSubstring("both") ) +with expansion: + "keypress argument must be one of: never, start, exit or both. 'sometimes' + not recognised" ( contains: "never" and contains: "both" ) + +------------------------------------------------------------------------------- +Process can be configured on command line + nothrow + -e +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "-e"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.noThrow ) +with expansion: + true + +------------------------------------------------------------------------------- +Process can be configured on command line + nothrow + --nothrow +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "--nothrow"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.noThrow ) +with expansion: + true + +------------------------------------------------------------------------------- +Process can be configured on command line + output filename + -o filename +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "-o", "filename.ext"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.defaultOutputFilename == "filename.ext" ) +with expansion: + "filename.ext" == "filename.ext" + +------------------------------------------------------------------------------- +Process can be configured on command line + output filename + --out +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "--out", "filename.ext"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.defaultOutputFilename == "filename.ext" ) +with expansion: + "filename.ext" == "filename.ext" + +------------------------------------------------------------------------------- +Process can be configured on command line + combinations + Single character flags can be combined +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "-abe"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + CHECK( config.abortAfter == 1 ) +with expansion: + 1 == 1 + +CmdLine.tests.cpp:: PASSED: + CHECK( config.shouldDebugBreak ) +with expansion: + true + +CmdLine.tests.cpp:: PASSED: + CHECK( config.noThrow == true ) +with expansion: + true == true + +------------------------------------------------------------------------------- +Process can be configured on command line + use-colour + without option +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.defaultColourMode == ColourMode::PlatformDefault ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Process can be configured on command line + use-colour + auto +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse( { "test", "--colour-mode", "default" } ) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.defaultColourMode == ColourMode::PlatformDefault ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Process can be configured on command line + use-colour + yes +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "--colour-mode", "ansi"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.defaultColourMode == ColourMode::ANSI ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Process can be configured on command line + use-colour + no +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({"test", "--colour-mode", "none"}) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.defaultColourMode == ColourMode::None ) +with expansion: + 3 == 3 + +------------------------------------------------------------------------------- +Process can be configured on command line + use-colour + error +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( !result ) +with expansion: + true + +CmdLine.tests.cpp:: PASSED: + CHECK_THAT( result.errorMessage(), ContainsSubstring( "colour mode must be one of" ) ) +with expansion: + "colour mode must be one of: default, ansi, win32, or none. 'wrong' is not + recognised" contains: "colour mode must be one of" + +------------------------------------------------------------------------------- +Process can be configured on command line + Benchmark options + samples +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "--benchmark-samples=200" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.benchmarkSamples == 200 ) +with expansion: + 200 == 200 + +------------------------------------------------------------------------------- +Process can be configured on command line + Benchmark options + resamples +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "--benchmark-resamples=20000" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.benchmarkResamples == 20000 ) +with expansion: + 20000 (0x) == 20000 (0x) + +------------------------------------------------------------------------------- +Process can be configured on command line + Benchmark options + confidence-interval +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "--benchmark-confidence-interval=0.99" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.benchmarkConfidenceInterval == Catch::Approx(0.99) ) +with expansion: + 0.98999999999999999 + == + Approx( 0.98999999999999999 ) + +------------------------------------------------------------------------------- +Process can be configured on command line + Benchmark options + no-analysis +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "--benchmark-no-analysis" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.benchmarkNoAnalysis ) +with expansion: + true + +------------------------------------------------------------------------------- +Process can be configured on command line + Benchmark options + warmup-time +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "--benchmark-warmup-time=10" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.benchmarkWarmupTime == 10 ) +with expansion: + 10 == 10 + +------------------------------------------------------------------------------- +Product with differing arities - std::tuple +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( std::tuple_size::value >= 1 ) +with expansion: + 3 >= 1 + +------------------------------------------------------------------------------- +Product with differing arities - std::tuple +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( std::tuple_size::value >= 1 ) +with expansion: + 2 >= 1 + +------------------------------------------------------------------------------- +Product with differing arities - std::tuple +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( std::tuple_size::value >= 1 ) +with expansion: + 1 >= 1 + +------------------------------------------------------------------------------- +Random seed generation accepts known methods +------------------------------------------------------------------------------- +RandomNumberGeneration.tests.cpp: +............................................................................... + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE_NOTHROW( Catch::generateRandomSeed(method) ) + +------------------------------------------------------------------------------- +Random seed generation accepts known methods +------------------------------------------------------------------------------- +RandomNumberGeneration.tests.cpp: +............................................................................... + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE_NOTHROW( Catch::generateRandomSeed(method) ) + +------------------------------------------------------------------------------- +Random seed generation accepts known methods +------------------------------------------------------------------------------- +RandomNumberGeneration.tests.cpp: +............................................................................... + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE_NOTHROW( Catch::generateRandomSeed(method) ) + +------------------------------------------------------------------------------- +Random seed generation reports unknown methods +------------------------------------------------------------------------------- +RandomNumberGeneration.tests.cpp: +............................................................................... + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE_THROWS( Catch::generateRandomSeed(static_cast(77)) ) + +------------------------------------------------------------------------------- +Range type with sentinel +------------------------------------------------------------------------------- +ToString.tests.cpp: +............................................................................... + +ToString.tests.cpp:: PASSED: + CHECK( Catch::Detail::stringify(UsesSentinel{}) == "{ }" ) +with expansion: + "{ }" == "{ }" + +------------------------------------------------------------------------------- +Reconstruction should be based on stringification: #914 +------------------------------------------------------------------------------- +Decomposition.tests.cpp: +............................................................................... + +Decomposition.tests.cpp:: FAILED: + CHECK( truthy(false) ) +with expansion: + Hey, its truthy! + +------------------------------------------------------------------------------- +Regex string matcher +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), Matches( "this STRING contains 'abc' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" matches "this STRING contains + 'abc' as a substring" case sensitively + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), Matches( "contains 'abc' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" matches "contains 'abc' as a + substring" case sensitively + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), Matches( "this string contains 'abc' as a" ) ) +with expansion: + "this string contains 'abc' as a substring" matches "this string contains + 'abc' as a" case sensitively + +------------------------------------------------------------------------------- +Registering reporter with '::' in name fails +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THROWS_WITH( registry.registerReporter( "with::doublecolons", Catch::Detail::make_unique() ), "'::' is not allowed in reporter name: 'with::doublecolons'" ) +with expansion: + "'::' is not allowed in reporter name: 'with::doublecolons'" equals: "'::' is + not allowed in reporter name: 'with::doublecolons'" + +------------------------------------------------------------------------------- +Regression test #1 +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( actual, !UnorderedEquals( expected ) ) +with expansion: + { 'a', 'b' } not UnorderedEquals: { 'c', 'b' } + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + Automake reporter lists tags +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) ) +with expansion: + "All available tags: + 1 [fakeTag] + 1 tag + +" contains: "fakeTag" +with message: + Tested reporter: Automake + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + Automake reporter lists reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) ) +with expansion: + "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" +with message: + Tested reporter: Automake + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + Automake reporter lists tests +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ) +with expansion: + "All available test cases: + fake test name + [fakeTestTag] + 1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) +with message: + Tested reporter: Automake + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + compact reporter lists tags +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) ) +with expansion: + "All available tags: + 1 [fakeTag] + 1 tag + +" contains: "fakeTag" +with message: + Tested reporter: compact + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + compact reporter lists reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) ) +with expansion: + "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" +with message: + Tested reporter: compact + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + compact reporter lists tests +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ) +with expansion: + "All available test cases: + fake test name + [fakeTestTag] + 1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) +with message: + Tested reporter: compact + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + console reporter lists tags +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) ) +with expansion: + "All available tags: + 1 [fakeTag] + 1 tag + +" contains: "fakeTag" +with message: + Tested reporter: console + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + console reporter lists reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) ) +with expansion: + "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" +with message: + Tested reporter: console + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + console reporter lists tests +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ) +with expansion: + "All available test cases: + fake test name + [fakeTestTag] + 1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) +with message: + Tested reporter: console + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + JSON reporter lists tags +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) ) +with expansion: + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "" + }, + "listings": { + "tags": [ + { + "aliases": [ + "fakeTag" + ], + "count": 1 + } + ]" contains: "fakeTag" +with message: + Tested reporter: JSON + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + JSON reporter lists reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) ) +with expansion: + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "" + }, + "listings": { + "reporters": [ + { + "name": "fake reporter", + "description": "fake description" + } + ]" contains: "fake reporter" +with message: + Tested reporter: JSON + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + JSON reporter lists tests +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ) +with expansion: + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "" + }, + "listings": { + "tests": [ + { + "name": "fake test name", + "class-name": "", + "tags": [ + "fakeTestTag" + ], + "source-location": { + "filename": "fake-file.cpp", + "line": 123456789 + } + } + ]" ( contains: "fake test name" and contains: "fakeTestTag" ) +with message: + Tested reporter: JSON + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + JUnit reporter lists tags +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) ) +with expansion: + " + All available tags: + 1 [fakeTag] + 1 tag + +" contains: "fakeTag" +with message: + Tested reporter: JUnit + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + JUnit reporter lists reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) ) +with expansion: + " + Available reporters: + fake reporter: fake description + +" contains: "fake reporter" +with message: + Tested reporter: JUnit + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + JUnit reporter lists tests +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ) +with expansion: + " + All available test cases: + fake test name + [fakeTestTag] + 1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) +with message: + Tested reporter: JUnit + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + SonarQube reporter lists tags +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) ) +with expansion: + " + All available tags: + 1 [fakeTag] + 1 tag + +" contains: "fakeTag" +with message: + Tested reporter: SonarQube + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + SonarQube reporter lists reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) ) +with expansion: + " + Available reporters: + fake reporter: fake description + +" contains: "fake reporter" +with message: + Tested reporter: SonarQube + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + SonarQube reporter lists tests +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ) +with expansion: + " + All available test cases: + fake test name + [fakeTestTag] + 1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) +with message: + Tested reporter: SonarQube + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + TAP reporter lists tags +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) ) +with expansion: + "All available tags: + 1 [fakeTag] + 1 tag + +" contains: "fakeTag" +with message: + Tested reporter: TAP + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + TAP reporter lists reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) ) +with expansion: + "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" +with message: + Tested reporter: TAP + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + TAP reporter lists tests +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ) +with expansion: + "All available test cases: + fake test name + [fakeTestTag] + 1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) +with message: + Tested reporter: TAP + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + TeamCity reporter lists tags +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) ) +with expansion: + "All available tags: + 1 [fakeTag] + 1 tag + +" contains: "fakeTag" +with message: + Tested reporter: TeamCity + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + TeamCity reporter lists reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) ) +with expansion: + "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" +with message: + Tested reporter: TeamCity + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + TeamCity reporter lists tests +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ) +with expansion: + "All available test cases: + fake test name + [fakeTestTag] + 1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) +with message: + Tested reporter: TeamCity + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + XML reporter lists tags +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) ) +with expansion: + " + + + 1 + + fakeTag + + + " contains: "fakeTag" +with message: + Tested reporter: XML + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + XML reporter lists reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) ) +with expansion: + " + + + fake reporter + fake description + + " contains: "fake reporter" +with message: + Tested reporter: XML + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + XML reporter lists tests +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ) +with expansion: + " + + + fake test name + + [fakeTestTag] + + fake-file.cpp + 123456789 + + + " ( contains: "fake test name" and contains: "fakeTestTag" ) +with message: + Tested reporter: XML + +------------------------------------------------------------------------------- +Reproducer for #2309 - a very long description past 80 chars (default console +width) with a late colon : blablabla +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +SUCCEED counts as a test pass +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: PASSED: +with message: + this is a success + +------------------------------------------------------------------------------- +SUCCEED does not require an argument +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or + methods + Given: No operations precede me +------------------------------------------------------------------------------- +BDD.tests.cpp: +............................................................................... + +BDD.tests.cpp:: PASSED: + REQUIRE( before == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or + methods + Given: No operations precede me + When: We get the count + Then: Subsequently values are higher +------------------------------------------------------------------------------- +BDD.tests.cpp: +............................................................................... + +BDD.tests.cpp:: PASSED: + REQUIRE( after > before ) +with expansion: + 1 > 0 + +------------------------------------------------------------------------------- +Scenario: Do that thing with the thing + Given: This stuff exists + And given: And some assumption + When: I do this + Then: it should do this +------------------------------------------------------------------------------- +BDD.tests.cpp: +............................................................................... + +BDD.tests.cpp:: PASSED: + REQUIRE( itDoesThis() ) +with expansion: + true + +------------------------------------------------------------------------------- +Scenario: Do that thing with the thing + Given: This stuff exists + And given: And some assumption + When: I do this + Then: it should do this + And: do that +------------------------------------------------------------------------------- +BDD.tests.cpp: +............................................................................... + +BDD.tests.cpp:: PASSED: + REQUIRE( itDoesThat() ) +with expansion: + true + +------------------------------------------------------------------------------- +Scenario: This is a really long scenario name to see how the list command deals + with wrapping + Given: A section name that is so long that it cannot fit in a single + console width + When: The test headers are printed as part of the normal running of the + scenario + Then: The, deliberately very long and overly verbose (you see what I did + there?) section names must wrap, along with an indent +------------------------------------------------------------------------------- +BDD.tests.cpp: +............................................................................... + +BDD.tests.cpp:: PASSED: +with message: + boo! + +------------------------------------------------------------------------------- +Scenario: Vector resizing affects size and capacity + Given: an empty vector +------------------------------------------------------------------------------- +BDD.tests.cpp: +............................................................................... + +BDD.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Scenario: Vector resizing affects size and capacity + Given: an empty vector + When: it is made larger + Then: the size and capacity go up +------------------------------------------------------------------------------- +BDD.tests.cpp: +............................................................................... + +BDD.tests.cpp:: PASSED: + REQUIRE( v.size() == 10 ) +with expansion: + 10 == 10 + +BDD.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +Scenario: Vector resizing affects size and capacity + Given: an empty vector + When: it is made larger + Then: the size and capacity go up + And when: it is made smaller again + Then: the size goes down but the capacity stays the same +------------------------------------------------------------------------------- +BDD.tests.cpp: +............................................................................... + +BDD.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +BDD.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +Scenario: Vector resizing affects size and capacity + Given: an empty vector +------------------------------------------------------------------------------- +BDD.tests.cpp: +............................................................................... + +BDD.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Scenario: Vector resizing affects size and capacity + Given: an empty vector + When: we reserve more space + Then: The capacity is increased but the size remains the same +------------------------------------------------------------------------------- +BDD.tests.cpp: +............................................................................... + +BDD.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +BDD.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Sends stuff to stdout and stderr +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + + +No assertions in test case 'Sends stuff to stdout and stderr' + +------------------------------------------------------------------------------- +Some simple comparisons between doubles +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( d == Approx( 1.23 ) ) +with expansion: + 1.22999999999999998 + == + Approx( 1.22999999999999998 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d != Approx( 1.22 ) ) +with expansion: + 1.22999999999999998 + != + Approx( 1.21999999999999997 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d != Approx( 1.24 ) ) +with expansion: + 1.22999999999999998 + != + Approx( 1.23999999999999999 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d == 1.23_a ) +with expansion: + 1.22999999999999998 + == + Approx( 1.22999999999999998 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d != 1.22_a ) +with expansion: + 1.22999999999999998 + != + Approx( 1.21999999999999997 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( Approx( d ) == 1.23 ) +with expansion: + Approx( 1.22999999999999998 ) + == + 1.22999999999999998 + +Approx.tests.cpp:: PASSED: + REQUIRE( Approx( d ) != 1.22 ) +with expansion: + Approx( 1.22999999999999998 ) + != + 1.21999999999999997 + +Approx.tests.cpp:: PASSED: + REQUIRE( Approx( d ) != 1.24 ) +with expansion: + Approx( 1.22999999999999998 ) + != + 1.23999999999999999 + +------------------------------------------------------------------------------- +Standard output from all sections is reported + one +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + + +No assertions in section 'one' + +------------------------------------------------------------------------------- +Standard output from all sections is reported + two +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + + +No assertions in section 'two' + +------------------------------------------------------------------------------- +StartsWith string matcher +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), StartsWith( "This String" ) ) +with expansion: + "this string contains 'abc' as a substring" starts with: "This String" + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" starts with: "string" (case + insensitive) + +------------------------------------------------------------------------------- +Static arrays are convertible to string + Single item +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify(singular) == "{ 1 }" ) +with expansion: + "{ 1 }" == "{ 1 }" + +------------------------------------------------------------------------------- +Static arrays are convertible to string + Multiple +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify(arr) == "{ 3, 2, 1 }" ) +with expansion: + "{ 3, 2, 1 }" == "{ 3, 2, 1 }" + +------------------------------------------------------------------------------- +Static arrays are convertible to string + Non-trivial inner items +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify(arr) == R"({ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } })" ) +with expansion: + "{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }" + == + "{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }" + +------------------------------------------------------------------------------- +String matchers +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( testStringForMatching(), ContainsSubstring( "string" ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "string" + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( testStringForMatching(), ContainsSubstring( "string", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "string" (case + insensitive) + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), ContainsSubstring( "abc" ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "abc" + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), ContainsSubstring( "aBC", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "abc" (case + insensitive) + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), StartsWith( "this" ) ) +with expansion: + "this string contains 'abc' as a substring" starts with: "this" + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), StartsWith( "THIS", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" starts with: "this" (case + insensitive) + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), EndsWith( "substring" ) ) +with expansion: + "this string contains 'abc' as a substring" ends with: "substring" + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( testStringForMatching(), EndsWith( " SuBsTrInG", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" ends with: " substring" (case + insensitive) + +------------------------------------------------------------------------------- +StringRef + Empty string +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( empty.empty() ) +with expansion: + true + +String.tests.cpp:: PASSED: + REQUIRE( empty.size() == 0 ) +with expansion: + 0 == 0 + +String.tests.cpp:: PASSED: + REQUIRE( std::strcmp( empty.data(), "" ) == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +StringRef + From string literal +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( s.empty() == false ) +with expansion: + false == false + +String.tests.cpp:: PASSED: + REQUIRE( s.size() == 5 ) +with expansion: + 5 == 5 + +String.tests.cpp:: PASSED: + REQUIRE( std::strcmp( rawChars, "hello" ) == 0 ) +with expansion: + 0 == 0 + +String.tests.cpp:: PASSED: + REQUIRE( s.data() == rawChars ) +with expansion: + "hello" == "hello" + +------------------------------------------------------------------------------- +StringRef + From sub-string +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( original == "original" ) + +String.tests.cpp:: PASSED: + REQUIRE_NOTHROW( original.data() ) + +------------------------------------------------------------------------------- +StringRef + Copy construction is shallow +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( original.begin() == copy.begin() ) +with expansion: + "original string" == "original string" + +------------------------------------------------------------------------------- +StringRef + Copy assignment is shallow +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( original.begin() == copy.begin() ) +with expansion: + "original string" == "original string" + +------------------------------------------------------------------------------- +StringRef + Substrings + zero-based substring +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( ss.empty() == false ) +with expansion: + false == false + +String.tests.cpp:: PASSED: + REQUIRE( ss.size() == 5 ) +with expansion: + 5 == 5 + +String.tests.cpp:: PASSED: + REQUIRE( std::strncmp( ss.data(), "hello", 5 ) == 0 ) +with expansion: + 0 == 0 + +String.tests.cpp:: PASSED: + REQUIRE( ss == "hello" ) +with expansion: + hello == "hello" + +------------------------------------------------------------------------------- +StringRef + Substrings + non-zero-based substring +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( ss.size() == 6 ) +with expansion: + 6 == 6 + +String.tests.cpp:: PASSED: + REQUIRE( std::strcmp( ss.data(), "world!" ) == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +StringRef + Substrings + Pointer values of full refs should match +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( s.data() == s2.data() ) +with expansion: + "hello world!" == "hello world!" + +------------------------------------------------------------------------------- +StringRef + Substrings + Pointer values of substring refs should also match +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( s.data() == ss.data() ) +with expansion: + "hello world!" == "hello world!" + +------------------------------------------------------------------------------- +StringRef + Substrings + Past the end substring +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( s.substr(s.size() + 1, 123).empty() ) +with expansion: + true + +------------------------------------------------------------------------------- +StringRef + Substrings + Substring off the end are trimmed +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( std::strcmp(ss.data(), "world!") == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +StringRef + Substrings + substring start after the end is empty +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( s.substr(1'000'000, 1).empty() ) +with expansion: + true + +------------------------------------------------------------------------------- +StringRef + Comparisons are deep +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + CHECK( reinterpret_cast(buffer1) != reinterpret_cast(buffer2) ) +with expansion: + "Hello" != "Hello" + +String.tests.cpp:: PASSED: + REQUIRE( left == right ) +with expansion: + Hello == Hello + +String.tests.cpp:: PASSED: + REQUIRE( left != left.substr(0, 3) ) +with expansion: + Hello != Hel + +------------------------------------------------------------------------------- +StringRef + from std::string + implicitly constructed +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( sr == "a standard string" ) +with expansion: + a standard string == "a standard string" + +String.tests.cpp:: PASSED: + REQUIRE( sr.size() == stdStr.size() ) +with expansion: + 17 == 17 + +------------------------------------------------------------------------------- +StringRef + from std::string + explicitly constructed +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( sr == "a standard string" ) +with expansion: + a standard string == "a standard string" + +String.tests.cpp:: PASSED: + REQUIRE( sr.size() == stdStr.size() ) +with expansion: + 17 == 17 + +------------------------------------------------------------------------------- +StringRef + from std::string + assigned +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( sr == "a standard string" ) +with expansion: + a standard string == "a standard string" + +String.tests.cpp:: PASSED: + REQUIRE( sr.size() == stdStr.size() ) +with expansion: + 17 == 17 + +------------------------------------------------------------------------------- +StringRef + to std::string + explicitly constructed +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( stdStr == "a stringref" ) +with expansion: + "a stringref" == "a stringref" + +String.tests.cpp:: PASSED: + REQUIRE( stdStr.size() == sr.size() ) +with expansion: + 11 == 11 + +------------------------------------------------------------------------------- +StringRef + to std::string + assigned +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( stdStr == "a stringref" ) +with expansion: + "a stringref" == "a stringref" + +String.tests.cpp:: PASSED: + REQUIRE( stdStr.size() == sr.size() ) +with expansion: + 11 == 11 + +------------------------------------------------------------------------------- +StringRef + std::string += StringRef +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( lhs == "some string += the stringref contents" ) +with expansion: + "some string += the stringref contents" + == + "some string += the stringref contents" + +------------------------------------------------------------------------------- +StringRef + StringRef + StringRef +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: + REQUIRE( together == "abrakadabra" ) +with expansion: + "abrakadabra" == "abrakadabra" + +------------------------------------------------------------------------------- +StringRef at compilation time + Simple constructors +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: +with message: + empty.size() == 0 + +String.tests.cpp:: PASSED: +with message: + empty.begin() == empty.end() + +String.tests.cpp:: PASSED: +with message: + stringref.size() == 3 + +String.tests.cpp:: PASSED: +with message: + stringref.data() == abc + +String.tests.cpp:: PASSED: +with message: + stringref.begin() == abc + +String.tests.cpp:: PASSED: +with message: + stringref.begin() != stringref.end() + +String.tests.cpp:: PASSED: +with message: + stringref.substr(10, 0).empty() + +String.tests.cpp:: PASSED: +with message: + stringref.substr(2, 1).data() == abc + 2 + +String.tests.cpp:: PASSED: +with message: + stringref[1] == 'b' + +String.tests.cpp:: PASSED: +with message: + shortened.size() == 2 + +String.tests.cpp:: PASSED: +with message: + shortened.data() == abc + +String.tests.cpp:: PASSED: +with message: + shortened.begin() != shortened.end() + +------------------------------------------------------------------------------- +StringRef at compilation time + UDL construction +------------------------------------------------------------------------------- +String.tests.cpp: +............................................................................... + +String.tests.cpp:: PASSED: +with message: + !(sr1.empty()) + +String.tests.cpp:: PASSED: +with message: + sr1.size() == 3 + +String.tests.cpp:: PASSED: +with message: + sr2.empty() + +String.tests.cpp:: PASSED: +with message: + sr2.size() == 0 + +------------------------------------------------------------------------------- +Stringifying char arrays with statically known sizes - char +------------------------------------------------------------------------------- +ToString.tests.cpp: +............................................................................... + +ToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s ) +with expansion: + ""abc"" == ""abc"" + +ToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s ) +with expansion: + ""abc"" == ""abc"" + +------------------------------------------------------------------------------- +Stringifying char arrays with statically known sizes - signed char +------------------------------------------------------------------------------- +ToString.tests.cpp: +............................................................................... + +ToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s ) +with expansion: + ""abc"" == ""abc"" + +ToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s ) +with expansion: + ""abc"" == ""abc"" + +------------------------------------------------------------------------------- +Stringifying char arrays with statically known sizes - unsigned char +------------------------------------------------------------------------------- +ToString.tests.cpp: +............................................................................... + +ToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s ) +with expansion: + ""abc"" == ""abc"" + +ToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s ) +with expansion: + ""abc"" == ""abc"" + +------------------------------------------------------------------------------- +Stringifying std::chrono::duration helpers +------------------------------------------------------------------------------- +ToStringChrono.tests.cpp: +............................................................................... + +ToStringChrono.tests.cpp:: PASSED: + REQUIRE( minute == seconds ) +with expansion: + 1 m == 60 s + +ToStringChrono.tests.cpp:: PASSED: + REQUIRE( hour != seconds ) +with expansion: + 1 h != 60 s + +ToStringChrono.tests.cpp:: PASSED: + REQUIRE( micro != milli ) +with expansion: + 1 us != 1 ms + +ToStringChrono.tests.cpp:: PASSED: + REQUIRE( nano != micro ) +with expansion: + 1 ns != 1 us + +------------------------------------------------------------------------------- +Stringifying std::chrono::duration with weird ratios +------------------------------------------------------------------------------- +ToStringChrono.tests.cpp: +............................................................................... + +ToStringChrono.tests.cpp:: PASSED: + REQUIRE( half_minute != femto_second ) +with expansion: + 1 [30/1]s != 1 fs + +ToStringChrono.tests.cpp:: PASSED: + REQUIRE( pico_second != atto_second ) +with expansion: + 1 ps != 1 as + +------------------------------------------------------------------------------- +Stringifying std::chrono::time_point +------------------------------------------------------------------------------- +ToStringChrono.tests.cpp: +............................................................................... + +ToStringChrono.tests.cpp:: PASSED: + REQUIRE( now != later ) +with expansion: + {iso8601-timestamp} + != + {iso8601-timestamp} + +------------------------------------------------------------------------------- +Tabs and newlines show in output +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + CHECK( s1 == s2 ) +with expansion: + "if ($b == 10) { + $a = 20; + }" + == + "if ($b == 10) { + $a = 20; + } + " + +------------------------------------------------------------------------------- +Tag alias can be registered against tag patterns + The same tag alias can only be registered once +------------------------------------------------------------------------------- +Tag.tests.cpp: +............................................................................... + +Tag.tests.cpp:: PASSED: + CHECK_THAT( what, ContainsSubstring( "[@zzz]" ) ) +with expansion: + "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "[@zzz]" + +Tag.tests.cpp:: PASSED: + CHECK_THAT( what, ContainsSubstring( "file" ) ) +with expansion: + "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "file" + +Tag.tests.cpp:: PASSED: + CHECK_THAT( what, ContainsSubstring( "2" ) ) +with expansion: + "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "2" + +Tag.tests.cpp:: PASSED: + CHECK_THAT( what, ContainsSubstring( "10" ) ) +with expansion: + "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "10" + +------------------------------------------------------------------------------- +Tag alias can be registered against tag patterns + Tag aliases must be of the form [@name] +------------------------------------------------------------------------------- +Tag.tests.cpp: +............................................................................... + +Tag.tests.cpp:: PASSED: + CHECK_THROWS( registry.add( "[no ampersat]", "", Catch::SourceLineInfo( "file", 3 ) ) ) + +Tag.tests.cpp:: PASSED: + CHECK_THROWS( registry.add( "[the @ is not at the start]", "", Catch::SourceLineInfo( "file", 3 ) ) ) + +Tag.tests.cpp:: PASSED: + CHECK_THROWS( registry.add( "@no square bracket at start]", "", Catch::SourceLineInfo( "file", 3 ) ) ) + +Tag.tests.cpp:: PASSED: + CHECK_THROWS( registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) ) ) + +------------------------------------------------------------------------------- +Tags with spaces and non-alphanumerical characters are accepted +------------------------------------------------------------------------------- +Tag.tests.cpp: +............................................................................... + +Tag.tests.cpp:: PASSED: + REQUIRE( testCase.tags.size() == 2 ) +with expansion: + 2 == 2 + +Tag.tests.cpp:: PASSED: + REQUIRE_THAT( testCase.tags, VectorContains( Tag( "tag with spaces" ) ) && VectorContains( Tag( "I said \"good day\" sir!"_catch_sr ) ) ) +with expansion: + { {?}, {?} } ( Contains: {?} and Contains: {?} ) + +------------------------------------------------------------------------------- +Template test case method with test types specified inside std::tuple - MyTypes +- 0 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture::m_a == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Template test case method with test types specified inside std::tuple - MyTypes +- 1 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture::m_a == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Template test case method with test types specified inside std::tuple - MyTypes +- 2 +------------------------------------------------------------------------------- +Class.tests.cpp: +............................................................................... + +Class.tests.cpp:: PASSED: + REQUIRE( Template_Fixture::m_a == 1 ) +with expansion: + 1.0 == 1 + +------------------------------------------------------------------------------- +Template test case with test types specified inside non-copyable and non- +movable std::tuple - NonCopyableAndNonMovableTypes - 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( std::is_default_constructible::value ) +with expansion: + true + +------------------------------------------------------------------------------- +Template test case with test types specified inside non-copyable and non- +movable std::tuple - NonCopyableAndNonMovableTypes - 1 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( std::is_default_constructible::value ) +with expansion: + true + +------------------------------------------------------------------------------- +Template test case with test types specified inside non-default-constructible +std::tuple - MyNonDefaultConstructibleTypes - 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( std::is_trivially_copyable::value ) +with expansion: + true + +------------------------------------------------------------------------------- +Template test case with test types specified inside non-default-constructible +std::tuple - MyNonDefaultConstructibleTypes - 1 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( std::is_trivially_copyable::value ) +with expansion: + true + +------------------------------------------------------------------------------- +Template test case with test types specified inside std::tuple - MyTypes - 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( std::is_arithmetic::value ) +with expansion: + true + +------------------------------------------------------------------------------- +Template test case with test types specified inside std::tuple - MyTypes - 1 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( std::is_arithmetic::value ) +with expansion: + true + +------------------------------------------------------------------------------- +Template test case with test types specified inside std::tuple - MyTypes - 2 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( std::is_arithmetic::value ) +with expansion: + true + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - float +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - float + resizing bigger changes size and capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 10 ) +with expansion: + 10 == 10 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - float +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - float + resizing smaller changes size but not capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - float + resizing smaller changes size but not capacity + We can use the 'swap trick' to reset the capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - float +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - float + reserving bigger changes capacity but not size +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - float +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - float + reserving smaller does not change size or capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - int +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - int + resizing bigger changes size and capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 10 ) +with expansion: + 10 == 10 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - int +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - int + resizing smaller changes size but not capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - int + resizing smaller changes size but not capacity + We can use the 'swap trick' to reset the capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - int +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - int + reserving bigger changes capacity but not size +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - int +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - int + reserving smaller does not change size or capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::string +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::string + resizing bigger changes size and capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 10 ) +with expansion: + 10 == 10 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::string +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::string + resizing smaller changes size but not capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::string + resizing smaller changes size but not capacity + We can use the 'swap trick' to reset the capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::string +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::string + reserving bigger changes capacity but not size +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::string +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::string + reserving smaller does not change size or capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::tuple +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::tuple + resizing bigger changes size and capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 10 ) +with expansion: + 10 == 10 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::tuple +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::tuple + resizing smaller changes size but not capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::tuple + resizing smaller changes size but not capacity + We can use the 'swap trick' to reset the capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::tuple +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::tuple + reserving bigger changes capacity but not size +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::tuple +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTest: vectors can be sized and resized - std::tuple + reserving smaller does not change size or capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 6 == 6 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 6 >= 6 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 + resizing bigger changes size and capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 2 * V ) +with expansion: + 12 == 12 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 2 * V ) +with expansion: + 12 >= 12 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 6 == 6 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 6 >= 6 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 + resizing smaller changes size but not capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 6 >= 6 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 + resizing smaller changes size but not capacity + We can use the 'swap trick' to reset the capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 6 == 6 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 6 >= 6 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 + reserving bigger changes capacity but not size +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 6 == 6 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 2 * V ) +with expansion: + 12 >= 12 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 6 == 6 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 6 >= 6 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 + reserving smaller does not change size or capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 6 == 6 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 6 >= 6 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - float,4 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 4 == 4 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 4 >= 4 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - float,4 + resizing bigger changes size and capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 2 * V ) +with expansion: + 8 == 8 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 2 * V ) +with expansion: + 8 >= 8 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - float,4 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 4 == 4 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 4 >= 4 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - float,4 + resizing smaller changes size but not capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 4 >= 4 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - float,4 + resizing smaller changes size but not capacity + We can use the 'swap trick' to reset the capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - float,4 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 4 == 4 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 4 >= 4 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - float,4 + reserving bigger changes capacity but not size +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 4 == 4 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 2 * V ) +with expansion: + 8 >= 8 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - float,4 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 4 == 4 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 4 >= 4 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - float,4 + reserving smaller does not change size or capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 4 == 4 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 4 >= 4 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - int,5 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - int,5 + resizing bigger changes size and capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 2 * V ) +with expansion: + 10 == 10 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 2 * V ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - int,5 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - int,5 + resizing smaller changes size but not capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - int,5 + resizing smaller changes size but not capacity + We can use the 'swap trick' to reset the capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - int,5 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - int,5 + reserving bigger changes capacity but not size +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 2 * V ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - int,5 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - int,5 + reserving smaller does not change size or capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - std::string,15 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 15 == 15 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 15 >= 15 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - std::string,15 + resizing bigger changes size and capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 2 * V ) +with expansion: + 30 == 30 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 2 * V ) +with expansion: + 30 >= 30 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - std::string,15 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 15 == 15 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 15 >= 15 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - std::string,15 + resizing smaller changes size but not capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 15 >= 15 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - std::string,15 + resizing smaller changes size but not capacity + We can use the 'swap trick' to reset the capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - std::string,15 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 15 == 15 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 15 >= 15 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - std::string,15 + reserving bigger changes capacity but not size +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 15 == 15 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 2 * V ) +with expansion: + 30 >= 30 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - std::string,15 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 15 == 15 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 15 >= 15 + +------------------------------------------------------------------------------- +TemplateTestSig: vectors can be sized and resized - std::string,15 + reserving smaller does not change size or capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == V ) +with expansion: + 15 == 15 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= V ) +with expansion: + 15 >= 15 + +------------------------------------------------------------------------------- +Test case with identical tags keeps just one +------------------------------------------------------------------------------- +Tag.tests.cpp: +............................................................................... + +Tag.tests.cpp:: PASSED: + REQUIRE( testCase.tags.size() == 1 ) +with expansion: + 1 == 1 + +Tag.tests.cpp:: PASSED: + REQUIRE( testCase.tags[0] == Tag( "tag1" ) ) +with expansion: + {?} == {?} + +------------------------------------------------------------------------------- +Test case with one argument +------------------------------------------------------------------------------- +VariadicMacros.tests.cpp: +............................................................................... + +VariadicMacros.tests.cpp:: PASSED: +with message: + no assertions + +------------------------------------------------------------------------------- +Test enum bit values +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( 0x == bit30and31 ) +with expansion: + 3221225472 (0x) == 3221225472 + +------------------------------------------------------------------------------- +Test with special, characters "in name +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +Testing checked-if +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECKED_IF( true ) + +Misc.tests.cpp:: PASSED: + +Misc.tests.cpp:: FAILED - but was ok: + CHECKED_IF( false ) + +Misc.tests.cpp:: PASSED: + CHECKED_ELSE( true ) + +Misc.tests.cpp:: FAILED - but was ok: + CHECKED_ELSE( false ) + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +Testing checked-if 2 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECKED_IF( true ) + +Misc.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +Testing checked-if 3 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED - but was ok: + CHECKED_ELSE( false ) + +Misc.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +Testing checked-if 4 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECKED_ELSE( true ) + +Misc.tests.cpp:: FAILED: + {Unknown expression after the reported line} +due to unexpected exception with message: + Uncaught exception should fail! + +------------------------------------------------------------------------------- +Testing checked-if 5 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED - but was ok: + CHECKED_ELSE( false ) + +Misc.tests.cpp:: FAILED: + {Unknown expression after the reported line} +due to unexpected exception with message: + Uncaught exception should fail! + +------------------------------------------------------------------------------- +The NO_FAIL macro reports a failure but does not fail the test +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED - but was ok: + CHECK_NOFAIL( 1 == 2 ) + + +No assertions in test case 'The NO_FAIL macro reports a failure but does not fail the test' + +------------------------------------------------------------------------------- +The default listing implementation write to provided stream + Listing tags +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("[fakeTag]"s) ) +with expansion: + "All available tags: + 1 [fakeTag] + 1 tag + +" contains: "[fakeTag]" + +------------------------------------------------------------------------------- +The default listing implementation write to provided stream + Listing reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake reporter"s ) && ContainsSubstring( "fake description"s ) ) +with expansion: + "Available reporters: + fake reporter: fake description + +" ( contains: "fake reporter" and contains: "fake description" ) + +------------------------------------------------------------------------------- +The default listing implementation write to provided stream + Listing tests +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ) +with expansion: + "All available test cases: + fake test name + [fakeTestTag] + 1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) + +------------------------------------------------------------------------------- +The default listing implementation write to provided stream + Listing listeners +------------------------------------------------------------------------------- +Reporters.tests.cpp: +............................................................................... + +Reporters.tests.cpp:: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fakeListener"s ) && ContainsSubstring( "fake description"s ) ) +with expansion: + "Registered listeners: + fakeListener: fake description + +" ( contains: "fakeListener" and contains: "fake description" ) + +------------------------------------------------------------------------------- +This test 'should' fail but doesn't +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + oops! + +------------------------------------------------------------------------------- +Thrown string literals are translated +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with message: + For some reason someone is throwing a string literal! + +------------------------------------------------------------------------------- +Tracker +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isOpen() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker + successfully close one section +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isSuccessfullyCompleted() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isComplete() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( ctx.completedCycle() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isSuccessfullyCompleted() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isOpen() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker + fail one section +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isComplete() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isSuccessfullyCompleted() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isComplete() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( ctx.completedCycle() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isSuccessfullyCompleted() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + fail one section + re-enter after failed section +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase2.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1b.isOpen() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( ctx.completedCycle() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isComplete() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isSuccessfullyCompleted() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isOpen() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker + fail one section +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isComplete() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isSuccessfullyCompleted() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isComplete() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( ctx.completedCycle() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isSuccessfullyCompleted() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + fail one section + re-enter after failed section and find next section +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase2.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1b.isOpen() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s2.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( ctx.completedCycle() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isComplete() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isSuccessfullyCompleted() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isOpen() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker + successfully close one section, then find another +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s2.isOpen() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isComplete() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + successfully close one section, then find another + Re-enter - skips S1 and enters S2 +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase2.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1b.isOpen() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s2b.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( ctx.completedCycle() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + successfully close one section, then find another + Re-enter - skips S1 and enters S2 + Successfully close S2 +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( ctx.completedCycle() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s2b.isSuccessfullyCompleted() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase2.isComplete() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase2.isSuccessfullyCompleted() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isOpen() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker + successfully close one section, then find another +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s2.isOpen() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isComplete() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + successfully close one section, then find another + Re-enter - skips S1 and enters S2 +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase2.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1b.isOpen() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s2b.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( ctx.completedCycle() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + successfully close one section, then find another + Re-enter - skips S1 and enters S2 + fail S2 +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( ctx.completedCycle() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s2b.isComplete() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s2b.isSuccessfullyCompleted() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase2.isSuccessfullyCompleted() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase3.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1c.isOpen() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s2c.isOpen() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase3.isSuccessfullyCompleted() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isOpen() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker + open a nested section +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s2.isOpen() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s2.isComplete() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isComplete() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( s1.isComplete() ) +with expansion: + true + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isComplete() == false ) +with expansion: + false == false + +PartTracker.tests.cpp:: PASSED: + REQUIRE( testCase.isComplete() ) +with expansion: + true + +------------------------------------------------------------------------------- +Trim strings +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + REQUIRE( trim(std::string(no_whitespace)) == no_whitespace ) +with expansion: + "There is no extra whitespace here" + == + "There is no extra whitespace here" + +StringManip.tests.cpp:: PASSED: + REQUIRE( trim(std::string(leading_whitespace)) == no_whitespace ) +with expansion: + "There is no extra whitespace here" + == + "There is no extra whitespace here" + +StringManip.tests.cpp:: PASSED: + REQUIRE( trim(std::string(trailing_whitespace)) == no_whitespace ) +with expansion: + "There is no extra whitespace here" + == + "There is no extra whitespace here" + +StringManip.tests.cpp:: PASSED: + REQUIRE( trim(std::string(whitespace_at_both_ends)) == no_whitespace ) +with expansion: + "There is no extra whitespace here" + == + "There is no extra whitespace here" + +StringManip.tests.cpp:: PASSED: + REQUIRE( trim(StringRef(no_whitespace)) == StringRef(no_whitespace) ) +with expansion: + There is no extra whitespace here + == + There is no extra whitespace here + +StringManip.tests.cpp:: PASSED: + REQUIRE( trim(StringRef(leading_whitespace)) == StringRef(no_whitespace) ) +with expansion: + There is no extra whitespace here + == + There is no extra whitespace here + +StringManip.tests.cpp:: PASSED: + REQUIRE( trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace) ) +with expansion: + There is no extra whitespace here + == + There is no extra whitespace here + +StringManip.tests.cpp:: PASSED: + REQUIRE( trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace) ) +with expansion: + There is no extra whitespace here + == + There is no extra whitespace here + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Container conversions + Two equal containers of different container types +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_int_a, RangeEquals( c_array ) ) +with expansion: + { 1, 2, 3 } elements are { 1, 2, 3 } + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_int_a, UnorderedRangeEquals( c_array ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Container conversions + Two equal containers of different container types (differ in array N) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_int_3, !RangeEquals( array_int_4 ) ) +with expansion: + { 1, 2, 3 } not elements are { 1, 2, 3, 4 } + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_int_3, !UnorderedRangeEquals( array_int_4 ) ) +with expansion: + { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Container conversions + Two equal containers of different container types and value types +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_int_a, RangeEquals( vector_char_a ) ) +with expansion: + { 1, 2, 3 } elements are { 1, 2, 3 } + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_int_a, UnorderedRangeEquals( vector_char_a ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Container conversions + Two equal containers, one random access, one not +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: +with message: + ContainerIsRandomAccess( array_int_a ) != ContainerIsRandomAccess( + list_char_a ) + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_int_a, RangeEquals( list_char_a ) ) +with expansion: + { 1, 2, 3 } elements are { 1, 2, 3 } + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_int_a, UnorderedRangeEquals( list_char_a ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Value type + Two equal containers of different value types +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_int_a, RangeEquals( vector_char_a ) ) +with expansion: + { 1, 2, 3 } elements are { 1, 2, 3 } + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_int_a, UnorderedRangeEquals( vector_char_a ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Value type + Two non-equal containers of different value types +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_int_a, !RangeEquals( vector_char_b ) ) +with expansion: + { 1, 2, 3 } not elements are { 1, 2, 2 } + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_int_a, !UnorderedRangeEquals( vector_char_b ) ) +with expansion: + { 1, 2, 3 } not unordered elements are { 1, 2, 2 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Ranges with begin that needs ADL +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( a, !RangeEquals( b ) ) +with expansion: + { 1, 2, 3 } not elements are { 3, 2, 1 } + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( a, UnorderedRangeEquals( b ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 3, 2, 1 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Custom predicate + Two equal non-empty containers (close enough) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_a, RangeEquals( array_a_plus_1, close_enough ) ) +with expansion: + { 1, 2, 3 } elements are { 2, 3, 4 } + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_a, UnorderedRangeEquals( array_a_plus_1, close_enough ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 2, 3, 4 } + +------------------------------------------------------------------------------- +Unexpected exceptions can be translated +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with message: + 3.14000000000000012 + +------------------------------------------------------------------------------- +Upcasting special member functions + Move constructor +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( bptr->i == 3 ) +with expansion: + 3 == 3 + +------------------------------------------------------------------------------- +Upcasting special member functions + move assignment +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( bptr->i == 3 ) +with expansion: + 3 == 3 + +------------------------------------------------------------------------------- +Usage of AllMatch range matcher + Basic usage +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, AllMatch(SizeIs(5)) ) +with expansion: + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 + }, { 1, 0, 0, -1, 5 } } all match has size == 5 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !AllMatch(Contains(0) && Contains(1)) ) +with expansion: + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 + }, { 1, 0, 0, -1, 5 } } not all match ( contains element 0 and contains + element 1 ) + +------------------------------------------------------------------------------- +Usage of AllMatch range matcher + Type requires ADL found begin and end +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( needs_adl, AllMatch( Predicate( []( int elem ) { return elem < 6; } ) ) ) +with expansion: + { 1, 2, 3, 4, 5 } all match matches undescribed predicate + +------------------------------------------------------------------------------- +Usage of AllMatch range matcher + Shortcircuiting + All are read +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, allMatch ) +with expansion: + { 1, 2, 3, 4, 5 } all match matches undescribed predicate + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[3] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[4] ) +with expansion: + true + +------------------------------------------------------------------------------- +Usage of AllMatch range matcher + Shortcircuiting + Short-circuited +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, !allMatch ) +with expansion: + { 1, 2, 3, 4, 5 } not all match matches undescribed predicate + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[3] ) +with expansion: + !false + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[4] ) +with expansion: + !false + +------------------------------------------------------------------------------- +Usage of AllTrue range matcher + Basic usage + All true evaluates to true +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, AllTrue() ) +with expansion: + { true, true, true, true, true } contains only true + +------------------------------------------------------------------------------- +Usage of AllTrue range matcher + Basic usage + Empty evaluates to true +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, AllTrue() ) +with expansion: + { } contains only true + +------------------------------------------------------------------------------- +Usage of AllTrue range matcher + Basic usage + One false evaluates to false +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !AllTrue() ) +with expansion: + { true, true, false, true, true } not contains only true + +------------------------------------------------------------------------------- +Usage of AllTrue range matcher + Basic usage + All false evaluates to false +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !AllTrue() ) +with expansion: + { false, false, false, false, false } not contains only true + +------------------------------------------------------------------------------- +Usage of AllTrue range matcher + Contained type is convertible to bool + All true evaluates to true +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, AllTrue() ) +with expansion: + { true, true, true, true, true } contains only true + +------------------------------------------------------------------------------- +Usage of AllTrue range matcher + Contained type is convertible to bool + One false evaluates to false +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !AllTrue() ) +with expansion: + { true, true, false, true, true } not contains only true + +------------------------------------------------------------------------------- +Usage of AllTrue range matcher + Contained type is convertible to bool + All false evaluates to false +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !AllTrue() ) +with expansion: + { false, false, false, false, false } not contains only true + +------------------------------------------------------------------------------- +Usage of AllTrue range matcher + Shortcircuiting + All are read +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, AllTrue() ) +with expansion: + { true, true, true, true, true } contains only true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[3] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[4] ) +with expansion: + true + +------------------------------------------------------------------------------- +Usage of AllTrue range matcher + Shortcircuiting + Short-circuited +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, !AllTrue() ) +with expansion: + { true, true, false, true, true } not contains only true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[3] ) +with expansion: + !false + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[4] ) +with expansion: + !false + +------------------------------------------------------------------------------- +Usage of AnyMatch range matcher + Basic usage +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, AnyMatch(SizeIs(5)) ) +with expansion: + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 + }, { 1, 0, 0, -1, 5 } } any match has size == 5 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !AnyMatch(Contains(0) && Contains(10)) ) +with expansion: + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 + }, { 1, 0, 0, -1, 5 } } not any match ( contains element 0 and contains + element 10 ) + +------------------------------------------------------------------------------- +Usage of AnyMatch range matcher + Type requires ADL found begin and end +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( needs_adl, AnyMatch( Predicate( []( int elem ) { return elem < 3; } ) ) ) +with expansion: + { 1, 2, 3, 4, 5 } any match matches undescribed predicate + +------------------------------------------------------------------------------- +Usage of AnyMatch range matcher + Shortcircuiting + All are read +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, !anyMatch ) +with expansion: + { 1, 2, 3, 4, 5 } not any match matches undescribed predicate + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[3] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[4] ) +with expansion: + true + +------------------------------------------------------------------------------- +Usage of AnyMatch range matcher + Shortcircuiting + Short-circuited +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, anyMatch ) +with expansion: + { 1, 2, 3, 4, 5 } any match matches undescribed predicate + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[1] ) +with expansion: + !false + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[2] ) +with expansion: + !false + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[3] ) +with expansion: + !false + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[4] ) +with expansion: + !false + +------------------------------------------------------------------------------- +Usage of AnyTrue range matcher + Basic usage + All true evaluates to true +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, AnyTrue() ) +with expansion: + { true, true, true, true, true } contains at least one true + +------------------------------------------------------------------------------- +Usage of AnyTrue range matcher + Basic usage + Empty evaluates to false +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !AnyTrue() ) +with expansion: + { } not contains at least one true + +------------------------------------------------------------------------------- +Usage of AnyTrue range matcher + Basic usage + One true evaluates to true +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, AnyTrue() ) +with expansion: + { false, false, true, false, false } contains at least one true + +------------------------------------------------------------------------------- +Usage of AnyTrue range matcher + Basic usage + All false evaluates to false +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !AnyTrue() ) +with expansion: + { false, false, false, false, false } not contains at least one true + +------------------------------------------------------------------------------- +Usage of AnyTrue range matcher + Contained type is convertible to bool + All true evaluates to true +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, AnyTrue() ) +with expansion: + { true, true, true, true, true } contains at least one true + +------------------------------------------------------------------------------- +Usage of AnyTrue range matcher + Contained type is convertible to bool + One true evaluates to true +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, AnyTrue() ) +with expansion: + { false, false, true, false, false } contains at least one true + +------------------------------------------------------------------------------- +Usage of AnyTrue range matcher + Contained type is convertible to bool + All false evaluates to false +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !AnyTrue() ) +with expansion: + { false, false, false, false, false } not contains at least one true + +------------------------------------------------------------------------------- +Usage of AnyTrue range matcher + Shortcircuiting + All are read +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, AnyTrue() ) +with expansion: + { false, false, false, false, true } contains at least one true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[3] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[4] ) +with expansion: + true + +------------------------------------------------------------------------------- +Usage of AnyTrue range matcher + Shortcircuiting + Short-circuited +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, AnyTrue() ) +with expansion: + { false, false, true, true, true } contains at least one true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[3] ) +with expansion: + !false + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[4] ) +with expansion: + !false + +------------------------------------------------------------------------------- +Usage of NoneMatch range matcher + Basic usage +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, NoneMatch(SizeIs(6)) ) +with expansion: + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 + }, { 1, 0, 0, -1, 5 } } none match has size == 6 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !NoneMatch(Contains(0) && Contains(1)) ) +with expansion: + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 + }, { 1, 0, 0, -1, 5 } } not none match ( contains element 0 and contains + element 1 ) + +------------------------------------------------------------------------------- +Usage of NoneMatch range matcher + Type requires ADL found begin and end +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( needs_adl, NoneMatch( Predicate( []( int elem ) { return elem > 6; } ) ) ) +with expansion: + { 1, 2, 3, 4, 5 } none match matches undescribed predicate + +------------------------------------------------------------------------------- +Usage of NoneMatch range matcher + Shortcircuiting + All are read +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, noneMatch ) +with expansion: + { 1, 2, 3, 4, 5 } none match matches undescribed predicate + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[3] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[4] ) +with expansion: + true + +------------------------------------------------------------------------------- +Usage of NoneMatch range matcher + Shortcircuiting + Short-circuited +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, !noneMatch ) +with expansion: + { 1, 2, 3, 4, 5 } not none match matches undescribed predicate + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[1] ) +with expansion: + !false + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[2] ) +with expansion: + !false + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[3] ) +with expansion: + !false + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[4] ) +with expansion: + !false + +------------------------------------------------------------------------------- +Usage of NoneTrue range matcher + Basic usage + All true evaluates to false +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !NoneTrue() ) +with expansion: + { true, true, true, true, true } not contains no true + +------------------------------------------------------------------------------- +Usage of NoneTrue range matcher + Basic usage + Empty evaluates to true +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, NoneTrue() ) +with expansion: + { } contains no true + +------------------------------------------------------------------------------- +Usage of NoneTrue range matcher + Basic usage + One true evaluates to false +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !NoneTrue() ) +with expansion: + { false, false, true, false, false } not contains no true + +------------------------------------------------------------------------------- +Usage of NoneTrue range matcher + Basic usage + All false evaluates to true +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, NoneTrue() ) +with expansion: + { false, false, false, false, false } contains no true + +------------------------------------------------------------------------------- +Usage of NoneTrue range matcher + Contained type is convertible to bool + All true evaluates to false +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !NoneTrue() ) +with expansion: + { true, true, true, true, true } not contains no true + +------------------------------------------------------------------------------- +Usage of NoneTrue range matcher + Contained type is convertible to bool + One true evaluates to false +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, !NoneTrue() ) +with expansion: + { false, false, true, false, false } not contains no true + +------------------------------------------------------------------------------- +Usage of NoneTrue range matcher + Contained type is convertible to bool + All false evaluates to true +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( data, NoneTrue() ) +with expansion: + { false, false, false, false, false } contains no true + +------------------------------------------------------------------------------- +Usage of NoneTrue range matcher + Shortcircuiting + All are read +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, NoneTrue() ) +with expansion: + { false, false, false, false, false } contains no true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[3] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[4] ) +with expansion: + true + +------------------------------------------------------------------------------- +Usage of NoneTrue range matcher + Shortcircuiting + Short-circuited +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked, !NoneTrue() ) +with expansion: + { false, false, true, true, true } not contains no true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[3] ) +with expansion: + !false + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked.m_derefed[4] ) +with expansion: + !false + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Empty container matches empty container +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( empty_vector, RangeEquals( empty_vector ) ) +with expansion: + { } elements are { } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Empty container does not match non-empty container +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( empty_vector, !RangeEquals( non_empty_vector ) ) +with expansion: + { } not elements are { 1 } + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( non_empty_vector, !RangeEquals( empty_vector ) ) +with expansion: + { 1 } not elements are { } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Two equal 1-length non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( non_empty_array, RangeEquals( non_empty_array ) ) +with expansion: + { 1 } elements are { 1 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Two equal-sized, equal, non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_a, RangeEquals( array_a ) ) +with expansion: + { 1, 2, 3 } elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Two equal-sized, non-equal, non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_a, !RangeEquals( array_b ) ) +with expansion: + { 1, 2, 3 } not elements are { 2, 2, 3 } + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_a, !RangeEquals( array_c ) ) +with expansion: + { 1, 2, 3 } not elements are { 1, 2, 2 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Two non-equal-sized, non-empty containers (with same first elements) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_a, !RangeEquals( vector_b ) ) +with expansion: + { 1, 2, 3 } not elements are { 1, 2, 3, 4 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Custom predicate + Two equal non-empty containers (close enough) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_a, RangeEquals( vector_a_plus_1, close_enough ) ) +with expansion: + { 1, 2, 3 } elements are { 2, 3, 4 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Custom predicate + Two non-equal non-empty containers (close enough) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_a, !RangeEquals( vector_b, close_enough ) ) +with expansion: + { 1, 2, 3 } not elements are { 3, 3, 4 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Ranges that need ADL begin/end +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( needs_adl1, RangeEquals( needs_adl2 ) ) +with expansion: + { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 } + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } ) ) +with expansion: + { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Compare against std::initializer_list +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( array_a, RangeEquals( { 1, 2, 3 } ) ) +with expansion: + { 1, 2, 3 } elements are { 1, 2, 3 } + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( array_a, RangeEquals( { 2, 4, 6 }, []( int l, int r ) { return l * 2 == r; } ) ) +with expansion: + { 1, 2, 3 } elements are { 2, 4, 6 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Check short-circuiting behaviour + Check short-circuits on failure +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked1, !RangeEquals( arr ) ) +with expansion: + { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 } + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked1.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked1.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked1.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_FALSE( mocked1.m_derefed[3] ) +with expansion: + !false + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Check short-circuiting behaviour + All elements are checked on success +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( mocked1, RangeEquals( arr ) ) +with expansion: + { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 } + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked1.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked1.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked1.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE( mocked1.m_derefed[3] ) +with expansion: + true + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Empty container matches empty container +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( empty_vector, UnorderedRangeEquals( empty_vector ) ) +with expansion: + { } unordered elements are { } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Empty container does not match non-empty container +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( empty_vector, !UnorderedRangeEquals( non_empty_vector ) ) +with expansion: + { } not unordered elements are { 1 } + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( non_empty_vector, !UnorderedRangeEquals( empty_vector ) ) +with expansion: + { 1 } not unordered elements are { } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Two equal 1-length non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( non_empty_array, UnorderedRangeEquals( non_empty_array ) ) +with expansion: + { 1 } unordered elements are { 1 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Two equal-sized, equal, non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_a, UnorderedRangeEquals( array_a ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Two equal-sized, non-equal, non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( array_a, !UnorderedRangeEquals( array_b ) ) +with expansion: + { 1, 2, 3 } not unordered elements are { 2, 2, 3 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Two non-equal-sized, non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_a, !UnorderedRangeEquals( vector_b ) ) +with expansion: + { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Custom predicate + Two equal non-empty containers (close enough) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_a, UnorderedRangeEquals( vector_a_plus_1, close_enough ) ) +with expansion: + { 1, 10, 20 } unordered elements are { 11, 21, 2 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Custom predicate + Two non-equal non-empty containers (close enough) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + CHECK_THAT( vector_a, !UnorderedRangeEquals( vector_b, close_enough ) ) +with expansion: + { 1, 10, 21 } not unordered elements are { 11, 21, 3 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Ranges that need ADL begin/end +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( needs_adl1, UnorderedRangeEquals( needs_adl2 ) ) +with expansion: + { 1, 2, 3, 4, 5 } unordered elements are { 1, 2, 3, 4, 5 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Compare against std::initializer_list +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( array_a, UnorderedRangeEquals( { 10, 20, 1 } ) ) +with expansion: + { 1, 10, 20 } unordered elements are { 10, 20, 1 } + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( array_a, UnorderedRangeEquals( { 11, 21, 2 }, []( int l, int r ) { return std::abs( l - r ) <= 1; } ) ) +with expansion: + { 1, 10, 20 } unordered elements are { 11, 21, 2 } + +------------------------------------------------------------------------------- +Usage of the SizeIs range matcher + Some with stdlib containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( empty_vec, SizeIs(0) ) +with expansion: + { } has size == 0 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( empty_vec, !SizeIs(2) ) +with expansion: + { } not has size == 2 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( empty_vec, SizeIs(Lt(2)) ) +with expansion: + { } size matches is less than 2 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( arr, SizeIs(2) ) +with expansion: + { 0, 0 } has size == 2 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( arr, SizeIs( Lt(3)) ) +with expansion: + { 0, 0 } size matches is less than 3 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( arr, !SizeIs(!Lt(3)) ) +with expansion: + { 0, 0 } not size matches not is less than 3 + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( map, SizeIs(3) ) +with expansion: + { {?}, {?}, {?} } has size == 3 + +------------------------------------------------------------------------------- +Usage of the SizeIs range matcher + Type requires ADL found size free function +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( unrelated::ADL_size{}, SizeIs(12) ) +with expansion: + {?} has size == 12 + +------------------------------------------------------------------------------- +Usage of the SizeIs range matcher + Type has size member +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp: +............................................................................... + +MatchersRanges.tests.cpp:: PASSED: + REQUIRE_THAT( has_size{}, SizeIs(13) ) +with expansion: + {?} has size == 13 + +------------------------------------------------------------------------------- +Use a custom approx +------------------------------------------------------------------------------- +Approx.tests.cpp: +............................................................................... + +Approx.tests.cpp:: PASSED: + REQUIRE( d == approx( 1.23 ) ) +with expansion: + 1.22999999999999998 + == + Approx( 1.22999999999999998 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d == approx( 1.22 ) ) +with expansion: + 1.22999999999999998 + == + Approx( 1.21999999999999997 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d == approx( 1.24 ) ) +with expansion: + 1.22999999999999998 + == + Approx( 1.23999999999999999 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( d != approx( 1.25 ) ) +with expansion: + 1.22999999999999998 != Approx( 1.25 ) + +Approx.tests.cpp:: PASSED: + REQUIRE( approx( d ) == 1.23 ) +with expansion: + Approx( 1.22999999999999998 ) + == + 1.22999999999999998 + +Approx.tests.cpp:: PASSED: + REQUIRE( approx( d ) == 1.22 ) +with expansion: + Approx( 1.22999999999999998 ) + == + 1.21999999999999997 + +Approx.tests.cpp:: PASSED: + REQUIRE( approx( d ) == 1.24 ) +with expansion: + Approx( 1.22999999999999998 ) + == + 1.23999999999999999 + +Approx.tests.cpp:: PASSED: + REQUIRE( approx( d ) != 1.25 ) +with expansion: + Approx( 1.22999999999999998 ) != 1.25 + +------------------------------------------------------------------------------- +Variadic macros + Section with one argument +------------------------------------------------------------------------------- +VariadicMacros.tests.cpp: +............................................................................... + +VariadicMacros.tests.cpp:: PASSED: +with message: + no assertions + +------------------------------------------------------------------------------- +Vector Approx matcher + Empty vector is roughly equal to an empty vector +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( empty, Approx( empty ) ) +with expansion: + { } is approx: { } + +------------------------------------------------------------------------------- +Vector Approx matcher + Vectors with elements + A vector is approx equal to itself +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( v1, Approx( v1 ) ) +with expansion: + { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( v1, Approx( { 1., 2., 3. } ) ) +with expansion: + { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } + +------------------------------------------------------------------------------- +Vector Approx matcher + Vectors with elements + Different length +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( v1, !Approx( temp ) ) +with expansion: + { 1.0, 2.0, 3.0 } not is approx: { 1.0, 2.0, 3.0, 4.0 } + +------------------------------------------------------------------------------- +Vector Approx matcher + Vectors with elements + Same length, different elements +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( v1, !Approx( v2 ) ) +with expansion: + { 1.0, 2.0, 3.0 } not is approx: { 1.5, 2.5, 3.5 } + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( v1, Approx( v2 ).margin( 0.5 ) ) +with expansion: + { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( v1, Approx( v2 ).epsilon( 0.5 ) ) +with expansion: + { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( v1, Approx( v2 ).epsilon( 0.1 ).scale( 500 ) ) +with expansion: + { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } + +------------------------------------------------------------------------------- +Vector Approx matcher -- failing + Empty and non empty vectors are not approx equal +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( empty, Approx( t1 ) ) +with expansion: + { } is approx: { 1.0, 2.0 } + +------------------------------------------------------------------------------- +Vector Approx matcher -- failing + Just different vectors +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( v1, Approx( v2 ) ) +with expansion: + { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 } + +------------------------------------------------------------------------------- +Vector matchers + Contains (element) +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, VectorContains( 1 ) ) +with expansion: + { 1, 2, 3 } Contains: 1 + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, VectorContains( 2 ) ) +with expansion: + { 1, 2, 3 } Contains: 2 + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v5, ( VectorContains>( 2 ) ) ) +with expansion: + { 1, 2, 3 } Contains: 2 + +------------------------------------------------------------------------------- +Vector matchers + Contains (vector) +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, Contains( v2 ) ) +with expansion: + { 1, 2, 3 } Contains: { 1, 2 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, Contains( { 1, 2 } ) ) +with expansion: + { 1, 2, 3 } Contains: { 1, 2 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v5, ( Contains, CustomAllocator>( v2 ) ) ) +with expansion: + { 1, 2, 3 } Contains: { 1, 2 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, Contains( v2 ) ) +with expansion: + { 1, 2, 3 } Contains: { 1, 2, 3 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, Contains( empty ) ) +with expansion: + { 1, 2, 3 } Contains: { } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( empty, Contains( empty ) ) +with expansion: + { } Contains: { } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v5, ( Contains, CustomAllocator>( v2 ) ) ) +with expansion: + { 1, 2, 3 } Contains: { 1, 2, 3 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v5, Contains( v6 ) ) +with expansion: + { 1, 2, 3 } Contains: { 1, 2 } + +------------------------------------------------------------------------------- +Vector matchers + Contains (element), composed +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, VectorContains( 1 ) && VectorContains( 2 ) ) +with expansion: + { 1, 2, 3 } ( Contains: 1 and Contains: 2 ) + +------------------------------------------------------------------------------- +Vector matchers + Equals +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, Equals( v ) ) +with expansion: + { 1, 2, 3 } Equals: { 1, 2, 3 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( empty, Equals( empty ) ) +with expansion: + { } Equals: { } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, Equals( { 1, 2, 3 } ) ) +with expansion: + { 1, 2, 3 } Equals: { 1, 2, 3 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, Equals( v2 ) ) +with expansion: + { 1, 2, 3 } Equals: { 1, 2, 3 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v5, ( Equals, CustomAllocator>( v2 ) ) ) +with expansion: + { 1, 2, 3 } Equals: { 1, 2, 3 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v5, Equals( v6 ) ) +with expansion: + { 1, 2, 3 } Equals: { 1, 2, 3 } + +------------------------------------------------------------------------------- +Vector matchers + UnorderedEquals +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, UnorderedEquals( v ) ) +with expansion: + { 1, 2, 3 } UnorderedEquals: { 1, 2, 3 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v, UnorderedEquals( { 3, 2, 1 } ) ) +with expansion: + { 1, 2, 3 } UnorderedEquals: { 3, 2, 1 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( empty, UnorderedEquals( empty ) ) +with expansion: + { } UnorderedEquals: { } + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( permuted, UnorderedEquals( v ) ) +with expansion: + { 1, 3, 2 } UnorderedEquals: { 1, 2, 3 } + +Matchers.tests.cpp:: PASSED: + REQUIRE_THAT( permuted, UnorderedEquals( v ) ) +with expansion: + { 2, 3, 1 } UnorderedEquals: { 1, 2, 3 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v5, ( UnorderedEquals, CustomAllocator>( permuted ) ) ) +with expansion: + { 1, 2, 3 } UnorderedEquals: { 2, 3, 1 } + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( v5_permuted, UnorderedEquals( v5 ) ) +with expansion: + { 1, 3, 2 } UnorderedEquals: { 1, 2, 3 } + +------------------------------------------------------------------------------- +Vector matchers that fail + Contains (element) +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( v, VectorContains( -1 ) ) +with expansion: + { 1, 2, 3 } Contains: -1 + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( empty, VectorContains( 1 ) ) +with expansion: + { } Contains: 1 + +------------------------------------------------------------------------------- +Vector matchers that fail + Contains (vector) +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( empty, Contains( v ) ) +with expansion: + { } Contains: { 1, 2, 3 } + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( v, Contains( v2 ) ) +with expansion: + { 1, 2, 3 } Contains: { 1, 2, 4 } + +------------------------------------------------------------------------------- +Vector matchers that fail + Equals +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( v, Equals( v2 ) ) +with expansion: + { 1, 2, 3 } Equals: { 1, 2 } + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( v2, Equals( v ) ) +with expansion: + { 1, 2 } Equals: { 1, 2, 3 } + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( empty, Equals( v ) ) +with expansion: + { } Equals: { 1, 2, 3 } + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( v, Equals( empty ) ) +with expansion: + { 1, 2, 3 } Equals: { } + +------------------------------------------------------------------------------- +Vector matchers that fail + UnorderedEquals +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( v, UnorderedEquals( empty ) ) +with expansion: + { 1, 2, 3 } UnorderedEquals: { } + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( empty, UnorderedEquals( v ) ) +with expansion: + { } UnorderedEquals: { 1, 2, 3 } + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( permuted, UnorderedEquals( v ) ) +with expansion: + { 1, 3 } UnorderedEquals: { 1, 2, 3 } + +Matchers.tests.cpp:: FAILED: + CHECK_THAT( permuted, UnorderedEquals( v ) ) +with expansion: + { 3, 1 } UnorderedEquals: { 1, 2, 3 } + +------------------------------------------------------------------------------- +When checked exceptions are thrown they can be expected or unexpected +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: PASSED: + REQUIRE_THROWS_AS( thisThrows(), std::domain_error ) + +Exception.tests.cpp:: PASSED: + REQUIRE_NOTHROW( thisDoesntThrow() ) + +Exception.tests.cpp:: PASSED: + REQUIRE_THROWS( thisThrows() ) + +------------------------------------------------------------------------------- +When unchecked exceptions are thrown directly they are always failures +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with message: + unexpected exception + +------------------------------------------------------------------------------- +When unchecked exceptions are thrown during a CHECK the test should continue +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + CHECK( thisThrows() == 0 ) +due to unexpected exception with message: + expected exception + +------------------------------------------------------------------------------- +When unchecked exceptions are thrown during a REQUIRE the test should abort +fail +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + REQUIRE( thisThrows() == 0 ) +due to unexpected exception with message: + expected exception + +------------------------------------------------------------------------------- +When unchecked exceptions are thrown from functions they are always failures +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + CHECK( thisThrows() == 0 ) +due to unexpected exception with message: + expected exception + +------------------------------------------------------------------------------- +When unchecked exceptions are thrown from sections they are always failures + section name +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with message: + unexpected exception + +------------------------------------------------------------------------------- +When unchecked exceptions are thrown, but caught, they do not affect the test +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + + +No assertions in test case 'When unchecked exceptions are thrown, but caught, they do not affect the test' + +------------------------------------------------------------------------------- +X/level/0/a +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +X/level/0/b +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +X/level/1/a +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +X/level/1/b +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +XmlEncode + normal string +------------------------------------------------------------------------------- +Xml.tests.cpp: +............................................................................... + +Xml.tests.cpp:: PASSED: + REQUIRE( encode( "normal string" ) == "normal string" ) +with expansion: + "normal string" == "normal string" + +------------------------------------------------------------------------------- +XmlEncode + empty string +------------------------------------------------------------------------------- +Xml.tests.cpp: +............................................................................... + +Xml.tests.cpp:: PASSED: + REQUIRE( encode( "" ) == "" ) +with expansion: + "" == "" + +------------------------------------------------------------------------------- +XmlEncode + string with ampersand +------------------------------------------------------------------------------- +Xml.tests.cpp: +............................................................................... + +Xml.tests.cpp:: PASSED: + REQUIRE( encode( "smith & jones" ) == "smith & jones" ) +with expansion: + "smith & jones" == "smith & jones" + +------------------------------------------------------------------------------- +XmlEncode + string with less-than +------------------------------------------------------------------------------- +Xml.tests.cpp: +............................................................................... + +Xml.tests.cpp:: PASSED: + REQUIRE( encode( "smith < jones" ) == "smith < jones" ) +with expansion: + "smith < jones" == "smith < jones" + +------------------------------------------------------------------------------- +XmlEncode + string with greater-than +------------------------------------------------------------------------------- +Xml.tests.cpp: +............................................................................... + +Xml.tests.cpp:: PASSED: + REQUIRE( encode( "smith > jones" ) == "smith > jones" ) +with expansion: + "smith > jones" == "smith > jones" + +Xml.tests.cpp:: PASSED: + REQUIRE( encode( "smith ]]> jones" ) == "smith ]]> jones" ) +with expansion: + "smith ]]> jones" + == + "smith ]]> jones" + +------------------------------------------------------------------------------- +XmlEncode + string with quotes +------------------------------------------------------------------------------- +Xml.tests.cpp: +............................................................................... + +Xml.tests.cpp:: PASSED: + REQUIRE( encode( stringWithQuotes ) == stringWithQuotes ) +with expansion: + "don't "quote" me on that" + == + "don't "quote" me on that" + +Xml.tests.cpp:: PASSED: + REQUIRE( encode( stringWithQuotes, Catch::XmlEncode::ForAttributes ) == "don't "quote" me on that" ) +with expansion: + "don't "quote" me on that" + == + "don't "quote" me on that" + +------------------------------------------------------------------------------- +XmlEncode + string with control char (1) +------------------------------------------------------------------------------- +Xml.tests.cpp: +............................................................................... + +Xml.tests.cpp:: PASSED: + REQUIRE( encode( "[\x01]" ) == "[\\x01]" ) +with expansion: + "[\x01]" == "[\x01]" + +------------------------------------------------------------------------------- +XmlEncode + string with control char (x7F) +------------------------------------------------------------------------------- +Xml.tests.cpp: +............................................................................... + +Xml.tests.cpp:: PASSED: + REQUIRE( encode( "[\x7F]" ) == "[\\x7F]" ) +with expansion: + "[\x7F]" == "[\x7F]" + +------------------------------------------------------------------------------- +XmlWriter writes boolean attributes as true/false +------------------------------------------------------------------------------- +Xml.tests.cpp: +............................................................................... + +Xml.tests.cpp:: PASSED: + REQUIRE_THAT( stream.str(), ContainsSubstring(R"(attr1="true")") && ContainsSubstring(R"(attr2="false")") ) +with expansion: + " + + " ( contains: "attr1="true"" and contains: "attr2="false"" ) + +------------------------------------------------------------------------------- +a succeeding test can still be skipped +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: PASSED: + +Skip.tests.cpp:: SKIPPED: + +------------------------------------------------------------------------------- +analyse no analysis +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.mean.point.count() == 23 ) +with expansion: + 23.0 == 23 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.mean.lower_bound.count() == 23 ) +with expansion: + 23.0 == 23 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.mean.upper_bound.count() == 23 ) +with expansion: + 23.0 == 23 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.standard_deviation.point.count() == 0 ) +with expansion: + 0.0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.standard_deviation.lower_bound.count() == 0 ) +with expansion: + 0.0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.standard_deviation.upper_bound.count() == 0 ) +with expansion: + 0.0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.outliers.total() == 0 ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.outliers.low_mild == 0 ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.outliers.low_severe == 0 ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.outliers.high_mild == 0 ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.outliers.high_severe == 0 ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.outliers.samples_seen == 0 ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( analysis.outlier_variance == 0 ) +with expansion: + 0.0 == 0 + +------------------------------------------------------------------------------- +array -> toString +------------------------------------------------------------------------------- +ToStringVector.tests.cpp: +............................................................................... + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify( empty ) == "{ }" ) +with expansion: + "{ }" == "{ }" + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify( oneValue ) == "{ 42 }" ) +with expansion: + "{ 42 }" == "{ 42 }" + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify( twoValues ) == "{ 42, 250 }" ) +with expansion: + "{ 42, 250 }" == "{ 42, 250 }" + +------------------------------------------------------------------------------- +benchmark function call + without chronometer +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( model.started == 1 ) +with expansion: + 1 == 1 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( model.finished == 0 ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( model.started == 1 ) +with expansion: + 1 == 1 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( model.finished == 1 ) +with expansion: + 1 == 1 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( called == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +benchmark function call + with chronometer +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( model.started == 0 ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( model.finished == 0 ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( model.started == 0 ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( model.finished == 0 ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( called == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +boolean member +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( obj.prop != 0 ) +with expansion: + 0x != 0 + +------------------------------------------------------------------------------- +checkedElse +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECKED_ELSE( flag ) +with expansion: + true + +Misc.tests.cpp:: PASSED: + REQUIRE( testCheckedElse( true ) ) +with expansion: + true + +------------------------------------------------------------------------------- +checkedElse, failing +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED - but was ok: + CHECKED_ELSE( flag ) +with expansion: + false + +Misc.tests.cpp:: FAILED: + REQUIRE( testCheckedElse( false ) ) +with expansion: + false + +------------------------------------------------------------------------------- +checkedIf +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECKED_IF( flag ) +with expansion: + true + +Misc.tests.cpp:: PASSED: + REQUIRE( testCheckedIf( true ) ) +with expansion: + true + +------------------------------------------------------------------------------- +checkedIf, failing +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED - but was ok: + CHECKED_IF( flag ) +with expansion: + false + +Misc.tests.cpp:: FAILED: + REQUIRE( testCheckedIf( false ) ) +with expansion: + false + +------------------------------------------------------------------------------- +classify_outliers + none +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.samples_seen == static_cast(x.size()) ) +with expansion: + 6 == 6 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_severe == los ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_mild == lom ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_mild == him ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_severe == his ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.total() == los + lom + him + his ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +classify_outliers + low severe +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.samples_seen == static_cast(x.size()) ) +with expansion: + 6 == 6 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_severe == los ) +with expansion: + 1 == 1 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_mild == lom ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_mild == him ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_severe == his ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.total() == los + lom + him + his ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +classify_outliers + low mild +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.samples_seen == static_cast(x.size()) ) +with expansion: + 6 == 6 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_severe == los ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_mild == lom ) +with expansion: + 1 == 1 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_mild == him ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_severe == his ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.total() == los + lom + him + his ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +classify_outliers + high mild +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.samples_seen == static_cast(x.size()) ) +with expansion: + 6 == 6 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_severe == los ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_mild == lom ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_mild == him ) +with expansion: + 1 == 1 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_severe == his ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.total() == los + lom + him + his ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +classify_outliers + high severe +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.samples_seen == static_cast(x.size()) ) +with expansion: + 6 == 6 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_severe == los ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_mild == lom ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_mild == him ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_severe == his ) +with expansion: + 1 == 1 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.total() == los + lom + him + his ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +classify_outliers + mixed +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.samples_seen == static_cast(x.size()) ) +with expansion: + 6 == 6 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_severe == los ) +with expansion: + 1 == 1 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.low_mild == lom ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_mild == him ) +with expansion: + 1 == 1 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.high_severe == his ) +with expansion: + 0 == 0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( o.total() == los + lom + him + his ) +with expansion: + 2 == 2 + +------------------------------------------------------------------------------- +comparisons between const int variables +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: PASSED: + REQUIRE( unsigned_char_var == 1 ) +with expansion: + 1 == 1 + +Condition.tests.cpp:: PASSED: + REQUIRE( unsigned_short_var == 1 ) +with expansion: + 1 == 1 + +Condition.tests.cpp:: PASSED: + REQUIRE( unsigned_int_var == 1 ) +with expansion: + 1 == 1 + +Condition.tests.cpp:: PASSED: + REQUIRE( unsigned_long_var == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +comparisons between int variables +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: PASSED: + REQUIRE( long_var == unsigned_char_var ) +with expansion: + 1 == 1 + +Condition.tests.cpp:: PASSED: + REQUIRE( long_var == unsigned_short_var ) +with expansion: + 1 == 1 + +Condition.tests.cpp:: PASSED: + REQUIRE( long_var == unsigned_int_var ) +with expansion: + 1 == 1 + +Condition.tests.cpp:: PASSED: + REQUIRE( long_var == unsigned_long_var ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +convertToBits +------------------------------------------------------------------------------- +FloatingPoint.tests.cpp: +............................................................................... + +FloatingPoint.tests.cpp:: PASSED: + CHECK( convertToBits( 0.f ) == 0 ) +with expansion: + 0 == 0 + +FloatingPoint.tests.cpp:: PASSED: + CHECK( convertToBits( -0.f ) == ( 1ULL << 31 ) ) +with expansion: + 2147483648 (0x) + == + 2147483648 (0x) + +FloatingPoint.tests.cpp:: PASSED: + CHECK( convertToBits( 0. ) == 0 ) +with expansion: + 0 == 0 + +FloatingPoint.tests.cpp:: PASSED: + CHECK( convertToBits( -0. ) == ( 1ULL << 63 ) ) +with expansion: + 9223372036854775808 (0x) + == + 9223372036854775808 (0x) + +FloatingPoint.tests.cpp:: PASSED: + CHECK( convertToBits( std::numeric_limits::denorm_min() ) == 1 ) +with expansion: + 1 == 1 + +FloatingPoint.tests.cpp:: PASSED: + CHECK( convertToBits( std::numeric_limits::denorm_min() ) == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +dynamic skipping works with generators +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: +explicitly with message: + skipping because answer = 41 + +------------------------------------------------------------------------------- +dynamic skipping works with generators +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +dynamic skipping works with generators +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: +explicitly with message: + skipping because answer = 43 + +------------------------------------------------------------------------------- +empty tags are not allowed +------------------------------------------------------------------------------- +Tag.tests.cpp: +............................................................................... + +Tag.tests.cpp:: PASSED: + REQUIRE_THROWS( Catch::TestCaseInfo("", { "test with an empty tag", "[]" }, dummySourceLineInfo) ) + +------------------------------------------------------------------------------- +erfc_inv +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( erfc_inv(1.103560) == Approx(-0.09203687623843015) ) +with expansion: + -0.09203687623843014 + == + Approx( -0.09203687623843015 ) + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( erfc_inv(1.067400) == Approx(-0.05980291115763361) ) +with expansion: + -0.05980291115763361 + == + Approx( -0.05980291115763361 ) + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( erfc_inv(0.050000) == Approx(1.38590382434967796) ) +with expansion: + 1.38590382434967774 + == + Approx( 1.38590382434967796 ) + +------------------------------------------------------------------------------- +estimate_clock_resolution +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res.mean.count() == rate ) +with expansion: + 2000.0 == 2000 (0x) + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res.outliers.total() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +even more nested SECTION tests + c + d (leaf) +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +even more nested SECTION tests + c + e (leaf) +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +even more nested SECTION tests + f (leaf) +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +failed assertions before SKIP cause test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: FAILED: + CHECK( 3 == 4 ) + +Skip.tests.cpp:: SKIPPED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: + +------------------------------------------------------------------------------- +failing in some unskipped sections causes entire test case to fail + skipped +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: + +------------------------------------------------------------------------------- +failing in some unskipped sections causes entire test case to fail + not skipped +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: FAILED: + +------------------------------------------------------------------------------- +first tag +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + + +No assertions in test case 'first tag' + +------------------------------------------------------------------------------- +has printf +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + + +No assertions in test case 'has printf' + +------------------------------------------------------------------------------- +is_unary_function +------------------------------------------------------------------------------- +Clara.tests.cpp: +............................................................................... + +Clara.tests.cpp:: PASSED: +with message: + Catch::Clara::Detail::is_unary_function::value + +Clara.tests.cpp:: PASSED: +with message: + Catch::Clara::Detail::is_unary_function::value + +Clara.tests.cpp:: PASSED: +with message: + Catch::Clara::Detail::is_unary_function::value + +Clara.tests.cpp:: PASSED: +with message: + Catch::Clara::Detail::is_unary_function::value + +Clara.tests.cpp:: PASSED: +with message: + Catch::Clara::Detail::is_unary_function::value + +Clara.tests.cpp:: PASSED: +with message: + Catch::Clara::Detail::is_unary_function::value + +Clara.tests.cpp:: PASSED: +with message: + !(Catch::Clara::Detail::is_unary_function::value) + +Clara.tests.cpp:: PASSED: +with message: + !(Catch::Clara::Detail::is_unary_function::value) + +Clara.tests.cpp:: PASSED: +with message: + !(Catch::Clara::Detail::is_unary_function::value) + +Clara.tests.cpp:: PASSED: +with message: + !(Catch::Clara::Detail::is_unary_function::value) + +Clara.tests.cpp:: PASSED: +with message: + !(Catch::Clara::Detail::is_unary_function::value) + +Clara.tests.cpp:: PASSED: +with message: + !(Catch::Clara::Detail::is_unary_function::value) + +------------------------------------------------------------------------------- +just failure +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: +explicitly with message: + Previous info should not be seen + +------------------------------------------------------------------------------- +just failure after unscoped info +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: +explicitly with message: + previous unscoped info SHOULD not be seen + +------------------------------------------------------------------------------- +just info +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + + +No assertions in test case 'just info' + +------------------------------------------------------------------------------- +just unscoped info +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + + +No assertions in test case 'just unscoped info' + +------------------------------------------------------------------------------- +long long +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( l == std::numeric_limits::max() ) +with expansion: + 9223372036854775807 (0x) + == + 9223372036854775807 (0x) + +------------------------------------------------------------------------------- +looped SECTION tests + b is currently: 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + CHECK( b > a ) +with expansion: + 0 > 1 + +------------------------------------------------------------------------------- +looped SECTION tests + b is currently: 1 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + CHECK( b > a ) +with expansion: + 1 > 1 + +------------------------------------------------------------------------------- +looped SECTION tests + b is currently: 2 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( b > a ) +with expansion: + 2 > 1 + +------------------------------------------------------------------------------- +looped SECTION tests + b is currently: 3 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( b > a ) +with expansion: + 3 > 1 + +------------------------------------------------------------------------------- +looped SECTION tests + b is currently: 4 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( b > a ) +with expansion: + 4 > 1 + +------------------------------------------------------------------------------- +looped SECTION tests + b is currently: 5 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( b > a ) +with expansion: + 5 > 1 + +------------------------------------------------------------------------------- +looped SECTION tests + b is currently: 6 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( b > a ) +with expansion: + 6 > 1 + +------------------------------------------------------------------------------- +looped SECTION tests + b is currently: 7 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( b > a ) +with expansion: + 7 > 1 + +------------------------------------------------------------------------------- +looped SECTION tests + b is currently: 8 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( b > a ) +with expansion: + 8 > 1 + +------------------------------------------------------------------------------- +looped SECTION tests + b is currently: 9 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( b > a ) +with expansion: + 9 > 1 + +------------------------------------------------------------------------------- +looped tests +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[0] (1) is even + +Misc.tests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[1] (1) is even + +Misc.tests.cpp:: PASSED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 0 == 0 +with message: + Testing if fib[2] (2) is even + +Misc.tests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[3] (3) is even + +Misc.tests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[4] (5) is even + +Misc.tests.cpp:: PASSED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 0 == 0 +with message: + Testing if fib[5] (8) is even + +Misc.tests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[6] (13) is even + +Misc.tests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[7] (21) is even + +------------------------------------------------------------------------------- +makeStream recognizes %debug stream name +------------------------------------------------------------------------------- +Stream.tests.cpp: +............................................................................... + +Stream.tests.cpp:: PASSED: + REQUIRE_NOTHROW( Catch::makeStream( "%debug" ) ) + +------------------------------------------------------------------------------- +make_unique reimplementation + From lvalue copies +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE_FALSE( lval.has_moved ) +with expansion: + !false + +------------------------------------------------------------------------------- +make_unique reimplementation + From rvalue moves +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( rval.has_moved ) +with expansion: + true + +------------------------------------------------------------------------------- +make_unique reimplementation + Variadic constructor +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( *ptr == std::tuple{1, 2., 3} ) +with expansion: + {?} == {?} + +------------------------------------------------------------------------------- +mean +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( m == 19. ) +with expansion: + 19.0 == 19.0 + +------------------------------------------------------------------------------- +measure +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( x == 17 ) +with expansion: + 17 == 17 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( x == 23 ) +with expansion: + 23 == 23 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( r.elapsed.count() == 42 ) +with expansion: + 42 == 42 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( r.result == 23 ) +with expansion: + 23 == 23 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( r.iterations == 1 ) +with expansion: + 1 == 1 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( s.elapsed.count() == 69 ) +with expansion: + 69 == 69 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( s.result == 17 ) +with expansion: + 17 == 17 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( s.iterations == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +mix info, unscoped info and warning +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: warning: + info + unscoped info + and warn may mix + +Message.tests.cpp:: warning: + info + unscoped info + they are not cleared after warnings + + +No assertions in test case 'mix info, unscoped info and warning' + +------------------------------------------------------------------------------- +more nested SECTION tests + doesn't equal + equal +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + REQUIRE( a == b ) +with expansion: + 1 == 2 + +------------------------------------------------------------------------------- +more nested SECTION tests + doesn't equal + not equal +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( a != b ) +with expansion: + 1 != 2 + +------------------------------------------------------------------------------- +more nested SECTION tests + doesn't equal + less than +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( a < b ) +with expansion: + 1 < 2 + +------------------------------------------------------------------------------- +nested SECTION tests + doesn't equal +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( a != b ) +with expansion: + 1 != 2 + +Misc.tests.cpp:: PASSED: + REQUIRE( b != a ) +with expansion: + 2 != 1 + +------------------------------------------------------------------------------- +nested SECTION tests + doesn't equal + not equal +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( a != b ) +with expansion: + 1 != 2 + +------------------------------------------------------------------------------- +nested sections can be skipped dynamically at runtime + A +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + + +No assertions in section 'A' + +------------------------------------------------------------------------------- +nested sections can be skipped dynamically at runtime + B + B1 +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + + +No assertions in section 'B1' + +------------------------------------------------------------------------------- +nested sections can be skipped dynamically at runtime + B + B2 +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: + +------------------------------------------------------------------------------- +non streamable - with conv. op +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( s == "7" ) +with expansion: + "7" == "7" + +------------------------------------------------------------------------------- +non-copyable objects +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + CHECK( ti == typeid(int) ) +with expansion: + {?} == {?} + +------------------------------------------------------------------------------- +normal_quantile +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( normal_quantile(0.551780) == Approx(0.13015979861484198) ) +with expansion: + 0.13015979861484195 + == + Approx( 0.13015979861484198 ) + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( normal_quantile(0.533700) == Approx(0.08457408802851875) ) +with expansion: + 0.08457408802851875 + == + Approx( 0.08457408802851875 ) + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( normal_quantile(0.025000) == Approx(-1.95996398454005449) ) +with expansion: + -1.95996398454005405 + == + Approx( -1.95996398454005449 ) + +------------------------------------------------------------------------------- +not allowed +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +not prints unscoped info from previous failures +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: PASSED: + REQUIRE( true ) +with message: + this MAY be seen only for the FIRST assertion IF info is printed for passing + assertions + +Message.tests.cpp:: PASSED: + REQUIRE( true ) +with message: + this MAY be seen only for the SECOND assertion IF info is printed for passing + assertions + +Message.tests.cpp:: FAILED: + REQUIRE( false ) +with message: + this SHOULD be seen + +------------------------------------------------------------------------------- +null strings +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( makeString( false ) != static_cast(0) ) +with expansion: + "valid string" != {null string} + +Misc.tests.cpp:: PASSED: + REQUIRE( makeString( true ) == static_cast(0) ) +with expansion: + {null string} == {null string} + +------------------------------------------------------------------------------- +null_ptr +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( ptr.get() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +pair > -> toString +------------------------------------------------------------------------------- +ToStringPair.tests.cpp: +............................................................................... + +ToStringPair.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify( pair ) == "{ { 42, \"Arthur\" }, { \"Ford\", 24 } }" ) +with expansion: + "{ { 42, "Arthur" }, { "Ford", 24 } }" + == + "{ { 42, "Arthur" }, { "Ford", 24 } }" + +------------------------------------------------------------------------------- +parseEnums + No enums +------------------------------------------------------------------------------- +ToString.tests.cpp: +............................................................................... + +ToString.tests.cpp:: PASSED: + CHECK_THAT( parseEnums( "" ), Equals( std::vector{} ) ) +with expansion: + { } Equals: { } + +------------------------------------------------------------------------------- +parseEnums + One enum value +------------------------------------------------------------------------------- +ToString.tests.cpp: +............................................................................... + +ToString.tests.cpp:: PASSED: + CHECK_THAT( parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector{"Value1"} ) ) +with expansion: + { Value1 } Equals: { Value1 } + +ToString.tests.cpp:: PASSED: + CHECK_THAT( parseEnums( "Value1" ), Equals( std::vector{"Value1"} ) ) +with expansion: + { Value1 } Equals: { Value1 } + +ToString.tests.cpp:: PASSED: + CHECK_THAT( parseEnums( "EnumName::Value1" ), Equals(std::vector{"Value1"} ) ) +with expansion: + { Value1 } Equals: { Value1 } + +------------------------------------------------------------------------------- +parseEnums + Multiple enum values +------------------------------------------------------------------------------- +ToString.tests.cpp: +............................................................................... + +ToString.tests.cpp:: PASSED: + CHECK_THAT( parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector{"Value1", "Value2"} ) ) +with expansion: + { Value1, Value2 } Equals: { Value1, Value2 } + +ToString.tests.cpp:: PASSED: + CHECK_THAT( parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector{"Value1", "Value2", "Value3"} ) ) +with expansion: + { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 } + +ToString.tests.cpp:: PASSED: + CHECK_THAT( parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector{"Value1", "Value2", "Value3"} ) ) +with expansion: + { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 } + +------------------------------------------------------------------------------- +pointer to class +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: PASSED: + REQUIRE( p == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +print unscoped info if passing unscoped info is printed +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: PASSED: + REQUIRE( true ) +with message: + this MAY be seen IF info is printed for passing assertions + +------------------------------------------------------------------------------- +prints unscoped info on failure +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: + REQUIRE( false ) +with messages: + this SHOULD be seen + this SHOULD also be seen + +------------------------------------------------------------------------------- +prints unscoped info only for the first assertion +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: + CHECK( false ) +with message: + this SHOULD be seen only ONCE + +Message.tests.cpp:: PASSED: + CHECK( true ) + +Message.tests.cpp:: PASSED: + CHECK( true ) +with message: + this MAY also be seen only ONCE IF info is printed for passing assertions + +Message.tests.cpp:: PASSED: + CHECK( true ) + +------------------------------------------------------------------------------- +random SECTION tests + doesn't equal +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( a != b ) +with expansion: + 1 != 2 + +Misc.tests.cpp:: PASSED: + REQUIRE( b != a ) +with expansion: + 2 != 1 + +------------------------------------------------------------------------------- +random SECTION tests + not equal +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( a != b ) +with expansion: + 1 != 2 + +------------------------------------------------------------------------------- +replaceInPlace + replace single char +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + CHECK( Catch::replaceInPlace(letters, "b", "z") ) +with expansion: + true + +StringManip.tests.cpp:: PASSED: + CHECK( letters == "azcdefcg" ) +with expansion: + "azcdefcg" == "azcdefcg" + +------------------------------------------------------------------------------- +replaceInPlace + replace two chars +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + CHECK( Catch::replaceInPlace(letters, "c", "z") ) +with expansion: + true + +StringManip.tests.cpp:: PASSED: + CHECK( letters == "abzdefzg" ) +with expansion: + "abzdefzg" == "abzdefzg" + +------------------------------------------------------------------------------- +replaceInPlace + replace first char +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + CHECK( Catch::replaceInPlace(letters, "a", "z") ) +with expansion: + true + +StringManip.tests.cpp:: PASSED: + CHECK( letters == "zbcdefcg" ) +with expansion: + "zbcdefcg" == "zbcdefcg" + +------------------------------------------------------------------------------- +replaceInPlace + replace last char +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + CHECK( Catch::replaceInPlace(letters, "g", "z") ) +with expansion: + true + +StringManip.tests.cpp:: PASSED: + CHECK( letters == "abcdefcz" ) +with expansion: + "abcdefcz" == "abcdefcz" + +------------------------------------------------------------------------------- +replaceInPlace + replace all chars +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + CHECK( Catch::replaceInPlace(letters, letters, "replaced") ) +with expansion: + true + +StringManip.tests.cpp:: PASSED: + CHECK( letters == "replaced" ) +with expansion: + "replaced" == "replaced" + +------------------------------------------------------------------------------- +replaceInPlace + replace no chars +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + CHECK_FALSE( Catch::replaceInPlace(letters, "x", "z") ) +with expansion: + !false + +StringManip.tests.cpp:: PASSED: + CHECK( letters == letters ) +with expansion: + "abcdefcg" == "abcdefcg" + +------------------------------------------------------------------------------- +replaceInPlace + no replace in already-replaced string + lengthening +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + CHECK( Catch::replaceInPlace(letters, "c", "cc") ) +with expansion: + true + +StringManip.tests.cpp:: PASSED: + CHECK( letters == "abccdefccg" ) +with expansion: + "abccdefccg" == "abccdefccg" + +------------------------------------------------------------------------------- +replaceInPlace + no replace in already-replaced string + shortening +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + CHECK( Catch::replaceInPlace(s, "--", "-") ) +with expansion: + true + +StringManip.tests.cpp:: PASSED: + CHECK( s == "--" ) +with expansion: + "--" == "--" + +------------------------------------------------------------------------------- +replaceInPlace + escape ' +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + CHECK( Catch::replaceInPlace(s, "'", "|'") ) +with expansion: + true + +StringManip.tests.cpp:: PASSED: + CHECK( s == "didn|'t" ) +with expansion: + "didn|'t" == "didn|'t" + +------------------------------------------------------------------------------- +request an unknown %-starting stream fails +------------------------------------------------------------------------------- +Stream.tests.cpp: +............................................................................... + +Stream.tests.cpp:: PASSED: + REQUIRE_THROWS( Catch::makeStream( "%somestream" ) ) + +------------------------------------------------------------------------------- +resolution +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res.size() == count ) +with expansion: + 10 == 10 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res[i] == rate ) +with expansion: + 1000.0 == 1000 (0x) + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res[i] == rate ) +with expansion: + 1000.0 == 1000 (0x) + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res[i] == rate ) +with expansion: + 1000.0 == 1000 (0x) + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res[i] == rate ) +with expansion: + 1000.0 == 1000 (0x) + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res[i] == rate ) +with expansion: + 1000.0 == 1000 (0x) + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res[i] == rate ) +with expansion: + 1000.0 == 1000 (0x) + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res[i] == rate ) +with expansion: + 1000.0 == 1000 (0x) + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res[i] == rate ) +with expansion: + 1000.0 == 1000 (0x) + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( res[i] == rate ) +with expansion: + 1000.0 == 1000 (0x) + +------------------------------------------------------------------------------- +run_for_at_least, chronometer +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( meter.runs() >= old_runs ) +with expansion: + 1 >= 1 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( meter.runs() >= old_runs ) +with expansion: + 2 >= 1 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( meter.runs() >= old_runs ) +with expansion: + 4 >= 2 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( meter.runs() >= old_runs ) +with expansion: + 8 >= 4 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( meter.runs() >= old_runs ) +with expansion: + 16 >= 8 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( meter.runs() >= old_runs ) +with expansion: + 32 >= 16 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( meter.runs() >= old_runs ) +with expansion: + 64 >= 32 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( meter.runs() >= old_runs ) +with expansion: + 128 >= 64 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( Timing.elapsed >= time ) +with expansion: + 128 ns >= 100 ns + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( Timing.result == Timing.iterations + 17 ) +with expansion: + 145 == 145 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( Timing.iterations >= time.count() ) +with expansion: + 128 >= 100 + +------------------------------------------------------------------------------- +run_for_at_least, int +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( x >= old_x ) +with expansion: + 1 >= 1 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( x >= old_x ) +with expansion: + 2 >= 1 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( x >= old_x ) +with expansion: + 4 >= 2 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( x >= old_x ) +with expansion: + 8 >= 4 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( x >= old_x ) +with expansion: + 16 >= 8 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( x >= old_x ) +with expansion: + 32 >= 16 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( x >= old_x ) +with expansion: + 64 >= 32 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( x >= old_x ) +with expansion: + 128 >= 64 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( Timing.elapsed >= time ) +with expansion: + 128 ns >= 100 ns + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( Timing.result == Timing.iterations + 17 ) +with expansion: + 145 == 145 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( Timing.iterations >= time.count() ) +with expansion: + 128 >= 100 + +------------------------------------------------------------------------------- +second tag +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + + +No assertions in test case 'second tag' + +------------------------------------------------------------------------------- +sections can be skipped dynamically at runtime + not skipped +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +sections can be skipped dynamically at runtime + skipped +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: + +------------------------------------------------------------------------------- +sections can be skipped dynamically at runtime + also not skipped +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +send a single char to INFO +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + REQUIRE( false ) +with message: + 3 + +------------------------------------------------------------------------------- +sends information to INFO +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: + REQUIRE( false ) +with messages: + hi + i := 7 + +------------------------------------------------------------------------------- +shortened hide tags are split apart +------------------------------------------------------------------------------- +Tag.tests.cpp: +............................................................................... + +Tag.tests.cpp:: PASSED: + REQUIRE_THAT( testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "."_catch_sr ) ) ) +with expansion: + { {?}, {?} } ( Contains: {?} and Contains: {?} ) + +------------------------------------------------------------------------------- +skipped tests can optionally provide a reason +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: +explicitly with message: + skipping because answer = 43 + +------------------------------------------------------------------------------- +splitString +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + CHECK_THAT( splitStringRef("", ','), Equals(std::vector()) ) +with expansion: + { } Equals: { } + +StringManip.tests.cpp:: PASSED: + CHECK_THAT( splitStringRef("abc", ','), Equals(std::vector{"abc"}) ) +with expansion: + { abc } Equals: { abc } + +StringManip.tests.cpp:: PASSED: + CHECK_THAT( splitStringRef("abc,def", ','), Equals(std::vector{"abc", "def"}) ) +with expansion: + { abc, def } Equals: { abc, def } + +------------------------------------------------------------------------------- +stacks unscoped info in loops +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: FAILED: + CHECK( false ) +with messages: + Count 1 to 3... + 1 + 2 + 3 + +Message.tests.cpp:: FAILED: + CHECK( false ) +with messages: + Count 4 to 6... + 4 + 5 + 6 + +------------------------------------------------------------------------------- +startsWith +------------------------------------------------------------------------------- +StringManip.tests.cpp: +............................................................................... + +StringManip.tests.cpp:: PASSED: + CHECK_FALSE( startsWith("", 'c') ) +with expansion: + !false + +StringManip.tests.cpp:: PASSED: + CHECK( startsWith(std::string("abc"), 'a') ) +with expansion: + true + +StringManip.tests.cpp:: PASSED: + CHECK( startsWith("def"_catch_sr, 'd') ) +with expansion: + true + +------------------------------------------------------------------------------- +std::map is convertible string + empty +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify( emptyMap ) == "{ }" ) +with expansion: + "{ }" == "{ }" + +------------------------------------------------------------------------------- +std::map is convertible string + single item +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify( map ) == "{ { \"one\", 1 } }" ) +with expansion: + "{ { "one", 1 } }" == "{ { "one", 1 } }" + +------------------------------------------------------------------------------- +std::map is convertible string + several items +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify( map ) == "{ { \"abc\", 1 }, { \"def\", 2 }, { \"ghi\", 3 } }" ) +with expansion: + "{ { "abc", 1 }, { "def", 2 }, { "ghi", 3 } }" + == + "{ { "abc", 1 }, { "def", 2 }, { "ghi", 3 } }" + +------------------------------------------------------------------------------- +std::pair -> toString +------------------------------------------------------------------------------- +ToStringPair.tests.cpp: +............................................................................... + +ToStringPair.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(value) == "{ 34, \"xyzzy\" }" ) +with expansion: + "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" + +------------------------------------------------------------------------------- +std::pair -> toString +------------------------------------------------------------------------------- +ToStringPair.tests.cpp: +............................................................................... + +ToStringPair.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify( value ) == "{ 34, \"xyzzy\" }" ) +with expansion: + "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" + +------------------------------------------------------------------------------- +std::set is convertible string + empty +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify( emptySet ) == "{ }" ) +with expansion: + "{ }" == "{ }" + +------------------------------------------------------------------------------- +std::set is convertible string + single item +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify( set ) == "{ \"one\" }" ) +with expansion: + "{ "one" }" == "{ "one" }" + +------------------------------------------------------------------------------- +std::set is convertible string + several items +------------------------------------------------------------------------------- +ToStringGeneral.tests.cpp: +............................................................................... + +ToStringGeneral.tests.cpp:: PASSED: + REQUIRE( Catch::Detail::stringify( set ) == "{ \"abc\", \"def\", \"ghi\" }" ) +with expansion: + "{ "abc", "def", "ghi" }" + == + "{ "abc", "def", "ghi" }" + +------------------------------------------------------------------------------- +std::vector > -> toString +------------------------------------------------------------------------------- +ToStringPair.tests.cpp: +............................................................................... + +ToStringPair.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify( pr ) == "{ { \"green\", 55 } }" ) +with expansion: + "{ { "green", 55 } }" + == + "{ { "green", 55 } }" + +------------------------------------------------------------------------------- +stdout and stderr streams have %-starting name +------------------------------------------------------------------------------- +Stream.tests.cpp: +............................................................................... + +Stream.tests.cpp:: PASSED: + REQUIRE( Catch::makeStream( "%stderr" )->isConsole() ) +with expansion: + true + +Stream.tests.cpp:: PASSED: + REQUIRE( Catch::makeStream( "%stdout" )->isConsole() ) +with expansion: + true + +------------------------------------------------------------------------------- +stringify ranges +------------------------------------------------------------------------------- +ToStringWhich.tests.cpp: +............................................................................... + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(streamable_range{}) == "op<<(streamable_range)" ) +with expansion: + "op<<(streamable_range)" + == + "op<<(streamable_range)" + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(stringmaker_range{}) == "stringmaker(streamable_range)" ) +with expansion: + "stringmaker(streamable_range)" + == + "stringmaker(streamable_range)" + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(just_range{}) == "{ 1, 2, 3, 4 }" ) +with expansion: + "{ 1, 2, 3, 4 }" == "{ 1, 2, 3, 4 }" + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(disabled_range{}) == "{?}" ) +with expansion: + "{?}" == "{?}" + +------------------------------------------------------------------------------- +stringify( has_maker ) +------------------------------------------------------------------------------- +ToStringWhich.tests.cpp: +............................................................................... + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify( item ) == "StringMaker" ) +with expansion: + "StringMaker" + == + "StringMaker" + +------------------------------------------------------------------------------- +stringify( has_maker_and_operator ) +------------------------------------------------------------------------------- +ToStringWhich.tests.cpp: +............................................................................... + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify( item ) == "StringMaker" ) +with expansion: + "StringMaker" + == + "StringMaker" + +------------------------------------------------------------------------------- +stringify( has_neither ) +------------------------------------------------------------------------------- +ToStringWhich.tests.cpp: +............................................................................... + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(item) == "{?}" ) +with expansion: + "{?}" == "{?}" + +------------------------------------------------------------------------------- +stringify( has_operator ) +------------------------------------------------------------------------------- +ToStringWhich.tests.cpp: +............................................................................... + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify( item ) == "operator<<( has_operator )" ) +with expansion: + "operator<<( has_operator )" + == + "operator<<( has_operator )" + +------------------------------------------------------------------------------- +stringify( has_template_operator ) +------------------------------------------------------------------------------- +ToStringWhich.tests.cpp: +............................................................................... + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify( item ) == "operator<<( has_template_operator )" ) +with expansion: + "operator<<( has_template_operator )" + == + "operator<<( has_template_operator )" + +------------------------------------------------------------------------------- +stringify( vectors ) +------------------------------------------------------------------------------- +ToStringWhich.tests.cpp: +............................................................................... + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify( v ) == "{ StringMaker }" ) +with expansion: + "{ StringMaker }" + == + "{ StringMaker }" + +------------------------------------------------------------------------------- +stringify( vectors ) +------------------------------------------------------------------------------- +ToStringWhich.tests.cpp: +............................................................................... + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify( v ) == "{ StringMaker }" ) +with expansion: + "{ StringMaker }" + == + "{ StringMaker }" + +------------------------------------------------------------------------------- +stringify( vectors ) +------------------------------------------------------------------------------- +ToStringWhich.tests.cpp: +............................................................................... + +ToStringWhich.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify( v ) == "{ operator<<( has_operator ) }" ) +with expansion: + "{ operator<<( has_operator ) }" + == + "{ operator<<( has_operator ) }" + +------------------------------------------------------------------------------- +strlen3 +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( data.str.size() == data.len ) +with expansion: + 3 == 3 + +------------------------------------------------------------------------------- +strlen3 +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( data.str.size() == data.len ) +with expansion: + 3 == 3 + +------------------------------------------------------------------------------- +strlen3 +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( data.str.size() == data.len ) +with expansion: + 5 == 5 + +------------------------------------------------------------------------------- +strlen3 +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( data.str.size() == data.len ) +with expansion: + 4 == 4 + +------------------------------------------------------------------------------- +tables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) ) +with expansion: + 5 == 5 + +------------------------------------------------------------------------------- +tables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) ) +with expansion: + 6 == 6 + +------------------------------------------------------------------------------- +tables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) ) +with expansion: + 5 == 5 + +------------------------------------------------------------------------------- +tables +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) ) +with expansion: + 6 == 6 + +------------------------------------------------------------------------------- +tags with dots in later positions are not parsed as hidden +------------------------------------------------------------------------------- +Tag.tests.cpp: +............................................................................... + +Tag.tests.cpp:: PASSED: + REQUIRE( testcase.tags.size() == 1 ) +with expansion: + 1 == 1 + +Tag.tests.cpp:: PASSED: + REQUIRE( testcase.tags[0].original == "magic.tag"_catch_sr ) +with expansion: + magic.tag == magic.tag + +------------------------------------------------------------------------------- +tests can be skipped dynamically at runtime +------------------------------------------------------------------------------- +Skip.tests.cpp: +............................................................................... + +Skip.tests.cpp:: SKIPPED: + +------------------------------------------------------------------------------- +thrown std::strings are translated +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with message: + Why would you throw a std::string? + +------------------------------------------------------------------------------- +toString on const wchar_t const pointer returns the string contents +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( result == "\"wide load\"" ) +with expansion: + ""wide load"" == ""wide load"" + +------------------------------------------------------------------------------- +toString on const wchar_t pointer returns the string contents +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( result == "\"wide load\"" ) +with expansion: + ""wide load"" == ""wide load"" + +------------------------------------------------------------------------------- +toString on wchar_t const pointer returns the string contents +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( result == "\"wide load\"" ) +with expansion: + ""wide load"" == ""wide load"" + +------------------------------------------------------------------------------- +toString on wchar_t returns the string contents +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + CHECK( result == "\"wide load\"" ) +with expansion: + ""wide load"" == ""wide load"" + +------------------------------------------------------------------------------- +toString(enum class w/operator<<) +------------------------------------------------------------------------------- +EnumToString.tests.cpp: +............................................................................... + +EnumToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify(e0) == "E2/V0" ) +with expansion: + "E2/V0" == "E2/V0" + +EnumToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify(e1) == "E2/V1" ) +with expansion: + "E2/V1" == "E2/V1" + +EnumToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify(e3) == "Unknown enum value 10" ) +with expansion: + "Unknown enum value 10" + == + "Unknown enum value 10" + +------------------------------------------------------------------------------- +toString(enum class) +------------------------------------------------------------------------------- +EnumToString.tests.cpp: +............................................................................... + +EnumToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify(e0) == "0" ) +with expansion: + "0" == "0" + +EnumToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify(e1) == "1" ) +with expansion: + "1" == "1" + +------------------------------------------------------------------------------- +toString(enum w/operator<<) +------------------------------------------------------------------------------- +EnumToString.tests.cpp: +............................................................................... + +EnumToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify(e0) == "E2{0}" ) +with expansion: + "E2{0}" == "E2{0}" + +EnumToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify(e1) == "E2{1}" ) +with expansion: + "E2{1}" == "E2{1}" + +------------------------------------------------------------------------------- +toString(enum) +------------------------------------------------------------------------------- +EnumToString.tests.cpp: +............................................................................... + +EnumToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify(e0) == "0" ) +with expansion: + "0" == "0" + +EnumToString.tests.cpp:: PASSED: + CHECK( ::Catch::Detail::stringify(e1) == "1" ) +with expansion: + "1" == "1" + +------------------------------------------------------------------------------- +tuple<> +------------------------------------------------------------------------------- +ToStringTuple.tests.cpp: +............................................................................... + +ToStringTuple.tests.cpp:: PASSED: + CHECK( "{ }" == ::Catch::Detail::stringify(type{}) ) +with expansion: + "{ }" == "{ }" + +ToStringTuple.tests.cpp:: PASSED: + CHECK( "{ }" == ::Catch::Detail::stringify(value) ) +with expansion: + "{ }" == "{ }" + +------------------------------------------------------------------------------- +tuple +------------------------------------------------------------------------------- +ToStringTuple.tests.cpp: +............................................................................... + +ToStringTuple.tests.cpp:: PASSED: + CHECK( "1.5f" == ::Catch::Detail::stringify(float(1.5)) ) +with expansion: + "1.5f" == "1.5f" + +ToStringTuple.tests.cpp:: PASSED: + CHECK( "{ 1.5f, 0 }" == ::Catch::Detail::stringify(type{1.5f,0}) ) +with expansion: + "{ 1.5f, 0 }" == "{ 1.5f, 0 }" + +------------------------------------------------------------------------------- +tuple +------------------------------------------------------------------------------- +ToStringTuple.tests.cpp: +............................................................................... + +ToStringTuple.tests.cpp:: PASSED: + CHECK( "{ 0 }" == ::Catch::Detail::stringify(type{0}) ) +with expansion: + "{ 0 }" == "{ 0 }" + +------------------------------------------------------------------------------- +tuple +------------------------------------------------------------------------------- +ToStringTuple.tests.cpp: +............................................................................... + +ToStringTuple.tests.cpp:: PASSED: + CHECK( "{ \"hello\", \"world\" }" == ::Catch::Detail::stringify(type{"hello","world"}) ) +with expansion: + "{ "hello", "world" }" + == + "{ "hello", "world" }" + +------------------------------------------------------------------------------- +tuple,tuple<>,float> +------------------------------------------------------------------------------- +ToStringTuple.tests.cpp: +............................................................................... + +ToStringTuple.tests.cpp:: PASSED: + CHECK( "{ { 42 }, { }, 1.5f }" == ::Catch::Detail::stringify(value) ) +with expansion: + "{ { 42 }, { }, 1.5f }" + == + "{ { 42 }, { }, 1.5f }" + +------------------------------------------------------------------------------- +uniform samples +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( e.point == 23 ) +with expansion: + 23.0 == 23 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( e.upper_bound == 23 ) +with expansion: + 23.0 == 23 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( e.lower_bound == 23 ) +with expansion: + 23.0 == 23 + +InternalBenchmark.tests.cpp:: PASSED: + CHECK( e.confidence_interval == 0.95 ) +with expansion: + 0.94999999999999996 == 0.94999999999999996 + +------------------------------------------------------------------------------- +uniform_integer_distribution can return the bounds +------------------------------------------------------------------------------- +RandomNumberGeneration.tests.cpp: +............................................................................... + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( dist.a() == -10 ) +with expansion: + -10 == -10 + +RandomNumberGeneration.tests.cpp:: PASSED: + REQUIRE( dist.b() == 10 ) +with expansion: + 10 == 10 + +------------------------------------------------------------------------------- +unique_ptr reimplementation: basic functionality + Default constructed unique_ptr is empty +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE_FALSE( ptr ) +with expansion: + !{?} + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( ptr.get() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +unique_ptr reimplementation: basic functionality + Take ownership of allocation +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( ptr ) +with expansion: + {?} + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( *ptr == 0 ) +with expansion: + 0 == 0 + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( ptr.get() == naked_ptr ) +with expansion: + 0x == 0x + +------------------------------------------------------------------------------- +unique_ptr reimplementation: basic functionality + Take ownership of allocation + Plain reset deallocates +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE_FALSE( ptr ) +with expansion: + !{?} + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( ptr.get() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +unique_ptr reimplementation: basic functionality + Take ownership of allocation +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( ptr ) +with expansion: + {?} + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( *ptr == 0 ) +with expansion: + 0 == 0 + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( ptr.get() == naked_ptr ) +with expansion: + 0x == 0x + +------------------------------------------------------------------------------- +unique_ptr reimplementation: basic functionality + Take ownership of allocation + Reset replaces ownership +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( ptr ) +with expansion: + {?} + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( ptr.get() != 0 ) +with expansion: + 0x != 0 + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( *ptr == 2 ) +with expansion: + 2 == 2 + +------------------------------------------------------------------------------- +unique_ptr reimplementation: basic functionality + Release releases ownership +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + CHECK_FALSE( ptr ) +with expansion: + !{?} + +UniquePtr.tests.cpp:: PASSED: + CHECK( ptr.get() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +unique_ptr reimplementation: basic functionality + Move constructor +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE_FALSE( ptr1 ) +with expansion: + !{?} + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( ptr2 ) +with expansion: + {?} + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( *ptr2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +unique_ptr reimplementation: basic functionality + Move assignment +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE_FALSE( ptr2 ) +with expansion: + !{?} + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( ptr1 ) +with expansion: + {?} + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( *ptr1 == 2 ) +with expansion: + 2 == 2 + +------------------------------------------------------------------------------- +unique_ptr reimplementation: basic functionality + free swap +------------------------------------------------------------------------------- +UniquePtr.tests.cpp: +............................................................................... + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( *ptr1 == 2 ) +with expansion: + 2 == 2 + +UniquePtr.tests.cpp:: PASSED: + REQUIRE( *ptr2 == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +vec> -> toString +------------------------------------------------------------------------------- +ToStringVector.tests.cpp: +............................................................................... + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(v) == "{ }" ) +with expansion: + "{ }" == "{ }" + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(v) == "{ { \"hello\" }, { \"world\" } }" ) +with expansion: + "{ { "hello" }, { "world" } }" + == + "{ { "hello" }, { "world" } }" + +------------------------------------------------------------------------------- +vector -> toString +------------------------------------------------------------------------------- +ToStringVector.tests.cpp: +............................................................................... + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(bools) == "{ }" ) +with expansion: + "{ }" == "{ }" + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(bools) == "{ true }" ) +with expansion: + "{ true }" == "{ true }" + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(bools) == "{ true, false }" ) +with expansion: + "{ true, false }" == "{ true, false }" + +------------------------------------------------------------------------------- +vector -> toString +------------------------------------------------------------------------------- +ToStringVector.tests.cpp: +............................................................................... + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(vv) == "{ }" ) +with expansion: + "{ }" == "{ }" + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(vv) == "{ 42 }" ) +with expansion: + "{ 42 }" == "{ 42 }" + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(vv) == "{ 42, 250 }" ) +with expansion: + "{ 42, 250 }" == "{ 42, 250 }" + +------------------------------------------------------------------------------- +vector -> toString +------------------------------------------------------------------------------- +ToStringVector.tests.cpp: +............................................................................... + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(vv) == "{ }" ) +with expansion: + "{ }" == "{ }" + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(vv) == "{ 42 }" ) +with expansion: + "{ 42 }" == "{ 42 }" + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(vv) == "{ 42, 250 }" ) +with expansion: + "{ 42, 250 }" == "{ 42, 250 }" + +------------------------------------------------------------------------------- +vector -> toString +------------------------------------------------------------------------------- +ToStringVector.tests.cpp: +............................................................................... + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(vv) == "{ }" ) +with expansion: + "{ }" == "{ }" + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(vv) == "{ \"hello\" }" ) +with expansion: + "{ "hello" }" == "{ "hello" }" + +ToStringVector.tests.cpp:: PASSED: + REQUIRE( ::Catch::Detail::stringify(vv) == "{ \"hello\", \"world\" }" ) +with expansion: + "{ "hello", "world" }" + == + "{ "hello", "world" }" + +------------------------------------------------------------------------------- +vectors can be sized and resized +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +vectors can be sized and resized + resizing bigger changes size and capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 10 ) +with expansion: + 10 == 10 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +vectors can be sized and resized +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +vectors can be sized and resized + resizing smaller changes size but not capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +vectors can be sized and resized + resizing smaller changes size but not capacity + We can use the 'swap trick' to reset the capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +vectors can be sized and resized +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +vectors can be sized and resized + reserving bigger changes capacity but not size +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +vectors can be sized and resized +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +vectors can be sized and resized + reserving smaller does not change size or capacity +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +Misc.tests.cpp:: PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +warmup +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( (iterations * rate) > Catch::Benchmark::Detail::warmup_time.count() ) +with expansion: + 160000000 (0x) > 100 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( (end - start) > Catch::Benchmark::Detail::warmup_time ) +with expansion: + 310016000 ns > 100 ms + +------------------------------------------------------------------------------- +weighted_average_quantile +------------------------------------------------------------------------------- +InternalBenchmark.tests.cpp: +............................................................................... + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( q1 == 14.5 ) +with expansion: + 14.5 == 14.5 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( med == 18. ) +with expansion: + 18.0 == 18.0 + +InternalBenchmark.tests.cpp:: PASSED: + REQUIRE( q3 == 23. ) +with expansion: + 23.0 == 23.0 + +------------------------------------------------------------------------------- +xmlentitycheck + embedded xml: it should be possible to embed xml characters, such as <, + " or &, or even whole documents within an attribute + +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +xmlentitycheck + encoded chars: these should all be encoded: &&&"""<<<&"<<&" +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +=============================================================================== +test cases: 419 | 313 passed | 86 failed | 6 skipped | 14 failed as expected +assertions: 2269 | 2087 passed | 147 failed | 35 failed as expected + diff --git a/tests/SelfTest/Baselines/console.swa4.approved.txt b/tests/SelfTest/Baselines/console.swa4.approved.txt new file mode 100644 index 0000000..41b7612 --- /dev/null +++ b/tests/SelfTest/Baselines/console.swa4.approved.txt @@ -0,0 +1,956 @@ +Filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals] +Randomness seeded to: 1 + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + is a Catch2 v host application. +Run with -? for options + +------------------------------------------------------------------------------- +# A test name that starts with a # +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + yay + +------------------------------------------------------------------------------- +#1027: Bitfields can be captured +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( y.v == 0 ) +with expansion: + 0 == 0 + +Compilation.tests.cpp:: PASSED: + REQUIRE( 0 == y.v ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +#1147 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( t1 == t2 ) +with expansion: + {?} == {?} + +Compilation.tests.cpp:: PASSED: + REQUIRE( t1 != t2 ) +with expansion: + {?} != {?} + +Compilation.tests.cpp:: PASSED: + REQUIRE( t1 < t2 ) +with expansion: + {?} < {?} + +Compilation.tests.cpp:: PASSED: + REQUIRE( t1 > t2 ) +with expansion: + {?} > {?} + +Compilation.tests.cpp:: PASSED: + REQUIRE( t1 <= t2 ) +with expansion: + {?} <= {?} + +Compilation.tests.cpp:: PASSED: + REQUIRE( t1 >= t2 ) +with expansion: + {?} >= {?} + +------------------------------------------------------------------------------- +#1175 - Hidden Test +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +#1238 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( std::memcmp(uarr, "123", sizeof(uarr)) == 0 ) +with expansion: + 0 == 0 +with messages: + uarr := "123" + sarr := "456" + +Compilation.tests.cpp:: PASSED: + REQUIRE( std::memcmp(sarr, "456", sizeof(sarr)) == 0 ) +with expansion: + 0 == 0 +with messages: + uarr := "123" + sarr := "456" + +------------------------------------------------------------------------------- +#1245 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +#1319: Sections can have description (even if it is not saved + SectionName +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +#1403 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( h1 == h2 ) +with expansion: + [1403 helper] == [1403 helper] + +------------------------------------------------------------------------------- +#1455 - INFO and WARN can start with a linebreak +------------------------------------------------------------------------------- +Message.tests.cpp: +............................................................................... + +Message.tests.cpp:: warning: + +This info message starts with a linebreak + +This warning message starts with a linebreak + + +No assertions in test case '#1455 - INFO and WARN can start with a linebreak' + +This would not be caught previously +Nor would this +------------------------------------------------------------------------------- +#1514: stderr/stdout is not captured in tests aborted by an exception +------------------------------------------------------------------------------- +Tricky.tests.cpp: +............................................................................... + +Tricky.tests.cpp:: FAILED: +explicitly with message: + 1514 + +------------------------------------------------------------------------------- +#1548 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( std::is_same, TypeList>::value ) +with expansion: + true + +------------------------------------------------------------------------------- +#1905 -- test spec parser properly clears internal state between compound tests +------------------------------------------------------------------------------- +TestSpec.tests.cpp: +............................................................................... + +TestSpec.tests.cpp:: PASSED: + REQUIRE( spec.matches(*fakeTestCase("spec . char")) ) +with expansion: + true + +TestSpec.tests.cpp:: PASSED: + REQUIRE( spec.matches(*fakeTestCase("spec , char")) ) +with expansion: + true + +TestSpec.tests.cpp:: PASSED: + REQUIRE_FALSE( spec.matches(*fakeTestCase(R"(spec \, char)")) ) +with expansion: + !false + +------------------------------------------------------------------------------- +#1912 -- test spec parser handles escaping + Various parentheses +------------------------------------------------------------------------------- +TestSpec.tests.cpp: +............................................................................... + +TestSpec.tests.cpp:: PASSED: + REQUIRE( spec.matches(*fakeTestCase(R"(spec {a} char)")) ) +with expansion: + true + +TestSpec.tests.cpp:: PASSED: + REQUIRE( spec.matches(*fakeTestCase(R"(spec [a] char)")) ) +with expansion: + true + +TestSpec.tests.cpp:: PASSED: + REQUIRE_FALSE( spec.matches(*fakeTestCase("differs but has similar tag", "[a]")) ) +with expansion: + !false + +------------------------------------------------------------------------------- +#1912 -- test spec parser handles escaping + backslash in test name +------------------------------------------------------------------------------- +TestSpec.tests.cpp: +............................................................................... + +TestSpec.tests.cpp:: PASSED: + REQUIRE( spec.matches(*fakeTestCase(R"(spec \ char)")) ) +with expansion: + true + +------------------------------------------------------------------------------- +#1913 - GENERATE inside a for loop should not keep recreating the generator +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( counter < 7 ) +with expansion: + 3 < 7 + +------------------------------------------------------------------------------- +#1913 - GENERATE inside a for loop should not keep recreating the generator +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( counter < 7 ) +with expansion: + 6 < 7 + +------------------------------------------------------------------------------- +#1913 - GENERATEs can share a line +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i != j ) +with expansion: + 1 != 3 + +------------------------------------------------------------------------------- +#1913 - GENERATEs can share a line +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i != j ) +with expansion: + 1 != 4 + +------------------------------------------------------------------------------- +#1913 - GENERATEs can share a line +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i != j ) +with expansion: + 2 != 3 + +------------------------------------------------------------------------------- +#1913 - GENERATEs can share a line +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: PASSED: + REQUIRE( i != j ) +with expansion: + 2 != 4 + +------------------------------------------------------------------------------- +#1938 - GENERATE after a section + A +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with message: + A + +------------------------------------------------------------------------------- +#1938 - GENERATE after a section + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - GENERATE after a section + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - GENERATE after a section + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - Section followed by flat generate + A +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( 1 ) + +------------------------------------------------------------------------------- +#1938 - Section followed by flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - Section followed by flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + A +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with message: + A + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 1 + j := 3 + k := 5 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with message: + B + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 1 + j := 3 + k := 6 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with message: + B + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 1 + j := 4 + k := 5 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 1 + j := 4 + k := 6 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + A +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with message: + A + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 2 + j := 3 + k := 5 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with message: + B + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 2 + j := 3 + k := 6 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with message: + B + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 2 + j := 4 + k := 5 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: +with messages: + i := 2 + j := 4 + k := 6 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 1 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 1 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 1 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 2 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 2 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 2 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 3 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 3 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp: +............................................................................... + +PartTracker.tests.cpp:: PASSED: + REQUIRE( m ) +with expansion: + 3 + +PartTracker.tests.cpp:: PASSED: + REQUIRE( n ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +#1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +#1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +#2152 - ULP checks between differently signed values were wrong - double +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) ) +with expansion: + 0.0 is within 2 ULPs of -4.9406564584124654e-324 ([-1.4821969375237396e-323, + 4.9406564584124654e-324]) + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) ) +with expansion: + 0.0 not is within 1 ULPs of -4.9406564584124654e-324 ([-9.8813129168249309e- + 324, -0.0000000000000000e+00]) + +------------------------------------------------------------------------------- +#2152 - ULP checks between differently signed values were wrong - float +------------------------------------------------------------------------------- +Matchers.tests.cpp: +............................................................................... + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) ) +with expansion: + 0.0f is within 2 ULPs of -1.40129846e-45f ([-4.20389539e-45, 1.40129846e-45]) + +Matchers.tests.cpp:: PASSED: + CHECK_THAT( smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) ) +with expansion: + 0.0f not is within 1 ULPs of -1.40129846e-45f ([-2.80259693e-45, -0. + 00000000e+00]) + +------------------------------------------------------------------------------- +#2615 - Throwing in constructor generator fails test case but does not abort +------------------------------------------------------------------------------- +Generators.tests.cpp: +............................................................................... + +Generators.tests.cpp:: FAILED: +due to unexpected exception with message: + failure to init + +------------------------------------------------------------------------------- +#748 - captures with unexpected exceptions + outside assertions +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: +due to unexpected exception with messages: + answer := 42 + expected exception + +------------------------------------------------------------------------------- +#748 - captures with unexpected exceptions + inside REQUIRE_NOTHROW +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: FAILED: + REQUIRE_NOTHROW( thisThrows() ) +due to unexpected exception with messages: + answer := 42 + expected exception + +------------------------------------------------------------------------------- +#748 - captures with unexpected exceptions + inside REQUIRE_THROWS +------------------------------------------------------------------------------- +Exception.tests.cpp: +............................................................................... + +Exception.tests.cpp:: PASSED: + REQUIRE_THROWS( thisThrows() ) +with message: + answer := 42 + +------------------------------------------------------------------------------- +#809 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( 42 == f ) +with expansion: + 42 == {?} + +------------------------------------------------------------------------------- +#833 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( a == t ) +with expansion: + 3 == 3 + +Compilation.tests.cpp:: PASSED: + CHECK( a == t ) +with expansion: + 3 == 3 + +Compilation.tests.cpp:: PASSED: + REQUIRE_THROWS( throws_int(true) ) + +Compilation.tests.cpp:: PASSED: + CHECK_THROWS_AS( throws_int(true), int ) + +Compilation.tests.cpp:: PASSED: + REQUIRE_NOTHROW( throws_int(false) ) + +Compilation.tests.cpp:: PASSED: + REQUIRE_THAT( "aaa", Catch::Matchers::EndsWith("aaa") ) +with expansion: + "aaa" ends with: "aaa" + +Compilation.tests.cpp:: PASSED: + REQUIRE( templated_tests(3) ) +with expansion: + true + +------------------------------------------------------------------------------- +#835 -- errno should not be touched by Catch2 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: FAILED: + CHECK( f() == 0 ) +with expansion: + 1 == 0 + +Misc.tests.cpp:: PASSED: + REQUIRE( errno_after == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +#872 +------------------------------------------------------------------------------- +Compilation.tests.cpp: +............................................................................... + +Compilation.tests.cpp:: PASSED: + REQUIRE( x == 4 ) +with expansion: + {?} == 4 +with message: + dummy := 0 + +------------------------------------------------------------------------------- +#961 -- Dynamically created sections should all be reported + Looped section 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + Everything is OK + +------------------------------------------------------------------------------- +#961 -- Dynamically created sections should all be reported + Looped section 1 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + Everything is OK + +------------------------------------------------------------------------------- +#961 -- Dynamically created sections should all be reported + Looped section 2 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + Everything is OK + +------------------------------------------------------------------------------- +#961 -- Dynamically created sections should all be reported + Looped section 3 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + Everything is OK + +------------------------------------------------------------------------------- +#961 -- Dynamically created sections should all be reported + Looped section 4 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: +with message: + Everything is OK + +------------------------------------------------------------------------------- +'Not' checks that should fail +------------------------------------------------------------------------------- +Condition.tests.cpp: +............................................................................... + +Condition.tests.cpp:: FAILED: + CHECK( false != false ) + +Condition.tests.cpp:: FAILED: + CHECK( true != true ) + +=============================================================================== +test cases: 33 | 27 passed | 3 failed | 3 failed as expected +assertions: 102 | 94 passed | 4 failed | 4 failed as expected + diff --git a/tests/SelfTest/Baselines/default.sw.multi.approved.txt b/tests/SelfTest/Baselines/default.sw.multi.approved.txt new file mode 100644 index 0000000..bb17484 --- /dev/null +++ b/tests/SelfTest/Baselines/default.sw.multi.approved.txt @@ -0,0 +1,11 @@ +This would not be caught previously +Nor would this +A string sent directly to stdout +A string sent directly to stderr +A string sent to stderr via clog +Message from section one +Message from section two +loose text artifact +a! +b1! +! diff --git a/tests/SelfTest/Baselines/junit.sw.approved.txt b/tests/SelfTest/Baselines/junit.sw.approved.txt new file mode 100644 index 0000000..c3571f3 --- /dev/null +++ b/tests/SelfTest/Baselines/junit.sw.approved.txt @@ -0,0 +1,2305 @@ + + + + + + + + + + + + + + + + + + + +FAILED: +1514 +at Tricky.tests.cpp: + + +This would not be caught previously + + +Nor would this + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: +failure to init +at Generators.tests.cpp: + + + + + + +FAILED: +expected exception +answer := 42 +at Exception.tests.cpp: + + + + + +FAILED: + REQUIRE_NOTHROW( thisThrows() ) +expected exception +answer := 42 +at Exception.tests.cpp: + + + + + + + + +FAILED: + CHECK( f() == 0 ) +with expansion: + 1 == 0 +at Misc.tests.cpp: + + + + + + + + + + + +FAILED: + CHECK( false != false ) +at Condition.tests.cpp: + + +FAILED: + CHECK( true != true ) +at Condition.tests.cpp: + + +FAILED: + CHECK( !true ) +with expansion: + false +at Condition.tests.cpp: + + +FAILED: + CHECK_FALSE( true ) +with expansion: + !true +at Condition.tests.cpp: + + +FAILED: + CHECK( !trueValue ) +with expansion: + false +at Condition.tests.cpp: + + +FAILED: + CHECK_FALSE( trueValue ) +with expansion: + !true +at Condition.tests.cpp: + + +FAILED: + CHECK( !(1 == 1) ) +with expansion: + false +at Condition.tests.cpp: + + +FAILED: + CHECK_FALSE( 1 == 1 ) +at Condition.tests.cpp: + + + + + + + + + + + + +FAILED: + REQUIRE( s == "world" ) +with expansion: + "hello" == "world" +at Class.tests.cpp: + + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) +with expansion: + 0 == 1 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) +with expansion: + 0 == 1 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) +with expansion: + 0 == 1 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) +with expansion: + 0 == 1 +at Class.tests.cpp: + + + + + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) +with expansion: + 6 < 2 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) +with expansion: + 2 < 2 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) +with expansion: + 6 < 2 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) +with expansion: + 2 < 2 +at Class.tests.cpp: + + + + + + + + +FAILED: + REQUIRE( Template_Fixture<TestType>::m_a == 2 ) +with expansion: + 1.0 == 2 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture<TestType>::m_a == 2 ) +with expansion: + 1.0f == 2 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture<TestType>::m_a == 2 ) +with expansion: + 1 == 2 +at Class.tests.cpp: + + + + + + + +FAILED: + REQUIRE( Nttp_Fixture<V>::value == 0 ) +with expansion: + 1 == 0 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Nttp_Fixture<V>::value == 0 ) +with expansion: + 3 == 0 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Nttp_Fixture<V>::value == 0 ) +with expansion: + 6 == 0 +at Class.tests.cpp: + + + + + + + +FAILED: + REQUIRE( m_a == 2 ) +with expansion: + 1 == 2 +at Class.tests.cpp: + + + + + + +FAILED: + REQUIRE( m_a == 0 ) +with expansion: + 1 == 0 +at Class.tests.cpp: + + + + + + + + + + + + + + + + +FAILED: +to infinity and beyond +at Misc.tests.cpp: + + + + + + +FAILED: + CHECK( &o1 == &o2 ) +with expansion: + 0x == 0x +at Tricky.tests.cpp: + + +FAILED: + CHECK( o1 == o2 ) +with expansion: + {?} == {?} +at Tricky.tests.cpp: + + + + + + + +FAILED: + {Unknown expression after the reported line} +unexpected exception +at Exception.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: + CHECK_THAT( testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "not there" (case + insensitive) +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "STRING" +at Matchers.tests.cpp: + + + + + + + + + +FAILED: + REQUIRE_NOTHROW( throwCustom() ) +custom exception - not std +at Exception.tests.cpp: + + + + +FAILED: + REQUIRE_THROWS_AS( throwCustom(), std::exception ) +custom exception - not std +at Exception.tests.cpp: + + + + +FAILED: +custom std exception +at Exception.tests.cpp: + + + + + + +SKIPPED +This generator is empty +at Skip.tests.cpp: + + + + + +FAILED: + CHECK_THAT( testStringForMatching(), EndsWith( "Substring" ) ) +with expansion: + "this string contains 'abc' as a substring" ends with: "Substring" +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" ends with: "this" (case + insensitive) +at Matchers.tests.cpp: + + + + + + + + +FAILED: + CHECK( data.int_seven == 6 ) +with expansion: + 7 == 6 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven == 8 ) +with expansion: + 7 == 8 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven == 0 ) +with expansion: + 7 == 0 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one == Approx( 9.11f ) ) +with expansion: + 9.100000381f + == + Approx( 9.10999965667724609 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one == Approx( 9.0f ) ) +with expansion: + 9.100000381f == Approx( 9.0 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one == Approx( 1 ) ) +with expansion: + 9.100000381f == Approx( 1.0 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one == Approx( 0 ) ) +with expansion: + 9.100000381f == Approx( 0.0 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.double_pi == Approx( 3.1415 ) ) +with expansion: + 3.14159265350000005 + == + Approx( 3.14150000000000018 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello == "goodbye" ) +with expansion: + "hello" == "goodbye" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello == "hell" ) +with expansion: + "hello" == "hell" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello == "hello1" ) +with expansion: + "hello" == "hello1" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello.size() == 6 ) +with expansion: + 5 == 6 +at Condition.tests.cpp: + + +FAILED: + CHECK( x == Approx( 1.301 ) ) +with expansion: + 1.30000000000000027 + == + Approx( 1.30099999999999993 ) +at Condition.tests.cpp: + + + + + + +FAILED: + CHECK_THAT( testStringForMatching(), Equals( "this string contains 'ABC' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" equals: "this string contains + 'ABC' as a substring" +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" equals: "something else" (case + insensitive) +at Matchers.tests.cpp: + + + + + +FAILED: + CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) +at Matchers.tests.cpp: + + +FAILED: + REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) +Unknown exception +at Matchers.tests.cpp: + + +FAILED: + REQUIRE_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) +Unknown exception +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THROWS_MATCHES( throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } ) +with expansion: + SpecialException::what special exception has value of 1 +at Matchers.tests.cpp: + + +FAILED: + REQUIRE_THROWS_MATCHES( throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } ) +with expansion: + SpecialException::what special exception has value of 1 +at Matchers.tests.cpp: + + + + + + + + + + + +FAILED: + CHECK_THROWS_AS( thisThrows(), std::string ) +expected exception +at Exception.tests.cpp: + + +FAILED: + CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error ) +at Exception.tests.cpp: + + +FAILED: + CHECK_NOTHROW( thisThrows() ) +expected exception +at Exception.tests.cpp: + + + + +FAILED: +This is a failure +at Message.tests.cpp: + + + + +FAILED: +at Message.tests.cpp: + + + + +FAILED: +This is a failure +at Message.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: +Show infos! +This info has multiple parts. +This unscoped info has multiple parts. +at Message.tests.cpp: + + + + + +FAILED: + REQUIRE( a == 1 ) +with expansion: + 2 == 1 +this message should be logged +so should this +at Message.tests.cpp: + + + + +FAILED: + CHECK( a == 1 ) +with expansion: + 2 == 1 +this message may be logged later +this message should be logged +at Message.tests.cpp: + + +FAILED: + CHECK( a == 0 ) +with expansion: + 2 == 0 +this message may be logged later +this message should be logged +and this, but later +at Message.tests.cpp: + + + + +FAILED: + REQUIRE( i < 10 ) +with expansion: + 10 < 10 +current counter 10 +i := 10 +at Message.tests.cpp: + + + + + +FAILED: + REQUIRE( Dummy ) +Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE +at AssertionHandler.tests.cpp: + + + + + +FAILED: + CHECK( data.int_seven != 7 ) +with expansion: + 7 != 7 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one != Approx( 9.1f ) ) +with expansion: + 9.100000381f + != + Approx( 9.10000038146972656 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.double_pi != Approx( 3.1415926535 ) ) +with expansion: + 3.14159265350000005 + != + Approx( 3.14159265350000005 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello != "hello" ) +with expansion: + "hello" != "hello" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello.size() != 5 ) +with expansion: + 5 != 5 +at Condition.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: + CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) ) +with expansion: + "this string contains 'abc' as a substring" ( ( contains: "string" or + contains: "different" ) and contains: "random" ) +at Matchers.tests.cpp: + + + + + +FAILED: + CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) ) +with expansion: + "this string contains 'abc' as a substring" not contains: "substring" +at Matchers.tests.cpp: + + + + + + + + +FAILED: +at Condition.tests.cpp: + + + + + + + + +FAILED: +at Condition.tests.cpp: + + + + + + + + +FAILED: +at Condition.tests.cpp: + + + + + + + + +FAILED: +at Condition.tests.cpp: + + + + +FAILED: + REQUIRE_THROWS_WITH( thisThrows(), "should fail" ) +with expansion: + "expected exception" equals: "should fail" +at Exception.tests.cpp: + + + + + + + + + + +FAILED: +custom exception +at Exception.tests.cpp: + + + + + + +FAILED: + CHECK( data.int_seven > 7 ) +with expansion: + 7 > 7 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven < 7 ) +with expansion: + 7 < 7 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven > 8 ) +with expansion: + 7 > 8 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven < 6 ) +with expansion: + 7 < 6 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven < 0 ) +with expansion: + 7 < 0 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven < -1 ) +with expansion: + 7 < -1 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven >= 8 ) +with expansion: + 7 >= 8 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven <= 6 ) +with expansion: + 7 <= 6 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one < 9 ) +with expansion: + 9.100000381f < 9 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one > 10 ) +with expansion: + 9.100000381f > 10 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one > 9.2 ) +with expansion: + 9.100000381f > 9.19999999999999929 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello > "hello" ) +with expansion: + "hello" > "hello" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello < "hello" ) +with expansion: + "hello" < "hello" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello > "hellp" ) +with expansion: + "hello" > "hellp" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello > "z" ) +with expansion: + "hello" > "z" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello < "hellm" ) +with expansion: + "hello" < "hellm" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello < "a" ) +with expansion: + "hello" < "a" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello >= "z" ) +with expansion: + "hello" >= "z" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello <= "a" ) +with expansion: + "hello" <= "a" +at Condition.tests.cpp: + + + + + + + + +FAILED: +Message from section one +at Message.tests.cpp: + + + + +FAILED: +Message from section two +at Message.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: + CHECK( truthy(false) ) +with expansion: + Hey, its truthy! +at Decomposition.tests.cpp: + + + + +FAILED: + CHECK_THAT( testStringForMatching(), Matches( "this STRING contains 'abc' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" matches "this STRING contains + 'abc' as a substring" case sensitively +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), Matches( "contains 'abc' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" matches "contains 'abc' as a + substring" case sensitively +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), Matches( "this string contains 'abc' as a" ) ) +with expansion: + "this string contains 'abc' as a substring" matches "this string contains + 'abc' as a" case sensitively +at Matchers.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +A string sent directly to stdout + + +A string sent directly to stderr +A string sent to stderr via clog + + + + + + + +Message from section one +Message from section two + + + + +FAILED: + CHECK_THAT( testStringForMatching(), StartsWith( "This String" ) ) +with expansion: + "this string contains 'abc' as a substring" starts with: "This String" +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" starts with: "string" (case + insensitive) +at Matchers.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: + CHECK( s1 == s2 ) +with expansion: + "if ($b == 10) { + $a = 20; + }" + == + "if ($b == 10) { + $a = 20; + } + " +at Misc.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: +at Misc.tests.cpp: + + + + + +FAILED: +at Misc.tests.cpp: + + + + + +FAILED: + {Unknown expression after the reported line} +Uncaught exception should fail! +at Misc.tests.cpp: + + + + + +FAILED: + {Unknown expression after the reported line} +Uncaught exception should fail! +at Misc.tests.cpp: + + + + + + + + + + + +FAILED: +For some reason someone is throwing a string literal! +at Exception.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: +3.14000000000000012 +at Exception.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: + CHECK_THAT( empty, Approx( t1 ) ) +with expansion: + { } is approx: { 1.0, 2.0 } +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THAT( v1, Approx( v2 ) ) +with expansion: + { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 } +at Matchers.tests.cpp: + + + + + + + + + + + +FAILED: + CHECK_THAT( v, VectorContains( -1 ) ) +with expansion: + { 1, 2, 3 } Contains: -1 +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( empty, VectorContains( 1 ) ) +with expansion: + { } Contains: 1 +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THAT( empty, Contains( v ) ) +with expansion: + { } Contains: { 1, 2, 3 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( v, Contains( v2 ) ) +with expansion: + { 1, 2, 3 } Contains: { 1, 2, 4 } +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THAT( v, Equals( v2 ) ) +with expansion: + { 1, 2, 3 } Equals: { 1, 2 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( v2, Equals( v ) ) +with expansion: + { 1, 2 } Equals: { 1, 2, 3 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( empty, Equals( v ) ) +with expansion: + { } Equals: { 1, 2, 3 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( v, Equals( empty ) ) +with expansion: + { 1, 2, 3 } Equals: { } +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THAT( v, UnorderedEquals( empty ) ) +with expansion: + { 1, 2, 3 } UnorderedEquals: { } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( empty, UnorderedEquals( v ) ) +with expansion: + { } UnorderedEquals: { 1, 2, 3 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( permuted, UnorderedEquals( v ) ) +with expansion: + { 1, 3 } UnorderedEquals: { 1, 2, 3 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( permuted, UnorderedEquals( v ) ) +with expansion: + { 3, 1 } UnorderedEquals: { 1, 2, 3 } +at Matchers.tests.cpp: + + + + + +FAILED: +unexpected exception +at Exception.tests.cpp: + + + + +FAILED: + CHECK( thisThrows() == 0 ) +expected exception +at Exception.tests.cpp: + + + + +FAILED: + REQUIRE( thisThrows() == 0 ) +expected exception +at Exception.tests.cpp: + + + + +FAILED: + CHECK( thisThrows() == 0 ) +expected exception +at Exception.tests.cpp: + + + + +FAILED: +unexpected exception +at Exception.tests.cpp: + + + + + + + + + + + + + + + + + + + +SKIPPED +at Skip.tests.cpp: + + + + + + + + + + + +FAILED: + REQUIRE( testCheckedElse( false ) ) +with expansion: + false +at Misc.tests.cpp: + + + + + +FAILED: + REQUIRE( testCheckedIf( false ) ) +with expansion: + false +at Misc.tests.cpp: + + + + + + + + + + + + + + +SKIPPED +skipping because answer = 41 +at Skip.tests.cpp: + + +SKIPPED +skipping because answer = 43 +at Skip.tests.cpp: + + + + + + + + + + + + + +FAILED: + CHECK( 3 == 4 ) +at Skip.tests.cpp: + + +SKIPPED +at Skip.tests.cpp: + + + + +FAILED: +at Skip.tests.cpp: + + +SKIPPED +at Skip.tests.cpp: + + +FAILED: +at Skip.tests.cpp: + + +SKIPPED +at Skip.tests.cpp: + + + + +SKIPPED +at Skip.tests.cpp: + + + + + +FAILED: +at Skip.tests.cpp: + + + + + + + +FAILED: +Previous info should not be seen +at Message.tests.cpp: + + + + +FAILED: +previous unscoped info SHOULD not be seen +at Message.tests.cpp: + + + + + + + + +FAILED: + CHECK( b > a ) +with expansion: + 0 > 1 +at Misc.tests.cpp: + + + + +FAILED: + CHECK( b > a ) +with expansion: + 1 > 1 +at Misc.tests.cpp: + + + + + + + + + + + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[0] (1) is even +at Misc.tests.cpp: + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[1] (1) is even +at Misc.tests.cpp: + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[3] (3) is even +at Misc.tests.cpp: + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[4] (5) is even +at Misc.tests.cpp: + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[6] (13) is even +at Misc.tests.cpp: + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[7] (21) is even +at Misc.tests.cpp: + + + + + + + + + + + + + + +FAILED: + REQUIRE( a == b ) +with expansion: + 1 == 2 +at Misc.tests.cpp: + + + + + + + + + + + + + +SKIPPED +at Skip.tests.cpp: + + + + +a! +b1! +! + + + + + + + + +FAILED: + REQUIRE( false ) +this SHOULD be seen +at Message.tests.cpp: + + + + + + + + + + + + + +FAILED: + REQUIRE( false ) +this SHOULD be seen +this SHOULD also be seen +at Message.tests.cpp: + + + + +FAILED: + CHECK( false ) +this SHOULD be seen only ONCE +at Message.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + +SKIPPED +at Skip.tests.cpp: + + + + + +FAILED: + REQUIRE( false ) +3 +at Misc.tests.cpp: + + + + +FAILED: + REQUIRE( false ) +hi +i := 7 +at Message.tests.cpp: + + + + + +SKIPPED +skipping because answer = 43 +at Skip.tests.cpp: + + + + + +FAILED: + CHECK( false ) +Count 1 to 3... +1 +2 +3 +at Message.tests.cpp: + + +FAILED: + CHECK( false ) +Count 4 to 6... +4 +5 +6 +at Message.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +SKIPPED +at Skip.tests.cpp: + + + + +FAILED: +Why would you throw a std::string? +at Exception.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +This would not be caught previously +A string sent directly to stdout +Message from section one +Message from section two +a! +b1! +! + + +Nor would this +A string sent directly to stderr +A string sent to stderr via clog + + + diff --git a/tests/SelfTest/Baselines/junit.sw.multi.approved.txt b/tests/SelfTest/Baselines/junit.sw.multi.approved.txt new file mode 100644 index 0000000..55f5520 --- /dev/null +++ b/tests/SelfTest/Baselines/junit.sw.multi.approved.txt @@ -0,0 +1,2304 @@ + + + + + + + + + + + + + + + + + + + +FAILED: +1514 +at Tricky.tests.cpp: + + +This would not be caught previously + + +Nor would this + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: +failure to init +at Generators.tests.cpp: + + + + + + +FAILED: +expected exception +answer := 42 +at Exception.tests.cpp: + + + + + +FAILED: + REQUIRE_NOTHROW( thisThrows() ) +expected exception +answer := 42 +at Exception.tests.cpp: + + + + + + + + +FAILED: + CHECK( f() == 0 ) +with expansion: + 1 == 0 +at Misc.tests.cpp: + + + + + + + + + + + +FAILED: + CHECK( false != false ) +at Condition.tests.cpp: + + +FAILED: + CHECK( true != true ) +at Condition.tests.cpp: + + +FAILED: + CHECK( !true ) +with expansion: + false +at Condition.tests.cpp: + + +FAILED: + CHECK_FALSE( true ) +with expansion: + !true +at Condition.tests.cpp: + + +FAILED: + CHECK( !trueValue ) +with expansion: + false +at Condition.tests.cpp: + + +FAILED: + CHECK_FALSE( trueValue ) +with expansion: + !true +at Condition.tests.cpp: + + +FAILED: + CHECK( !(1 == 1) ) +with expansion: + false +at Condition.tests.cpp: + + +FAILED: + CHECK_FALSE( 1 == 1 ) +at Condition.tests.cpp: + + + + + + + + + + + + +FAILED: + REQUIRE( s == "world" ) +with expansion: + "hello" == "world" +at Class.tests.cpp: + + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) +with expansion: + 0 == 1 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) +with expansion: + 0 == 1 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) +with expansion: + 0 == 1 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) +with expansion: + 0 == 1 +at Class.tests.cpp: + + + + + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) +with expansion: + 6 < 2 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) +with expansion: + 2 < 2 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) +with expansion: + 6 < 2 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) +with expansion: + 2 < 2 +at Class.tests.cpp: + + + + + + + + +FAILED: + REQUIRE( Template_Fixture<TestType>::m_a == 2 ) +with expansion: + 1.0 == 2 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture<TestType>::m_a == 2 ) +with expansion: + 1.0f == 2 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture<TestType>::m_a == 2 ) +with expansion: + 1 == 2 +at Class.tests.cpp: + + + + + + + +FAILED: + REQUIRE( Nttp_Fixture<V>::value == 0 ) +with expansion: + 1 == 0 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Nttp_Fixture<V>::value == 0 ) +with expansion: + 3 == 0 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Nttp_Fixture<V>::value == 0 ) +with expansion: + 6 == 0 +at Class.tests.cpp: + + + + + + + +FAILED: + REQUIRE( m_a == 2 ) +with expansion: + 1 == 2 +at Class.tests.cpp: + + + + + + +FAILED: + REQUIRE( m_a == 0 ) +with expansion: + 1 == 0 +at Class.tests.cpp: + + + + + + + + + + + + + + + + +FAILED: +to infinity and beyond +at Misc.tests.cpp: + + + + + + +FAILED: + CHECK( &o1 == &o2 ) +with expansion: + 0x == 0x +at Tricky.tests.cpp: + + +FAILED: + CHECK( o1 == o2 ) +with expansion: + {?} == {?} +at Tricky.tests.cpp: + + + + + + + +FAILED: + {Unknown expression after the reported line} +unexpected exception +at Exception.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: + CHECK_THAT( testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "not there" (case + insensitive) +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "STRING" +at Matchers.tests.cpp: + + + + + + + + + +FAILED: + REQUIRE_NOTHROW( throwCustom() ) +custom exception - not std +at Exception.tests.cpp: + + + + +FAILED: + REQUIRE_THROWS_AS( throwCustom(), std::exception ) +custom exception - not std +at Exception.tests.cpp: + + + + +FAILED: +custom std exception +at Exception.tests.cpp: + + + + + + +SKIPPED +This generator is empty +at Skip.tests.cpp: + + + + + +FAILED: + CHECK_THAT( testStringForMatching(), EndsWith( "Substring" ) ) +with expansion: + "this string contains 'abc' as a substring" ends with: "Substring" +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" ends with: "this" (case + insensitive) +at Matchers.tests.cpp: + + + + + + + + +FAILED: + CHECK( data.int_seven == 6 ) +with expansion: + 7 == 6 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven == 8 ) +with expansion: + 7 == 8 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven == 0 ) +with expansion: + 7 == 0 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one == Approx( 9.11f ) ) +with expansion: + 9.100000381f + == + Approx( 9.10999965667724609 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one == Approx( 9.0f ) ) +with expansion: + 9.100000381f == Approx( 9.0 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one == Approx( 1 ) ) +with expansion: + 9.100000381f == Approx( 1.0 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one == Approx( 0 ) ) +with expansion: + 9.100000381f == Approx( 0.0 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.double_pi == Approx( 3.1415 ) ) +with expansion: + 3.14159265350000005 + == + Approx( 3.14150000000000018 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello == "goodbye" ) +with expansion: + "hello" == "goodbye" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello == "hell" ) +with expansion: + "hello" == "hell" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello == "hello1" ) +with expansion: + "hello" == "hello1" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello.size() == 6 ) +with expansion: + 5 == 6 +at Condition.tests.cpp: + + +FAILED: + CHECK( x == Approx( 1.301 ) ) +with expansion: + 1.30000000000000027 + == + Approx( 1.30099999999999993 ) +at Condition.tests.cpp: + + + + + + +FAILED: + CHECK_THAT( testStringForMatching(), Equals( "this string contains 'ABC' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" equals: "this string contains + 'ABC' as a substring" +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" equals: "something else" (case + insensitive) +at Matchers.tests.cpp: + + + + + +FAILED: + CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) +at Matchers.tests.cpp: + + +FAILED: + REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) +Unknown exception +at Matchers.tests.cpp: + + +FAILED: + REQUIRE_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) +Unknown exception +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THROWS_MATCHES( throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } ) +with expansion: + SpecialException::what special exception has value of 1 +at Matchers.tests.cpp: + + +FAILED: + REQUIRE_THROWS_MATCHES( throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } ) +with expansion: + SpecialException::what special exception has value of 1 +at Matchers.tests.cpp: + + + + + + + + + + + +FAILED: + CHECK_THROWS_AS( thisThrows(), std::string ) +expected exception +at Exception.tests.cpp: + + +FAILED: + CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error ) +at Exception.tests.cpp: + + +FAILED: + CHECK_NOTHROW( thisThrows() ) +expected exception +at Exception.tests.cpp: + + + + +FAILED: +This is a failure +at Message.tests.cpp: + + + + +FAILED: +at Message.tests.cpp: + + + + +FAILED: +This is a failure +at Message.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: +Show infos! +This info has multiple parts. +This unscoped info has multiple parts. +at Message.tests.cpp: + + + + + +FAILED: + REQUIRE( a == 1 ) +with expansion: + 2 == 1 +this message should be logged +so should this +at Message.tests.cpp: + + + + +FAILED: + CHECK( a == 1 ) +with expansion: + 2 == 1 +this message may be logged later +this message should be logged +at Message.tests.cpp: + + +FAILED: + CHECK( a == 0 ) +with expansion: + 2 == 0 +this message may be logged later +this message should be logged +and this, but later +at Message.tests.cpp: + + + + +FAILED: + REQUIRE( i < 10 ) +with expansion: + 10 < 10 +current counter 10 +i := 10 +at Message.tests.cpp: + + + + + +FAILED: + REQUIRE( Dummy ) +Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE +at AssertionHandler.tests.cpp: + + + + + +FAILED: + CHECK( data.int_seven != 7 ) +with expansion: + 7 != 7 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one != Approx( 9.1f ) ) +with expansion: + 9.100000381f + != + Approx( 9.10000038146972656 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.double_pi != Approx( 3.1415926535 ) ) +with expansion: + 3.14159265350000005 + != + Approx( 3.14159265350000005 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello != "hello" ) +with expansion: + "hello" != "hello" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello.size() != 5 ) +with expansion: + 5 != 5 +at Condition.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: + CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) ) +with expansion: + "this string contains 'abc' as a substring" ( ( contains: "string" or + contains: "different" ) and contains: "random" ) +at Matchers.tests.cpp: + + + + + +FAILED: + CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) ) +with expansion: + "this string contains 'abc' as a substring" not contains: "substring" +at Matchers.tests.cpp: + + + + + + + + +FAILED: +at Condition.tests.cpp: + + + + + + + + +FAILED: +at Condition.tests.cpp: + + + + + + + + +FAILED: +at Condition.tests.cpp: + + + + + + + + +FAILED: +at Condition.tests.cpp: + + + + +FAILED: + REQUIRE_THROWS_WITH( thisThrows(), "should fail" ) +with expansion: + "expected exception" equals: "should fail" +at Exception.tests.cpp: + + + + + + + + + + +FAILED: +custom exception +at Exception.tests.cpp: + + + + + + +FAILED: + CHECK( data.int_seven > 7 ) +with expansion: + 7 > 7 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven < 7 ) +with expansion: + 7 < 7 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven > 8 ) +with expansion: + 7 > 8 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven < 6 ) +with expansion: + 7 < 6 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven < 0 ) +with expansion: + 7 < 0 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven < -1 ) +with expansion: + 7 < -1 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven >= 8 ) +with expansion: + 7 >= 8 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven <= 6 ) +with expansion: + 7 <= 6 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one < 9 ) +with expansion: + 9.100000381f < 9 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one > 10 ) +with expansion: + 9.100000381f > 10 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one > 9.2 ) +with expansion: + 9.100000381f > 9.19999999999999929 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello > "hello" ) +with expansion: + "hello" > "hello" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello < "hello" ) +with expansion: + "hello" < "hello" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello > "hellp" ) +with expansion: + "hello" > "hellp" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello > "z" ) +with expansion: + "hello" > "z" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello < "hellm" ) +with expansion: + "hello" < "hellm" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello < "a" ) +with expansion: + "hello" < "a" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello >= "z" ) +with expansion: + "hello" >= "z" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello <= "a" ) +with expansion: + "hello" <= "a" +at Condition.tests.cpp: + + + + + + + + +FAILED: +Message from section one +at Message.tests.cpp: + + + + +FAILED: +Message from section two +at Message.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: + CHECK( truthy(false) ) +with expansion: + Hey, its truthy! +at Decomposition.tests.cpp: + + + + +FAILED: + CHECK_THAT( testStringForMatching(), Matches( "this STRING contains 'abc' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" matches "this STRING contains + 'abc' as a substring" case sensitively +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), Matches( "contains 'abc' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" matches "contains 'abc' as a + substring" case sensitively +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), Matches( "this string contains 'abc' as a" ) ) +with expansion: + "this string contains 'abc' as a substring" matches "this string contains + 'abc' as a" case sensitively +at Matchers.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +A string sent directly to stdout + + +A string sent directly to stderr +A string sent to stderr via clog + + + + + + + +Message from section one +Message from section two + + + + +FAILED: + CHECK_THAT( testStringForMatching(), StartsWith( "This String" ) ) +with expansion: + "this string contains 'abc' as a substring" starts with: "This String" +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" starts with: "string" (case + insensitive) +at Matchers.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: + CHECK( s1 == s2 ) +with expansion: + "if ($b == 10) { + $a = 20; + }" + == + "if ($b == 10) { + $a = 20; + } + " +at Misc.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: +at Misc.tests.cpp: + + + + + +FAILED: +at Misc.tests.cpp: + + + + + +FAILED: + {Unknown expression after the reported line} +Uncaught exception should fail! +at Misc.tests.cpp: + + + + + +FAILED: + {Unknown expression after the reported line} +Uncaught exception should fail! +at Misc.tests.cpp: + + + + + + + + + + + +FAILED: +For some reason someone is throwing a string literal! +at Exception.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: +3.14000000000000012 +at Exception.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: + CHECK_THAT( empty, Approx( t1 ) ) +with expansion: + { } is approx: { 1.0, 2.0 } +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THAT( v1, Approx( v2 ) ) +with expansion: + { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 } +at Matchers.tests.cpp: + + + + + + + + + + + +FAILED: + CHECK_THAT( v, VectorContains( -1 ) ) +with expansion: + { 1, 2, 3 } Contains: -1 +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( empty, VectorContains( 1 ) ) +with expansion: + { } Contains: 1 +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THAT( empty, Contains( v ) ) +with expansion: + { } Contains: { 1, 2, 3 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( v, Contains( v2 ) ) +with expansion: + { 1, 2, 3 } Contains: { 1, 2, 4 } +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THAT( v, Equals( v2 ) ) +with expansion: + { 1, 2, 3 } Equals: { 1, 2 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( v2, Equals( v ) ) +with expansion: + { 1, 2 } Equals: { 1, 2, 3 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( empty, Equals( v ) ) +with expansion: + { } Equals: { 1, 2, 3 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( v, Equals( empty ) ) +with expansion: + { 1, 2, 3 } Equals: { } +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THAT( v, UnorderedEquals( empty ) ) +with expansion: + { 1, 2, 3 } UnorderedEquals: { } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( empty, UnorderedEquals( v ) ) +with expansion: + { } UnorderedEquals: { 1, 2, 3 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( permuted, UnorderedEquals( v ) ) +with expansion: + { 1, 3 } UnorderedEquals: { 1, 2, 3 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( permuted, UnorderedEquals( v ) ) +with expansion: + { 3, 1 } UnorderedEquals: { 1, 2, 3 } +at Matchers.tests.cpp: + + + + + +FAILED: +unexpected exception +at Exception.tests.cpp: + + + + +FAILED: + CHECK( thisThrows() == 0 ) +expected exception +at Exception.tests.cpp: + + + + +FAILED: + REQUIRE( thisThrows() == 0 ) +expected exception +at Exception.tests.cpp: + + + + +FAILED: + CHECK( thisThrows() == 0 ) +expected exception +at Exception.tests.cpp: + + + + +FAILED: +unexpected exception +at Exception.tests.cpp: + + + + + + + + + + + + + + + + + + + +SKIPPED +at Skip.tests.cpp: + + + + + + + + + + + +FAILED: + REQUIRE( testCheckedElse( false ) ) +with expansion: + false +at Misc.tests.cpp: + + + + + +FAILED: + REQUIRE( testCheckedIf( false ) ) +with expansion: + false +at Misc.tests.cpp: + + + + + + + + + + + + + + +SKIPPED +skipping because answer = 41 +at Skip.tests.cpp: + + +SKIPPED +skipping because answer = 43 +at Skip.tests.cpp: + + + + + + + + + + + + + +FAILED: + CHECK( 3 == 4 ) +at Skip.tests.cpp: + + +SKIPPED +at Skip.tests.cpp: + + + + +FAILED: +at Skip.tests.cpp: + + +SKIPPED +at Skip.tests.cpp: + + +FAILED: +at Skip.tests.cpp: + + +SKIPPED +at Skip.tests.cpp: + + + + +SKIPPED +at Skip.tests.cpp: + + + + + +FAILED: +at Skip.tests.cpp: + + + + + + + +FAILED: +Previous info should not be seen +at Message.tests.cpp: + + + + +FAILED: +previous unscoped info SHOULD not be seen +at Message.tests.cpp: + + + + + + + + +FAILED: + CHECK( b > a ) +with expansion: + 0 > 1 +at Misc.tests.cpp: + + + + +FAILED: + CHECK( b > a ) +with expansion: + 1 > 1 +at Misc.tests.cpp: + + + + + + + + + + + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[0] (1) is even +at Misc.tests.cpp: + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[1] (1) is even +at Misc.tests.cpp: + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[3] (3) is even +at Misc.tests.cpp: + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[4] (5) is even +at Misc.tests.cpp: + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[6] (13) is even +at Misc.tests.cpp: + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[7] (21) is even +at Misc.tests.cpp: + + + + + + + + + + + + + + +FAILED: + REQUIRE( a == b ) +with expansion: + 1 == 2 +at Misc.tests.cpp: + + + + + + + + + + + + + +SKIPPED +at Skip.tests.cpp: + + + + +a! +b1! +! + + + + + + + + +FAILED: + REQUIRE( false ) +this SHOULD be seen +at Message.tests.cpp: + + + + + + + + + + + + + +FAILED: + REQUIRE( false ) +this SHOULD be seen +this SHOULD also be seen +at Message.tests.cpp: + + + + +FAILED: + CHECK( false ) +this SHOULD be seen only ONCE +at Message.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + +SKIPPED +at Skip.tests.cpp: + + + + + +FAILED: + REQUIRE( false ) +3 +at Misc.tests.cpp: + + + + +FAILED: + REQUIRE( false ) +hi +i := 7 +at Message.tests.cpp: + + + + + +SKIPPED +skipping because answer = 43 +at Skip.tests.cpp: + + + + + +FAILED: + CHECK( false ) +Count 1 to 3... +1 +2 +3 +at Message.tests.cpp: + + +FAILED: + CHECK( false ) +Count 4 to 6... +4 +5 +6 +at Message.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +SKIPPED +at Skip.tests.cpp: + + + + +FAILED: +Why would you throw a std::string? +at Exception.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +This would not be caught previously +A string sent directly to stdout +Message from section one +Message from section two +a! +b1! +! + + +Nor would this +A string sent directly to stderr +A string sent to stderr via clog + + + diff --git a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt new file mode 100644 index 0000000..af06793 --- /dev/null +++ b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt @@ -0,0 +1,2317 @@ + + + + + + +FAILED: + REQUIRE( Dummy ) +Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE +at AssertionHandler.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: + REQUIRE( s == "world" ) +with expansion: + "hello" == "world" +at Class.tests.cpp: + + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) +with expansion: + 0 == 1 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) +with expansion: + 0 == 1 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) +with expansion: + 0 == 1 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) +with expansion: + 0 == 1 +at Class.tests.cpp: + + + + + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) +with expansion: + 6 < 2 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) +with expansion: + 2 < 2 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) +with expansion: + 6 < 2 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) +with expansion: + 2 < 2 +at Class.tests.cpp: + + + + + + + + +FAILED: + REQUIRE( Template_Fixture<TestType>::m_a == 2 ) +with expansion: + 1.0 == 2 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture<TestType>::m_a == 2 ) +with expansion: + 1.0f == 2 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture<TestType>::m_a == 2 ) +with expansion: + 1 == 2 +at Class.tests.cpp: + + + + + + + +FAILED: + REQUIRE( Nttp_Fixture<V>::value == 0 ) +with expansion: + 1 == 0 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Nttp_Fixture<V>::value == 0 ) +with expansion: + 3 == 0 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Nttp_Fixture<V>::value == 0 ) +with expansion: + 6 == 0 +at Class.tests.cpp: + + + + + + + +FAILED: + REQUIRE( m_a == 2 ) +with expansion: + 1 == 2 +at Class.tests.cpp: + + + + + + +FAILED: + REQUIRE( m_a == 0 ) +with expansion: + 1 == 0 +at Class.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: + CHECK( false != false ) +at Condition.tests.cpp: + + +FAILED: + CHECK( true != true ) +at Condition.tests.cpp: + + +FAILED: + CHECK( !true ) +with expansion: + false +at Condition.tests.cpp: + + +FAILED: + CHECK_FALSE( true ) +with expansion: + !true +at Condition.tests.cpp: + + +FAILED: + CHECK( !trueValue ) +with expansion: + false +at Condition.tests.cpp: + + +FAILED: + CHECK_FALSE( trueValue ) +with expansion: + !true +at Condition.tests.cpp: + + +FAILED: + CHECK( !(1 == 1) ) +with expansion: + false +at Condition.tests.cpp: + + +FAILED: + CHECK_FALSE( 1 == 1 ) +at Condition.tests.cpp: + + + + + + + + +FAILED: + CHECK( data.int_seven == 6 ) +with expansion: + 7 == 6 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven == 8 ) +with expansion: + 7 == 8 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven == 0 ) +with expansion: + 7 == 0 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one == Approx( 9.11f ) ) +with expansion: + 9.100000381f +== +Approx( 9.10999965667724609 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one == Approx( 9.0f ) ) +with expansion: + 9.100000381f == Approx( 9.0 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one == Approx( 1 ) ) +with expansion: + 9.100000381f == Approx( 1.0 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one == Approx( 0 ) ) +with expansion: + 9.100000381f == Approx( 0.0 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.double_pi == Approx( 3.1415 ) ) +with expansion: + 3.14159265350000005 +== +Approx( 3.14150000000000018 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello == "goodbye" ) +with expansion: + "hello" == "goodbye" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello == "hell" ) +with expansion: + "hello" == "hell" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello == "hello1" ) +with expansion: + "hello" == "hello1" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello.size() == 6 ) +with expansion: + 5 == 6 +at Condition.tests.cpp: + + +FAILED: + CHECK( x == Approx( 1.301 ) ) +with expansion: + 1.30000000000000027 +== +Approx( 1.30099999999999993 ) +at Condition.tests.cpp: + + + + + +FAILED: + CHECK( data.int_seven != 7 ) +with expansion: + 7 != 7 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one != Approx( 9.1f ) ) +with expansion: + 9.100000381f +!= +Approx( 9.10000038146972656 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.double_pi != Approx( 3.1415926535 ) ) +with expansion: + 3.14159265350000005 +!= +Approx( 3.14159265350000005 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello != "hello" ) +with expansion: + "hello" != "hello" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello.size() != 5 ) +with expansion: + 5 != 5 +at Condition.tests.cpp: + + + + + + +FAILED: +at Condition.tests.cpp: + + + + + +FAILED: +at Condition.tests.cpp: + + + + + +FAILED: +at Condition.tests.cpp: + + + + + +FAILED: +at Condition.tests.cpp: + + + + +FAILED: + CHECK( data.int_seven > 7 ) +with expansion: + 7 > 7 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven < 7 ) +with expansion: + 7 < 7 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven > 8 ) +with expansion: + 7 > 8 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven < 6 ) +with expansion: + 7 < 6 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven < 0 ) +with expansion: + 7 < 0 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven < -1 ) +with expansion: + 7 < -1 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven >= 8 ) +with expansion: + 7 >= 8 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven <= 6 ) +with expansion: + 7 <= 6 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one < 9 ) +with expansion: + 9.100000381f < 9 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one > 10 ) +with expansion: + 9.100000381f > 10 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one > 9.2 ) +with expansion: + 9.100000381f > 9.19999999999999929 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello > "hello" ) +with expansion: + "hello" > "hello" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello < "hello" ) +with expansion: + "hello" < "hello" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello > "hellp" ) +with expansion: + "hello" > "hellp" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello > "z" ) +with expansion: + "hello" > "z" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello < "hellm" ) +with expansion: + "hello" < "hellm" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello < "a" ) +with expansion: + "hello" < "a" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello >= "z" ) +with expansion: + "hello" >= "z" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello <= "a" ) +with expansion: + "hello" <= "a" +at Condition.tests.cpp: + + + + + + + + + + +FAILED: + CHECK( truthy(false) ) +with expansion: + Hey, its truthy! +at Decomposition.tests.cpp: + + + + + + + + + + + + + + + +FAILED: +expected exception +answer := 42 +at Exception.tests.cpp: + + + + +FAILED: + REQUIRE_NOTHROW( thisThrows() ) +expected exception +answer := 42 +at Exception.tests.cpp: + + + + + +FAILED: + {Unknown expression after the reported line} +unexpected exception +at Exception.tests.cpp: + + + + +FAILED: + REQUIRE_NOTHROW( throwCustom() ) +custom exception - not std +at Exception.tests.cpp: + + + + +FAILED: + REQUIRE_THROWS_AS( throwCustom(), std::exception ) +custom exception - not std +at Exception.tests.cpp: + + + + +FAILED: +custom std exception +at Exception.tests.cpp: + + + + + + + + +FAILED: + CHECK_THROWS_AS( thisThrows(), std::string ) +expected exception +at Exception.tests.cpp: + + +FAILED: + CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error ) +at Exception.tests.cpp: + + +FAILED: + CHECK_NOTHROW( thisThrows() ) +expected exception +at Exception.tests.cpp: + + + + +FAILED: + REQUIRE_THROWS_WITH( thisThrows(), "should fail" ) +with expansion: + "expected exception" equals: "should fail" +at Exception.tests.cpp: + + + + +FAILED: +custom exception +at Exception.tests.cpp: + + + + +FAILED: +For some reason someone is throwing a string literal! +at Exception.tests.cpp: + + + + +FAILED: +3.14000000000000012 +at Exception.tests.cpp: + + + + + +FAILED: +unexpected exception +at Exception.tests.cpp: + + + + +FAILED: + CHECK( thisThrows() == 0 ) +expected exception +at Exception.tests.cpp: + + + + +FAILED: + REQUIRE( thisThrows() == 0 ) +expected exception +at Exception.tests.cpp: + + + + +FAILED: + CHECK( thisThrows() == 0 ) +expected exception +at Exception.tests.cpp: + + + + +FAILED: +unexpected exception +at Exception.tests.cpp: + + + + + +FAILED: +Why would you throw a std::string? +at Exception.tests.cpp: + + + + + + + + +FAILED: +failure to init +at Generators.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: + CHECK_THAT( testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "not there" (case insensitive) +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "STRING" +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THAT( testStringForMatching(), EndsWith( "Substring" ) ) +with expansion: + "this string contains 'abc' as a substring" ends with: "Substring" +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" ends with: "this" (case insensitive) +at Matchers.tests.cpp: + + + + + +FAILED: + CHECK_THAT( testStringForMatching(), Equals( "this string contains 'ABC' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" equals: "this string contains 'ABC' as a substring" +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" equals: "something else" (case insensitive) +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) +at Matchers.tests.cpp: + + +FAILED: + REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) +Unknown exception +at Matchers.tests.cpp: + + +FAILED: + REQUIRE_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) +Unknown exception +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THROWS_MATCHES( throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } ) +with expansion: + SpecialException::what special exception has value of 1 +at Matchers.tests.cpp: + + +FAILED: + REQUIRE_THROWS_MATCHES( throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } ) +with expansion: + SpecialException::what special exception has value of 1 +at Matchers.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: + CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) ) +with expansion: + "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" ) +at Matchers.tests.cpp: + + + + + +FAILED: + CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) ) +with expansion: + "this string contains 'abc' as a substring" not contains: "substring" +at Matchers.tests.cpp: + + + + + + +FAILED: + CHECK_THAT( testStringForMatching(), Matches( "this STRING contains 'abc' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" matches "this STRING contains 'abc' as a substring" case sensitively +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), Matches( "contains 'abc' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" matches "contains 'abc' as a substring" case sensitively +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), Matches( "this string contains 'abc' as a" ) ) +with expansion: + "this string contains 'abc' as a substring" matches "this string contains 'abc' as a" case sensitively +at Matchers.tests.cpp: + + + + + +FAILED: + CHECK_THAT( testStringForMatching(), StartsWith( "This String" ) ) +with expansion: + "this string contains 'abc' as a substring" starts with: "This String" +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" starts with: "string" (case insensitive) +at Matchers.tests.cpp: + + + + + + + + + + + + +FAILED: + CHECK_THAT( empty, Approx( t1 ) ) +with expansion: + { } is approx: { 1.0, 2.0 } +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THAT( v1, Approx( v2 ) ) +with expansion: + { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 } +at Matchers.tests.cpp: + + + + + + + + + + + +FAILED: + CHECK_THAT( v, VectorContains( -1 ) ) +with expansion: + { 1, 2, 3 } Contains: -1 +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( empty, VectorContains( 1 ) ) +with expansion: + { } Contains: 1 +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THAT( empty, Contains( v ) ) +with expansion: + { } Contains: { 1, 2, 3 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( v, Contains( v2 ) ) +with expansion: + { 1, 2, 3 } Contains: { 1, 2, 4 } +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THAT( v, Equals( v2 ) ) +with expansion: + { 1, 2, 3 } Equals: { 1, 2 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( v2, Equals( v ) ) +with expansion: + { 1, 2 } Equals: { 1, 2, 3 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( empty, Equals( v ) ) +with expansion: + { } Equals: { 1, 2, 3 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( v, Equals( empty ) ) +with expansion: + { 1, 2, 3 } Equals: { } +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THAT( v, UnorderedEquals( empty ) ) +with expansion: + { 1, 2, 3 } UnorderedEquals: { } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( empty, UnorderedEquals( v ) ) +with expansion: + { } UnorderedEquals: { 1, 2, 3 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( permuted, UnorderedEquals( v ) ) +with expansion: + { 1, 3 } UnorderedEquals: { 1, 2, 3 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( permuted, UnorderedEquals( v ) ) +with expansion: + { 3, 1 } UnorderedEquals: { 1, 2, 3 } +at Matchers.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: +This is a failure +at Message.tests.cpp: + + + + +FAILED: +at Message.tests.cpp: + + + + +FAILED: +This is a failure +at Message.tests.cpp: + + + + +FAILED: +Show infos! +This info has multiple parts. +This unscoped info has multiple parts. +at Message.tests.cpp: + + + + + +FAILED: + REQUIRE( a == 1 ) +with expansion: + 2 == 1 +this message should be logged +so should this +at Message.tests.cpp: + + + + +FAILED: + CHECK( a == 1 ) +with expansion: + 2 == 1 +this message may be logged later +this message should be logged +at Message.tests.cpp: + + +FAILED: + CHECK( a == 0 ) +with expansion: + 2 == 0 +this message may be logged later +this message should be logged +and this, but later +at Message.tests.cpp: + + + + +FAILED: + REQUIRE( i < 10 ) +with expansion: + 10 < 10 +current counter 10 +i := 10 +at Message.tests.cpp: + + + + +FAILED: +Message from section one +at Message.tests.cpp: + + + + +FAILED: +Message from section two +at Message.tests.cpp: + + + + + + + + + + +FAILED: +Previous info should not be seen +at Message.tests.cpp: + + + + +FAILED: +previous unscoped info SHOULD not be seen +at Message.tests.cpp: + + + + + + + +FAILED: + REQUIRE( false ) +this SHOULD be seen +at Message.tests.cpp: + + + + + +FAILED: + REQUIRE( false ) +this SHOULD be seen +this SHOULD also be seen +at Message.tests.cpp: + + + + +FAILED: + CHECK( false ) +this SHOULD be seen only ONCE +at Message.tests.cpp: + + + + +FAILED: + REQUIRE( false ) +hi +i := 7 +at Message.tests.cpp: + + + + +FAILED: + CHECK( false ) +Count 1 to 3... +1 +2 +3 +at Message.tests.cpp: + + +FAILED: + CHECK( false ) +Count 4 to 6... +4 +5 +6 +at Message.tests.cpp: + + + + + + + + + + + +FAILED: + CHECK( f() == 0 ) +with expansion: + 1 == 0 +at Misc.tests.cpp: + + + + + + + + + + + + + + + + + + +FAILED: +to infinity and beyond +at Misc.tests.cpp: + + + + + + + + + + + + + + +FAILED: + CHECK( s1 == s2 ) +with expansion: + "if ($b == 10) { + $a = 20; +}" +== +"if ($b == 10) { + $a = 20; +} +" +at Misc.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: +at Misc.tests.cpp: + + + + +FAILED: +at Misc.tests.cpp: + + + + +FAILED: + {Unknown expression after the reported line} +Uncaught exception should fail! +at Misc.tests.cpp: + + + + +FAILED: + {Unknown expression after the reported line} +Uncaught exception should fail! +at Misc.tests.cpp: + + + + + + +FAILED: + REQUIRE( testCheckedElse( false ) ) +with expansion: + false +at Misc.tests.cpp: + + + + + +FAILED: + REQUIRE( testCheckedIf( false ) ) +with expansion: + false +at Misc.tests.cpp: + + + + + + + + + + + + +FAILED: + CHECK( b > a ) +with expansion: + 0 > 1 +at Misc.tests.cpp: + + + + +FAILED: + CHECK( b > a ) +with expansion: + 1 > 1 +at Misc.tests.cpp: + + + + + + + + + + + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[0] (1) is even +at Misc.tests.cpp: + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[1] (1) is even +at Misc.tests.cpp: + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[3] (3) is even +at Misc.tests.cpp: + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[4] (5) is even +at Misc.tests.cpp: + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[6] (13) is even +at Misc.tests.cpp: + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[7] (21) is even +at Misc.tests.cpp: + + + + + + +FAILED: + REQUIRE( a == b ) +with expansion: + 1 == 2 +at Misc.tests.cpp: + + + + + + + + + + + + + + + + +FAILED: + REQUIRE( false ) +3 +at Misc.tests.cpp: + + + + + + + + + + + + + + + + + + + +SKIPPED +This generator is empty +at Skip.tests.cpp: + + + + +SKIPPED +at Skip.tests.cpp: + + + + +SKIPPED +skipping because answer = 41 +at Skip.tests.cpp: + + +SKIPPED +skipping because answer = 43 +at Skip.tests.cpp: + + + + +FAILED: + CHECK( 3 == 4 ) +at Skip.tests.cpp: + + +SKIPPED +at Skip.tests.cpp: + + + + +FAILED: +at Skip.tests.cpp: + + +SKIPPED +at Skip.tests.cpp: + + +FAILED: +at Skip.tests.cpp: + + +SKIPPED +at Skip.tests.cpp: + + + + +SKIPPED +at Skip.tests.cpp: + + + + +FAILED: +at Skip.tests.cpp: + + + + + + + +SKIPPED +at Skip.tests.cpp: + + + + + + + +SKIPPED +at Skip.tests.cpp: + + + + + +SKIPPED +skipping because answer = 43 +at Skip.tests.cpp: + + + + +SKIPPED +at Skip.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: +1514 +at Tricky.tests.cpp: + + + + + + + + + + +FAILED: + CHECK( &o1 == &o2 ) +with expansion: + 0x == 0x +at Tricky.tests.cpp: + + +FAILED: + CHECK( o1 == o2 ) +with expansion: + {?} == {?} +at Tricky.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt b/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt new file mode 100644 index 0000000..2d8d510 --- /dev/null +++ b/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt @@ -0,0 +1,2316 @@ + + + + + + +FAILED: + REQUIRE( Dummy ) +Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE +at AssertionHandler.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: + REQUIRE( s == "world" ) +with expansion: + "hello" == "world" +at Class.tests.cpp: + + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) +with expansion: + 0 == 1 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) +with expansion: + 0 == 1 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) +with expansion: + 0 == 1 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) +with expansion: + 0 == 1 +at Class.tests.cpp: + + + + + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) +with expansion: + 6 < 2 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) +with expansion: + 2 < 2 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) +with expansion: + 6 < 2 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) +with expansion: + 2 < 2 +at Class.tests.cpp: + + + + + + + + +FAILED: + REQUIRE( Template_Fixture<TestType>::m_a == 2 ) +with expansion: + 1.0 == 2 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture<TestType>::m_a == 2 ) +with expansion: + 1.0f == 2 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Template_Fixture<TestType>::m_a == 2 ) +with expansion: + 1 == 2 +at Class.tests.cpp: + + + + + + + +FAILED: + REQUIRE( Nttp_Fixture<V>::value == 0 ) +with expansion: + 1 == 0 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Nttp_Fixture<V>::value == 0 ) +with expansion: + 3 == 0 +at Class.tests.cpp: + + + + +FAILED: + REQUIRE( Nttp_Fixture<V>::value == 0 ) +with expansion: + 6 == 0 +at Class.tests.cpp: + + + + + + + +FAILED: + REQUIRE( m_a == 2 ) +with expansion: + 1 == 2 +at Class.tests.cpp: + + + + + + +FAILED: + REQUIRE( m_a == 0 ) +with expansion: + 1 == 0 +at Class.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: + CHECK( false != false ) +at Condition.tests.cpp: + + +FAILED: + CHECK( true != true ) +at Condition.tests.cpp: + + +FAILED: + CHECK( !true ) +with expansion: + false +at Condition.tests.cpp: + + +FAILED: + CHECK_FALSE( true ) +with expansion: + !true +at Condition.tests.cpp: + + +FAILED: + CHECK( !trueValue ) +with expansion: + false +at Condition.tests.cpp: + + +FAILED: + CHECK_FALSE( trueValue ) +with expansion: + !true +at Condition.tests.cpp: + + +FAILED: + CHECK( !(1 == 1) ) +with expansion: + false +at Condition.tests.cpp: + + +FAILED: + CHECK_FALSE( 1 == 1 ) +at Condition.tests.cpp: + + + + + + + + +FAILED: + CHECK( data.int_seven == 6 ) +with expansion: + 7 == 6 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven == 8 ) +with expansion: + 7 == 8 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven == 0 ) +with expansion: + 7 == 0 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one == Approx( 9.11f ) ) +with expansion: + 9.100000381f +== +Approx( 9.10999965667724609 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one == Approx( 9.0f ) ) +with expansion: + 9.100000381f == Approx( 9.0 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one == Approx( 1 ) ) +with expansion: + 9.100000381f == Approx( 1.0 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one == Approx( 0 ) ) +with expansion: + 9.100000381f == Approx( 0.0 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.double_pi == Approx( 3.1415 ) ) +with expansion: + 3.14159265350000005 +== +Approx( 3.14150000000000018 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello == "goodbye" ) +with expansion: + "hello" == "goodbye" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello == "hell" ) +with expansion: + "hello" == "hell" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello == "hello1" ) +with expansion: + "hello" == "hello1" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello.size() == 6 ) +with expansion: + 5 == 6 +at Condition.tests.cpp: + + +FAILED: + CHECK( x == Approx( 1.301 ) ) +with expansion: + 1.30000000000000027 +== +Approx( 1.30099999999999993 ) +at Condition.tests.cpp: + + + + + +FAILED: + CHECK( data.int_seven != 7 ) +with expansion: + 7 != 7 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one != Approx( 9.1f ) ) +with expansion: + 9.100000381f +!= +Approx( 9.10000038146972656 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.double_pi != Approx( 3.1415926535 ) ) +with expansion: + 3.14159265350000005 +!= +Approx( 3.14159265350000005 ) +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello != "hello" ) +with expansion: + "hello" != "hello" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello.size() != 5 ) +with expansion: + 5 != 5 +at Condition.tests.cpp: + + + + + + +FAILED: +at Condition.tests.cpp: + + + + + +FAILED: +at Condition.tests.cpp: + + + + + +FAILED: +at Condition.tests.cpp: + + + + + +FAILED: +at Condition.tests.cpp: + + + + +FAILED: + CHECK( data.int_seven > 7 ) +with expansion: + 7 > 7 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven < 7 ) +with expansion: + 7 < 7 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven > 8 ) +with expansion: + 7 > 8 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven < 6 ) +with expansion: + 7 < 6 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven < 0 ) +with expansion: + 7 < 0 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven < -1 ) +with expansion: + 7 < -1 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven >= 8 ) +with expansion: + 7 >= 8 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.int_seven <= 6 ) +with expansion: + 7 <= 6 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one < 9 ) +with expansion: + 9.100000381f < 9 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one > 10 ) +with expansion: + 9.100000381f > 10 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.float_nine_point_one > 9.2 ) +with expansion: + 9.100000381f > 9.19999999999999929 +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello > "hello" ) +with expansion: + "hello" > "hello" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello < "hello" ) +with expansion: + "hello" < "hello" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello > "hellp" ) +with expansion: + "hello" > "hellp" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello > "z" ) +with expansion: + "hello" > "z" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello < "hellm" ) +with expansion: + "hello" < "hellm" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello < "a" ) +with expansion: + "hello" < "a" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello >= "z" ) +with expansion: + "hello" >= "z" +at Condition.tests.cpp: + + +FAILED: + CHECK( data.str_hello <= "a" ) +with expansion: + "hello" <= "a" +at Condition.tests.cpp: + + + + + + + + + + +FAILED: + CHECK( truthy(false) ) +with expansion: + Hey, its truthy! +at Decomposition.tests.cpp: + + + + + + + + + + + + + + + +FAILED: +expected exception +answer := 42 +at Exception.tests.cpp: + + + + +FAILED: + REQUIRE_NOTHROW( thisThrows() ) +expected exception +answer := 42 +at Exception.tests.cpp: + + + + + +FAILED: + {Unknown expression after the reported line} +unexpected exception +at Exception.tests.cpp: + + + + +FAILED: + REQUIRE_NOTHROW( throwCustom() ) +custom exception - not std +at Exception.tests.cpp: + + + + +FAILED: + REQUIRE_THROWS_AS( throwCustom(), std::exception ) +custom exception - not std +at Exception.tests.cpp: + + + + +FAILED: +custom std exception +at Exception.tests.cpp: + + + + + + + + +FAILED: + CHECK_THROWS_AS( thisThrows(), std::string ) +expected exception +at Exception.tests.cpp: + + +FAILED: + CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error ) +at Exception.tests.cpp: + + +FAILED: + CHECK_NOTHROW( thisThrows() ) +expected exception +at Exception.tests.cpp: + + + + +FAILED: + REQUIRE_THROWS_WITH( thisThrows(), "should fail" ) +with expansion: + "expected exception" equals: "should fail" +at Exception.tests.cpp: + + + + +FAILED: +custom exception +at Exception.tests.cpp: + + + + +FAILED: +For some reason someone is throwing a string literal! +at Exception.tests.cpp: + + + + +FAILED: +3.14000000000000012 +at Exception.tests.cpp: + + + + + +FAILED: +unexpected exception +at Exception.tests.cpp: + + + + +FAILED: + CHECK( thisThrows() == 0 ) +expected exception +at Exception.tests.cpp: + + + + +FAILED: + REQUIRE( thisThrows() == 0 ) +expected exception +at Exception.tests.cpp: + + + + +FAILED: + CHECK( thisThrows() == 0 ) +expected exception +at Exception.tests.cpp: + + + + +FAILED: +unexpected exception +at Exception.tests.cpp: + + + + + +FAILED: +Why would you throw a std::string? +at Exception.tests.cpp: + + + + + + + + +FAILED: +failure to init +at Generators.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: + CHECK_THAT( testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "not there" (case insensitive) +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "STRING" +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THAT( testStringForMatching(), EndsWith( "Substring" ) ) +with expansion: + "this string contains 'abc' as a substring" ends with: "Substring" +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" ends with: "this" (case insensitive) +at Matchers.tests.cpp: + + + + + +FAILED: + CHECK_THAT( testStringForMatching(), Equals( "this string contains 'ABC' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" equals: "this string contains 'ABC' as a substring" +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" equals: "something else" (case insensitive) +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) +at Matchers.tests.cpp: + + +FAILED: + REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) +Unknown exception +at Matchers.tests.cpp: + + +FAILED: + REQUIRE_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) +Unknown exception +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THROWS_MATCHES( throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } ) +with expansion: + SpecialException::what special exception has value of 1 +at Matchers.tests.cpp: + + +FAILED: + REQUIRE_THROWS_MATCHES( throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } ) +with expansion: + SpecialException::what special exception has value of 1 +at Matchers.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: + CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) ) +with expansion: + "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" ) +at Matchers.tests.cpp: + + + + + +FAILED: + CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) ) +with expansion: + "this string contains 'abc' as a substring" not contains: "substring" +at Matchers.tests.cpp: + + + + + + +FAILED: + CHECK_THAT( testStringForMatching(), Matches( "this STRING contains 'abc' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" matches "this STRING contains 'abc' as a substring" case sensitively +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), Matches( "contains 'abc' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" matches "contains 'abc' as a substring" case sensitively +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), Matches( "this string contains 'abc' as a" ) ) +with expansion: + "this string contains 'abc' as a substring" matches "this string contains 'abc' as a" case sensitively +at Matchers.tests.cpp: + + + + + +FAILED: + CHECK_THAT( testStringForMatching(), StartsWith( "This String" ) ) +with expansion: + "this string contains 'abc' as a substring" starts with: "This String" +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) ) +with expansion: + "this string contains 'abc' as a substring" starts with: "string" (case insensitive) +at Matchers.tests.cpp: + + + + + + + + + + + + +FAILED: + CHECK_THAT( empty, Approx( t1 ) ) +with expansion: + { } is approx: { 1.0, 2.0 } +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THAT( v1, Approx( v2 ) ) +with expansion: + { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 } +at Matchers.tests.cpp: + + + + + + + + + + + +FAILED: + CHECK_THAT( v, VectorContains( -1 ) ) +with expansion: + { 1, 2, 3 } Contains: -1 +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( empty, VectorContains( 1 ) ) +with expansion: + { } Contains: 1 +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THAT( empty, Contains( v ) ) +with expansion: + { } Contains: { 1, 2, 3 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( v, Contains( v2 ) ) +with expansion: + { 1, 2, 3 } Contains: { 1, 2, 4 } +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THAT( v, Equals( v2 ) ) +with expansion: + { 1, 2, 3 } Equals: { 1, 2 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( v2, Equals( v ) ) +with expansion: + { 1, 2 } Equals: { 1, 2, 3 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( empty, Equals( v ) ) +with expansion: + { } Equals: { 1, 2, 3 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( v, Equals( empty ) ) +with expansion: + { 1, 2, 3 } Equals: { } +at Matchers.tests.cpp: + + + + +FAILED: + CHECK_THAT( v, UnorderedEquals( empty ) ) +with expansion: + { 1, 2, 3 } UnorderedEquals: { } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( empty, UnorderedEquals( v ) ) +with expansion: + { } UnorderedEquals: { 1, 2, 3 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( permuted, UnorderedEquals( v ) ) +with expansion: + { 1, 3 } UnorderedEquals: { 1, 2, 3 } +at Matchers.tests.cpp: + + +FAILED: + CHECK_THAT( permuted, UnorderedEquals( v ) ) +with expansion: + { 3, 1 } UnorderedEquals: { 1, 2, 3 } +at Matchers.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: +This is a failure +at Message.tests.cpp: + + + + +FAILED: +at Message.tests.cpp: + + + + +FAILED: +This is a failure +at Message.tests.cpp: + + + + +FAILED: +Show infos! +This info has multiple parts. +This unscoped info has multiple parts. +at Message.tests.cpp: + + + + + +FAILED: + REQUIRE( a == 1 ) +with expansion: + 2 == 1 +this message should be logged +so should this +at Message.tests.cpp: + + + + +FAILED: + CHECK( a == 1 ) +with expansion: + 2 == 1 +this message may be logged later +this message should be logged +at Message.tests.cpp: + + +FAILED: + CHECK( a == 0 ) +with expansion: + 2 == 0 +this message may be logged later +this message should be logged +and this, but later +at Message.tests.cpp: + + + + +FAILED: + REQUIRE( i < 10 ) +with expansion: + 10 < 10 +current counter 10 +i := 10 +at Message.tests.cpp: + + + + +FAILED: +Message from section one +at Message.tests.cpp: + + + + +FAILED: +Message from section two +at Message.tests.cpp: + + + + + + + + + + +FAILED: +Previous info should not be seen +at Message.tests.cpp: + + + + +FAILED: +previous unscoped info SHOULD not be seen +at Message.tests.cpp: + + + + + + + +FAILED: + REQUIRE( false ) +this SHOULD be seen +at Message.tests.cpp: + + + + + +FAILED: + REQUIRE( false ) +this SHOULD be seen +this SHOULD also be seen +at Message.tests.cpp: + + + + +FAILED: + CHECK( false ) +this SHOULD be seen only ONCE +at Message.tests.cpp: + + + + +FAILED: + REQUIRE( false ) +hi +i := 7 +at Message.tests.cpp: + + + + +FAILED: + CHECK( false ) +Count 1 to 3... +1 +2 +3 +at Message.tests.cpp: + + +FAILED: + CHECK( false ) +Count 4 to 6... +4 +5 +6 +at Message.tests.cpp: + + + + + + + + + + + +FAILED: + CHECK( f() == 0 ) +with expansion: + 1 == 0 +at Misc.tests.cpp: + + + + + + + + + + + + + + + + + + +FAILED: +to infinity and beyond +at Misc.tests.cpp: + + + + + + + + + + + + + + +FAILED: + CHECK( s1 == s2 ) +with expansion: + "if ($b == 10) { + $a = 20; +}" +== +"if ($b == 10) { + $a = 20; +} +" +at Misc.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: +at Misc.tests.cpp: + + + + +FAILED: +at Misc.tests.cpp: + + + + +FAILED: + {Unknown expression after the reported line} +Uncaught exception should fail! +at Misc.tests.cpp: + + + + +FAILED: + {Unknown expression after the reported line} +Uncaught exception should fail! +at Misc.tests.cpp: + + + + + + +FAILED: + REQUIRE( testCheckedElse( false ) ) +with expansion: + false +at Misc.tests.cpp: + + + + + +FAILED: + REQUIRE( testCheckedIf( false ) ) +with expansion: + false +at Misc.tests.cpp: + + + + + + + + + + + + +FAILED: + CHECK( b > a ) +with expansion: + 0 > 1 +at Misc.tests.cpp: + + + + +FAILED: + CHECK( b > a ) +with expansion: + 1 > 1 +at Misc.tests.cpp: + + + + + + + + + + + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[0] (1) is even +at Misc.tests.cpp: + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[1] (1) is even +at Misc.tests.cpp: + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[3] (3) is even +at Misc.tests.cpp: + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[4] (5) is even +at Misc.tests.cpp: + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[6] (13) is even +at Misc.tests.cpp: + + +FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +Testing if fib[7] (21) is even +at Misc.tests.cpp: + + + + + + +FAILED: + REQUIRE( a == b ) +with expansion: + 1 == 2 +at Misc.tests.cpp: + + + + + + + + + + + + + + + + +FAILED: + REQUIRE( false ) +3 +at Misc.tests.cpp: + + + + + + + + + + + + + + + + + + + +SKIPPED +This generator is empty +at Skip.tests.cpp: + + + + +SKIPPED +at Skip.tests.cpp: + + + + +SKIPPED +skipping because answer = 41 +at Skip.tests.cpp: + + +SKIPPED +skipping because answer = 43 +at Skip.tests.cpp: + + + + +FAILED: + CHECK( 3 == 4 ) +at Skip.tests.cpp: + + +SKIPPED +at Skip.tests.cpp: + + + + +FAILED: +at Skip.tests.cpp: + + +SKIPPED +at Skip.tests.cpp: + + +FAILED: +at Skip.tests.cpp: + + +SKIPPED +at Skip.tests.cpp: + + + + +SKIPPED +at Skip.tests.cpp: + + + + +FAILED: +at Skip.tests.cpp: + + + + + + + +SKIPPED +at Skip.tests.cpp: + + + + + + + +SKIPPED +at Skip.tests.cpp: + + + + + +SKIPPED +skipping because answer = 43 +at Skip.tests.cpp: + + + + +SKIPPED +at Skip.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FAILED: +1514 +at Tricky.tests.cpp: + + + + + + + + + + +FAILED: + CHECK( &o1 == &o2 ) +with expansion: + 0x == 0x +at Tricky.tests.cpp: + + +FAILED: + CHECK( o1 == o2 ) +with expansion: + {?} == {?} +at Tricky.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/SelfTest/Baselines/tap.sw.approved.txt b/tests/SelfTest/Baselines/tap.sw.approved.txt new file mode 100644 index 0000000..801946d --- /dev/null +++ b/tests/SelfTest/Baselines/tap.sw.approved.txt @@ -0,0 +1,4571 @@ +# filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals] +# rng-seed: 1 +# # A test name that starts with a # +ok {test-number} - with 1 message: 'yay' +# #1027: Bitfields can be captured +ok {test-number} - y.v == 0 for: 0 == 0 +# #1027: Bitfields can be captured +ok {test-number} - 0 == y.v for: 0 == 0 +# #1147 +ok {test-number} - t1 == t2 for: {?} == {?} +# #1147 +ok {test-number} - t1 != t2 for: {?} != {?} +# #1147 +ok {test-number} - t1 < t2 for: {?} < {?} +# #1147 +ok {test-number} - t1 > t2 for: {?} > {?} +# #1147 +ok {test-number} - t1 <= t2 for: {?} <= {?} +# #1147 +ok {test-number} - t1 >= t2 for: {?} >= {?} +# #1175 - Hidden Test +ok {test-number} - +# #1238 +ok {test-number} - std::memcmp(uarr, "123", sizeof(uarr)) == 0 for: 0 == 0 with 2 messages: 'uarr := "123"' and 'sarr := "456"' +# #1238 +ok {test-number} - std::memcmp(sarr, "456", sizeof(sarr)) == 0 for: 0 == 0 with 2 messages: 'uarr := "123"' and 'sarr := "456"' +# #1245 +ok {test-number} - +# #1319: Sections can have description (even if it is not saved +ok {test-number} - +# #1403 +ok {test-number} - h1 == h2 for: [1403 helper] == [1403 helper] +# #1455 - INFO and WARN can start with a linebreak +warning {test-number} - ' +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 +# #1514: stderr/stdout is not captured in tests aborted by an exception +not ok {test-number} - explicitly with 1 message: '1514' +# #1548 +ok {test-number} - std::is_same, TypeList>::value for: true +# #1905 -- test spec parser properly clears internal state between compound tests +ok {test-number} - spec.matches(*fakeTestCase("spec . char")) for: true +# #1905 -- test spec parser properly clears internal state between compound tests +ok {test-number} - spec.matches(*fakeTestCase("spec , char")) for: true +# #1905 -- test spec parser properly clears internal state between compound tests +ok {test-number} - !(spec.matches(*fakeTestCase(R"(spec \, char)"))) for: !false +# #1912 -- test spec parser handles escaping +ok {test-number} - spec.matches(*fakeTestCase(R"(spec {a} char)")) for: true +# #1912 -- test spec parser handles escaping +ok {test-number} - spec.matches(*fakeTestCase(R"(spec [a] char)")) for: true +# #1912 -- test spec parser handles escaping +ok {test-number} - !(spec.matches(*fakeTestCase("differs but has similar tag", "[a]"))) for: !false +# #1912 -- test spec parser handles escaping +ok {test-number} - spec.matches(*fakeTestCase(R"(spec \ char)")) for: true +# #1913 - GENERATE inside a for loop should not keep recreating the generator +ok {test-number} - counter < 7 for: 3 < 7 +# #1913 - GENERATE inside a for loop should not keep recreating the generator +ok {test-number} - counter < 7 for: 6 < 7 +# #1913 - GENERATEs can share a line +ok {test-number} - i != j for: 1 != 3 +# #1913 - GENERATEs can share a line +ok {test-number} - i != j for: 1 != 4 +# #1913 - GENERATEs can share a line +ok {test-number} - i != j for: 2 != 3 +# #1913 - GENERATEs can share a line +ok {test-number} - i != j for: 2 != 4 +# #1938 - GENERATE after a section +ok {test-number} - with 1 message: 'A' +# #1938 - GENERATE after a section +ok {test-number} - m for: 1 +# #1938 - GENERATE after a section +ok {test-number} - m for: 2 +# #1938 - GENERATE after a section +ok {test-number} - m for: 3 +# #1938 - Section followed by flat generate +ok {test-number} - 1 +# #1938 - Section followed by flat generate +ok {test-number} - m for: 2 +# #1938 - Section followed by flat generate +ok {test-number} - m for: 3 +# #1938 - flat generate +ok {test-number} - m for: 1 +# #1938 - flat generate +ok {test-number} - m for: 2 +# #1938 - flat generate +ok {test-number} - m for: 3 +# #1938 - mixed sections and generates +ok {test-number} - with 1 message: 'A' +# #1938 - mixed sections and generates +ok {test-number} - with 3 messages: 'i := 1' and 'j := 3' and 'k := 5' +# #1938 - mixed sections and generates +ok {test-number} - with 1 message: 'B' +# #1938 - mixed sections and generates +ok {test-number} - with 3 messages: 'i := 1' and 'j := 3' and 'k := 6' +# #1938 - mixed sections and generates +ok {test-number} - with 1 message: 'B' +# #1938 - mixed sections and generates +ok {test-number} - with 3 messages: 'i := 1' and 'j := 4' and 'k := 5' +# #1938 - mixed sections and generates +ok {test-number} - with 3 messages: 'i := 1' and 'j := 4' and 'k := 6' +# #1938 - mixed sections and generates +ok {test-number} - with 1 message: 'A' +# #1938 - mixed sections and generates +ok {test-number} - with 3 messages: 'i := 2' and 'j := 3' and 'k := 5' +# #1938 - mixed sections and generates +ok {test-number} - with 1 message: 'B' +# #1938 - mixed sections and generates +ok {test-number} - with 3 messages: 'i := 2' and 'j := 3' and 'k := 6' +# #1938 - mixed sections and generates +ok {test-number} - with 1 message: 'B' +# #1938 - mixed sections and generates +ok {test-number} - with 3 messages: 'i := 2' and 'j := 4' and 'k := 5' +# #1938 - mixed sections and generates +ok {test-number} - with 3 messages: 'i := 2' and 'j := 4' and 'k := 6' +# #1938 - nested generate +ok {test-number} - m for: 1 +# #1938 - nested generate +ok {test-number} - n for: 1 +# #1938 - nested generate +ok {test-number} - m for: 1 +# #1938 - nested generate +ok {test-number} - n for: 2 +# #1938 - nested generate +ok {test-number} - m for: 1 +# #1938 - nested generate +ok {test-number} - n for: 3 +# #1938 - nested generate +ok {test-number} - m for: 2 +# #1938 - nested generate +ok {test-number} - n for: 1 +# #1938 - nested generate +ok {test-number} - m for: 2 +# #1938 - nested generate +ok {test-number} - n for: 2 +# #1938 - nested generate +ok {test-number} - m for: 2 +# #1938 - nested generate +ok {test-number} - n for: 3 +# #1938 - nested generate +ok {test-number} - m for: 3 +# #1938 - nested generate +ok {test-number} - n for: 1 +# #1938 - nested generate +ok {test-number} - m for: 3 +# #1938 - nested generate +ok {test-number} - n for: 2 +# #1938 - nested generate +ok {test-number} - m for: 3 +# #1938 - nested generate +ok {test-number} - n for: 3 +# #1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0 +ok {test-number} - +# #1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0 +ok {test-number} - +# #1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0 +ok {test-number} - +# #2152 - ULP checks between differently signed values were wrong - double +ok {test-number} - smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) for: 0.0 is within 2 ULPs of -4.9406564584124654e-324 ([-1.4821969375237396e-323, 4.9406564584124654e-324]) +# #2152 - ULP checks between differently signed values were wrong - double +ok {test-number} - smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) for: 0.0 not is within 1 ULPs of -4.9406564584124654e-324 ([-9.8813129168249309e-324, -0.0000000000000000e+00]) +# #2152 - ULP checks between differently signed values were wrong - float +ok {test-number} - smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) for: 0.0f is within 2 ULPs of -1.40129846e-45f ([-4.20389539e-45, 1.40129846e-45]) +# #2152 - ULP checks between differently signed values were wrong - float +ok {test-number} - smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) for: 0.0f not is within 1 ULPs of -1.40129846e-45f ([-2.80259693e-45, -0.00000000e+00]) +# #2615 - Throwing in constructor generator fails test case but does not abort +not ok {test-number} - unexpected exception with message: 'failure to init' +# #748 - captures with unexpected exceptions +not ok {test-number} - unexpected exception with message: 'answer := 42' with 1 message: 'expected exception' +# #748 - captures with unexpected exceptions +not ok {test-number} - unexpected exception with message: 'answer := 42'; expression was: thisThrows() with 1 message: 'expected exception' +# #748 - captures with unexpected exceptions +ok {test-number} - thisThrows() with 1 message: 'answer := 42' +# #809 +ok {test-number} - 42 == f for: 42 == {?} +# #833 +ok {test-number} - a == t for: 3 == 3 +# #833 +ok {test-number} - a == t for: 3 == 3 +# #833 +ok {test-number} - throws_int(true) +# #833 +ok {test-number} - throws_int(true), int +# #833 +ok {test-number} - throws_int(false) +# #833 +ok {test-number} - "aaa", Catch::Matchers::EndsWith("aaa") for: "aaa" ends with: "aaa" +# #833 +ok {test-number} - templated_tests(3) for: true +# #835 -- errno should not be touched by Catch2 +not ok {test-number} - f() == 0 for: 1 == 0 +# #835 -- errno should not be touched by Catch2 +ok {test-number} - errno_after == 1 for: 1 == 1 +# #872 +ok {test-number} - x == 4 for: {?} == 4 with 1 message: 'dummy := 0' +# #961 -- Dynamically created sections should all be reported +ok {test-number} - with 1 message: 'Everything is OK' +# #961 -- Dynamically created sections should all be reported +ok {test-number} - with 1 message: 'Everything is OK' +# #961 -- Dynamically created sections should all be reported +ok {test-number} - with 1 message: 'Everything is OK' +# #961 -- Dynamically created sections should all be reported +ok {test-number} - with 1 message: 'Everything is OK' +# #961 -- Dynamically created sections should all be reported +ok {test-number} - with 1 message: 'Everything is OK' +# 'Not' checks that should fail +not ok {test-number} - false != false +# 'Not' checks that should fail +not ok {test-number} - true != true +# 'Not' checks that should fail +not ok {test-number} - !true for: false +# 'Not' checks that should fail +not ok {test-number} - !(true) for: !true +# 'Not' checks that should fail +not ok {test-number} - !trueValue for: false +# 'Not' checks that should fail +not ok {test-number} - !(trueValue) for: !true +# 'Not' checks that should fail +not ok {test-number} - !(1 == 1) for: false +# 'Not' checks that should fail +not ok {test-number} - !(1 == 1) +# 'Not' checks that should succeed +ok {test-number} - false == false +# 'Not' checks that should succeed +ok {test-number} - true == true +# 'Not' checks that should succeed +ok {test-number} - !false for: true +# 'Not' checks that should succeed +ok {test-number} - !(false) for: !false +# 'Not' checks that should succeed +ok {test-number} - !falseValue for: true +# 'Not' checks that should succeed +ok {test-number} - !(falseValue) for: !false +# 'Not' checks that should succeed +ok {test-number} - !(1 == 2) for: true +# 'Not' checks that should succeed +ok {test-number} - !(1 == 2) +# (unimplemented) static bools can be evaluated +ok {test-number} - is_true::value == true for: true == true +# (unimplemented) static bools can be evaluated +ok {test-number} - true == is_true::value for: true == true +# (unimplemented) static bools can be evaluated +ok {test-number} - is_true::value == false for: false == false +# (unimplemented) static bools can be evaluated +ok {test-number} - false == is_true::value for: false == false +# (unimplemented) static bools can be evaluated +ok {test-number} - !is_true::value for: true +# (unimplemented) static bools can be evaluated +ok {test-number} - !!is_true::value for: true +# (unimplemented) static bools can be evaluated +ok {test-number} - is_true::value for: true +# (unimplemented) static bools can be evaluated +ok {test-number} - !(is_true::value) for: !false +# 3x3x3 ints +ok {test-number} - x < y for: 1 < 4 +# 3x3x3 ints +ok {test-number} - y < z for: 4 < 7 +# 3x3x3 ints +ok {test-number} - x < z for: 1 < 7 +# 3x3x3 ints +ok {test-number} - x < y for: 1 < 4 +# 3x3x3 ints +ok {test-number} - y < z for: 4 < 8 +# 3x3x3 ints +ok {test-number} - x < z for: 1 < 8 +# 3x3x3 ints +ok {test-number} - x < y for: 1 < 4 +# 3x3x3 ints +ok {test-number} - y < z for: 4 < 9 +# 3x3x3 ints +ok {test-number} - x < z for: 1 < 9 +# 3x3x3 ints +ok {test-number} - x < y for: 1 < 5 +# 3x3x3 ints +ok {test-number} - y < z for: 5 < 7 +# 3x3x3 ints +ok {test-number} - x < z for: 1 < 7 +# 3x3x3 ints +ok {test-number} - x < y for: 1 < 5 +# 3x3x3 ints +ok {test-number} - y < z for: 5 < 8 +# 3x3x3 ints +ok {test-number} - x < z for: 1 < 8 +# 3x3x3 ints +ok {test-number} - x < y for: 1 < 5 +# 3x3x3 ints +ok {test-number} - y < z for: 5 < 9 +# 3x3x3 ints +ok {test-number} - x < z for: 1 < 9 +# 3x3x3 ints +ok {test-number} - x < y for: 1 < 6 +# 3x3x3 ints +ok {test-number} - y < z for: 6 < 7 +# 3x3x3 ints +ok {test-number} - x < z for: 1 < 7 +# 3x3x3 ints +ok {test-number} - x < y for: 1 < 6 +# 3x3x3 ints +ok {test-number} - y < z for: 6 < 8 +# 3x3x3 ints +ok {test-number} - x < z for: 1 < 8 +# 3x3x3 ints +ok {test-number} - x < y for: 1 < 6 +# 3x3x3 ints +ok {test-number} - y < z for: 6 < 9 +# 3x3x3 ints +ok {test-number} - x < z for: 1 < 9 +# 3x3x3 ints +ok {test-number} - x < y for: 2 < 4 +# 3x3x3 ints +ok {test-number} - y < z for: 4 < 7 +# 3x3x3 ints +ok {test-number} - x < z for: 2 < 7 +# 3x3x3 ints +ok {test-number} - x < y for: 2 < 4 +# 3x3x3 ints +ok {test-number} - y < z for: 4 < 8 +# 3x3x3 ints +ok {test-number} - x < z for: 2 < 8 +# 3x3x3 ints +ok {test-number} - x < y for: 2 < 4 +# 3x3x3 ints +ok {test-number} - y < z for: 4 < 9 +# 3x3x3 ints +ok {test-number} - x < z for: 2 < 9 +# 3x3x3 ints +ok {test-number} - x < y for: 2 < 5 +# 3x3x3 ints +ok {test-number} - y < z for: 5 < 7 +# 3x3x3 ints +ok {test-number} - x < z for: 2 < 7 +# 3x3x3 ints +ok {test-number} - x < y for: 2 < 5 +# 3x3x3 ints +ok {test-number} - y < z for: 5 < 8 +# 3x3x3 ints +ok {test-number} - x < z for: 2 < 8 +# 3x3x3 ints +ok {test-number} - x < y for: 2 < 5 +# 3x3x3 ints +ok {test-number} - y < z for: 5 < 9 +# 3x3x3 ints +ok {test-number} - x < z for: 2 < 9 +# 3x3x3 ints +ok {test-number} - x < y for: 2 < 6 +# 3x3x3 ints +ok {test-number} - y < z for: 6 < 7 +# 3x3x3 ints +ok {test-number} - x < z for: 2 < 7 +# 3x3x3 ints +ok {test-number} - x < y for: 2 < 6 +# 3x3x3 ints +ok {test-number} - y < z for: 6 < 8 +# 3x3x3 ints +ok {test-number} - x < z for: 2 < 8 +# 3x3x3 ints +ok {test-number} - x < y for: 2 < 6 +# 3x3x3 ints +ok {test-number} - y < z for: 6 < 9 +# 3x3x3 ints +ok {test-number} - x < z for: 2 < 9 +# 3x3x3 ints +ok {test-number} - x < y for: 3 < 4 +# 3x3x3 ints +ok {test-number} - y < z for: 4 < 7 +# 3x3x3 ints +ok {test-number} - x < z for: 3 < 7 +# 3x3x3 ints +ok {test-number} - x < y for: 3 < 4 +# 3x3x3 ints +ok {test-number} - y < z for: 4 < 8 +# 3x3x3 ints +ok {test-number} - x < z for: 3 < 8 +# 3x3x3 ints +ok {test-number} - x < y for: 3 < 4 +# 3x3x3 ints +ok {test-number} - y < z for: 4 < 9 +# 3x3x3 ints +ok {test-number} - x < z for: 3 < 9 +# 3x3x3 ints +ok {test-number} - x < y for: 3 < 5 +# 3x3x3 ints +ok {test-number} - y < z for: 5 < 7 +# 3x3x3 ints +ok {test-number} - x < z for: 3 < 7 +# 3x3x3 ints +ok {test-number} - x < y for: 3 < 5 +# 3x3x3 ints +ok {test-number} - y < z for: 5 < 8 +# 3x3x3 ints +ok {test-number} - x < z for: 3 < 8 +# 3x3x3 ints +ok {test-number} - x < y for: 3 < 5 +# 3x3x3 ints +ok {test-number} - y < z for: 5 < 9 +# 3x3x3 ints +ok {test-number} - x < z for: 3 < 9 +# 3x3x3 ints +ok {test-number} - x < y for: 3 < 6 +# 3x3x3 ints +ok {test-number} - y < z for: 6 < 7 +# 3x3x3 ints +ok {test-number} - x < z for: 3 < 7 +# 3x3x3 ints +ok {test-number} - x < y for: 3 < 6 +# 3x3x3 ints +ok {test-number} - y < z for: 6 < 8 +# 3x3x3 ints +ok {test-number} - x < z for: 3 < 8 +# 3x3x3 ints +ok {test-number} - x < y for: 3 < 6 +# 3x3x3 ints +ok {test-number} - y < z for: 6 < 9 +# 3x3x3 ints +ok {test-number} - x < z for: 3 < 9 +# A METHOD_AS_TEST_CASE based test run that fails +not ok {test-number} - s == "world" for: "hello" == "world" +# A METHOD_AS_TEST_CASE based test run that succeeds +ok {test-number} - s == "hello" for: "hello" == "hello" +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo +not ok {test-number} - Template_Fixture_2::m_a.size() == 1 for: 0 == 1 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo +not ok {test-number} - Template_Fixture_2::m_a.size() == 1 for: 0 == 1 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector +not ok {test-number} - Template_Fixture_2::m_a.size() == 1 for: 0 == 1 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector +not ok {test-number} - Template_Fixture_2::m_a.size() == 1 for: 0 == 1 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo +ok {test-number} - Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo +ok {test-number} - Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector +ok {test-number} - Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector +ok {test-number} - Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2 +not ok {test-number} - Template_Fixture_2{}.m_a.size() < 2 for: 6 < 2 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2 +not ok {test-number} - Template_Fixture_2{}.m_a.size() < 2 for: 2 < 2 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array +not ok {test-number} - Template_Fixture_2{}.m_a.size() < 2 for: 6 < 2 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array +not ok {test-number} - Template_Fixture_2{}.m_a.size() < 2 for: 2 < 2 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2 +ok {test-number} - Template_Fixture_2{}.m_a.size() >= 2 for: 6 >= 2 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2 +ok {test-number} - Template_Fixture_2{}.m_a.size() >= 2 for: 2 >= 2 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array +ok {test-number} - Template_Fixture_2{}.m_a.size() >= 2 for: 6 >= 2 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array +ok {test-number} - Template_Fixture_2{}.m_a.size() >= 2 for: 2 >= 2 +# A TEMPLATE_TEST_CASE_METHOD based test run that fails - double +not ok {test-number} - Template_Fixture::m_a == 2 for: 1.0 == 2 +# A TEMPLATE_TEST_CASE_METHOD based test run that fails - float +not ok {test-number} - Template_Fixture::m_a == 2 for: 1.0f == 2 +# A TEMPLATE_TEST_CASE_METHOD based test run that fails - int +not ok {test-number} - Template_Fixture::m_a == 2 for: 1 == 2 +# A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - double +ok {test-number} - Template_Fixture::m_a == 1 for: 1.0 == 1 +# A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - float +ok {test-number} - Template_Fixture::m_a == 1 for: 1.0f == 1 +# A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - int +ok {test-number} - Template_Fixture::m_a == 1 for: 1 == 1 +# A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1 +not ok {test-number} - Nttp_Fixture::value == 0 for: 1 == 0 +# A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3 +not ok {test-number} - Nttp_Fixture::value == 0 for: 3 == 0 +# A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6 +not ok {test-number} - Nttp_Fixture::value == 0 for: 6 == 0 +# A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1 +ok {test-number} - Nttp_Fixture::value > 0 for: 1 > 0 +# A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 3 +ok {test-number} - Nttp_Fixture::value > 0 for: 3 > 0 +# A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 6 +ok {test-number} - Nttp_Fixture::value > 0 for: 6 > 0 +# A TEST_CASE_METHOD based test run that fails +not ok {test-number} - m_a == 2 for: 1 == 2 +# A TEST_CASE_METHOD based test run that succeeds +ok {test-number} - m_a == 1 for: 1 == 1 +# A TEST_CASE_PERSISTENT_FIXTURE based test run that fails +ok {test-number} - m_a++ == 0 for: 0 == 0 +# A TEST_CASE_PERSISTENT_FIXTURE based test run that fails +not ok {test-number} - m_a == 0 for: 1 == 0 +# A TEST_CASE_PERSISTENT_FIXTURE based test run that succeeds +ok {test-number} - m_a++ == 0 for: 0 == 0 +# A TEST_CASE_PERSISTENT_FIXTURE based test run that succeeds +ok {test-number} - m_a == 1 for: 1 == 1 +# A Template product test case - Foo +ok {test-number} - x.size() == 0 for: 0 == 0 +# A Template product test case - Foo +ok {test-number} - x.size() == 0 for: 0 == 0 +# A Template product test case - std::vector +ok {test-number} - x.size() == 0 for: 0 == 0 +# A Template product test case - std::vector +ok {test-number} - x.size() == 0 for: 0 == 0 +# A Template product test case with array signature - Bar +ok {test-number} - x.size() > 0 for: 42 > 0 +# A Template product test case with array signature - Bar +ok {test-number} - x.size() > 0 for: 9 > 0 +# A Template product test case with array signature - std::array +ok {test-number} - x.size() > 0 for: 42 > 0 +# A Template product test case with array signature - std::array +ok {test-number} - x.size() > 0 for: 9 > 0 +# A comparison that uses literals instead of the normal constructor +ok {test-number} - d == 1.23_a for: 1.22999999999999998 == Approx( 1.22999999999999998 ) +# A comparison that uses literals instead of the normal constructor +ok {test-number} - d != 1.22_a for: 1.22999999999999998 != Approx( 1.21999999999999997 ) +# A comparison that uses literals instead of the normal constructor +ok {test-number} - -d == -1.23_a for: -1.22999999999999998 == Approx( -1.22999999999999998 ) +# A comparison that uses literals instead of the normal constructor +ok {test-number} - d == 1.2_a .epsilon(.1) for: 1.22999999999999998 == Approx( 1.19999999999999996 ) +# A comparison that uses literals instead of the normal constructor +ok {test-number} - d != 1.2_a .epsilon(.001) for: 1.22999999999999998 != Approx( 1.19999999999999996 ) +# A comparison that uses literals instead of the normal constructor +ok {test-number} - d == 1_a .epsilon(.3) for: 1.22999999999999998 == Approx( 1.0 ) +# A couple of nested sections followed by a failure +ok {test-number} - with 1 message: 'that's not flying - that's failing in style' +# A couple of nested sections followed by a failure +not ok {test-number} - explicitly with 1 message: 'to infinity and beyond' +# A failing expression with a non streamable type is still captured +not ok {test-number} - &o1 == &o2 for: 0x == 0x +# A failing expression with a non streamable type is still captured +not ok {test-number} - o1 == o2 for: {?} == {?} +# Absolute margin +ok {test-number} - 104.0 != Approx(100.0) for: 104.0 != Approx( 100.0 ) +# Absolute margin +ok {test-number} - 104.0 == Approx(100.0).margin(5) for: 104.0 == Approx( 100.0 ) +# Absolute margin +ok {test-number} - 104.0 == Approx(100.0).margin(4) for: 104.0 == Approx( 100.0 ) +# Absolute margin +ok {test-number} - 104.0 != Approx(100.0).margin(3) for: 104.0 != Approx( 100.0 ) +# Absolute margin +ok {test-number} - 100.3 != Approx(100.0) for: 100.29999999999999716 != Approx( 100.0 ) +# Absolute margin +ok {test-number} - 100.3 == Approx(100.0).margin(0.5) for: 100.29999999999999716 == Approx( 100.0 ) +# An expression with side-effects should only be evaluated once +ok {test-number} - i++ == 7 for: 7 == 7 +# An expression with side-effects should only be evaluated once +ok {test-number} - i++ == 8 for: 8 == 8 +# An unchecked exception reports the line of the last assertion +ok {test-number} - 1 == 1 +# An unchecked exception reports the line of the last assertion +not ok {test-number} - unexpected exception with message: 'unexpected exception'; expression was: {Unknown expression after the reported line} +# Anonymous test case 1 +ok {test-number} - with 1 message: 'anonymous test case' +# Approx setters validate their arguments +ok {test-number} - Approx(0).margin(0) +# Approx setters validate their arguments +ok {test-number} - Approx(0).margin(1234656) +# Approx setters validate their arguments +ok {test-number} - Approx(0).margin(-2), std::domain_error +# Approx setters validate their arguments +ok {test-number} - Approx(0).epsilon(0) +# Approx setters validate their arguments +ok {test-number} - Approx(0).epsilon(1) +# Approx setters validate their arguments +ok {test-number} - Approx(0).epsilon(-0.001), std::domain_error +# Approx setters validate their arguments +ok {test-number} - Approx(0).epsilon(1.0001), std::domain_error +# Approx with exactly-representable margin +ok {test-number} - 0.25f == Approx(0.0f).margin(0.25f) for: 0.25f == Approx( 0.0 ) +# Approx with exactly-representable margin +ok {test-number} - 0.0f == Approx(0.25f).margin(0.25f) for: 0.0f == Approx( 0.25 ) +# Approx with exactly-representable margin +ok {test-number} - 0.5f == Approx(0.25f).margin(0.25f) for: 0.5f == Approx( 0.25 ) +# Approx with exactly-representable margin +ok {test-number} - 245.0f == Approx(245.25f).margin(0.25f) for: 245.0f == Approx( 245.25 ) +# Approx with exactly-representable margin +ok {test-number} - 245.5f == Approx(245.25f).margin(0.25f) for: 245.5f == Approx( 245.25 ) +# Approximate PI +ok {test-number} - divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) for: 3.14285714285714279 == Approx( 3.14100000000000001 ) +# Approximate PI +ok {test-number} - divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) for: 3.14285714285714279 != Approx( 3.14100000000000001 ) +# Approximate comparisons with different epsilons +ok {test-number} - d != Approx( 1.231 ) for: 1.22999999999999998 != Approx( 1.23100000000000009 ) +# Approximate comparisons with different epsilons +ok {test-number} - d == Approx( 1.231 ).epsilon( 0.1 ) for: 1.22999999999999998 == Approx( 1.23100000000000009 ) +# Approximate comparisons with floats +ok {test-number} - 1.23f == Approx( 1.23f ) for: 1.230000019f == Approx( 1.23000001907348633 ) +# Approximate comparisons with floats +ok {test-number} - 0.0f == Approx( 0.0f ) for: 0.0f == Approx( 0.0 ) +# Approximate comparisons with ints +ok {test-number} - 1 == Approx( 1 ) for: 1 == Approx( 1.0 ) +# Approximate comparisons with ints +ok {test-number} - 0 == Approx( 0 ) for: 0 == Approx( 0.0 ) +# Approximate comparisons with mixed numeric types +ok {test-number} - 1.0f == Approx( 1 ) for: 1.0f == Approx( 1.0 ) +# Approximate comparisons with mixed numeric types +ok {test-number} - 0 == Approx( dZero) for: 0 == Approx( 0.0 ) +# Approximate comparisons with mixed numeric types +ok {test-number} - 0 == Approx( dSmall ).margin( 0.001 ) for: 0 == Approx( 0.00001 ) +# Approximate comparisons with mixed numeric types +ok {test-number} - 1.234f == Approx( dMedium ) for: 1.233999968f == Approx( 1.23399999999999999 ) +# Approximate comparisons with mixed numeric types +ok {test-number} - dMedium == Approx( 1.234f ) for: 1.23399999999999999 == Approx( 1.23399996757507324 ) +# Arbitrary predicate matcher +ok {test-number} - 1, Predicate( alwaysTrue, "always true" ) for: 1 matches predicate: "always true" +# Arbitrary predicate matcher +ok {test-number} - 1, !Predicate( alwaysFalse, "always false" ) for: 1 not matches predicate: "always false" +# Arbitrary predicate matcher +ok {test-number} - "Hello olleH", Predicate( []( std::string const& str ) -> bool { return str.front() == str.back(); }, "First and last character should be equal" ) for: "Hello olleH" matches predicate: "First and last character should be equal" +# Arbitrary predicate matcher +ok {test-number} - "This wouldn't pass", !Predicate( []( std::string const& str ) -> bool { return str.front() == str.back(); } ) for: "This wouldn't pass" not matches undescribed predicate +# Assertion macros support bit operators and bool conversions +ok {test-number} - lhs | rhs for: Val: 1 | Val: 2 +# Assertion macros support bit operators and bool conversions +ok {test-number} - !(lhs & rhs) for: !(Val: 1 & Val: 2) +# Assertion macros support bit operators and bool conversions +ok {test-number} - HasBitOperators{ 1 } & HasBitOperators{ 1 } for: Val: 1 & Val: 1 +# Assertion macros support bit operators and bool conversions +ok {test-number} - lhs ^ rhs for: Val: 1 ^ Val: 2 +# Assertion macros support bit operators and bool conversions +ok {test-number} - !(lhs ^ lhs) for: !(Val: 1 ^ Val: 1) +# Assertions then sections +ok {test-number} - true +# Assertions then sections +ok {test-number} - true +# Assertions then sections +ok {test-number} - true +# Assertions then sections +ok {test-number} - true +# Assertions then sections +ok {test-number} - true +# Assertions then sections +ok {test-number} - true +# Basic use of the Contains range matcher +ok {test-number} - a, Contains(1) for: { 1, 2, 3 } contains element 1 +# Basic use of the Contains range matcher +ok {test-number} - b, Contains(1) for: { 0, 1, 2 } contains element 1 +# Basic use of the Contains range matcher +ok {test-number} - c, !Contains(1) for: { 4, 5, 6 } not contains element 1 +# Basic use of the Contains range matcher +ok {test-number} - a, Contains(0, close_enough) for: { 1, 2, 3 } contains element 0 +# Basic use of the Contains range matcher +ok {test-number} - b, Contains(0, close_enough) for: { 0, 1, 2 } contains element 0 +# Basic use of the Contains range matcher +ok {test-number} - c, !Contains(0, close_enough) for: { 4, 5, 6 } not contains element 0 +# Basic use of the Contains range matcher +ok {test-number} - a, Contains(4, [](auto&& lhs, size_t sz) { return lhs.size() == sz; }) for: { "abc", "abcd", "abcde" } contains element 4 +# Basic use of the Contains range matcher +ok {test-number} - in, Contains(1) for: { 1, 2, 3, 4, 5 } contains element 1 +# Basic use of the Contains range matcher +ok {test-number} - in, !Contains(8) for: { 1, 2, 3, 4, 5 } not contains element 8 +# Basic use of the Contains range matcher +ok {test-number} - in, Contains(MoveOnlyTestElement{ 2 }) for: { 1, 2, 3 } contains element 2 +# Basic use of the Contains range matcher +ok {test-number} - in, !Contains(MoveOnlyTestElement{ 9 }) for: { 1, 2, 3 } not contains element 9 +# Basic use of the Contains range matcher +ok {test-number} - in, Contains(Catch::Matchers::WithinAbs(0.5, 0.5)) for: { 1.0, 2.0, 3.0, 0.0 } contains element matching is within 0.5 of 0.5 +# Basic use of the Empty range matcher +ok {test-number} - empty_array, IsEmpty() for: { } is empty +# Basic use of the Empty range matcher +ok {test-number} - non_empty_array, !IsEmpty() for: { 0.0 } not is empty +# Basic use of the Empty range matcher +ok {test-number} - empty_vec, IsEmpty() for: { } is empty +# Basic use of the Empty range matcher +ok {test-number} - non_empty_vec, !IsEmpty() for: { 'a', 'b', 'c' } not is empty +# Basic use of the Empty range matcher +ok {test-number} - inner_lists_are_empty, !IsEmpty() for: { { } } not is empty +# Basic use of the Empty range matcher +ok {test-number} - inner_lists_are_empty.front(), IsEmpty() for: { } is empty +# Basic use of the Empty range matcher +ok {test-number} - has_empty{}, !IsEmpty() for: {?} not is empty +# Basic use of the Empty range matcher +ok {test-number} - unrelated::ADL_empty{}, IsEmpty() for: {?} is empty +# CAPTURE can deal with complex expressions +ok {test-number} - with 7 messages: 'a := 1' and 'b := 2' and 'c := 3' and 'a + b := 3' and 'a+b := 3' and 'c > b := true' and 'a == 1 := true' +# CAPTURE can deal with complex expressions involving commas +ok {test-number} - with 7 messages: 'custom_index_op{1, 2, 3}[0, 1, 2] := 0' and 'custom_index_op{1, 2, 3}[(0, 1)] := 0' and 'custom_index_op{1, 2, 3}[0] := 0' and '(helper_1436{12, -12}) := { 12, -12 }' and '(helper_1436(-12, 12)) := { -12, 12 }' and '(1, 2) := 2' and '(2, 3) := 3' +# CAPTURE parses string and character constants +ok {test-number} - with 11 messages: '("comma, in string", "escaped, \", ") := "escaped, ", "' and '"single quote in string,'," := "single quote in string,',"' and '"some escapes, \\,\\\\" := "some escapes, \,\\"' and '"some, ), unmatched, } prenheses {[<" := "some, ), unmatched, } prenheses {[<"' and ''"' := '"'' and ''\'' := '''' and '',' := ','' and ''}' := '}'' and '')' := ')'' and ''(' := '('' and ''{' := '{'' +# Capture and info messages +ok {test-number} - true with 1 message: 'i := 2' +# Capture and info messages +ok {test-number} - true with 1 message: '3' +# CaseInsensitiveEqualsTo is case insensitive +ok {test-number} - eq( "", "" ) for: true +# CaseInsensitiveEqualsTo is case insensitive +ok {test-number} - !(eq( "", "a" )) for: !false +# CaseInsensitiveEqualsTo is case insensitive +ok {test-number} - eq( "a", "a" ) for: true +# CaseInsensitiveEqualsTo is case insensitive +ok {test-number} - eq( "a", "A" ) for: true +# CaseInsensitiveEqualsTo is case insensitive +ok {test-number} - eq( "A", "a" ) for: true +# CaseInsensitiveEqualsTo is case insensitive +ok {test-number} - eq( "A", "A" ) for: true +# CaseInsensitiveEqualsTo is case insensitive +ok {test-number} - !(eq( "a", "b" )) for: !false +# CaseInsensitiveEqualsTo is case insensitive +ok {test-number} - !(eq( "a", "B" )) for: !false +# CaseInsensitiveLess is case insensitive +ok {test-number} - lt( "", "a" ) for: true +# CaseInsensitiveLess is case insensitive +ok {test-number} - !(lt( "a", "a" )) for: !false +# CaseInsensitiveLess is case insensitive +ok {test-number} - !(lt( "", "" )) for: !false +# CaseInsensitiveLess is case insensitive +ok {test-number} - lt( "a", "b" ) for: true +# CaseInsensitiveLess is case insensitive +ok {test-number} - lt( "a", "B" ) for: true +# CaseInsensitiveLess is case insensitive +ok {test-number} - lt( "A", "b" ) for: true +# CaseInsensitiveLess is case insensitive +ok {test-number} - lt( "A", "B" ) for: true +# Character pretty printing +ok {test-number} - ::Catch::Detail::stringify('\t') == "'\\t'" for: "'\t'" == "'\t'" +# Character pretty printing +ok {test-number} - ::Catch::Detail::stringify('\n') == "'\\n'" for: "'\n'" == "'\n'" +# Character pretty printing +ok {test-number} - ::Catch::Detail::stringify('\r') == "'\\r'" for: "'\r'" == "'\r'" +# Character pretty printing +ok {test-number} - ::Catch::Detail::stringify('\f') == "'\\f'" for: "'\f'" == "'\f'" +# Character pretty printing +ok {test-number} - ::Catch::Detail::stringify( ' ' ) == "' '" for: "' '" == "' '" +# Character pretty printing +ok {test-number} - ::Catch::Detail::stringify( 'A' ) == "'A'" for: "'A'" == "'A'" +# Character pretty printing +ok {test-number} - ::Catch::Detail::stringify( 'z' ) == "'z'" for: "'z'" == "'z'" +# Character pretty printing +ok {test-number} - ::Catch::Detail::stringify( '\0' ) == "0" for: "0" == "0" +# Character pretty printing +ok {test-number} - ::Catch::Detail::stringify( static_cast(2) ) == "2" for: "2" == "2" +# Character pretty printing +ok {test-number} - ::Catch::Detail::stringify( static_cast(5) ) == "5" for: "5" == "5" +# Clara::Arg does not crash on incomplete input +ok {test-number} - name.empty() for: true +# Clara::Arg does not crash on incomplete input +ok {test-number} - result for: {?} +# Clara::Arg does not crash on incomplete input +ok {test-number} - result.type() == Catch::Clara::Detail::ResultType::Ok for: 0 == 0 +# Clara::Arg does not crash on incomplete input +ok {test-number} - parsed.type() == Catch::Clara::ParseResultType::NoMatch for: 1 == 1 +# Clara::Arg does not crash on incomplete input +ok {test-number} - parsed.remainingTokens().count() == 2 for: 2 == 2 +# Clara::Arg does not crash on incomplete input +ok {test-number} - name.empty() for: true +# Clara::Arg supports single-arg parse the way Opt does +ok {test-number} - name.empty() for: true +# Clara::Arg supports single-arg parse the way Opt does +ok {test-number} - name == "foo" for: "foo" == "foo" +# Clara::Opt supports accept-many lambdas +ok {test-number} - !(parse_result) for: !{?} +# Clara::Opt supports accept-many lambdas +ok {test-number} - parse_result for: {?} +# Clara::Opt supports accept-many lambdas +ok {test-number} - res == std::vector{ "aaa", "bbb" } for: { "aaa", "bbb" } == { "aaa", "bbb" } +# ColourGuard behaviour +ok {test-number} - streamWrapper.str().empty() for: true +# ColourGuard behaviour +ok {test-number} - streamWrapper.str() == "1\nUsing code: 2\n2\nUsing code: 0\n3\n" for: "1 Using code: 2 2 Using code: 0 3 " == "1 Using code: 2 2 Using code: 0 3 " +# ColourGuard behaviour +ok {test-number} - streamWrapper.str() == "Using code: 2\nA\nB\nUsing code: 0\nC\n" for: "Using code: 2 A B Using code: 0 C " == "Using code: 2 A B Using code: 0 C " +# Combining MatchAllOfGeneric does not nest +ok {test-number} - with 1 message: 'std::is_same< decltype( ( MatcherA() && MatcherB() ) && MatcherC() ), Catch::Matchers::Detail:: MatchAllOfGeneric>::value' +# Combining MatchAllOfGeneric does not nest +ok {test-number} - 1, ( MatcherA() && MatcherB() ) && MatcherC() for: 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 ) +# Combining MatchAllOfGeneric does not nest +ok {test-number} - with 1 message: 'std::is_same< decltype( MatcherA() && ( MatcherB() && MatcherC() ) ), Catch::Matchers::Detail:: MatchAllOfGeneric>::value' +# Combining MatchAllOfGeneric does not nest +ok {test-number} - 1, MatcherA() && ( MatcherB() && MatcherC() ) for: 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 ) +# Combining MatchAllOfGeneric does not nest +ok {test-number} - with 1 message: 'std::is_same< decltype( ( MatcherA() && MatcherB() ) && ( MatcherC() && MatcherD() ) ), Catch::Matchers::Detail:: MatchAllOfGeneric>:: value' +# Combining MatchAllOfGeneric does not nest +ok {test-number} - 1, ( MatcherA() && MatcherB() ) && ( MatcherC() && MatcherD() ) for: 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 and equals: true ) +# Combining MatchAnyOfGeneric does not nest +ok {test-number} - with 1 message: 'std::is_same< decltype( ( MatcherA() || MatcherB() ) || MatcherC() ), Catch::Matchers::Detail:: MatchAnyOfGeneric>::value' +# Combining MatchAnyOfGeneric does not nest +ok {test-number} - 1, ( MatcherA() || MatcherB() ) || MatcherC() for: 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 ) +# Combining MatchAnyOfGeneric does not nest +ok {test-number} - with 1 message: 'std::is_same< decltype( MatcherA() || ( MatcherB() || MatcherC() ) ), Catch::Matchers::Detail:: MatchAnyOfGeneric>::value' +# Combining MatchAnyOfGeneric does not nest +ok {test-number} - 1, MatcherA() || ( MatcherB() || MatcherC() ) for: 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 ) +# Combining MatchAnyOfGeneric does not nest +ok {test-number} - with 1 message: 'std::is_same< decltype( ( MatcherA() || MatcherB() ) || ( MatcherC() || MatcherD() ) ), Catch::Matchers::Detail:: MatchAnyOfGeneric>:: value' +# Combining MatchAnyOfGeneric does not nest +ok {test-number} - 1, ( MatcherA() || MatcherB() ) || ( MatcherC() || MatcherD() ) for: 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 or equals: true ) +# Combining MatchNotOfGeneric does not nest +ok {test-number} - with 1 message: 'std::is_same< decltype( !MatcherA() ), Catch::Matchers::Detail::MatchNotOfGeneric>::value' +# Combining MatchNotOfGeneric does not nest +ok {test-number} - 0, !MatcherA() for: 0 not equals: (int) 1 or (string) "1" +# Combining MatchNotOfGeneric does not nest +ok {test-number} - with 1 message: 'std::is_same::value' +# Combining MatchNotOfGeneric does not nest +ok {test-number} - 1, !!MatcherA() for: 1 equals: (int) 1 or (string) "1" +# Combining MatchNotOfGeneric does not nest +ok {test-number} - with 1 message: 'std::is_same< decltype( !!!MatcherA() ), Catch::Matchers::Detail::MatchNotOfGeneric>::value' +# Combining MatchNotOfGeneric does not nest +ok {test-number} - 0, !!!MatcherA() for: 0 not equals: (int) 1 or (string) "1" +# Combining MatchNotOfGeneric does not nest +ok {test-number} - with 1 message: 'std::is_same::value' +# Combining MatchNotOfGeneric does not nest +ok {test-number} - 1, !!!!MatcherA() for: 1 equals: (int) 1 or (string) "1" +# Combining concrete matchers does not use templated matchers +ok {test-number} - with 1 message: 'std::is_same>::value' +# Combining only templated matchers +ok {test-number} - with 1 message: 'std::is_same>::value' +# Combining only templated matchers +ok {test-number} - 1, MatcherA() || MatcherB() for: 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 ) +# Combining only templated matchers +ok {test-number} - with 1 message: 'std::is_same>::value' +# Combining only templated matchers +ok {test-number} - 1, MatcherA() && MatcherB() for: 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 ) +# Combining only templated matchers +ok {test-number} - with 1 message: 'std::is_same< decltype( MatcherA() || !MatcherB() ), Catch::Matchers::Detail::MatchAnyOfGeneric< MatcherA, Catch::Matchers::Detail::MatchNotOfGeneric>>::value' +# Combining only templated matchers +ok {test-number} - 1, MatcherA() || !MatcherB() for: 1 ( equals: (int) 1 or (string) "1" or not equals: (long long) 1 ) +# Combining templated and concrete matchers +ok {test-number} - vec, Predicate>( []( auto const& v ) { return std::all_of( v.begin(), v.end(), []( int elem ) { return elem % 2 == 1; } ); }, "All elements are odd" ) && !EqualsRange( a ) for: { 1, 3, 5 } ( matches predicate: "All elements are odd" and not Equals: { 5, 3, 1 } ) +# Combining templated and concrete matchers +ok {test-number} - str, StartsWith( "foo" ) && EqualsRange( arr ) && EndsWith( "bar" ) for: "foobar" ( starts with: "foo" and Equals: { 'f', 'o', 'o', 'b', 'a', 'r' } and ends with: "bar" ) +# Combining templated and concrete matchers +ok {test-number} - str, StartsWith( "foo" ) && !EqualsRange( bad_arr ) && EndsWith( "bar" ) for: "foobar" ( starts with: "foo" and not Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } and ends with: "bar" ) +# Combining templated and concrete matchers +ok {test-number} - str, EqualsRange( arr ) && StartsWith( "foo" ) && EndsWith( "bar" ) for: "foobar" ( Equals: { 'f', 'o', 'o', 'b', 'a', 'r' } and starts with: "foo" and ends with: "bar" ) +# Combining templated and concrete matchers +ok {test-number} - str, !EqualsRange( bad_arr ) && StartsWith( "foo" ) && EndsWith( "bar" ) for: "foobar" ( not Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } and starts with: "foo" and ends with: "bar" ) +# Combining templated and concrete matchers +ok {test-number} - str, EqualsRange( bad_arr ) || ( StartsWith( "foo" ) && EndsWith( "bar" ) ) for: "foobar" ( Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } or ( starts with: "foo" and ends with: "bar" ) ) +# Combining templated and concrete matchers +ok {test-number} - str, ( StartsWith( "foo" ) && EndsWith( "bar" ) ) || EqualsRange( bad_arr ) for: "foobar" ( ( starts with: "foo" and ends with: "bar" ) or Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } ) +# Combining templated matchers +ok {test-number} - container, EqualsRange( a ) || EqualsRange( b ) || EqualsRange( c ) for: { 1, 2, 3 } ( Equals: { 1, 2, 3 } or Equals: { 0, 1, 2 } or Equals: { 4, 5, 6 } ) +# Commas in various macros are allowed +ok {test-number} - std::vector{constructor_throws{}, constructor_throws{}} +# Commas in various macros are allowed +ok {test-number} - std::vector{constructor_throws{}, constructor_throws{}} +# Commas in various macros are allowed +ok {test-number} - std::vector{1, 2, 3} == std::vector{1, 2, 3} +# Commas in various macros are allowed +ok {test-number} - std::vector{1, 2, 3} == std::vector{1, 2, 3} +# Commas in various macros are allowed +ok {test-number} - std::vector{1, 2} == std::vector{1, 2} for: { 1, 2 } == { 1, 2 } +# Commas in various macros are allowed +ok {test-number} - std::vector{1, 2} == std::vector{1, 2} for: { 1, 2 } == { 1, 2 } +# Commas in various macros are allowed +ok {test-number} - !(std::vector{1, 2} == std::vector{1, 2, 3}) for: !({ 1, 2 } == { 1, 2, 3 }) +# Commas in various macros are allowed +ok {test-number} - !(std::vector{1, 2} == std::vector{1, 2, 3}) for: !({ 1, 2 } == { 1, 2, 3 }) +# Commas in various macros are allowed +ok {test-number} - std::vector{1, 2} == std::vector{1, 2} for: { 1, 2 } == { 1, 2 } +# Commas in various macros are allowed +ok {test-number} - std::vector{1, 2} == std::vector{1, 2} for: { 1, 2 } == { 1, 2 } +# Commas in various macros are allowed +ok {test-number} - true +# Commas in various macros are allowed +ok {test-number} - std::vector{1, 2} == std::vector{1, 2} for: { 1, 2 } == { 1, 2 } +# Comparing function pointers +ok {test-number} - a for: 0x +# Comparing function pointers +ok {test-number} - a == &foo for: 0x == 0x +# Comparison ops +ok {test-number} - SimplePcg32{} == SimplePcg32{} for: {?} == {?} +# Comparison ops +ok {test-number} - SimplePcg32{ 0 } != SimplePcg32{} for: {?} != {?} +# Comparison ops +ok {test-number} - !(SimplePcg32{ 1 } == SimplePcg32{ 2 }) for: !({?} == {?}) +# Comparison ops +ok {test-number} - !(SimplePcg32{ 1 } != SimplePcg32{ 1 }) for: !({?} != {?}) +# Comparison with explicitly convertible types +ok {test-number} - td == Approx(10.0) for: StrongDoubleTypedef(10) == Approx( 10.0 ) +# Comparison with explicitly convertible types +ok {test-number} - Approx(10.0) == td for: Approx( 10.0 ) == StrongDoubleTypedef(10) +# Comparison with explicitly convertible types +ok {test-number} - td != Approx(11.0) for: StrongDoubleTypedef(10) != Approx( 11.0 ) +# Comparison with explicitly convertible types +ok {test-number} - Approx(11.0) != td for: Approx( 11.0 ) != StrongDoubleTypedef(10) +# Comparison with explicitly convertible types +ok {test-number} - td <= Approx(10.0) for: StrongDoubleTypedef(10) <= Approx( 10.0 ) +# Comparison with explicitly convertible types +ok {test-number} - td <= Approx(11.0) for: StrongDoubleTypedef(10) <= Approx( 11.0 ) +# Comparison with explicitly convertible types +ok {test-number} - Approx(10.0) <= td for: Approx( 10.0 ) <= StrongDoubleTypedef(10) +# Comparison with explicitly convertible types +ok {test-number} - Approx(9.0) <= td for: Approx( 9.0 ) <= StrongDoubleTypedef(10) +# Comparison with explicitly convertible types +ok {test-number} - td >= Approx(9.0) for: StrongDoubleTypedef(10) >= Approx( 9.0 ) +# Comparison with explicitly convertible types +ok {test-number} - td >= Approx(td) for: StrongDoubleTypedef(10) >= Approx( 10.0 ) +# Comparison with explicitly convertible types +ok {test-number} - Approx(td) >= td for: Approx( 10.0 ) >= StrongDoubleTypedef(10) +# Comparison with explicitly convertible types +ok {test-number} - Approx(11.0) >= td for: Approx( 11.0 ) >= StrongDoubleTypedef(10) +# Comparisons between ints where one side is computed +ok {test-number} - 54 == 6*9 for: 54 == 54 +# Comparisons between unsigned ints and negative signed ints match c++ standard behaviour +ok {test-number} - ( -1 > 2u ) for: true +# Comparisons between unsigned ints and negative signed ints match c++ standard behaviour +ok {test-number} - -1 > 2u for: -1 > 2 +# Comparisons between unsigned ints and negative signed ints match c++ standard behaviour +ok {test-number} - ( 2u < -1 ) for: true +# Comparisons between unsigned ints and negative signed ints match c++ standard behaviour +ok {test-number} - 2u < -1 for: 2 < -1 +# Comparisons between unsigned ints and negative signed ints match c++ standard behaviour +ok {test-number} - ( minInt > 2u ) for: true +# Comparisons between unsigned ints and negative signed ints match c++ standard behaviour +ok {test-number} - minInt > 2u for: -2147483648 > 2 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - i == 1 for: 1 == 1 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - ui == 2 for: 2 == 2 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - l == 3 for: 3 == 3 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - ul == 4 for: 4 == 4 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - c == 5 for: 5 == 5 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - uc == 6 for: 6 == 6 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - 1 == i for: 1 == 1 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - 2 == ui for: 2 == 2 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - 3 == l for: 3 == 3 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - 4 == ul for: 4 == 4 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - 5 == c for: 5 == 5 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - 6 == uc for: 6 == 6 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - (std::numeric_limits::max)() > ul for: 4294967295 (0x) > 4 +# Composed generic matchers shortcircuit +ok {test-number} - !(matcher.match( 1 )) for: !false +# Composed generic matchers shortcircuit +ok {test-number} - first.matchCalled for: true +# Composed generic matchers shortcircuit +ok {test-number} - !second.matchCalled for: true +# Composed generic matchers shortcircuit +ok {test-number} - matcher.match( 1 ) for: true +# Composed generic matchers shortcircuit +ok {test-number} - first.matchCalled for: true +# Composed generic matchers shortcircuit +ok {test-number} - !second.matchCalled for: true +# Composed matchers shortcircuit +ok {test-number} - !(matcher.match( 1 )) for: !false +# Composed matchers shortcircuit +ok {test-number} - first.matchCalled for: true +# Composed matchers shortcircuit +ok {test-number} - !second.matchCalled for: true +# Composed matchers shortcircuit +ok {test-number} - matcher.match( 1 ) for: true +# Composed matchers shortcircuit +ok {test-number} - first.matchCalled for: true +# Composed matchers shortcircuit +ok {test-number} - !second.matchCalled for: true +# Contains string matcher +not ok {test-number} - testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "not there" (case insensitive) +# Contains string matcher +not ok {test-number} - testStringForMatching(), ContainsSubstring( "STRING" ) for: "this string contains 'abc' as a substring" contains: "STRING" +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - call_count == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - make_data().size() == test_count for: 6 == 6 +# Cout stream properly declares it writes to stdout +ok {test-number} - Catch::makeStream( "-" )->isConsole() for: true +# Custom exceptions can be translated when testing for nothrow +not ok {test-number} - unexpected exception with message: 'custom exception - not std'; expression was: throwCustom() +# Custom exceptions can be translated when testing for throwing as something else +not ok {test-number} - unexpected exception with message: 'custom exception - not std'; expression was: throwCustom(), std::exception +# Custom std-exceptions can be custom translated +not ok {test-number} - unexpected exception with message: 'custom std exception' +# Default scale is invisible to comparison +ok {test-number} - 101.000001 != Approx(100).epsilon(0.01) for: 101.00000099999999748 != Approx( 100.0 ) +# Default scale is invisible to comparison +ok {test-number} - std::pow(10, -5) != Approx(std::pow(10, -7)) for: 0.00001 != Approx( 0.0000001 ) +# Directly creating an EnumInfo +ok {test-number} - enumInfo->lookup(0) == "Value1" for: Value1 == "Value1" +# Directly creating an EnumInfo +ok {test-number} - enumInfo->lookup(1) == "Value2" for: Value2 == "Value2" +# Directly creating an EnumInfo +ok {test-number} - enumInfo->lookup(3) == "{** unexpected enum value **}" for: {** unexpected enum value **} == "{** unexpected enum value **}" +# Empty generators can SKIP in constructor +ok {test-number} - # SKIP 'This generator is empty' +# Empty stream name opens cout stream +ok {test-number} - Catch::makeStream( "" )->isConsole() for: true +# EndsWith string matcher +not ok {test-number} - testStringForMatching(), EndsWith( "Substring" ) for: "this string contains 'abc' as a substring" ends with: "Substring" +# EndsWith string matcher +not ok {test-number} - testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" ends with: "this" (case insensitive) +# Enums can quickly have stringification enabled using CATCH_REGISTER_ENUM +ok {test-number} - stringify( EnumClass3::Value1 ) == "Value1" for: "Value1" == "Value1" +# Enums can quickly have stringification enabled using CATCH_REGISTER_ENUM +ok {test-number} - stringify( EnumClass3::Value2 ) == "Value2" for: "Value2" == "Value2" +# Enums can quickly have stringification enabled using CATCH_REGISTER_ENUM +ok {test-number} - stringify( EnumClass3::Value3 ) == "Value3" for: "Value3" == "Value3" +# Enums can quickly have stringification enabled using CATCH_REGISTER_ENUM +ok {test-number} - stringify( EnumClass3::Value4 ) == "{** unexpected enum value **}" for: "{** unexpected enum value **}" == "{** unexpected enum value **}" +# Enums can quickly have stringification enabled using CATCH_REGISTER_ENUM +ok {test-number} - stringify( ec3 ) == "Value2" for: "Value2" == "Value2" +# Enums in namespaces can quickly have stringification enabled using CATCH_REGISTER_ENUM +ok {test-number} - stringify( Bikeshed::Colours::Red ) == "Red" for: "Red" == "Red" +# Enums in namespaces can quickly have stringification enabled using CATCH_REGISTER_ENUM +ok {test-number} - stringify( Bikeshed::Colours::Blue ) == "Blue" for: "Blue" == "Blue" +# Epsilon only applies to Approx's value +ok {test-number} - 101.01 != Approx(100).epsilon(0.01) for: 101.01000000000000512 != Approx( 100.0 ) +# Equality checks that should fail +not ok {test-number} - data.int_seven == 6 for: 7 == 6 +# Equality checks that should fail +not ok {test-number} - data.int_seven == 8 for: 7 == 8 +# Equality checks that should fail +not ok {test-number} - data.int_seven == 0 for: 7 == 0 +# Equality checks that should fail +not ok {test-number} - data.float_nine_point_one == Approx( 9.11f ) for: 9.100000381f == Approx( 9.10999965667724609 ) +# Equality checks that should fail +not ok {test-number} - data.float_nine_point_one == Approx( 9.0f ) for: 9.100000381f == Approx( 9.0 ) +# Equality checks that should fail +not ok {test-number} - data.float_nine_point_one == Approx( 1 ) for: 9.100000381f == Approx( 1.0 ) +# Equality checks that should fail +not ok {test-number} - data.float_nine_point_one == Approx( 0 ) for: 9.100000381f == Approx( 0.0 ) +# Equality checks that should fail +not ok {test-number} - data.double_pi == Approx( 3.1415 ) for: 3.14159265350000005 == Approx( 3.14150000000000018 ) +# Equality checks that should fail +not ok {test-number} - data.str_hello == "goodbye" for: "hello" == "goodbye" +# Equality checks that should fail +not ok {test-number} - data.str_hello == "hell" for: "hello" == "hell" +# Equality checks that should fail +not ok {test-number} - data.str_hello == "hello1" for: "hello" == "hello1" +# Equality checks that should fail +not ok {test-number} - data.str_hello.size() == 6 for: 5 == 6 +# Equality checks that should fail +not ok {test-number} - x == Approx( 1.301 ) for: 1.30000000000000027 == Approx( 1.30099999999999993 ) +# Equality checks that should succeed +ok {test-number} - data.int_seven == 7 for: 7 == 7 +# Equality checks that should succeed +ok {test-number} - data.float_nine_point_one == Approx( 9.1f ) for: 9.100000381f == Approx( 9.10000038146972656 ) +# Equality checks that should succeed +ok {test-number} - data.double_pi == Approx( 3.1415926535 ) for: 3.14159265350000005 == Approx( 3.14159265350000005 ) +# Equality checks that should succeed +ok {test-number} - data.str_hello == "hello" for: "hello" == "hello" +# Equality checks that should succeed +ok {test-number} - "hello" == data.str_hello for: "hello" == "hello" +# Equality checks that should succeed +ok {test-number} - data.str_hello.size() == 5 for: 5 == 5 +# Equality checks that should succeed +ok {test-number} - x == Approx( 1.3 ) for: 1.30000000000000027 == Approx( 1.30000000000000004 ) +# Equals +ok {test-number} - testStringForMatching(), Equals( "this string contains 'abc' as a substring" ) for: "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" +# Equals +ok {test-number} - testStringForMatching(), Equals( "this string contains 'ABC' as a substring", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" (case insensitive) +# Equals string matcher +not ok {test-number} - testStringForMatching(), Equals( "this string contains 'ABC' as a substring" ) for: "this string contains 'abc' as a substring" equals: "this string contains 'ABC' as a substring" +# Equals string matcher +not ok {test-number} - testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" equals: "something else" (case insensitive) +# Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified +ok {test-number} - ::Catch::Detail::stringify(WhatException{}) == "This exception has overridden what() method" for: "This exception has overridden what() method" == "This exception has overridden what() method" +# Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified +ok {test-number} - ::Catch::Detail::stringify(OperatorException{}) == "OperatorException" for: "OperatorException" == "OperatorException" +# Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified +ok {test-number} - ::Catch::Detail::stringify(StringMakerException{}) == "StringMakerException" for: "StringMakerException" == "StringMakerException" +# Exception matchers that fail +not ok {test-number} - expected exception, got none; expression was: doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } +# Exception matchers that fail +not ok {test-number} - expected exception, got none; expression was: doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } +# Exception matchers that fail +not ok {test-number} - unexpected exception with message: 'Unknown exception'; expression was: throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } +# Exception matchers that fail +not ok {test-number} - unexpected exception with message: 'Unknown exception'; expression was: throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } +# Exception matchers that fail +not ok {test-number} - throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } for: SpecialException::what special exception has value of 1 +# Exception matchers that fail +not ok {test-number} - throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } for: SpecialException::what special exception has value of 1 +# Exception matchers that succeed +ok {test-number} - throwsSpecialException( 1 ), SpecialException, ExceptionMatcher{ 1 } for: SpecialException::what special exception has value of 1 +# Exception matchers that succeed +ok {test-number} - throwsSpecialException( 2 ), SpecialException, ExceptionMatcher{ 2 } for: SpecialException::what special exception has value of 2 +# Exception message can be matched +ok {test-number} - throwsDerivedException(), DerivedException, MessageMatches( StartsWith( "Derived" ) ) for: DerivedException::what matches "starts with: "Derived"" +# Exception message can be matched +ok {test-number} - throwsDerivedException(), DerivedException, MessageMatches( EndsWith( "::what" ) ) for: DerivedException::what matches "ends with: "::what"" +# Exception message can be matched +ok {test-number} - throwsDerivedException(), DerivedException, MessageMatches( !StartsWith( "::what" ) ) for: DerivedException::what matches "not starts with: "::what"" +# Exception message can be matched +ok {test-number} - throwsSpecialException( 2 ), SpecialException, MessageMatches( StartsWith( "Special" ) ) for: SpecialException::what matches "starts with: "Special"" +# Exception messages can be tested for +ok {test-number} - thisThrows(), "expected exception" for: "expected exception" equals: "expected exception" +# Exception messages can be tested for +ok {test-number} - thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) for: "expected exception" equals: "expected exception" (case insensitive) +# Exception messages can be tested for +ok {test-number} - thisThrows(), StartsWith( "expected" ) for: "expected exception" starts with: "expected" +# Exception messages can be tested for +ok {test-number} - thisThrows(), EndsWith( "exception" ) for: "expected exception" ends with: "exception" +# Exception messages can be tested for +ok {test-number} - thisThrows(), ContainsSubstring( "except" ) for: "expected exception" contains: "except" +# Exception messages can be tested for +ok {test-number} - thisThrows(), ContainsSubstring( "exCept", Catch::CaseSensitive::No ) for: "expected exception" contains: "except" (case insensitive) +# Exceptions matchers +ok {test-number} - throwsDerivedException(), DerivedException, Message( "DerivedException::what" ) for: DerivedException::what exception message matches "DerivedException::what" +# Exceptions matchers +ok {test-number} - throwsDerivedException(), DerivedException, !Message( "derivedexception::what" ) for: DerivedException::what not exception message matches "derivedexception::what" +# Exceptions matchers +ok {test-number} - throwsSpecialException( 2 ), SpecialException, !Message( "DerivedException::what" ) for: SpecialException::what not exception message matches "DerivedException::what" +# Exceptions matchers +ok {test-number} - throwsSpecialException( 2 ), SpecialException, Message( "SpecialException::what" ) for: SpecialException::what exception message matches "SpecialException::what" +# Expected exceptions that don't throw or unexpected exceptions fail the test +not ok {test-number} - unexpected exception with message: 'expected exception'; expression was: thisThrows(), std::string +# Expected exceptions that don't throw or unexpected exceptions fail the test +not ok {test-number} - expected exception, got none; expression was: thisDoesntThrow(), std::domain_error +# Expected exceptions that don't throw or unexpected exceptions fail the test +not ok {test-number} - unexpected exception with message: 'expected exception'; expression was: thisThrows() +# FAIL aborts the test +not ok {test-number} - explicitly with 1 message: 'This is a failure' +# FAIL does not require an argument +not ok {test-number} - explicitly +# FAIL_CHECK does not abort the test +not ok {test-number} - explicitly with 1 message: 'This is a failure' +# FAIL_CHECK does not abort the test +warning {test-number} - 'This message appears in the output' +# Factorials are computed +ok {test-number} - Factorial(0) == 1 for: 1 == 1 +# Factorials are computed +ok {test-number} - Factorial(1) == 1 for: 1 == 1 +# Factorials are computed +ok {test-number} - Factorial(2) == 2 for: 2 == 2 +# Factorials are computed +ok {test-number} - Factorial(3) == 6 for: 6 == 6 +# Factorials are computed +ok {test-number} - Factorial(10) == 3628800 for: 3628800 (0x) == 3628800 (0x) +# Filter generator throws exception for empty generator +ok {test-number} - filter( []( int ) { return false; }, value( 3 ) ), Catch::GeneratorException +# Floating point matchers: double +ok {test-number} - 10., WithinRel( 11.1, 0.1 ) for: 10.0 and 11.09999999999999964 are within 10% of each other +# Floating point matchers: double +ok {test-number} - 10., !WithinRel( 11.2, 0.1 ) for: 10.0 not and 11.19999999999999929 are within 10% of each other +# Floating point matchers: double +ok {test-number} - 1., !WithinRel( 0., 0.99 ) for: 1.0 not and 0.0 are within 99% of each other +# Floating point matchers: double +ok {test-number} - -0., WithinRel( 0. ) for: -0.0 and 0.0 are within 2.22045e-12% of each other +# Floating point matchers: double +ok {test-number} - v1, WithinRel( v2 ) for: 0.0 and 0.0 are within 2.22045e-12% of each other +# Floating point matchers: double +ok {test-number} - 1., WithinAbs( 1., 0 ) for: 1.0 is within 0.0 of 1.0 +# Floating point matchers: double +ok {test-number} - 0., WithinAbs( 1., 1 ) for: 0.0 is within 1.0 of 1.0 +# Floating point matchers: double +ok {test-number} - 0., !WithinAbs( 1., 0.99 ) for: 0.0 not is within 0.98999999999999999 of 1.0 +# Floating point matchers: double +ok {test-number} - 0., !WithinAbs( 1., 0.99 ) for: 0.0 not is within 0.98999999999999999 of 1.0 +# Floating point matchers: double +ok {test-number} - 11., !WithinAbs( 10., 0.5 ) for: 11.0 not is within 0.5 of 10.0 +# Floating point matchers: double +ok {test-number} - 10., !WithinAbs( 11., 0.5 ) for: 10.0 not is within 0.5 of 11.0 +# Floating point matchers: double +ok {test-number} - -10., WithinAbs( -10., 0.5 ) for: -10.0 is within 0.5 of -10.0 +# Floating point matchers: double +ok {test-number} - -10., WithinAbs( -9.6, 0.5 ) for: -10.0 is within 0.5 of -9.59999999999999964 +# Floating point matchers: double +ok {test-number} - 1., WithinULP( 1., 0 ) for: 1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00]) +# Floating point matchers: double +ok {test-number} - nextafter( 1., 2. ), WithinULP( 1., 1 ) for: 1.00000000000000022 is within 1 ULPs of 1.0000000000000000e+00 ([9.9999999999999989e-01, 1.0000000000000002e+00]) +# Floating point matchers: double +ok {test-number} - 0., WithinULP( nextafter( 0., 1. ), 1 ) for: 0.0 is within 1 ULPs of 4.9406564584124654e-324 ([0.0000000000000000e+00, 9.8813129168249309e-324]) +# Floating point matchers: double +ok {test-number} - 1., WithinULP( nextafter( 1., 0. ), 1 ) for: 1.0 is within 1 ULPs of 9.9999999999999989e-01 ([9.9999999999999978e-01, 1.0000000000000000e+00]) +# Floating point matchers: double +ok {test-number} - 1., !WithinULP( nextafter( 1., 2. ), 0 ) for: 1.0 not is within 0 ULPs of 1.0000000000000002e+00 ([1.0000000000000002e+00, 1.0000000000000002e+00]) +# Floating point matchers: double +ok {test-number} - 1., WithinULP( 1., 0 ) for: 1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00]) +# Floating point matchers: double +ok {test-number} - -0., WithinULP( 0., 0 ) for: -0.0 is within 0 ULPs of 0.0000000000000000e+00 ([0.0000000000000000e+00, 0.0000000000000000e+00]) +# Floating point matchers: double +ok {test-number} - 1., WithinAbs( 1., 0.5 ) || WithinULP( 2., 1 ) for: 1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0000000000000000e+00 ([1.9999999999999998e+00, 2.0000000000000004e+00]) ) +# Floating point matchers: double +ok {test-number} - 1., WithinAbs( 2., 0.5 ) || WithinULP( 1., 0 ) for: 1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00]) ) +# Floating point matchers: double +ok {test-number} - 0.0001, WithinAbs( 0., 0.001 ) || WithinRel( 0., 0.1 ) for: 0.0001 ( is within 0.001 of 0.0 or and 0.0 are within 10% of each other ) +# Floating point matchers: double +ok {test-number} - WithinAbs( 1., 0. ) +# Floating point matchers: double +ok {test-number} - WithinAbs( 1., -1. ), std::domain_error +# Floating point matchers: double +ok {test-number} - WithinULP( 1., 0 ) +# Floating point matchers: double +ok {test-number} - WithinRel( 1., 0. ) +# Floating point matchers: double +ok {test-number} - WithinRel( 1., -0.2 ), std::domain_error +# Floating point matchers: double +ok {test-number} - WithinRel( 1., 1. ), std::domain_error +# Floating point matchers: double +ok {test-number} - 1., !IsNaN() for: 1.0 not is NaN +# Floating point matchers: float +ok {test-number} - 10.f, WithinRel( 11.1f, 0.1f ) for: 10.0f and 11.10000038146972656 are within 10% of each other +# Floating point matchers: float +ok {test-number} - 10.f, !WithinRel( 11.2f, 0.1f ) for: 10.0f not and 11.19999980926513672 are within 10% of each other +# Floating point matchers: float +ok {test-number} - 1.f, !WithinRel( 0.f, 0.99f ) for: 1.0f not and 0.0 are within 99% of each other +# Floating point matchers: float +ok {test-number} - -0.f, WithinRel( 0.f ) for: -0.0f and 0.0 are within 0.00119209% of each other +# Floating point matchers: float +ok {test-number} - v1, WithinRel( v2 ) for: 0.0f and 0.0 are within 0.00119209% of each other +# Floating point matchers: float +ok {test-number} - 1.f, WithinAbs( 1.f, 0 ) for: 1.0f is within 0.0 of 1.0 +# Floating point matchers: float +ok {test-number} - 0.f, WithinAbs( 1.f, 1 ) for: 0.0f is within 1.0 of 1.0 +# Floating point matchers: float +ok {test-number} - 0.f, !WithinAbs( 1.f, 0.99f ) for: 0.0f not is within 0.99000000953674316 of 1.0 +# Floating point matchers: float +ok {test-number} - 0.f, !WithinAbs( 1.f, 0.99f ) for: 0.0f not is within 0.99000000953674316 of 1.0 +# Floating point matchers: float +ok {test-number} - 0.f, WithinAbs( -0.f, 0 ) for: 0.0f is within 0.0 of -0.0 +# Floating point matchers: float +ok {test-number} - 11.f, !WithinAbs( 10.f, 0.5f ) for: 11.0f not is within 0.5 of 10.0 +# Floating point matchers: float +ok {test-number} - 10.f, !WithinAbs( 11.f, 0.5f ) for: 10.0f not is within 0.5 of 11.0 +# Floating point matchers: float +ok {test-number} - -10.f, WithinAbs( -10.f, 0.5f ) for: -10.0f is within 0.5 of -10.0 +# Floating point matchers: float +ok {test-number} - -10.f, WithinAbs( -9.6f, 0.5f ) for: -10.0f is within 0.5 of -9.60000038146972656 +# Floating point matchers: float +ok {test-number} - 1.f, WithinULP( 1.f, 0 ) for: 1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) +# Floating point matchers: float +ok {test-number} - -1.f, WithinULP( -1.f, 0 ) for: -1.0f is within 0 ULPs of -1.00000000e+00f ([-1.00000000e+00, -1.00000000e+00]) +# Floating point matchers: float +ok {test-number} - nextafter( 1.f, 2.f ), WithinULP( 1.f, 1 ) for: 1.000000119f is within 1 ULPs of 1.00000000e+00f ([9.99999940e-01, 1.00000012e+00]) +# Floating point matchers: float +ok {test-number} - 0.f, WithinULP( nextafter( 0.f, 1.f ), 1 ) for: 0.0f is within 1 ULPs of 1.40129846e-45f ([0.00000000e+00, 2.80259693e-45]) +# Floating point matchers: float +ok {test-number} - 1.f, WithinULP( nextafter( 1.f, 0.f ), 1 ) for: 1.0f is within 1 ULPs of 9.99999940e-01f ([9.99999881e-01, 1.00000000e+00]) +# Floating point matchers: float +ok {test-number} - 1.f, !WithinULP( nextafter( 1.f, 2.f ), 0 ) for: 1.0f not is within 0 ULPs of 1.00000012e+00f ([1.00000012e+00, 1.00000012e+00]) +# Floating point matchers: float +ok {test-number} - 1.f, WithinULP( 1.f, 0 ) for: 1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) +# Floating point matchers: float +ok {test-number} - -0.f, WithinULP( 0.f, 0 ) for: -0.0f is within 0 ULPs of 0.00000000e+00f ([0.00000000e+00, 0.00000000e+00]) +# Floating point matchers: float +ok {test-number} - 1.f, WithinAbs( 1.f, 0.5 ) || WithinULP( 1.f, 1 ) for: 1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.00000000e+00f ([9.99999940e-01, 1.00000012e+00]) ) +# Floating point matchers: float +ok {test-number} - 1.f, WithinAbs( 2.f, 0.5 ) || WithinULP( 1.f, 0 ) for: 1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) ) +# Floating point matchers: float +ok {test-number} - 0.0001f, WithinAbs( 0.f, 0.001f ) || WithinRel( 0.f, 0.1f ) for: 0.0001f ( is within 0.00100000004749745 of 0.0 or and 0.0 are within 10% of each other ) +# Floating point matchers: float +ok {test-number} - WithinAbs( 1.f, 0.f ) +# Floating point matchers: float +ok {test-number} - WithinAbs( 1.f, -1.f ), std::domain_error +# Floating point matchers: float +ok {test-number} - WithinULP( 1.f, 0 ) +# Floating point matchers: float +ok {test-number} - WithinULP( 1.f, static_cast( -1 ) ), std::domain_error +# Floating point matchers: float +ok {test-number} - WithinRel( 1.f, 0.f ) +# Floating point matchers: float +ok {test-number} - WithinRel( 1.f, -0.2f ), std::domain_error +# Floating point matchers: float +ok {test-number} - WithinRel( 1.f, 1.f ), std::domain_error +# Floating point matchers: float +ok {test-number} - 1., !IsNaN() for: 1.0 not is NaN +# GENERATE can combine literals and generators +ok {test-number} - i % 2 == 0 for: 0 == 0 +# GENERATE can combine literals and generators +ok {test-number} - i % 2 == 0 for: 0 == 0 +# GENERATE can combine literals and generators +ok {test-number} - i % 2 == 0 for: 0 == 0 +# GENERATE can combine literals and generators +ok {test-number} - i % 2 == 0 for: 0 == 0 +# Generators -- adapters +ok {test-number} - i % 2 == 0 for: 0 == 0 +# Generators -- adapters +ok {test-number} - i % 2 == 0 for: 0 == 0 +# Generators -- adapters +ok {test-number} - i % 2 == 0 for: 0 == 0 +# Generators -- adapters +ok {test-number} - filter([] (int) {return false; }, value(1)), Catch::GeneratorException +# Generators -- adapters +ok {test-number} - i < 4 for: 1 < 4 +# Generators -- adapters +ok {test-number} - i < 4 for: 2 < 4 +# Generators -- adapters +ok {test-number} - i < 4 for: 3 < 4 +# Generators -- adapters +ok {test-number} - i % 2 == 0 for: 0 == 0 +# Generators -- adapters +ok {test-number} - i % 2 == 0 for: 0 == 0 +# Generators -- adapters +ok {test-number} - i % 2 == 0 for: 0 == 0 +# Generators -- adapters +ok {test-number} - i.size() == 1 for: 1 == 1 +# Generators -- adapters +ok {test-number} - i.size() == 1 for: 1 == 1 +# Generators -- adapters +ok {test-number} - i.size() == 1 for: 1 == 1 +# Generators -- adapters +ok {test-number} - i.size() == 1 for: 1 == 1 +# Generators -- adapters +ok {test-number} - i.size() == 1 for: 1 == 1 +# Generators -- adapters +ok {test-number} - i.size() == 1 for: 1 == 1 +# Generators -- adapters +ok {test-number} - j > 0 for: 1 > 0 +# Generators -- adapters +ok {test-number} - j > 0 for: 2 > 0 +# Generators -- adapters +ok {test-number} - j > 0 for: 3 > 0 +# Generators -- adapters +ok {test-number} - j > 0 for: 1 > 0 +# Generators -- adapters +ok {test-number} - j > 0 for: 2 > 0 +# Generators -- adapters +ok {test-number} - j > 0 for: 3 > 0 +# Generators -- adapters +ok {test-number} - chunk2.size() == 2 for: 2 == 2 +# Generators -- adapters +ok {test-number} - chunk2.front() == chunk2.back() for: 1 == 1 +# Generators -- adapters +ok {test-number} - chunk2.size() == 2 for: 2 == 2 +# Generators -- adapters +ok {test-number} - chunk2.front() == chunk2.back() for: 2 == 2 +# Generators -- adapters +ok {test-number} - chunk2.size() == 2 for: 2 == 2 +# Generators -- adapters +ok {test-number} - chunk2.front() == chunk2.back() for: 3 == 3 +# Generators -- adapters +ok {test-number} - chunk2.size() == 2 for: 2 == 2 +# Generators -- adapters +ok {test-number} - chunk2.front() == chunk2.back() for: 1 == 1 +# Generators -- adapters +ok {test-number} - chunk2.front() < 3 for: 1 < 3 +# Generators -- adapters +ok {test-number} - chunk2.size() == 2 for: 2 == 2 +# Generators -- adapters +ok {test-number} - chunk2.front() == chunk2.back() for: 2 == 2 +# Generators -- adapters +ok {test-number} - chunk2.front() < 3 for: 2 < 3 +# Generators -- adapters +ok {test-number} - chunk2.size() == 0 for: 0 == 0 +# Generators -- adapters +ok {test-number} - chunk2.size() == 0 for: 0 == 0 +# Generators -- adapters +ok {test-number} - chunk2.size() == 0 for: 0 == 0 +# Generators -- adapters +ok {test-number} - chunk(2, value(1)), Catch::GeneratorException +# Generators -- simple +ok {test-number} - j < i for: -3 < 1 +# Generators -- simple +ok {test-number} - j < i for: -2 < 1 +# Generators -- simple +ok {test-number} - j < i for: -1 < 1 +# Generators -- simple +ok {test-number} - 4u * i > str.size() for: 4 > 1 +# Generators -- simple +ok {test-number} - 4u * i > str.size() for: 4 > 2 +# Generators -- simple +ok {test-number} - 4u * i > str.size() for: 4 > 3 +# Generators -- simple +ok {test-number} - j < i for: -3 < 2 +# Generators -- simple +ok {test-number} - j < i for: -2 < 2 +# Generators -- simple +ok {test-number} - j < i for: -1 < 2 +# Generators -- simple +ok {test-number} - 4u * i > str.size() for: 8 > 1 +# Generators -- simple +ok {test-number} - 4u * i > str.size() for: 8 > 2 +# Generators -- simple +ok {test-number} - 4u * i > str.size() for: 8 > 3 +# Generators -- simple +ok {test-number} - j < i for: -3 < 3 +# Generators -- simple +ok {test-number} - j < i for: -2 < 3 +# Generators -- simple +ok {test-number} - j < i for: -1 < 3 +# Generators -- simple +ok {test-number} - 4u * i > str.size() for: 12 > 1 +# Generators -- simple +ok {test-number} - 4u * i > str.size() for: 12 > 2 +# Generators -- simple +ok {test-number} - 4u * i > str.size() for: 12 > 3 +# Generators internals +ok {test-number} - gen.get() == 123 for: 123 == 123 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 1 for: 1 == 1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 3 for: 3 == 3 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 5 for: 5 == 5 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 1 for: 1 == 1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 5 for: 5 == 5 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 4 for: 4 == 4 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 0 for: 0 == 0 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get().size() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - gen.get() == "aa" for: "aa" == "aa" +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == "bb" for: "bb" == "bb" +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == "cc" for: "cc" == "cc" +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 1 for: 1 == 1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 3 for: 3 == 3 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 1 for: 1 == 1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 3 for: 3 == 3 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - filter([](int) { return false; }, value(1)), Catch::GeneratorException +# Generators internals +ok {test-number} - filter([](int) { return false; }, values({ 1, 2, 3 })), Catch::GeneratorException +# Generators internals +ok {test-number} - gen.get() == 1 for: 1 == 1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 1 for: 1 == 1 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 2.0 for: 2.0 == 2.0 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 4.0 for: 4.0 == 4.0 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 6.0 for: 6.0 == 6.0 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 2.0 for: 2.0 == 2.0 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 4.0 for: 4.0 == 4.0 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 6.0 for: 6.0 == 6.0 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 3 for: 3 == 3 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 1 for: 1 == 1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 3 for: 3 == 3 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 1 for: 1 == 1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 3 for: 3 == 3 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == -2 for: -2 == -2 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -1 for: -1 == -1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 0 for: 0 == 0 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 1 for: 1 == 1 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 1 for: 1 == 1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 0 for: 0 == 0 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -1 for: -1 == -1 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == -7 for: -7 == -7 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -4 for: -4 == -4 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -1 for: -1 == -1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == -7 for: -7 == -7 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -4 for: -4 == -4 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -1 for: -1 == -1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == -7 for: -7 == -7 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -4 for: -4 == -4 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -1 for: -1 == -1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 5 for: 5 == 5 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -1.0 == Approx( -1.0 ) with 1 message: 'Current expected value is -1' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -1' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.90000000000000002 == Approx( -0.90000000000000002 ) with 1 message: 'Current expected value is -0.9' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.9' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.80000000000000004 == Approx( -0.80000000000000004 ) with 1 message: 'Current expected value is -0.8' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.8' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.70000000000000007 == Approx( -0.70000000000000007 ) with 1 message: 'Current expected value is -0.7' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.7' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.60000000000000009 == Approx( -0.60000000000000009 ) with 1 message: 'Current expected value is -0.6' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.6' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.50000000000000011 == Approx( -0.50000000000000011 ) with 1 message: 'Current expected value is -0.5' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.5' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.40000000000000013 == Approx( -0.40000000000000013 ) with 1 message: 'Current expected value is -0.4' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.4' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.30000000000000016 == Approx( -0.30000000000000016 ) with 1 message: 'Current expected value is -0.3' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.3' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.20000000000000015 == Approx( -0.20000000000000015 ) with 1 message: 'Current expected value is -0.2' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.2' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.10000000000000014 == Approx( -0.10000000000000014 ) with 1 message: 'Current expected value is -0.1' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.1' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.00000000000000014 == Approx( -0.00000000000000014 ) with 1 message: 'Current expected value is -1.38778e-16' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -1.38778e-16' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.09999999999999987 == Approx( 0.09999999999999987 ) with 1 message: 'Current expected value is 0.1' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.1' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.19999999999999987 == Approx( 0.19999999999999987 ) with 1 message: 'Current expected value is 0.2' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.2' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.29999999999999988 == Approx( 0.29999999999999988 ) with 1 message: 'Current expected value is 0.3' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.3' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.39999999999999991 == Approx( 0.39999999999999991 ) with 1 message: 'Current expected value is 0.4' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.4' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.49999999999999989 == Approx( 0.49999999999999989 ) with 1 message: 'Current expected value is 0.5' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.5' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.59999999999999987 == Approx( 0.59999999999999987 ) with 1 message: 'Current expected value is 0.6' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.6' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.69999999999999984 == Approx( 0.69999999999999984 ) with 1 message: 'Current expected value is 0.7' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.7' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.79999999999999982 == Approx( 0.79999999999999982 ) with 1 message: 'Current expected value is 0.8' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.8' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.8999999999999998 == Approx( 0.8999999999999998 ) with 1 message: 'Current expected value is 0.9' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.9' +# Generators internals +ok {test-number} - gen.get() == Approx( rangeEnd ) for: 0.99999999999999978 == Approx( 1.0 ) +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -1.0 == Approx( -1.0 ) with 1 message: 'Current expected value is -1' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -1' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.69999999999999996 == Approx( -0.69999999999999996 ) with 1 message: 'Current expected value is -0.7' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.7' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.39999999999999997 == Approx( -0.39999999999999997 ) with 1 message: 'Current expected value is -0.4' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.4' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.09999999999999998 == Approx( -0.09999999999999998 ) with 1 message: 'Current expected value is -0.1' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.1' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.20000000000000001 == Approx( 0.20000000000000001 ) with 1 message: 'Current expected value is 0.2' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.2' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.5 == Approx( 0.5 ) with 1 message: 'Current expected value is 0.5' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.5' +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -1.0 == Approx( -1.0 ) with 1 message: 'Current expected value is -1' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -1' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.69999999999999996 == Approx( -0.69999999999999996 ) with 1 message: 'Current expected value is -0.7' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.7' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.39999999999999997 == Approx( -0.39999999999999997 ) with 1 message: 'Current expected value is -0.4' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.4' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.09999999999999998 == Approx( -0.09999999999999998 ) with 1 message: 'Current expected value is -0.1' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.1' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.20000000000000001 == Approx( 0.20000000000000001 ) with 1 message: 'Current expected value is 0.2' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.2' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.5 == Approx( 0.5 ) with 1 message: 'Current expected value is 0.5' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.5' +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 5 for: 5 == 5 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -1 for: -1 == -1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -4 for: -4 == -4 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 5 for: 5 == 5 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -1 for: -1 == -1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -4 for: -4 == -4 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 5 for: 5 == 5 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -1 for: -1 == -1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -4 for: -4 == -4 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -7 for: -7 == -7 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Greater-than inequalities with different epsilons +ok {test-number} - d >= Approx( 1.22 ) for: 1.22999999999999998 >= Approx( 1.21999999999999997 ) +# Greater-than inequalities with different epsilons +ok {test-number} - d >= Approx( 1.23 ) for: 1.22999999999999998 >= Approx( 1.22999999999999998 ) +# Greater-than inequalities with different epsilons +ok {test-number} - !(d >= Approx( 1.24 )) for: !(1.22999999999999998 >= Approx( 1.23999999999999999 )) +# Greater-than inequalities with different epsilons +ok {test-number} - d >= Approx( 1.24 ).epsilon(0.1) for: 1.22999999999999998 >= Approx( 1.23999999999999999 ) +# Hashers with different seed produce different hash with same test case +ok {test-number} - h1( dummy ) != h2( dummy ) for: 3422778688 (0x) != 130711275 (0x) +# Hashers with same seed produce same hash +ok {test-number} - h1( dummy ) == h2( dummy ) for: 3422778688 (0x) == 3422778688 (0x) +# Hashing different test cases produces different result +ok {test-number} - h( dummy1 ) != h( dummy2 ) for: 2903002874 (0x) != 2668622104 (0x) +# Hashing different test cases produces different result +ok {test-number} - h( dummy1 ) != h( dummy2 ) for: 2673152918 (0x) != 3916075712 (0x) +# Hashing different test cases produces different result +ok {test-number} - h( dummy1 ) != h( dummy2 ) for: 2074929312 (0x) != 3429949824 (0x) +# Hashing test case produces same hash across multiple calls +ok {test-number} - h( dummy ) == h( dummy ) for: 3422778688 (0x) == 3422778688 (0x) +# INFO and UNSCOPED_INFO can stream multiple arguments +not ok {test-number} - explicitly with 3 messages: 'This info has multiple parts.' and 'This unscoped info has multiple parts.' and 'Show infos!' +# INFO and WARN do not abort tests +warning {test-number} - 'this is a message' with 1 message: 'this is a warning' +# INFO gets logged on failure +not ok {test-number} - a == 1 for: 2 == 1 with 2 messages: 'this message should be logged' and 'so should this' +# INFO gets logged on failure, even if captured before successful assertions +ok {test-number} - a == 2 for: 2 == 2 with 1 message: 'this message may be logged later' +# INFO gets logged on failure, even if captured before successful assertions +not ok {test-number} - a == 1 for: 2 == 1 with 2 messages: 'this message may be logged later' and 'this message should be logged' +# INFO gets logged on failure, even if captured before successful assertions +not ok {test-number} - a == 0 for: 2 == 0 with 3 messages: 'this message may be logged later' and 'this message should be logged' and 'and this, but later' +# INFO gets logged on failure, even if captured before successful assertions +ok {test-number} - a == 2 for: 2 == 2 with 4 messages: 'this message may be logged later' and 'this message should be logged' and 'and this, but later' and 'but not this' +# INFO is reset for each loop +ok {test-number} - i < 10 for: 0 < 10 with 2 messages: 'current counter 0' and 'i := 0' +# INFO is reset for each loop +ok {test-number} - i < 10 for: 1 < 10 with 2 messages: 'current counter 1' and 'i := 1' +# INFO is reset for each loop +ok {test-number} - i < 10 for: 2 < 10 with 2 messages: 'current counter 2' and 'i := 2' +# INFO is reset for each loop +ok {test-number} - i < 10 for: 3 < 10 with 2 messages: 'current counter 3' and 'i := 3' +# INFO is reset for each loop +ok {test-number} - i < 10 for: 4 < 10 with 2 messages: 'current counter 4' and 'i := 4' +# INFO is reset for each loop +ok {test-number} - i < 10 for: 5 < 10 with 2 messages: 'current counter 5' and 'i := 5' +# INFO is reset for each loop +ok {test-number} - i < 10 for: 6 < 10 with 2 messages: 'current counter 6' and 'i := 6' +# INFO is reset for each loop +ok {test-number} - i < 10 for: 7 < 10 with 2 messages: 'current counter 7' and 'i := 7' +# INFO is reset for each loop +ok {test-number} - i < 10 for: 8 < 10 with 2 messages: 'current counter 8' and 'i := 8' +# INFO is reset for each loop +ok {test-number} - i < 10 for: 9 < 10 with 2 messages: 'current counter 9' and 'i := 9' +# INFO is reset for each loop +not ok {test-number} - i < 10 for: 10 < 10 with 2 messages: 'current counter 10' and 'i := 10' +# Incomplete AssertionHandler +not ok {test-number} - unexpected exception with message: 'Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE'; expression was: Dummy +# Inequality checks that should fail +not ok {test-number} - data.int_seven != 7 for: 7 != 7 +# Inequality checks that should fail +not ok {test-number} - data.float_nine_point_one != Approx( 9.1f ) for: 9.100000381f != Approx( 9.10000038146972656 ) +# Inequality checks that should fail +not ok {test-number} - data.double_pi != Approx( 3.1415926535 ) for: 3.14159265350000005 != Approx( 3.14159265350000005 ) +# Inequality checks that should fail +not ok {test-number} - data.str_hello != "hello" for: "hello" != "hello" +# Inequality checks that should fail +not ok {test-number} - data.str_hello.size() != 5 for: 5 != 5 +# Inequality checks that should succeed +ok {test-number} - data.int_seven != 6 for: 7 != 6 +# Inequality checks that should succeed +ok {test-number} - data.int_seven != 8 for: 7 != 8 +# Inequality checks that should succeed +ok {test-number} - data.float_nine_point_one != Approx( 9.11f ) for: 9.100000381f != Approx( 9.10999965667724609 ) +# Inequality checks that should succeed +ok {test-number} - data.float_nine_point_one != Approx( 9.0f ) for: 9.100000381f != Approx( 9.0 ) +# Inequality checks that should succeed +ok {test-number} - data.float_nine_point_one != Approx( 1 ) for: 9.100000381f != Approx( 1.0 ) +# Inequality checks that should succeed +ok {test-number} - data.float_nine_point_one != Approx( 0 ) for: 9.100000381f != Approx( 0.0 ) +# Inequality checks that should succeed +ok {test-number} - data.double_pi != Approx( 3.1415 ) for: 3.14159265350000005 != Approx( 3.14150000000000018 ) +# Inequality checks that should succeed +ok {test-number} - data.str_hello != "goodbye" for: "hello" != "goodbye" +# Inequality checks that should succeed +ok {test-number} - data.str_hello != "hell" for: "hello" != "hell" +# Inequality checks that should succeed +ok {test-number} - data.str_hello != "hello1" for: "hello" != "hello1" +# Inequality checks that should succeed +ok {test-number} - data.str_hello.size() != 6 for: 5 != 6 +# JsonWriter +ok {test-number} - stream.str() == "" for: "" == "" +# JsonWriter +ok {test-number} - stream.str() == "{\n}" for: "{ }" == "{ }" +# JsonWriter +ok {test-number} - stream.str(), ContainsSubstring( "\"int\": 1," ) && ContainsSubstring( "\"double\": 1.5," ) && ContainsSubstring( "\"true\": true," ) && ContainsSubstring( "\"false\": false," ) && ContainsSubstring( "\"string\": \"this is a string\"," ) && ContainsSubstring( "\"array\": [\n 1,\n 2\n ]\n}" ) for: "{ "int": 1, "double": 1.5, "true": true, "false": false, "string": "this is a string", "array": [ 1, 2 ] }" ( contains: ""int": 1," and contains: ""double": 1.5," and contains: ""true": true," and contains: ""false": false," and contains: ""string": "this is a string"," and contains: ""array": [ 1, 2 ] }" ) +# JsonWriter +ok {test-number} - stream.str(), ContainsSubstring( "\"empty_object\": {\n }," ) && ContainsSubstring( "\"fully_object\": {\n \"key\": 1\n }" ) for: "{ "empty_object": { }, "fully_object": { "key": 1 } }" ( contains: ""empty_object": { }," and contains: ""fully_object": { "key": 1 }" ) +# JsonWriter +ok {test-number} - stream.str() == "[\n]" for: "[ ]" == "[ ]" +# JsonWriter +ok {test-number} - stream.str() == "[\n 1,\n 1.5,\n true,\n false,\n \"this is a string\",\n {\n \"object\": 42\n },\n [\n \"array\",\n 42.5\n ]\n]" for: "[ 1, 1.5, true, false, "this is a string", { "object": 42 }, [ "array", 42.5 ] ]" == "[ 1, 1.5, true, false, "this is a string", { "object": 42 }, [ "array", 42.5 ] ]" +# JsonWriter +ok {test-number} - stream.str() == "{\n}" for: "{ }" == "{ }" +# JsonWriter +ok {test-number} - stream.str() == "[\n]" for: "[ ]" == "[ ]" +# JsonWriter +ok {test-number} - stream.str() == "\"custom\"" for: ""custom"" == ""custom"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\\"\"" for: ""\""" == ""\""" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\\\\"" for: ""\\"" == ""\\"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"/\"" for: ""/"" == ""/"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\b\"" for: ""\b"" == ""\b"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\f\"" for: ""\f"" == ""\f"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\n\"" for: ""\n"" == ""\n"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\r\"" for: ""\r"" == ""\r"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\t\"" for: ""\t"" == ""\t"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\\\/\\t\\r\\n\"" for: ""\\/\t\r\n"" == ""\\/\t\r\n"" +# Lambdas in assertions +ok {test-number} - []() { return true; }() for: true +# Less-than inequalities with different epsilons +ok {test-number} - d <= Approx( 1.24 ) for: 1.22999999999999998 <= Approx( 1.23999999999999999 ) +# Less-than inequalities with different epsilons +ok {test-number} - d <= Approx( 1.23 ) for: 1.22999999999999998 <= Approx( 1.22999999999999998 ) +# Less-than inequalities with different epsilons +ok {test-number} - !(d <= Approx( 1.22 )) for: !(1.22999999999999998 <= Approx( 1.21999999999999997 )) +# Less-than inequalities with different epsilons +ok {test-number} - d <= Approx( 1.22 ).epsilon(0.1) for: 1.22999999999999998 <= Approx( 1.21999999999999997 ) +# ManuallyRegistered +ok {test-number} - with 1 message: 'was called' +# Matchers can be (AllOf) composed with the && operator +ok {test-number} - testStringForMatching(), ContainsSubstring( "string" ) && ContainsSubstring( "abc" ) && ContainsSubstring( "substring" ) && ContainsSubstring( "contains" ) for: "this string contains 'abc' as a substring" ( contains: "string" and contains: "abc" and contains: "substring" and contains: "contains" ) +# Matchers can be (AnyOf) composed with the || operator +ok {test-number} - testStringForMatching(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) for: "this string contains 'abc' as a substring" ( contains: "string" or contains: "different" or contains: "random" ) +# Matchers can be (AnyOf) composed with the || operator +ok {test-number} - testStringForMatching2(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) for: "some completely different text that contains one common word" ( contains: "string" or contains: "different" or contains: "random" ) +# Matchers can be composed with both && and || +ok {test-number} - testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "substring" ) for: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "substring" ) +# Matchers can be composed with both && and || - failing +not ok {test-number} - testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) for: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" ) +# Matchers can be negated (Not) with the ! operator +ok {test-number} - testStringForMatching(), !ContainsSubstring( "different" ) for: "this string contains 'abc' as a substring" not contains: "different" +# Matchers can be negated (Not) with the ! operator - failing +not ok {test-number} - testStringForMatching(), !ContainsSubstring( "substring" ) for: "this string contains 'abc' as a substring" not contains: "substring" +# Mayfail test case with nested sections +not ok {test-number} - explicitly +# Mayfail test case with nested sections +not ok {test-number} - explicitly +# Mayfail test case with nested sections +not ok {test-number} - explicitly +# Mayfail test case with nested sections +not ok {test-number} - explicitly +# Mismatching exception messages failing the test +ok {test-number} - thisThrows(), "expected exception" for: "expected exception" equals: "expected exception" +# Mismatching exception messages failing the test +not ok {test-number} - thisThrows(), "should fail" for: "expected exception" equals: "should fail" +# Multireporter calls reporters and listeners in correct order +ok {test-number} - records == expected for: { "Hello", "world", "Goodbye", "world" } == { "Hello", "world", "Goodbye", "world" } +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == false for: false == false +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == false for: false == false +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +# Nested generators and captured variables +ok {test-number} - values > -6 for: 3 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 4 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 5 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 6 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: -5 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: -4 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 90 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 91 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 92 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 93 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 94 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 95 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 96 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 97 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 98 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 99 > -6 +# Nice descriptive name +warning {test-number} - 'This one ran' +# Non-std exceptions can be translated +not ok {test-number} - unexpected exception with message: 'custom exception' +# Objects that evaluated in boolean contexts can be checked +ok {test-number} - True for: {?} +# Objects that evaluated in boolean contexts can be checked +ok {test-number} - !False for: true +# Objects that evaluated in boolean contexts can be checked +ok {test-number} - !(False) for: !{?} +# Optionally static assertions +ok {test-number} - with 1 message: 'std::is_void::value' +# Optionally static assertions +ok {test-number} - with 1 message: '!(std::is_void::value)' +# Optionally static assertions +ok {test-number} - with 1 message: 'std::is_void::value' +# Optionally static assertions +ok {test-number} - with 1 message: '!(std::is_void::value)' +# Ordering comparison checks that should fail +not ok {test-number} - data.int_seven > 7 for: 7 > 7 +# Ordering comparison checks that should fail +not ok {test-number} - data.int_seven < 7 for: 7 < 7 +# Ordering comparison checks that should fail +not ok {test-number} - data.int_seven > 8 for: 7 > 8 +# Ordering comparison checks that should fail +not ok {test-number} - data.int_seven < 6 for: 7 < 6 +# Ordering comparison checks that should fail +not ok {test-number} - data.int_seven < 0 for: 7 < 0 +# Ordering comparison checks that should fail +not ok {test-number} - data.int_seven < -1 for: 7 < -1 +# Ordering comparison checks that should fail +not ok {test-number} - data.int_seven >= 8 for: 7 >= 8 +# Ordering comparison checks that should fail +not ok {test-number} - data.int_seven <= 6 for: 7 <= 6 +# Ordering comparison checks that should fail +not ok {test-number} - data.float_nine_point_one < 9 for: 9.100000381f < 9 +# Ordering comparison checks that should fail +not ok {test-number} - data.float_nine_point_one > 10 for: 9.100000381f > 10 +# Ordering comparison checks that should fail +not ok {test-number} - data.float_nine_point_one > 9.2 for: 9.100000381f > 9.19999999999999929 +# Ordering comparison checks that should fail +not ok {test-number} - data.str_hello > "hello" for: "hello" > "hello" +# Ordering comparison checks that should fail +not ok {test-number} - data.str_hello < "hello" for: "hello" < "hello" +# Ordering comparison checks that should fail +not ok {test-number} - data.str_hello > "hellp" for: "hello" > "hellp" +# Ordering comparison checks that should fail +not ok {test-number} - data.str_hello > "z" for: "hello" > "z" +# Ordering comparison checks that should fail +not ok {test-number} - data.str_hello < "hellm" for: "hello" < "hellm" +# Ordering comparison checks that should fail +not ok {test-number} - data.str_hello < "a" for: "hello" < "a" +# Ordering comparison checks that should fail +not ok {test-number} - data.str_hello >= "z" for: "hello" >= "z" +# Ordering comparison checks that should fail +not ok {test-number} - data.str_hello <= "a" for: "hello" <= "a" +# Ordering comparison checks that should succeed +ok {test-number} - data.int_seven < 8 for: 7 < 8 +# Ordering comparison checks that should succeed +ok {test-number} - data.int_seven > 6 for: 7 > 6 +# Ordering comparison checks that should succeed +ok {test-number} - data.int_seven > 0 for: 7 > 0 +# Ordering comparison checks that should succeed +ok {test-number} - data.int_seven > -1 for: 7 > -1 +# Ordering comparison checks that should succeed +ok {test-number} - data.int_seven >= 7 for: 7 >= 7 +# Ordering comparison checks that should succeed +ok {test-number} - data.int_seven >= 6 for: 7 >= 6 +# Ordering comparison checks that should succeed +ok {test-number} - data.int_seven <= 7 for: 7 <= 7 +# Ordering comparison checks that should succeed +ok {test-number} - data.int_seven <= 8 for: 7 <= 8 +# Ordering comparison checks that should succeed +ok {test-number} - data.float_nine_point_one > 9 for: 9.100000381f > 9 +# Ordering comparison checks that should succeed +ok {test-number} - data.float_nine_point_one < 10 for: 9.100000381f < 10 +# Ordering comparison checks that should succeed +ok {test-number} - data.float_nine_point_one < 9.2 for: 9.100000381f < 9.19999999999999929 +# Ordering comparison checks that should succeed +ok {test-number} - data.str_hello <= "hello" for: "hello" <= "hello" +# Ordering comparison checks that should succeed +ok {test-number} - data.str_hello >= "hello" for: "hello" >= "hello" +# Ordering comparison checks that should succeed +ok {test-number} - data.str_hello < "hellp" for: "hello" < "hellp" +# Ordering comparison checks that should succeed +ok {test-number} - data.str_hello < "zebra" for: "hello" < "zebra" +# Ordering comparison checks that should succeed +ok {test-number} - data.str_hello > "hellm" for: "hello" > "hellm" +# Ordering comparison checks that should succeed +ok {test-number} - data.str_hello > "a" for: "hello" > "a" +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 4242248763 (0x) == 4242248763 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 1867888929 (0x) == 1867888929 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 1276619030 (0x) == 1276619030 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 1911218783 (0x) == 1911218783 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 1827115164 (0x) == 1827115164 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 1472234645 (0x) == 1472234645 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 868832940 (0x) == 868832940 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 570883446 (0x) == 570883446 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 889299803 (0x) == 889299803 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 4261393167 (0x) == 4261393167 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 1472234645 (0x) == 1472234645 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 868832940 (0x) == 868832940 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 570883446 (0x) == 570883446 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 889299803 (0x) == 889299803 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 4261393167 (0x) == 4261393167 (0x) +# Output from all sections is reported +not ok {test-number} - explicitly with 1 message: 'Message from section one' +# Output from all sections is reported +not ok {test-number} - explicitly with 1 message: 'Message from section two' +# Overloaded comma or address-of operators are not used +ok {test-number} - ( EvilMatcher(), EvilMatcher() ), EvilCommaOperatorUsed +# Overloaded comma or address-of operators are not used +ok {test-number} - &EvilMatcher(), EvilAddressOfOperatorUsed +# Overloaded comma or address-of operators are not used +ok {test-number} - EvilMatcher() || ( EvilMatcher() && !EvilMatcher() ) +# Overloaded comma or address-of operators are not used +ok {test-number} - ( EvilMatcher() && EvilMatcher() ) || !EvilMatcher() +# Parse uints +ok {test-number} - parseUInt( "0" ) == Optional{ 0 } for: {?} == {?} +# Parse uints +ok {test-number} - parseUInt( "100" ) == Optional{ 100 } for: {?} == {?} +# Parse uints +ok {test-number} - parseUInt( "4294967295" ) == Optional{ 4294967295 } for: {?} == {?} +# Parse uints +ok {test-number} - parseUInt( "0x", 16 ) == Optional{ 255 } for: {?} == {?} +# Parse uints +ok {test-number} - !(parseUInt( "" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "!!KJHF*#" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "-1" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "4294967296" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "42949672964294967296429496729642949672964294967296" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "2 4" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "0x", 10 )) for: !{?} +# Parsed tags are matched case insensitive +ok {test-number} - spec.hasFilters() for: true +# Parsed tags are matched case insensitive +ok {test-number} - spec.getInvalidSpecs().empty() for: true +# Parsed tags are matched case insensitive +ok {test-number} - spec.matches( testCase ) for: true +# Parsing sharding-related cli flags +ok {test-number} - cli.parse({ "test", "--shard-count=8" }) for: {?} +# Parsing sharding-related cli flags +ok {test-number} - config.shardCount == 8 for: 8 == 8 +# Parsing sharding-related cli flags +ok {test-number} - !(result) for: !{?} +# Parsing sharding-related cli flags +ok {test-number} - result.errorMessage(), ContainsSubstring( "Could not parse '-1' as shard count" ) for: "Could not parse '-1' as shard count" contains: "Could not parse '-1' as shard count" +# Parsing sharding-related cli flags +ok {test-number} - !(result) for: !{?} +# Parsing sharding-related cli flags +ok {test-number} - result.errorMessage(), ContainsSubstring( "Shard count must be positive" ) for: "Shard count must be positive" contains: "Shard count must be positive" +# Parsing sharding-related cli flags +ok {test-number} - cli.parse({ "test", "--shard-index=2" }) for: {?} +# Parsing sharding-related cli flags +ok {test-number} - config.shardIndex == 2 for: 2 == 2 +# Parsing sharding-related cli flags +ok {test-number} - !(result) for: !{?} +# Parsing sharding-related cli flags +ok {test-number} - result.errorMessage(), ContainsSubstring( "Could not parse '-12' as shard index" ) for: "Could not parse '-12' as shard index" contains: "Could not parse '-12' as shard index" +# Parsing sharding-related cli flags +ok {test-number} - cli.parse({ "test", "--shard-index=0" }) for: {?} +# Parsing sharding-related cli flags +ok {test-number} - config.shardIndex == 0 for: 0 == 0 +# Parsing tags with non-alphabetical characters is pass-through +ok {test-number} - spec.hasFilters() for: true with 1 message: 'tagString := "[tag with spaces]"' +# Parsing tags with non-alphabetical characters is pass-through +ok {test-number} - spec.getInvalidSpecs().empty() for: true with 1 message: 'tagString := "[tag with spaces]"' +# Parsing tags with non-alphabetical characters is pass-through +ok {test-number} - spec.matches( testCase ) for: true with 1 message: 'tagString := "[tag with spaces]"' +# Parsing tags with non-alphabetical characters is pass-through +ok {test-number} - spec.hasFilters() for: true with 1 message: 'tagString := "[I said "good day" sir!]"' +# Parsing tags with non-alphabetical characters is pass-through +ok {test-number} - spec.getInvalidSpecs().empty() for: true with 1 message: 'tagString := "[I said "good day" sir!]"' +# Parsing tags with non-alphabetical characters is pass-through +ok {test-number} - spec.matches( testCase ) for: true with 1 message: 'tagString := "[I said "good day" sir!]"' +# Parsing warnings +ok {test-number} - cli.parse( { "test", "-w", "NoAssertions" } ) for: {?} +# Parsing warnings +ok {test-number} - config.warnings == WarnAbout::NoAssertions for: 1 == 1 +# Parsing warnings +ok {test-number} - !(cli.parse( { "test", "-w", "NoTests" } )) for: !{?} +# Parsing warnings +ok {test-number} - cli.parse( { "test", "--warn", "NoAssertions", "--warn", "UnmatchedTestSpec" } ) for: {?} +# Parsing warnings +ok {test-number} - config.warnings == ( WarnAbout::NoAssertions | WarnAbout::UnmatchedTestSpec ) for: 3 == 3 +# Pointers can be compared to null +ok {test-number} - p == 0 for: 0 == 0 +# Pointers can be compared to null +ok {test-number} - p == pNULL for: 0 == 0 +# Pointers can be compared to null +ok {test-number} - p != 0 for: 0x != 0 +# Pointers can be compared to null +ok {test-number} - cp != 0 for: 0x != 0 +# Pointers can be compared to null +ok {test-number} - cpc != 0 for: 0x != 0 +# Pointers can be compared to null +ok {test-number} - returnsNull() == 0 for: {null string} == 0 +# Pointers can be compared to null +ok {test-number} - returnsConstNull() == 0 for: {null string} == 0 +# Pointers can be compared to null +ok {test-number} - 0 != p for: 0 != 0x +# Precision of floating point stringification can be set +ok {test-number} - str1.size() == 3 + 5 for: 8 == 8 +# Precision of floating point stringification can be set +ok {test-number} - str2.size() == 3 + 10 for: 13 == 13 +# Precision of floating point stringification can be set +ok {test-number} - str1.size() == 2 + 5 for: 7 == 7 +# Precision of floating point stringification can be set +ok {test-number} - str2.size() == 2 + 15 for: 17 == 17 +# Predicate matcher can accept const char* +ok {test-number} - "foo", Predicate( []( const char* const& ) { return true; } ) for: "foo" matches undescribed predicate +# Process can be configured on command line +ok {test-number} - result for: {?} +# Process can be configured on command line +ok {test-number} - config.processName == "" for: "" == "" +# Process can be configured on command line +ok {test-number} - result for: {?} +# Process can be configured on command line +ok {test-number} - config.processName == "test" for: "test" == "test" +# Process can be configured on command line +ok {test-number} - config.shouldDebugBreak == false for: false == false +# Process can be configured on command line +ok {test-number} - config.abortAfter == -1 for: -1 == -1 +# Process can be configured on command line +ok {test-number} - config.noThrow == false for: false == false +# Process can be configured on command line +ok {test-number} - config.reporterSpecifications.empty() for: true +# Process can be configured on command line +ok {test-number} - !(cfg.hasTestFilters()) for: !false +# Process can be configured on command line +ok {test-number} - cfg.getReporterSpecs().size() == 1 for: 1 == 1 +# Process can be configured on command line +ok {test-number} - cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, {}, {}, {} } for: {?} == {?} +# Process can be configured on command line +ok {test-number} - cfg.getProcessedReporterSpecs().size() == 1 for: 1 == 1 +# Process can be configured on command line +ok {test-number} - cfg.getProcessedReporterSpecs()[0] == Catch::ProcessedReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} } for: {?} == {?} +# Process can be configured on command line +ok {test-number} - result for: {?} +# Process can be configured on command line +ok {test-number} - cfg.hasTestFilters() for: true +# Process can be configured on command line +ok {test-number} - cfg.testSpec().matches(*fakeTestCase("notIncluded")) == false for: false == false +# Process can be configured on command line +ok {test-number} - cfg.testSpec().matches(*fakeTestCase("test1")) for: true +# Process can be configured on command line +ok {test-number} - result for: {?} +# Process can be configured on command line +ok {test-number} - cfg.hasTestFilters() for: true +# Process can be configured on command line +ok {test-number} - cfg.testSpec().matches(*fakeTestCase("test1")) == false for: false == false +# Process can be configured on command line +ok {test-number} - cfg.testSpec().matches(*fakeTestCase("alwaysIncluded")) for: true +# Process can be configured on command line +ok {test-number} - result for: {?} +# Process can be configured on command line +ok {test-number} - cfg.hasTestFilters() for: true +# Process can be configured on command line +ok {test-number} - cfg.testSpec().matches(*fakeTestCase("test1")) == false for: false == false +# Process can be configured on command line +ok {test-number} - cfg.testSpec().matches(*fakeTestCase("alwaysIncluded")) for: true +# Process can be configured on command line +ok {test-number} - result for: {?} with 1 message: 'result.errorMessage() := ""' +# Process can be configured on command line +ok {test-number} - config.reporterSpecifications == vec_Specs{ { "console", {}, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""' +# Process can be configured on command line +ok {test-number} - result for: {?} with 1 message: 'result.errorMessage() := ""' +# Process can be configured on command line +ok {test-number} - config.reporterSpecifications == vec_Specs{ { "xml", {}, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""' +# Process can be configured on command line +ok {test-number} - result for: {?} with 1 message: 'result.errorMessage() := ""' +# Process can be configured on command line +ok {test-number} - config.reporterSpecifications == vec_Specs{ { "junit", {}, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""' +# Process can be configured on command line +ok {test-number} - !result for: true +# Process can be configured on command line +ok {test-number} - result.errorMessage(), ContainsSubstring("Unrecognized reporter") for: "Unrecognized reporter, 'unsupported'. Check available with --list-reporters" contains: "Unrecognized reporter" +# Process can be configured on command line +ok {test-number} - result for: {?} with 1 message: 'result.errorMessage() := ""' +# Process can be configured on command line +ok {test-number} - config.reporterSpecifications == vec_Specs{ { "console", "out.txt"s, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""' +# Process can be configured on command line +ok {test-number} - result for: {?} with 1 message: 'result.errorMessage() := ""' +# Process can be configured on command line +ok {test-number} - config.reporterSpecifications == vec_Specs{ { "console", "C:\\Temp\\out.txt"s, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""' +# Process can be configured on command line +ok {test-number} - cli.parse({ "test", "-r", "xml::out=output.xml", "-r", "junit::out=output-junit.xml" }) for: {?} +# Process can be configured on command line +ok {test-number} - config.reporterSpecifications == vec_Specs{ { "xml", "output.xml"s, {}, {} }, { "junit", "output-junit.xml"s, {}, {} } } for: { {?}, {?} } == { {?}, {?} } +# Process can be configured on command line +ok {test-number} - cli.parse({ "test", "-r", "xml::out=output.xml", "-r", "console" }) for: {?} +# Process can be configured on command line +ok {test-number} - config.reporterSpecifications == vec_Specs{ { "xml", "output.xml"s, {}, {} }, { "console", {}, {}, {} } } for: { {?}, {?} } == { {?}, {?} } +# Process can be configured on command line +ok {test-number} - !result for: true +# Process can be configured on command line +ok {test-number} - result.errorMessage(), ContainsSubstring("Only one reporter may have unspecified output file.") for: "Only one reporter may have unspecified output file." contains: "Only one reporter may have unspecified output file." +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "-b"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.shouldDebugBreak == true for: true == true +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "--break"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.shouldDebugBreak for: true +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "-a"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.abortAfter == 1 for: 1 == 1 +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "-x", "2"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.abortAfter == 2 for: 2 == 2 +# Process can be configured on command line +ok {test-number} - !result for: true +# Process can be configured on command line +ok {test-number} - result.errorMessage(), ContainsSubstring("convert") && ContainsSubstring("oops") for: "Unable to convert 'oops' to destination type" ( contains: "convert" and contains: "oops" ) +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?} +# Process can be configured on command line +ok {test-number} - config.waitForKeypress == std::get<1>(input) for: 0 == 0 +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?} +# Process can be configured on command line +ok {test-number} - config.waitForKeypress == std::get<1>(input) for: 1 == 1 +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?} +# Process can be configured on command line +ok {test-number} - config.waitForKeypress == std::get<1>(input) for: 2 == 2 +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?} +# Process can be configured on command line +ok {test-number} - config.waitForKeypress == std::get<1>(input) for: 3 == 3 +# Process can be configured on command line +ok {test-number} - !result for: true +# Process can be configured on command line +ok {test-number} - result.errorMessage(), ContainsSubstring("never") && ContainsSubstring("both") for: "keypress argument must be one of: never, start, exit or both. 'sometimes' not recognised" ( contains: "never" and contains: "both" ) +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "-e"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.noThrow for: true +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "--nothrow"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.noThrow for: true +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "-o", "filename.ext"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.defaultOutputFilename == "filename.ext" for: "filename.ext" == "filename.ext" +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "--out", "filename.ext"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.defaultOutputFilename == "filename.ext" for: "filename.ext" == "filename.ext" +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "-abe"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.abortAfter == 1 for: 1 == 1 +# Process can be configured on command line +ok {test-number} - config.shouldDebugBreak for: true +# Process can be configured on command line +ok {test-number} - config.noThrow == true for: true == true +# Process can be configured on command line +ok {test-number} - cli.parse({"test"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.defaultColourMode == ColourMode::PlatformDefault for: 0 == 0 +# Process can be configured on command line +ok {test-number} - cli.parse( { "test", "--colour-mode", "default" } ) for: {?} +# Process can be configured on command line +ok {test-number} - config.defaultColourMode == ColourMode::PlatformDefault for: 0 == 0 +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "--colour-mode", "ansi"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.defaultColourMode == ColourMode::ANSI for: 1 == 1 +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "--colour-mode", "none"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.defaultColourMode == ColourMode::None for: 3 == 3 +# Process can be configured on command line +ok {test-number} - !result for: true +# Process can be configured on command line +ok {test-number} - result.errorMessage(), ContainsSubstring( "colour mode must be one of" ) for: "colour mode must be one of: default, ansi, win32, or none. 'wrong' is not recognised" contains: "colour mode must be one of" +# Process can be configured on command line +ok {test-number} - cli.parse({ "test", "--benchmark-samples=200" }) for: {?} +# Process can be configured on command line +ok {test-number} - config.benchmarkSamples == 200 for: 200 == 200 +# Process can be configured on command line +ok {test-number} - cli.parse({ "test", "--benchmark-resamples=20000" }) for: {?} +# Process can be configured on command line +ok {test-number} - config.benchmarkResamples == 20000 for: 20000 (0x) == 20000 (0x) +# Process can be configured on command line +ok {test-number} - cli.parse({ "test", "--benchmark-confidence-interval=0.99" }) for: {?} +# Process can be configured on command line +ok {test-number} - config.benchmarkConfidenceInterval == Catch::Approx(0.99) for: 0.98999999999999999 == Approx( 0.98999999999999999 ) +# Process can be configured on command line +ok {test-number} - cli.parse({ "test", "--benchmark-no-analysis" }) for: {?} +# Process can be configured on command line +ok {test-number} - config.benchmarkNoAnalysis for: true +# Process can be configured on command line +ok {test-number} - cli.parse({ "test", "--benchmark-warmup-time=10" }) for: {?} +# Process can be configured on command line +ok {test-number} - config.benchmarkWarmupTime == 10 for: 10 == 10 +# Product with differing arities - std::tuple +ok {test-number} - std::tuple_size::value >= 1 for: 3 >= 1 +# Product with differing arities - std::tuple +ok {test-number} - std::tuple_size::value >= 1 for: 2 >= 1 +# Product with differing arities - std::tuple +ok {test-number} - std::tuple_size::value >= 1 for: 1 >= 1 +# Random seed generation accepts known methods +ok {test-number} - Catch::generateRandomSeed(method) +# Random seed generation accepts known methods +ok {test-number} - Catch::generateRandomSeed(method) +# Random seed generation accepts known methods +ok {test-number} - Catch::generateRandomSeed(method) +# Random seed generation reports unknown methods +ok {test-number} - Catch::generateRandomSeed(static_cast(77)) +# Range type with sentinel +ok {test-number} - Catch::Detail::stringify(UsesSentinel{}) == "{ }" for: "{ }" == "{ }" +# Reconstruction should be based on stringification: #914 +not ok {test-number} - truthy(false) for: Hey, its truthy! +# Regex string matcher +not ok {test-number} - testStringForMatching(), Matches( "this STRING contains 'abc' as a substring" ) for: "this string contains 'abc' as a substring" matches "this STRING contains 'abc' as a substring" case sensitively +# Regex string matcher +not ok {test-number} - testStringForMatching(), Matches( "contains 'abc' as a substring" ) for: "this string contains 'abc' as a substring" matches "contains 'abc' as a substring" case sensitively +# Regex string matcher +not ok {test-number} - testStringForMatching(), Matches( "this string contains 'abc' as a" ) for: "this string contains 'abc' as a substring" matches "this string contains 'abc' as a" case sensitively +# Registering reporter with '::' in name fails +ok {test-number} - registry.registerReporter( "with::doublecolons", Catch::Detail::make_unique() ), "'::' is not allowed in reporter name: 'with::doublecolons'" for: "'::' is not allowed in reporter name: 'with::doublecolons'" equals: "'::' is not allowed in reporter name: 'with::doublecolons'" +# Regression test #1 +ok {test-number} - actual, !UnorderedEquals( expected ) for: { 'a', 'b' } not UnorderedEquals: { 'c', 'b' } +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: Automake' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: Automake' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: Automake' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: compact' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: compact' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: compact' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: console' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: console' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: console' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "{ "version": 1, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "" }, "listings": { "tags": [ { "aliases": [ "fakeTag" ], "count": 1 } ]" contains: "fakeTag" with 1 message: 'Tested reporter: JSON' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "{ "version": 1, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "" }, "listings": { "reporters": [ { "name": "fake reporter", "description": "fake description" } ]" contains: "fake reporter" with 1 message: 'Tested reporter: JSON' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "{ "version": 1, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "" }, "listings": { "tests": [ { "name": "fake test name", "class-name": "", "tags": [ "fakeTestTag" ], "source-location": { "filename": "fake-file.cpp", "line": 123456789 } } ]" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: JSON' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: " All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: JUnit' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: " Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: JUnit' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: " All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: JUnit' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: " All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: SonarQube' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: " Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: SonarQube' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: " All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: SonarQube' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: TAP' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: TAP' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: TAP' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: TeamCity' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: TeamCity' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: TeamCity' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: " 1 fakeTag " contains: "fakeTag" with 1 message: 'Tested reporter: XML' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: " fake reporter fake description " contains: "fake reporter" with 1 message: 'Tested reporter: XML' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: " fake test name [fakeTestTag] fake-file.cpp 123456789 " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: XML' +# Reproducer for #2309 - a very long description past 80 chars (default console width) with a late colon : blablabla +ok {test-number} - +# SUCCEED counts as a test pass +ok {test-number} - with 1 message: 'this is a success' +# SUCCEED does not require an argument +ok {test-number} - +# Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or methods +ok {test-number} - before == 0 for: 0 == 0 +# Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or methods +ok {test-number} - after > before for: 1 > 0 +# Scenario: Do that thing with the thing +ok {test-number} - itDoesThis() for: true +# Scenario: Do that thing with the thing +ok {test-number} - itDoesThat() for: true +# Scenario: This is a really long scenario name to see how the list command deals with wrapping +ok {test-number} - with 1 message: 'boo!' +# Scenario: Vector resizing affects size and capacity +ok {test-number} - v.size() == 0 for: 0 == 0 +# Scenario: Vector resizing affects size and capacity +ok {test-number} - v.size() == 10 for: 10 == 10 +# Scenario: Vector resizing affects size and capacity +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# Scenario: Vector resizing affects size and capacity +ok {test-number} - v.size() == 5 for: 5 == 5 +# Scenario: Vector resizing affects size and capacity +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# Scenario: Vector resizing affects size and capacity +ok {test-number} - v.size() == 0 for: 0 == 0 +# Scenario: Vector resizing affects size and capacity +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# Scenario: Vector resizing affects size and capacity +ok {test-number} - v.size() == 0 for: 0 == 0 +A string sent directly to stdout +A string sent directly to stderr +A string sent to stderr via clog +# Some simple comparisons between doubles +ok {test-number} - d == Approx( 1.23 ) for: 1.22999999999999998 == Approx( 1.22999999999999998 ) +# Some simple comparisons between doubles +ok {test-number} - d != Approx( 1.22 ) for: 1.22999999999999998 != Approx( 1.21999999999999997 ) +# Some simple comparisons between doubles +ok {test-number} - d != Approx( 1.24 ) for: 1.22999999999999998 != Approx( 1.23999999999999999 ) +# Some simple comparisons between doubles +ok {test-number} - d == 1.23_a for: 1.22999999999999998 == Approx( 1.22999999999999998 ) +# Some simple comparisons between doubles +ok {test-number} - d != 1.22_a for: 1.22999999999999998 != Approx( 1.21999999999999997 ) +# Some simple comparisons between doubles +ok {test-number} - Approx( d ) == 1.23 for: Approx( 1.22999999999999998 ) == 1.22999999999999998 +# Some simple comparisons between doubles +ok {test-number} - Approx( d ) != 1.22 for: Approx( 1.22999999999999998 ) != 1.21999999999999997 +# Some simple comparisons between doubles +ok {test-number} - Approx( d ) != 1.24 for: Approx( 1.22999999999999998 ) != 1.23999999999999999 +Message from section one +Message from section two +# StartsWith string matcher +not ok {test-number} - testStringForMatching(), StartsWith( "This String" ) for: "this string contains 'abc' as a substring" starts with: "This String" +# StartsWith string matcher +not ok {test-number} - testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" starts with: "string" (case insensitive) +# Static arrays are convertible to string +ok {test-number} - Catch::Detail::stringify(singular) == "{ 1 }" for: "{ 1 }" == "{ 1 }" +# Static arrays are convertible to string +ok {test-number} - Catch::Detail::stringify(arr) == "{ 3, 2, 1 }" for: "{ 3, 2, 1 }" == "{ 3, 2, 1 }" +# Static arrays are convertible to string +ok {test-number} - Catch::Detail::stringify(arr) == R"({ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } })" for: "{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }" == "{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }" +# String matchers +ok {test-number} - testStringForMatching(), ContainsSubstring( "string" ) for: "this string contains 'abc' as a substring" contains: "string" +# String matchers +ok {test-number} - testStringForMatching(), ContainsSubstring( "string", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "string" (case insensitive) +# String matchers +ok {test-number} - testStringForMatching(), ContainsSubstring( "abc" ) for: "this string contains 'abc' as a substring" contains: "abc" +# String matchers +ok {test-number} - testStringForMatching(), ContainsSubstring( "aBC", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "abc" (case insensitive) +# String matchers +ok {test-number} - testStringForMatching(), StartsWith( "this" ) for: "this string contains 'abc' as a substring" starts with: "this" +# String matchers +ok {test-number} - testStringForMatching(), StartsWith( "THIS", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" starts with: "this" (case insensitive) +# String matchers +ok {test-number} - testStringForMatching(), EndsWith( "substring" ) for: "this string contains 'abc' as a substring" ends with: "substring" +# String matchers +ok {test-number} - testStringForMatching(), EndsWith( " SuBsTrInG", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" ends with: " substring" (case insensitive) +# StringRef +ok {test-number} - empty.empty() for: true +# StringRef +ok {test-number} - empty.size() == 0 for: 0 == 0 +# StringRef +ok {test-number} - std::strcmp( empty.data(), "" ) == 0 for: 0 == 0 +# StringRef +ok {test-number} - s.empty() == false for: false == false +# StringRef +ok {test-number} - s.size() == 5 for: 5 == 5 +# StringRef +ok {test-number} - std::strcmp( rawChars, "hello" ) == 0 for: 0 == 0 +# StringRef +ok {test-number} - s.data() == rawChars for: "hello" == "hello" +# StringRef +ok {test-number} - original == "original" +# StringRef +ok {test-number} - original.data() +# StringRef +ok {test-number} - original.begin() == copy.begin() for: "original string" == "original string" +# StringRef +ok {test-number} - original.begin() == copy.begin() for: "original string" == "original string" +# StringRef +ok {test-number} - ss.empty() == false for: false == false +# StringRef +ok {test-number} - ss.size() == 5 for: 5 == 5 +# StringRef +ok {test-number} - std::strncmp( ss.data(), "hello", 5 ) == 0 for: 0 == 0 +# StringRef +ok {test-number} - ss == "hello" for: hello == "hello" +# StringRef +ok {test-number} - ss.size() == 6 for: 6 == 6 +# StringRef +ok {test-number} - std::strcmp( ss.data(), "world!" ) == 0 for: 0 == 0 +# StringRef +ok {test-number} - s.data() == s2.data() for: "hello world!" == "hello world!" +# StringRef +ok {test-number} - s.data() == ss.data() for: "hello world!" == "hello world!" +# StringRef +ok {test-number} - s.substr(s.size() + 1, 123).empty() for: true +# StringRef +ok {test-number} - std::strcmp(ss.data(), "world!") == 0 for: 0 == 0 +# StringRef +ok {test-number} - s.substr(1'000'000, 1).empty() for: true +# StringRef +ok {test-number} - reinterpret_cast(buffer1) != reinterpret_cast(buffer2) for: "Hello" != "Hello" +# StringRef +ok {test-number} - left == right for: Hello == Hello +# StringRef +ok {test-number} - left != left.substr(0, 3) for: Hello != Hel +# StringRef +ok {test-number} - sr == "a standard string" for: a standard string == "a standard string" +# StringRef +ok {test-number} - sr.size() == stdStr.size() for: 17 == 17 +# StringRef +ok {test-number} - sr == "a standard string" for: a standard string == "a standard string" +# StringRef +ok {test-number} - sr.size() == stdStr.size() for: 17 == 17 +# StringRef +ok {test-number} - sr == "a standard string" for: a standard string == "a standard string" +# StringRef +ok {test-number} - sr.size() == stdStr.size() for: 17 == 17 +# StringRef +ok {test-number} - stdStr == "a stringref" for: "a stringref" == "a stringref" +# StringRef +ok {test-number} - stdStr.size() == sr.size() for: 11 == 11 +# StringRef +ok {test-number} - stdStr == "a stringref" for: "a stringref" == "a stringref" +# StringRef +ok {test-number} - stdStr.size() == sr.size() for: 11 == 11 +# StringRef +ok {test-number} - lhs == "some string += the stringref contents" for: "some string += the stringref contents" == "some string += the stringref contents" +# StringRef +ok {test-number} - together == "abrakadabra" for: "abrakadabra" == "abrakadabra" +# StringRef at compilation time +ok {test-number} - with 1 message: 'empty.size() == 0' +# StringRef at compilation time +ok {test-number} - with 1 message: 'empty.begin() == empty.end()' +# StringRef at compilation time +ok {test-number} - with 1 message: 'stringref.size() == 3' +# StringRef at compilation time +ok {test-number} - with 1 message: 'stringref.data() == abc' +# StringRef at compilation time +ok {test-number} - with 1 message: 'stringref.begin() == abc' +# StringRef at compilation time +ok {test-number} - with 1 message: 'stringref.begin() != stringref.end()' +# StringRef at compilation time +ok {test-number} - with 1 message: 'stringref.substr(10, 0).empty()' +# StringRef at compilation time +ok {test-number} - with 1 message: 'stringref.substr(2, 1).data() == abc + 2' +# StringRef at compilation time +ok {test-number} - with 1 message: 'stringref[1] == 'b'' +# StringRef at compilation time +ok {test-number} - with 1 message: 'shortened.size() == 2' +# StringRef at compilation time +ok {test-number} - with 1 message: 'shortened.data() == abc' +# StringRef at compilation time +ok {test-number} - with 1 message: 'shortened.begin() != shortened.end()' +# StringRef at compilation time +ok {test-number} - with 1 message: '!(sr1.empty())' +# StringRef at compilation time +ok {test-number} - with 1 message: 'sr1.size() == 3' +# StringRef at compilation time +ok {test-number} - with 1 message: 'sr2.empty()' +# StringRef at compilation time +ok {test-number} - with 1 message: 'sr2.size() == 0' +# Stringifying char arrays with statically known sizes - char +ok {test-number} - ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +# Stringifying char arrays with statically known sizes - char +ok {test-number} - ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +# Stringifying char arrays with statically known sizes - signed char +ok {test-number} - ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +# Stringifying char arrays with statically known sizes - signed char +ok {test-number} - ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +# Stringifying char arrays with statically known sizes - unsigned char +ok {test-number} - ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +# Stringifying char arrays with statically known sizes - unsigned char +ok {test-number} - ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +# Stringifying std::chrono::duration helpers +ok {test-number} - minute == seconds for: 1 m == 60 s +# Stringifying std::chrono::duration helpers +ok {test-number} - hour != seconds for: 1 h != 60 s +# Stringifying std::chrono::duration helpers +ok {test-number} - micro != milli for: 1 us != 1 ms +# Stringifying std::chrono::duration helpers +ok {test-number} - nano != micro for: 1 ns != 1 us +# Stringifying std::chrono::duration with weird ratios +ok {test-number} - half_minute != femto_second for: 1 [30/1]s != 1 fs +# Stringifying std::chrono::duration with weird ratios +ok {test-number} - pico_second != atto_second for: 1 ps != 1 as +# Stringifying std::chrono::time_point +ok {test-number} - now != later for: {iso8601-timestamp} != {iso8601-timestamp} +# Tabs and newlines show in output +not ok {test-number} - s1 == s2 for: "if ($b == 10) { $a = 20; }" == "if ($b == 10) { $a = 20; } " +# Tag alias can be registered against tag patterns +ok {test-number} - what, ContainsSubstring( "[@zzz]" ) for: "error: tag alias, '[@zzz]' already registered. First seen at: file:2 Redefined at: file:10" contains: "[@zzz]" +# Tag alias can be registered against tag patterns +ok {test-number} - what, ContainsSubstring( "file" ) for: "error: tag alias, '[@zzz]' already registered. First seen at: file:2 Redefined at: file:10" contains: "file" +# Tag alias can be registered against tag patterns +ok {test-number} - what, ContainsSubstring( "2" ) for: "error: tag alias, '[@zzz]' already registered. First seen at: file:2 Redefined at: file:10" contains: "2" +# Tag alias can be registered against tag patterns +ok {test-number} - what, ContainsSubstring( "10" ) for: "error: tag alias, '[@zzz]' already registered. First seen at: file:2 Redefined at: file:10" contains: "10" +# Tag alias can be registered against tag patterns +ok {test-number} - registry.add( "[no ampersat]", "", Catch::SourceLineInfo( "file", 3 ) ) +# Tag alias can be registered against tag patterns +ok {test-number} - registry.add( "[the @ is not at the start]", "", Catch::SourceLineInfo( "file", 3 ) ) +# Tag alias can be registered against tag patterns +ok {test-number} - registry.add( "@no square bracket at start]", "", Catch::SourceLineInfo( "file", 3 ) ) +# Tag alias can be registered against tag patterns +ok {test-number} - registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) ) +# Tags with spaces and non-alphanumerical characters are accepted +ok {test-number} - testCase.tags.size() == 2 for: 2 == 2 +# Tags with spaces and non-alphanumerical characters are accepted +ok {test-number} - testCase.tags, VectorContains( Tag( "tag with spaces" ) ) && VectorContains( Tag( "I said \"good day\" sir!"_catch_sr ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} ) +# Template test case method with test types specified inside std::tuple - MyTypes - 0 +ok {test-number} - Template_Fixture::m_a == 1 for: 1 == 1 +# Template test case method with test types specified inside std::tuple - MyTypes - 1 +ok {test-number} - Template_Fixture::m_a == 1 for: 1 == 1 +# Template test case method with test types specified inside std::tuple - MyTypes - 2 +ok {test-number} - Template_Fixture::m_a == 1 for: 1.0 == 1 +# Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 0 +ok {test-number} - std::is_default_constructible::value for: true +# Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 1 +ok {test-number} - std::is_default_constructible::value for: true +# Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 0 +ok {test-number} - std::is_trivially_copyable::value for: true +# Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 1 +ok {test-number} - std::is_trivially_copyable::value for: true +# Template test case with test types specified inside std::tuple - MyTypes - 0 +ok {test-number} - std::is_arithmetic::value for: true +# Template test case with test types specified inside std::tuple - MyTypes - 1 +ok {test-number} - std::is_arithmetic::value for: true +# Template test case with test types specified inside std::tuple - MyTypes - 2 +ok {test-number} - std::is_arithmetic::value for: true +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.size() == 10 for: 10 == 10 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.size() == 0 for: 0 == 0 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.capacity() == 0 for: 0 == 0 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.size() == 10 for: 10 == 10 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.size() == 0 for: 0 == 0 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.capacity() == 0 for: 0 == 0 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.size() == 10 for: 10 == 10 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.size() == 0 for: 0 == 0 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.capacity() == 0 for: 0 == 0 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.size() == 10 for: 10 == 10 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.size() == 0 for: 0 == 0 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.capacity() == 0 for: 0 == 0 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.size() == V for: 6 == 6 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.capacity() >= V for: 6 >= 6 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.size() == 2 * V for: 12 == 12 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.capacity() >= 2 * V for: 12 >= 12 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.size() == V for: 6 == 6 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.capacity() >= V for: 6 >= 6 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.size() == 0 for: 0 == 0 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.capacity() >= V for: 6 >= 6 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.capacity() == 0 for: 0 == 0 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.size() == V for: 6 == 6 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.capacity() >= V for: 6 >= 6 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.size() == V for: 6 == 6 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.capacity() >= 2 * V for: 12 >= 12 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.size() == V for: 6 == 6 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.capacity() >= V for: 6 >= 6 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.size() == V for: 6 == 6 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.capacity() >= V for: 6 >= 6 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.size() == V for: 4 == 4 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.capacity() >= V for: 4 >= 4 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.size() == 2 * V for: 8 == 8 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.capacity() >= 2 * V for: 8 >= 8 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.size() == V for: 4 == 4 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.capacity() >= V for: 4 >= 4 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.size() == 0 for: 0 == 0 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.capacity() >= V for: 4 >= 4 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.capacity() == 0 for: 0 == 0 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.size() == V for: 4 == 4 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.capacity() >= V for: 4 >= 4 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.size() == V for: 4 == 4 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.capacity() >= 2 * V for: 8 >= 8 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.size() == V for: 4 == 4 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.capacity() >= V for: 4 >= 4 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.size() == V for: 4 == 4 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.capacity() >= V for: 4 >= 4 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.size() == V for: 5 == 5 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.capacity() >= V for: 5 >= 5 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.size() == 2 * V for: 10 == 10 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.capacity() >= 2 * V for: 10 >= 10 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.size() == V for: 5 == 5 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.capacity() >= V for: 5 >= 5 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.size() == 0 for: 0 == 0 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.capacity() >= V for: 5 >= 5 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.capacity() == 0 for: 0 == 0 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.size() == V for: 5 == 5 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.capacity() >= V for: 5 >= 5 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.size() == V for: 5 == 5 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.capacity() >= 2 * V for: 10 >= 10 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.size() == V for: 5 == 5 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.capacity() >= V for: 5 >= 5 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.size() == V for: 5 == 5 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.capacity() >= V for: 5 >= 5 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.size() == V for: 15 == 15 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.capacity() >= V for: 15 >= 15 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.size() == 2 * V for: 30 == 30 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.capacity() >= 2 * V for: 30 >= 30 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.size() == V for: 15 == 15 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.capacity() >= V for: 15 >= 15 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.size() == 0 for: 0 == 0 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.capacity() >= V for: 15 >= 15 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.capacity() == 0 for: 0 == 0 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.size() == V for: 15 == 15 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.capacity() >= V for: 15 >= 15 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.size() == V for: 15 == 15 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.capacity() >= 2 * V for: 30 >= 30 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.size() == V for: 15 == 15 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.capacity() >= V for: 15 >= 15 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.size() == V for: 15 == 15 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.capacity() >= V for: 15 >= 15 +# Test case with identical tags keeps just one +ok {test-number} - testCase.tags.size() == 1 for: 1 == 1 +# Test case with identical tags keeps just one +ok {test-number} - testCase.tags[0] == Tag( "tag1" ) for: {?} == {?} +# Test case with one argument +ok {test-number} - with 1 message: 'no assertions' +# Test enum bit values +ok {test-number} - 0x == bit30and31 for: 3221225472 (0x) == 3221225472 +# Test with special, characters "in name +ok {test-number} - +# Testing checked-if +ok {test-number} - true +# Testing checked-if +ok {test-number} - +# Testing checked-if +ok {test-number} - false # TODO +# Testing checked-if +ok {test-number} - true +# Testing checked-if +ok {test-number} - false # TODO +# Testing checked-if +ok {test-number} - +# Testing checked-if 2 +ok {test-number} - true +# Testing checked-if 2 +not ok {test-number} - explicitly +# Testing checked-if 3 +ok {test-number} - false # TODO +# Testing checked-if 3 +not ok {test-number} - explicitly +# Testing checked-if 4 +ok {test-number} - true +# Testing checked-if 4 +not ok {test-number} - unexpected exception with message: 'Uncaught exception should fail!'; expression was: {Unknown expression after the reported line} +# Testing checked-if 5 +ok {test-number} - false # TODO +# Testing checked-if 5 +not ok {test-number} - unexpected exception with message: 'Uncaught exception should fail!'; expression was: {Unknown expression after the reported line} +# The NO_FAIL macro reports a failure but does not fail the test +ok {test-number} - 1 == 2 # TODO +# The default listing implementation write to provided stream +ok {test-number} - listingString, ContainsSubstring("[fakeTag]"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "[fakeTag]" +# The default listing implementation write to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake reporter"s ) && ContainsSubstring( "fake description"s ) for: "Available reporters: fake reporter: fake description " ( contains: "fake reporter" and contains: "fake description" ) +# The default listing implementation write to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) +# The default listing implementation write to provided stream +ok {test-number} - listingString, ContainsSubstring( "fakeListener"s ) && ContainsSubstring( "fake description"s ) for: "Registered listeners: fakeListener: fake description " ( contains: "fakeListener" and contains: "fake description" ) +# This test 'should' fail but doesn't +ok {test-number} - with 1 message: 'oops!' +# Thrown string literals are translated +not ok {test-number} - unexpected exception with message: 'For some reason someone is throwing a string literal!' +# Tracker +ok {test-number} - testCase.isOpen() for: true +# Tracker +ok {test-number} - s1.isOpen() for: true +# Tracker +ok {test-number} - s1.isSuccessfullyCompleted() for: true +# Tracker +ok {test-number} - testCase.isComplete() == false for: false == false +# Tracker +ok {test-number} - ctx.completedCycle() for: true +# Tracker +ok {test-number} - testCase.isSuccessfullyCompleted() for: true +# Tracker +ok {test-number} - testCase.isOpen() for: true +# Tracker +ok {test-number} - s1.isOpen() for: true +# Tracker +ok {test-number} - s1.isComplete() for: true +# Tracker +ok {test-number} - s1.isSuccessfullyCompleted() == false for: false == false +# Tracker +ok {test-number} - testCase.isComplete() == false for: false == false +# Tracker +ok {test-number} - ctx.completedCycle() for: true +# Tracker +ok {test-number} - testCase.isSuccessfullyCompleted() == false for: false == false +# Tracker +ok {test-number} - testCase2.isOpen() for: true +# Tracker +ok {test-number} - s1b.isOpen() == false for: false == false +# Tracker +ok {test-number} - ctx.completedCycle() for: true +# Tracker +ok {test-number} - testCase.isComplete() for: true +# Tracker +ok {test-number} - testCase.isSuccessfullyCompleted() for: true +# Tracker +ok {test-number} - testCase.isOpen() for: true +# Tracker +ok {test-number} - s1.isOpen() for: true +# Tracker +ok {test-number} - s1.isComplete() for: true +# Tracker +ok {test-number} - s1.isSuccessfullyCompleted() == false for: false == false +# Tracker +ok {test-number} - testCase.isComplete() == false for: false == false +# Tracker +ok {test-number} - ctx.completedCycle() for: true +# Tracker +ok {test-number} - testCase.isSuccessfullyCompleted() == false for: false == false +# Tracker +ok {test-number} - testCase2.isOpen() for: true +# Tracker +ok {test-number} - s1b.isOpen() == false for: false == false +# Tracker +ok {test-number} - s2.isOpen() for: true +# Tracker +ok {test-number} - ctx.completedCycle() for: true +# Tracker +ok {test-number} - testCase.isComplete() for: true +# Tracker +ok {test-number} - testCase.isSuccessfullyCompleted() for: true +# Tracker +ok {test-number} - testCase.isOpen() for: true +# Tracker +ok {test-number} - s1.isOpen() for: true +# Tracker +ok {test-number} - s2.isOpen() == false for: false == false +# Tracker +ok {test-number} - testCase.isComplete() == false for: false == false +# Tracker +ok {test-number} - testCase2.isOpen() for: true +# Tracker +ok {test-number} - s1b.isOpen() == false for: false == false +# Tracker +ok {test-number} - s2b.isOpen() for: true +# Tracker +ok {test-number} - ctx.completedCycle() == false for: false == false +# Tracker +ok {test-number} - ctx.completedCycle() for: true +# Tracker +ok {test-number} - s2b.isSuccessfullyCompleted() for: true +# Tracker +ok {test-number} - testCase2.isComplete() == false for: false == false +# Tracker +ok {test-number} - testCase2.isSuccessfullyCompleted() for: true +# Tracker +ok {test-number} - testCase.isOpen() for: true +# Tracker +ok {test-number} - s1.isOpen() for: true +# Tracker +ok {test-number} - s2.isOpen() == false for: false == false +# Tracker +ok {test-number} - testCase.isComplete() == false for: false == false +# Tracker +ok {test-number} - testCase2.isOpen() for: true +# Tracker +ok {test-number} - s1b.isOpen() == false for: false == false +# Tracker +ok {test-number} - s2b.isOpen() for: true +# Tracker +ok {test-number} - ctx.completedCycle() == false for: false == false +# Tracker +ok {test-number} - ctx.completedCycle() for: true +# Tracker +ok {test-number} - s2b.isComplete() for: true +# Tracker +ok {test-number} - s2b.isSuccessfullyCompleted() == false for: false == false +# Tracker +ok {test-number} - testCase2.isSuccessfullyCompleted() == false for: false == false +# Tracker +ok {test-number} - testCase3.isOpen() for: true +# Tracker +ok {test-number} - s1c.isOpen() == false for: false == false +# Tracker +ok {test-number} - s2c.isOpen() == false for: false == false +# Tracker +ok {test-number} - testCase3.isSuccessfullyCompleted() for: true +# Tracker +ok {test-number} - testCase.isOpen() for: true +# Tracker +ok {test-number} - s1.isOpen() for: true +# Tracker +ok {test-number} - s2.isOpen() for: true +# Tracker +ok {test-number} - s2.isComplete() for: true +# Tracker +ok {test-number} - s1.isComplete() == false for: false == false +# Tracker +ok {test-number} - s1.isComplete() for: true +# Tracker +ok {test-number} - testCase.isComplete() == false for: false == false +# Tracker +ok {test-number} - testCase.isComplete() for: true +# Trim strings +ok {test-number} - trim(std::string(no_whitespace)) == no_whitespace for: "There is no extra whitespace here" == "There is no extra whitespace here" +# Trim strings +ok {test-number} - trim(std::string(leading_whitespace)) == no_whitespace for: "There is no extra whitespace here" == "There is no extra whitespace here" +# Trim strings +ok {test-number} - trim(std::string(trailing_whitespace)) == no_whitespace for: "There is no extra whitespace here" == "There is no extra whitespace here" +# Trim strings +ok {test-number} - trim(std::string(whitespace_at_both_ends)) == no_whitespace for: "There is no extra whitespace here" == "There is no extra whitespace here" +# Trim strings +ok {test-number} - trim(StringRef(no_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here +# Trim strings +ok {test-number} - trim(StringRef(leading_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here +# Trim strings +ok {test-number} - trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here +# Trim strings +ok {test-number} - trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, RangeEquals( c_array ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, UnorderedRangeEquals( c_array ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_3, !RangeEquals( array_int_4 ) for: { 1, 2, 3 } not elements are { 1, 2, 3, 4 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_3, !UnorderedRangeEquals( array_int_4 ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, RangeEquals( vector_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, UnorderedRangeEquals( vector_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - with 1 message: 'ContainerIsRandomAccess( array_int_a ) != ContainerIsRandomAccess( list_char_a )' +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, RangeEquals( list_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, UnorderedRangeEquals( list_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_int_a, RangeEquals( vector_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_int_a, UnorderedRangeEquals( vector_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_int_a, !RangeEquals( vector_char_b ) for: { 1, 2, 3 } not elements are { 1, 2, 2 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_int_a, !UnorderedRangeEquals( vector_char_b ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 2 } +# Type conversions of RangeEquals and similar +ok {test-number} - a, !RangeEquals( b ) for: { 1, 2, 3 } not elements are { 3, 2, 1 } +# Type conversions of RangeEquals and similar +ok {test-number} - a, UnorderedRangeEquals( b ) for: { 1, 2, 3 } unordered elements are { 3, 2, 1 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_a, RangeEquals( array_a_plus_1, close_enough ) for: { 1, 2, 3 } elements are { 2, 3, 4 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_a, UnorderedRangeEquals( array_a_plus_1, close_enough ) for: { 1, 2, 3 } unordered elements are { 2, 3, 4 } +# Unexpected exceptions can be translated +not ok {test-number} - unexpected exception with message: '3.14000000000000012' +# Upcasting special member functions +ok {test-number} - bptr->i == 3 for: 3 == 3 +# Upcasting special member functions +ok {test-number} - bptr->i == 3 for: 3 == 3 +# Usage of AllMatch range matcher +ok {test-number} - data, AllMatch(SizeIs(5)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } all match has size == 5 +# Usage of AllMatch range matcher +ok {test-number} - data, !AllMatch(Contains(0) && Contains(1)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not all match ( contains element 0 and contains element 1 ) +# Usage of AllMatch range matcher +ok {test-number} - needs_adl, AllMatch( Predicate( []( int elem ) { return elem < 6; } ) ) for: { 1, 2, 3, 4, 5 } all match matches undescribed predicate +# Usage of AllMatch range matcher +ok {test-number} - mocked, allMatch for: { 1, 2, 3, 4, 5 } all match matches undescribed predicate +# Usage of AllMatch range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of AllMatch range matcher +ok {test-number} - mocked.m_derefed[1] for: true +# Usage of AllMatch range matcher +ok {test-number} - mocked.m_derefed[2] for: true +# Usage of AllMatch range matcher +ok {test-number} - mocked.m_derefed[3] for: true +# Usage of AllMatch range matcher +ok {test-number} - mocked.m_derefed[4] for: true +# Usage of AllMatch range matcher +ok {test-number} - mocked, !allMatch for: { 1, 2, 3, 4, 5 } not all match matches undescribed predicate +# Usage of AllMatch range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of AllMatch range matcher +ok {test-number} - mocked.m_derefed[1] for: true +# Usage of AllMatch range matcher +ok {test-number} - mocked.m_derefed[2] for: true +# Usage of AllMatch range matcher +ok {test-number} - !(mocked.m_derefed[3]) for: !false +# Usage of AllMatch range matcher +ok {test-number} - !(mocked.m_derefed[4]) for: !false +# Usage of AllTrue range matcher +ok {test-number} - data, AllTrue() for: { true, true, true, true, true } contains only true +# Usage of AllTrue range matcher +ok {test-number} - data, AllTrue() for: { } contains only true +# Usage of AllTrue range matcher +ok {test-number} - data, !AllTrue() for: { true, true, false, true, true } not contains only true +# Usage of AllTrue range matcher +ok {test-number} - data, !AllTrue() for: { false, false, false, false, false } not contains only true +# Usage of AllTrue range matcher +ok {test-number} - data, AllTrue() for: { true, true, true, true, true } contains only true +# Usage of AllTrue range matcher +ok {test-number} - data, !AllTrue() for: { true, true, false, true, true } not contains only true +# Usage of AllTrue range matcher +ok {test-number} - data, !AllTrue() for: { false, false, false, false, false } not contains only true +# Usage of AllTrue range matcher +ok {test-number} - mocked, AllTrue() for: { true, true, true, true, true } contains only true +# Usage of AllTrue range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of AllTrue range matcher +ok {test-number} - mocked.m_derefed[1] for: true +# Usage of AllTrue range matcher +ok {test-number} - mocked.m_derefed[2] for: true +# Usage of AllTrue range matcher +ok {test-number} - mocked.m_derefed[3] for: true +# Usage of AllTrue range matcher +ok {test-number} - mocked.m_derefed[4] for: true +# Usage of AllTrue range matcher +ok {test-number} - mocked, !AllTrue() for: { true, true, false, true, true } not contains only true +# Usage of AllTrue range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of AllTrue range matcher +ok {test-number} - mocked.m_derefed[1] for: true +# Usage of AllTrue range matcher +ok {test-number} - mocked.m_derefed[2] for: true +# Usage of AllTrue range matcher +ok {test-number} - !(mocked.m_derefed[3]) for: !false +# Usage of AllTrue range matcher +ok {test-number} - !(mocked.m_derefed[4]) for: !false +# Usage of AnyMatch range matcher +ok {test-number} - data, AnyMatch(SizeIs(5)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } any match has size == 5 +# Usage of AnyMatch range matcher +ok {test-number} - data, !AnyMatch(Contains(0) && Contains(10)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not any match ( contains element 0 and contains element 10 ) +# Usage of AnyMatch range matcher +ok {test-number} - needs_adl, AnyMatch( Predicate( []( int elem ) { return elem < 3; } ) ) for: { 1, 2, 3, 4, 5 } any match matches undescribed predicate +# Usage of AnyMatch range matcher +ok {test-number} - mocked, !anyMatch for: { 1, 2, 3, 4, 5 } not any match matches undescribed predicate +# Usage of AnyMatch range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of AnyMatch range matcher +ok {test-number} - mocked.m_derefed[1] for: true +# Usage of AnyMatch range matcher +ok {test-number} - mocked.m_derefed[2] for: true +# Usage of AnyMatch range matcher +ok {test-number} - mocked.m_derefed[3] for: true +# Usage of AnyMatch range matcher +ok {test-number} - mocked.m_derefed[4] for: true +# Usage of AnyMatch range matcher +ok {test-number} - mocked, anyMatch for: { 1, 2, 3, 4, 5 } any match matches undescribed predicate +# Usage of AnyMatch range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of AnyMatch range matcher +ok {test-number} - !(mocked.m_derefed[1]) for: !false +# Usage of AnyMatch range matcher +ok {test-number} - !(mocked.m_derefed[2]) for: !false +# Usage of AnyMatch range matcher +ok {test-number} - !(mocked.m_derefed[3]) for: !false +# Usage of AnyMatch range matcher +ok {test-number} - !(mocked.m_derefed[4]) for: !false +# Usage of AnyTrue range matcher +ok {test-number} - data, AnyTrue() for: { true, true, true, true, true } contains at least one true +# Usage of AnyTrue range matcher +ok {test-number} - data, !AnyTrue() for: { } not contains at least one true +# Usage of AnyTrue range matcher +ok {test-number} - data, AnyTrue() for: { false, false, true, false, false } contains at least one true +# Usage of AnyTrue range matcher +ok {test-number} - data, !AnyTrue() for: { false, false, false, false, false } not contains at least one true +# Usage of AnyTrue range matcher +ok {test-number} - data, AnyTrue() for: { true, true, true, true, true } contains at least one true +# Usage of AnyTrue range matcher +ok {test-number} - data, AnyTrue() for: { false, false, true, false, false } contains at least one true +# Usage of AnyTrue range matcher +ok {test-number} - data, !AnyTrue() for: { false, false, false, false, false } not contains at least one true +# Usage of AnyTrue range matcher +ok {test-number} - mocked, AnyTrue() for: { false, false, false, false, true } contains at least one true +# Usage of AnyTrue range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of AnyTrue range matcher +ok {test-number} - mocked.m_derefed[1] for: true +# Usage of AnyTrue range matcher +ok {test-number} - mocked.m_derefed[2] for: true +# Usage of AnyTrue range matcher +ok {test-number} - mocked.m_derefed[3] for: true +# Usage of AnyTrue range matcher +ok {test-number} - mocked.m_derefed[4] for: true +# Usage of AnyTrue range matcher +ok {test-number} - mocked, AnyTrue() for: { false, false, true, true, true } contains at least one true +# Usage of AnyTrue range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of AnyTrue range matcher +ok {test-number} - mocked.m_derefed[1] for: true +# Usage of AnyTrue range matcher +ok {test-number} - mocked.m_derefed[2] for: true +# Usage of AnyTrue range matcher +ok {test-number} - !(mocked.m_derefed[3]) for: !false +# Usage of AnyTrue range matcher +ok {test-number} - !(mocked.m_derefed[4]) for: !false +# Usage of NoneMatch range matcher +ok {test-number} - data, NoneMatch(SizeIs(6)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } none match has size == 6 +# Usage of NoneMatch range matcher +ok {test-number} - data, !NoneMatch(Contains(0) && Contains(1)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not none match ( contains element 0 and contains element 1 ) +# Usage of NoneMatch range matcher +ok {test-number} - needs_adl, NoneMatch( Predicate( []( int elem ) { return elem > 6; } ) ) for: { 1, 2, 3, 4, 5 } none match matches undescribed predicate +# Usage of NoneMatch range matcher +ok {test-number} - mocked, noneMatch for: { 1, 2, 3, 4, 5 } none match matches undescribed predicate +# Usage of NoneMatch range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of NoneMatch range matcher +ok {test-number} - mocked.m_derefed[1] for: true +# Usage of NoneMatch range matcher +ok {test-number} - mocked.m_derefed[2] for: true +# Usage of NoneMatch range matcher +ok {test-number} - mocked.m_derefed[3] for: true +# Usage of NoneMatch range matcher +ok {test-number} - mocked.m_derefed[4] for: true +# Usage of NoneMatch range matcher +ok {test-number} - mocked, !noneMatch for: { 1, 2, 3, 4, 5 } not none match matches undescribed predicate +# Usage of NoneMatch range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of NoneMatch range matcher +ok {test-number} - !(mocked.m_derefed[1]) for: !false +# Usage of NoneMatch range matcher +ok {test-number} - !(mocked.m_derefed[2]) for: !false +# Usage of NoneMatch range matcher +ok {test-number} - !(mocked.m_derefed[3]) for: !false +# Usage of NoneMatch range matcher +ok {test-number} - !(mocked.m_derefed[4]) for: !false +# Usage of NoneTrue range matcher +ok {test-number} - data, !NoneTrue() for: { true, true, true, true, true } not contains no true +# Usage of NoneTrue range matcher +ok {test-number} - data, NoneTrue() for: { } contains no true +# Usage of NoneTrue range matcher +ok {test-number} - data, !NoneTrue() for: { false, false, true, false, false } not contains no true +# Usage of NoneTrue range matcher +ok {test-number} - data, NoneTrue() for: { false, false, false, false, false } contains no true +# Usage of NoneTrue range matcher +ok {test-number} - data, !NoneTrue() for: { true, true, true, true, true } not contains no true +# Usage of NoneTrue range matcher +ok {test-number} - data, !NoneTrue() for: { false, false, true, false, false } not contains no true +# Usage of NoneTrue range matcher +ok {test-number} - data, NoneTrue() for: { false, false, false, false, false } contains no true +# Usage of NoneTrue range matcher +ok {test-number} - mocked, NoneTrue() for: { false, false, false, false, false } contains no true +# Usage of NoneTrue range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of NoneTrue range matcher +ok {test-number} - mocked.m_derefed[1] for: true +# Usage of NoneTrue range matcher +ok {test-number} - mocked.m_derefed[2] for: true +# Usage of NoneTrue range matcher +ok {test-number} - mocked.m_derefed[3] for: true +# Usage of NoneTrue range matcher +ok {test-number} - mocked.m_derefed[4] for: true +# Usage of NoneTrue range matcher +ok {test-number} - mocked, !NoneTrue() for: { false, false, true, true, true } not contains no true +# Usage of NoneTrue range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of NoneTrue range matcher +ok {test-number} - mocked.m_derefed[1] for: true +# Usage of NoneTrue range matcher +ok {test-number} - mocked.m_derefed[2] for: true +# Usage of NoneTrue range matcher +ok {test-number} - !(mocked.m_derefed[3]) for: !false +# Usage of NoneTrue range matcher +ok {test-number} - !(mocked.m_derefed[4]) for: !false +# Usage of RangeEquals range matcher +ok {test-number} - empty_vector, RangeEquals( empty_vector ) for: { } elements are { } +# Usage of RangeEquals range matcher +ok {test-number} - empty_vector, !RangeEquals( non_empty_vector ) for: { } not elements are { 1 } +# Usage of RangeEquals range matcher +ok {test-number} - non_empty_vector, !RangeEquals( empty_vector ) for: { 1 } not elements are { } +# Usage of RangeEquals range matcher +ok {test-number} - non_empty_array, RangeEquals( non_empty_array ) for: { 1 } elements are { 1 } +# Usage of RangeEquals range matcher +ok {test-number} - array_a, RangeEquals( array_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +# Usage of RangeEquals range matcher +ok {test-number} - array_a, !RangeEquals( array_b ) for: { 1, 2, 3 } not elements are { 2, 2, 3 } +# Usage of RangeEquals range matcher +ok {test-number} - array_a, !RangeEquals( array_c ) for: { 1, 2, 3 } not elements are { 1, 2, 2 } +# Usage of RangeEquals range matcher +ok {test-number} - vector_a, !RangeEquals( vector_b ) for: { 1, 2, 3 } not elements are { 1, 2, 3, 4 } +# Usage of RangeEquals range matcher +ok {test-number} - vector_a, RangeEquals( vector_a_plus_1, close_enough ) for: { 1, 2, 3 } elements are { 2, 3, 4 } +# Usage of RangeEquals range matcher +ok {test-number} - vector_a, !RangeEquals( vector_b, close_enough ) for: { 1, 2, 3 } not elements are { 3, 3, 4 } +# Usage of RangeEquals range matcher +ok {test-number} - needs_adl1, RangeEquals( needs_adl2 ) for: { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 } +# Usage of RangeEquals range matcher +ok {test-number} - needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } ) for: { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 } +# Usage of RangeEquals range matcher +ok {test-number} - array_a, RangeEquals( { 1, 2, 3 } ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +# Usage of RangeEquals range matcher +ok {test-number} - array_a, RangeEquals( { 2, 4, 6 }, []( int l, int r ) { return l * 2 == r; } ) for: { 1, 2, 3 } elements are { 2, 4, 6 } +# Usage of RangeEquals range matcher +ok {test-number} - mocked1, !RangeEquals( arr ) for: { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 } +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[0] for: true +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[1] for: true +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[2] for: true +# Usage of RangeEquals range matcher +ok {test-number} - !(mocked1.m_derefed[3]) for: !false +# Usage of RangeEquals range matcher +ok {test-number} - mocked1, RangeEquals( arr ) for: { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 } +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[0] for: true +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[1] for: true +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[2] for: true +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[3] for: true +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - empty_vector, UnorderedRangeEquals( empty_vector ) for: { } unordered elements are { } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - empty_vector, !UnorderedRangeEquals( non_empty_vector ) for: { } not unordered elements are { 1 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - non_empty_vector, !UnorderedRangeEquals( empty_vector ) for: { 1 } not unordered elements are { } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - non_empty_array, UnorderedRangeEquals( non_empty_array ) for: { 1 } unordered elements are { 1 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - array_a, UnorderedRangeEquals( array_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - array_a, !UnorderedRangeEquals( array_b ) for: { 1, 2, 3 } not unordered elements are { 2, 2, 3 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - vector_a, !UnorderedRangeEquals( vector_b ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - vector_a, UnorderedRangeEquals( vector_a_plus_1, close_enough ) for: { 1, 10, 20 } unordered elements are { 11, 21, 2 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - vector_a, !UnorderedRangeEquals( vector_b, close_enough ) for: { 1, 10, 21 } not unordered elements are { 11, 21, 3 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - needs_adl1, UnorderedRangeEquals( needs_adl2 ) for: { 1, 2, 3, 4, 5 } unordered elements are { 1, 2, 3, 4, 5 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - array_a, UnorderedRangeEquals( { 10, 20, 1 } ) for: { 1, 10, 20 } unordered elements are { 10, 20, 1 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - array_a, UnorderedRangeEquals( { 11, 21, 2 }, []( int l, int r ) { return std::abs( l - r ) <= 1; } ) for: { 1, 10, 20 } unordered elements are { 11, 21, 2 } +# Usage of the SizeIs range matcher +ok {test-number} - empty_vec, SizeIs(0) for: { } has size == 0 +# Usage of the SizeIs range matcher +ok {test-number} - empty_vec, !SizeIs(2) for: { } not has size == 2 +# Usage of the SizeIs range matcher +ok {test-number} - empty_vec, SizeIs(Lt(2)) for: { } size matches is less than 2 +# Usage of the SizeIs range matcher +ok {test-number} - arr, SizeIs(2) for: { 0, 0 } has size == 2 +# Usage of the SizeIs range matcher +ok {test-number} - arr, SizeIs( Lt(3)) for: { 0, 0 } size matches is less than 3 +# Usage of the SizeIs range matcher +ok {test-number} - arr, !SizeIs(!Lt(3)) for: { 0, 0 } not size matches not is less than 3 +# Usage of the SizeIs range matcher +ok {test-number} - map, SizeIs(3) for: { {?}, {?}, {?} } has size == 3 +# Usage of the SizeIs range matcher +ok {test-number} - unrelated::ADL_size{}, SizeIs(12) for: {?} has size == 12 +# Usage of the SizeIs range matcher +ok {test-number} - has_size{}, SizeIs(13) for: {?} has size == 13 +# Use a custom approx +ok {test-number} - d == approx( 1.23 ) for: 1.22999999999999998 == Approx( 1.22999999999999998 ) +# Use a custom approx +ok {test-number} - d == approx( 1.22 ) for: 1.22999999999999998 == Approx( 1.21999999999999997 ) +# Use a custom approx +ok {test-number} - d == approx( 1.24 ) for: 1.22999999999999998 == Approx( 1.23999999999999999 ) +# Use a custom approx +ok {test-number} - d != approx( 1.25 ) for: 1.22999999999999998 != Approx( 1.25 ) +# Use a custom approx +ok {test-number} - approx( d ) == 1.23 for: Approx( 1.22999999999999998 ) == 1.22999999999999998 +# Use a custom approx +ok {test-number} - approx( d ) == 1.22 for: Approx( 1.22999999999999998 ) == 1.21999999999999997 +# Use a custom approx +ok {test-number} - approx( d ) == 1.24 for: Approx( 1.22999999999999998 ) == 1.23999999999999999 +# Use a custom approx +ok {test-number} - approx( d ) != 1.25 for: Approx( 1.22999999999999998 ) != 1.25 +# Variadic macros +ok {test-number} - with 1 message: 'no assertions' +# Vector Approx matcher +ok {test-number} - empty, Approx( empty ) for: { } is approx: { } +# Vector Approx matcher +ok {test-number} - v1, Approx( v1 ) for: { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } +# Vector Approx matcher +ok {test-number} - v1, Approx( { 1., 2., 3. } ) for: { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } +# Vector Approx matcher +ok {test-number} - v1, !Approx( temp ) for: { 1.0, 2.0, 3.0 } not is approx: { 1.0, 2.0, 3.0, 4.0 } +# Vector Approx matcher +ok {test-number} - v1, !Approx( v2 ) for: { 1.0, 2.0, 3.0 } not is approx: { 1.5, 2.5, 3.5 } +# Vector Approx matcher +ok {test-number} - v1, Approx( v2 ).margin( 0.5 ) for: { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } +# Vector Approx matcher +ok {test-number} - v1, Approx( v2 ).epsilon( 0.5 ) for: { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } +# Vector Approx matcher +ok {test-number} - v1, Approx( v2 ).epsilon( 0.1 ).scale( 500 ) for: { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } +# Vector Approx matcher -- failing +not ok {test-number} - empty, Approx( t1 ) for: { } is approx: { 1.0, 2.0 } +# Vector Approx matcher -- failing +not ok {test-number} - v1, Approx( v2 ) for: { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 } +# Vector matchers +ok {test-number} - v, VectorContains( 1 ) for: { 1, 2, 3 } Contains: 1 +# Vector matchers +ok {test-number} - v, VectorContains( 2 ) for: { 1, 2, 3 } Contains: 2 +# Vector matchers +ok {test-number} - v5, ( VectorContains>( 2 ) ) for: { 1, 2, 3 } Contains: 2 +# Vector matchers +ok {test-number} - v, Contains( v2 ) for: { 1, 2, 3 } Contains: { 1, 2 } +# Vector matchers +ok {test-number} - v, Contains( { 1, 2 } ) for: { 1, 2, 3 } Contains: { 1, 2 } +# Vector matchers +ok {test-number} - v5, ( Contains, CustomAllocator>( v2 ) ) for: { 1, 2, 3 } Contains: { 1, 2 } +# Vector matchers +ok {test-number} - v, Contains( v2 ) for: { 1, 2, 3 } Contains: { 1, 2, 3 } +# Vector matchers +ok {test-number} - v, Contains( empty ) for: { 1, 2, 3 } Contains: { } +# Vector matchers +ok {test-number} - empty, Contains( empty ) for: { } Contains: { } +# Vector matchers +ok {test-number} - v5, ( Contains, CustomAllocator>( v2 ) ) for: { 1, 2, 3 } Contains: { 1, 2, 3 } +# Vector matchers +ok {test-number} - v5, Contains( v6 ) for: { 1, 2, 3 } Contains: { 1, 2 } +# Vector matchers +ok {test-number} - v, VectorContains( 1 ) && VectorContains( 2 ) for: { 1, 2, 3 } ( Contains: 1 and Contains: 2 ) +# Vector matchers +ok {test-number} - v, Equals( v ) for: { 1, 2, 3 } Equals: { 1, 2, 3 } +# Vector matchers +ok {test-number} - empty, Equals( empty ) for: { } Equals: { } +# Vector matchers +ok {test-number} - v, Equals( { 1, 2, 3 } ) for: { 1, 2, 3 } Equals: { 1, 2, 3 } +# Vector matchers +ok {test-number} - v, Equals( v2 ) for: { 1, 2, 3 } Equals: { 1, 2, 3 } +# Vector matchers +ok {test-number} - v5, ( Equals, CustomAllocator>( v2 ) ) for: { 1, 2, 3 } Equals: { 1, 2, 3 } +# Vector matchers +ok {test-number} - v5, Equals( v6 ) for: { 1, 2, 3 } Equals: { 1, 2, 3 } +# Vector matchers +ok {test-number} - v, UnorderedEquals( v ) for: { 1, 2, 3 } UnorderedEquals: { 1, 2, 3 } +# Vector matchers +ok {test-number} - v, UnorderedEquals( { 3, 2, 1 } ) for: { 1, 2, 3 } UnorderedEquals: { 3, 2, 1 } +# Vector matchers +ok {test-number} - empty, UnorderedEquals( empty ) for: { } UnorderedEquals: { } +# Vector matchers +ok {test-number} - permuted, UnorderedEquals( v ) for: { 1, 3, 2 } UnorderedEquals: { 1, 2, 3 } +# Vector matchers +ok {test-number} - permuted, UnorderedEquals( v ) for: { 2, 3, 1 } UnorderedEquals: { 1, 2, 3 } +# Vector matchers +ok {test-number} - v5, ( UnorderedEquals, CustomAllocator>( permuted ) ) for: { 1, 2, 3 } UnorderedEquals: { 2, 3, 1 } +# Vector matchers +ok {test-number} - v5_permuted, UnorderedEquals( v5 ) for: { 1, 3, 2 } UnorderedEquals: { 1, 2, 3 } +# Vector matchers that fail +not ok {test-number} - v, VectorContains( -1 ) for: { 1, 2, 3 } Contains: -1 +# Vector matchers that fail +not ok {test-number} - empty, VectorContains( 1 ) for: { } Contains: 1 +# Vector matchers that fail +not ok {test-number} - empty, Contains( v ) for: { } Contains: { 1, 2, 3 } +# Vector matchers that fail +not ok {test-number} - v, Contains( v2 ) for: { 1, 2, 3 } Contains: { 1, 2, 4 } +# Vector matchers that fail +not ok {test-number} - v, Equals( v2 ) for: { 1, 2, 3 } Equals: { 1, 2 } +# Vector matchers that fail +not ok {test-number} - v2, Equals( v ) for: { 1, 2 } Equals: { 1, 2, 3 } +# Vector matchers that fail +not ok {test-number} - empty, Equals( v ) for: { } Equals: { 1, 2, 3 } +# Vector matchers that fail +not ok {test-number} - v, Equals( empty ) for: { 1, 2, 3 } Equals: { } +# Vector matchers that fail +not ok {test-number} - v, UnorderedEquals( empty ) for: { 1, 2, 3 } UnorderedEquals: { } +# Vector matchers that fail +not ok {test-number} - empty, UnorderedEquals( v ) for: { } UnorderedEquals: { 1, 2, 3 } +# Vector matchers that fail +not ok {test-number} - permuted, UnorderedEquals( v ) for: { 1, 3 } UnorderedEquals: { 1, 2, 3 } +# Vector matchers that fail +not ok {test-number} - permuted, UnorderedEquals( v ) for: { 3, 1 } UnorderedEquals: { 1, 2, 3 } +# When checked exceptions are thrown they can be expected or unexpected +ok {test-number} - thisThrows(), std::domain_error +# When checked exceptions are thrown they can be expected or unexpected +ok {test-number} - thisDoesntThrow() +# When checked exceptions are thrown they can be expected or unexpected +ok {test-number} - thisThrows() +# When unchecked exceptions are thrown directly they are always failures +not ok {test-number} - unexpected exception with message: 'unexpected exception' +# When unchecked exceptions are thrown during a CHECK the test should continue +not ok {test-number} - unexpected exception with message: 'expected exception'; expression was: thisThrows() == 0 +# When unchecked exceptions are thrown during a REQUIRE the test should abort fail +not ok {test-number} - unexpected exception with message: 'expected exception'; expression was: thisThrows() == 0 +# When unchecked exceptions are thrown from functions they are always failures +not ok {test-number} - unexpected exception with message: 'expected exception'; expression was: thisThrows() == 0 +# When unchecked exceptions are thrown from sections they are always failures +not ok {test-number} - unexpected exception with message: 'unexpected exception' +# X/level/0/a +ok {test-number} - +# X/level/0/b +ok {test-number} - +# X/level/1/a +ok {test-number} - +# X/level/1/b +ok {test-number} - +# XmlEncode +ok {test-number} - encode( "normal string" ) == "normal string" for: "normal string" == "normal string" +# XmlEncode +ok {test-number} - encode( "" ) == "" for: "" == "" +# XmlEncode +ok {test-number} - encode( "smith & jones" ) == "smith & jones" for: "smith & jones" == "smith & jones" +# XmlEncode +ok {test-number} - encode( "smith < jones" ) == "smith < jones" for: "smith < jones" == "smith < jones" +# XmlEncode +ok {test-number} - encode( "smith > jones" ) == "smith > jones" for: "smith > jones" == "smith > jones" +# XmlEncode +ok {test-number} - encode( "smith ]]> jones" ) == "smith ]]> jones" for: "smith ]]> jones" == "smith ]]> jones" +# XmlEncode +ok {test-number} - encode( stringWithQuotes ) == stringWithQuotes for: "don't "quote" me on that" == "don't "quote" me on that" +# XmlEncode +ok {test-number} - encode( stringWithQuotes, Catch::XmlEncode::ForAttributes ) == "don't "quote" me on that" for: "don't "quote" me on that" == "don't "quote" me on that" +# XmlEncode +ok {test-number} - encode( "[\x01]" ) == "[\\x01]" for: "[\x01]" == "[\x01]" +# XmlEncode +ok {test-number} - encode( "[\x7F]" ) == "[\\x7F]" for: "[\x7F]" == "[\x7F]" +# XmlWriter writes boolean attributes as true/false +ok {test-number} - stream.str(), ContainsSubstring(R"(attr1="true")") && ContainsSubstring(R"(attr2="false")") for: " " ( contains: "attr1="true"" and contains: "attr2="false"" ) +# a succeeding test can still be skipped +ok {test-number} - +# a succeeding test can still be skipped +ok {test-number} - # SKIP +# analyse no analysis +ok {test-number} - analysis.mean.point.count() == 23 for: 23.0 == 23 +# analyse no analysis +ok {test-number} - analysis.mean.lower_bound.count() == 23 for: 23.0 == 23 +# analyse no analysis +ok {test-number} - analysis.mean.upper_bound.count() == 23 for: 23.0 == 23 +# analyse no analysis +ok {test-number} - analysis.standard_deviation.point.count() == 0 for: 0.0 == 0 +# analyse no analysis +ok {test-number} - analysis.standard_deviation.lower_bound.count() == 0 for: 0.0 == 0 +# analyse no analysis +ok {test-number} - analysis.standard_deviation.upper_bound.count() == 0 for: 0.0 == 0 +# analyse no analysis +ok {test-number} - analysis.outliers.total() == 0 for: 0 == 0 +# analyse no analysis +ok {test-number} - analysis.outliers.low_mild == 0 for: 0 == 0 +# analyse no analysis +ok {test-number} - analysis.outliers.low_severe == 0 for: 0 == 0 +# analyse no analysis +ok {test-number} - analysis.outliers.high_mild == 0 for: 0 == 0 +# analyse no analysis +ok {test-number} - analysis.outliers.high_severe == 0 for: 0 == 0 +# analyse no analysis +ok {test-number} - analysis.outliers.samples_seen == 0 for: 0 == 0 +# analyse no analysis +ok {test-number} - analysis.outlier_variance == 0 for: 0.0 == 0 +# array -> toString +ok {test-number} - Catch::Detail::stringify( empty ) == "{ }" for: "{ }" == "{ }" +# array -> toString +ok {test-number} - Catch::Detail::stringify( oneValue ) == "{ 42 }" for: "{ 42 }" == "{ 42 }" +# array -> toString +ok {test-number} - Catch::Detail::stringify( twoValues ) == "{ 42, 250 }" for: "{ 42, 250 }" == "{ 42, 250 }" +# benchmark function call +ok {test-number} - model.started == 1 for: 1 == 1 +# benchmark function call +ok {test-number} - model.finished == 0 for: 0 == 0 +# benchmark function call +ok {test-number} - model.started == 1 for: 1 == 1 +# benchmark function call +ok {test-number} - model.finished == 1 for: 1 == 1 +# benchmark function call +ok {test-number} - called == 1 for: 1 == 1 +# benchmark function call +ok {test-number} - model.started == 0 for: 0 == 0 +# benchmark function call +ok {test-number} - model.finished == 0 for: 0 == 0 +# benchmark function call +ok {test-number} - model.started == 0 for: 0 == 0 +# benchmark function call +ok {test-number} - model.finished == 0 for: 0 == 0 +# benchmark function call +ok {test-number} - called == 1 for: 1 == 1 +# boolean member +ok {test-number} - obj.prop != 0 for: 0x != 0 +# checkedElse +ok {test-number} - flag for: true +# checkedElse +ok {test-number} - testCheckedElse( true ) for: true +# checkedElse, failing +ok {test-number} - flag for: false # TODO +# checkedElse, failing +not ok {test-number} - testCheckedElse( false ) for: false +# checkedIf +ok {test-number} - flag for: true +# checkedIf +ok {test-number} - testCheckedIf( true ) for: true +# checkedIf, failing +ok {test-number} - flag for: false # TODO +# checkedIf, failing +not ok {test-number} - testCheckedIf( false ) for: false +# classify_outliers +ok {test-number} - o.samples_seen == static_cast(x.size()) for: 6 == 6 +# classify_outliers +ok {test-number} - o.low_severe == los for: 0 == 0 +# classify_outliers +ok {test-number} - o.low_mild == lom for: 0 == 0 +# classify_outliers +ok {test-number} - o.high_mild == him for: 0 == 0 +# classify_outliers +ok {test-number} - o.high_severe == his for: 0 == 0 +# classify_outliers +ok {test-number} - o.total() == los + lom + him + his for: 0 == 0 +# classify_outliers +ok {test-number} - o.samples_seen == static_cast(x.size()) for: 6 == 6 +# classify_outliers +ok {test-number} - o.low_severe == los for: 1 == 1 +# classify_outliers +ok {test-number} - o.low_mild == lom for: 0 == 0 +# classify_outliers +ok {test-number} - o.high_mild == him for: 0 == 0 +# classify_outliers +ok {test-number} - o.high_severe == his for: 0 == 0 +# classify_outliers +ok {test-number} - o.total() == los + lom + him + his for: 1 == 1 +# classify_outliers +ok {test-number} - o.samples_seen == static_cast(x.size()) for: 6 == 6 +# classify_outliers +ok {test-number} - o.low_severe == los for: 0 == 0 +# classify_outliers +ok {test-number} - o.low_mild == lom for: 1 == 1 +# classify_outliers +ok {test-number} - o.high_mild == him for: 0 == 0 +# classify_outliers +ok {test-number} - o.high_severe == his for: 0 == 0 +# classify_outliers +ok {test-number} - o.total() == los + lom + him + his for: 1 == 1 +# classify_outliers +ok {test-number} - o.samples_seen == static_cast(x.size()) for: 6 == 6 +# classify_outliers +ok {test-number} - o.low_severe == los for: 0 == 0 +# classify_outliers +ok {test-number} - o.low_mild == lom for: 0 == 0 +# classify_outliers +ok {test-number} - o.high_mild == him for: 1 == 1 +# classify_outliers +ok {test-number} - o.high_severe == his for: 0 == 0 +# classify_outliers +ok {test-number} - o.total() == los + lom + him + his for: 1 == 1 +# classify_outliers +ok {test-number} - o.samples_seen == static_cast(x.size()) for: 6 == 6 +# classify_outliers +ok {test-number} - o.low_severe == los for: 0 == 0 +# classify_outliers +ok {test-number} - o.low_mild == lom for: 0 == 0 +# classify_outliers +ok {test-number} - o.high_mild == him for: 0 == 0 +# classify_outliers +ok {test-number} - o.high_severe == his for: 1 == 1 +# classify_outliers +ok {test-number} - o.total() == los + lom + him + his for: 1 == 1 +# classify_outliers +ok {test-number} - o.samples_seen == static_cast(x.size()) for: 6 == 6 +# classify_outliers +ok {test-number} - o.low_severe == los for: 1 == 1 +# classify_outliers +ok {test-number} - o.low_mild == lom for: 0 == 0 +# classify_outliers +ok {test-number} - o.high_mild == him for: 1 == 1 +# classify_outliers +ok {test-number} - o.high_severe == his for: 0 == 0 +# classify_outliers +ok {test-number} - o.total() == los + lom + him + his for: 2 == 2 +# comparisons between const int variables +ok {test-number} - unsigned_char_var == 1 for: 1 == 1 +# comparisons between const int variables +ok {test-number} - unsigned_short_var == 1 for: 1 == 1 +# comparisons between const int variables +ok {test-number} - unsigned_int_var == 1 for: 1 == 1 +# comparisons between const int variables +ok {test-number} - unsigned_long_var == 1 for: 1 == 1 +# comparisons between int variables +ok {test-number} - long_var == unsigned_char_var for: 1 == 1 +# comparisons between int variables +ok {test-number} - long_var == unsigned_short_var for: 1 == 1 +# comparisons between int variables +ok {test-number} - long_var == unsigned_int_var for: 1 == 1 +# comparisons between int variables +ok {test-number} - long_var == unsigned_long_var for: 1 == 1 +# convertToBits +ok {test-number} - convertToBits( 0.f ) == 0 for: 0 == 0 +# convertToBits +ok {test-number} - convertToBits( -0.f ) == ( 1ULL << 31 ) for: 2147483648 (0x) == 2147483648 (0x) +# convertToBits +ok {test-number} - convertToBits( 0. ) == 0 for: 0 == 0 +# convertToBits +ok {test-number} - convertToBits( -0. ) == ( 1ULL << 63 ) for: 9223372036854775808 (0x) == 9223372036854775808 (0x) +# convertToBits +ok {test-number} - convertToBits( std::numeric_limits::denorm_min() ) == 1 for: 1 == 1 +# convertToBits +ok {test-number} - convertToBits( std::numeric_limits::denorm_min() ) == 1 for: 1 == 1 +# dynamic skipping works with generators +ok {test-number} - # SKIP 'skipping because answer = 41' +# dynamic skipping works with generators +ok {test-number} - +# dynamic skipping works with generators +ok {test-number} - # SKIP 'skipping because answer = 43' +# empty tags are not allowed +ok {test-number} - Catch::TestCaseInfo("", { "test with an empty tag", "[]" }, dummySourceLineInfo) +# erfc_inv +ok {test-number} - erfc_inv(1.103560) == Approx(-0.09203687623843015) for: -0.09203687623843014 == Approx( -0.09203687623843015 ) +# erfc_inv +ok {test-number} - erfc_inv(1.067400) == Approx(-0.05980291115763361) for: -0.05980291115763361 == Approx( -0.05980291115763361 ) +# erfc_inv +ok {test-number} - erfc_inv(0.050000) == Approx(1.38590382434967796) for: 1.38590382434967774 == Approx( 1.38590382434967796 ) +# estimate_clock_resolution +ok {test-number} - res.mean.count() == rate for: 2000.0 == 2000 (0x) +# estimate_clock_resolution +ok {test-number} - res.outliers.total() == 0 for: 0 == 0 +# even more nested SECTION tests +ok {test-number} - +# even more nested SECTION tests +ok {test-number} - +# even more nested SECTION tests +ok {test-number} - +# failed assertions before SKIP cause test case to fail +not ok {test-number} - 3 == 4 +# failed assertions before SKIP cause test case to fail +ok {test-number} - # SKIP +# failing for some generator values causes entire test case to fail +not ok {test-number} - explicitly +# failing for some generator values causes entire test case to fail +ok {test-number} - # SKIP +# failing for some generator values causes entire test case to fail +not ok {test-number} - explicitly +# failing for some generator values causes entire test case to fail +ok {test-number} - # SKIP +# failing in some unskipped sections causes entire test case to fail +ok {test-number} - # SKIP +# failing in some unskipped sections causes entire test case to fail +not ok {test-number} - explicitly +loose text artifact +# is_unary_function +ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +# is_unary_function +ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +# is_unary_function +ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +# is_unary_function +ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +# is_unary_function +ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +# is_unary_function +ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +# is_unary_function +ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +# is_unary_function +ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +# is_unary_function +ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +# is_unary_function +ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +# is_unary_function +ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +# is_unary_function +ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +# just failure +not ok {test-number} - explicitly with 1 message: 'Previous info should not be seen' +# just failure after unscoped info +not ok {test-number} - explicitly with 1 message: 'previous unscoped info SHOULD not be seen' +# long long +ok {test-number} - l == std::numeric_limits::max() for: 9223372036854775807 (0x) == 9223372036854775807 (0x) +# looped SECTION tests +not ok {test-number} - b > a for: 0 > 1 +# looped SECTION tests +not ok {test-number} - b > a for: 1 > 1 +# looped SECTION tests +ok {test-number} - b > a for: 2 > 1 +# looped SECTION tests +ok {test-number} - b > a for: 3 > 1 +# looped SECTION tests +ok {test-number} - b > a for: 4 > 1 +# looped SECTION tests +ok {test-number} - b > a for: 5 > 1 +# looped SECTION tests +ok {test-number} - b > a for: 6 > 1 +# looped SECTION tests +ok {test-number} - b > a for: 7 > 1 +# looped SECTION tests +ok {test-number} - b > a for: 8 > 1 +# looped SECTION tests +ok {test-number} - b > a for: 9 > 1 +# looped tests +not ok {test-number} - ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[0] (1) is even' +# looped tests +not ok {test-number} - ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[1] (1) is even' +# looped tests +ok {test-number} - ( fib[i] % 2 ) == 0 for: 0 == 0 with 1 message: 'Testing if fib[2] (2) is even' +# looped tests +not ok {test-number} - ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[3] (3) is even' +# looped tests +not ok {test-number} - ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[4] (5) is even' +# looped tests +ok {test-number} - ( fib[i] % 2 ) == 0 for: 0 == 0 with 1 message: 'Testing if fib[5] (8) is even' +# looped tests +not ok {test-number} - ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[6] (13) is even' +# looped tests +not ok {test-number} - ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[7] (21) is even' +# makeStream recognizes %debug stream name +ok {test-number} - Catch::makeStream( "%debug" ) +# make_unique reimplementation +ok {test-number} - !(lval.has_moved) for: !false +# make_unique reimplementation +ok {test-number} - rval.has_moved for: true +# make_unique reimplementation +ok {test-number} - *ptr == std::tuple{1, 2., 3} for: {?} == {?} +# mean +ok {test-number} - m == 19. for: 19.0 == 19.0 +# measure +ok {test-number} - x == 17 for: 17 == 17 +# measure +ok {test-number} - x == 23 for: 23 == 23 +# measure +ok {test-number} - r.elapsed.count() == 42 for: 42 == 42 +# measure +ok {test-number} - r.result == 23 for: 23 == 23 +# measure +ok {test-number} - r.iterations == 1 for: 1 == 1 +# measure +ok {test-number} - s.elapsed.count() == 69 for: 69 == 69 +# measure +ok {test-number} - s.result == 17 for: 17 == 17 +# measure +ok {test-number} - s.iterations == 1 for: 1 == 1 +# mix info, unscoped info and warning +warning {test-number} - 'info' with 2 messages: 'unscoped info' and 'and warn may mix' +# mix info, unscoped info and warning +warning {test-number} - 'info' with 2 messages: 'unscoped info' and 'they are not cleared after warnings' +# more nested SECTION tests +not ok {test-number} - a == b for: 1 == 2 +# more nested SECTION tests +ok {test-number} - a != b for: 1 != 2 +# more nested SECTION tests +ok {test-number} - a < b for: 1 < 2 +# nested SECTION tests +ok {test-number} - a != b for: 1 != 2 +# nested SECTION tests +ok {test-number} - b != a for: 2 != 1 +# nested SECTION tests +ok {test-number} - a != b for: 1 != 2 +a! +b1! +# nested sections can be skipped dynamically at runtime +ok {test-number} - # SKIP +! +# non streamable - with conv. op +ok {test-number} - s == "7" for: "7" == "7" +# non-copyable objects +ok {test-number} - ti == typeid(int) for: {?} == {?} +# normal_quantile +ok {test-number} - normal_quantile(0.551780) == Approx(0.13015979861484198) for: 0.13015979861484195 == Approx( 0.13015979861484198 ) +# normal_quantile +ok {test-number} - normal_quantile(0.533700) == Approx(0.08457408802851875) for: 0.08457408802851875 == Approx( 0.08457408802851875 ) +# normal_quantile +ok {test-number} - normal_quantile(0.025000) == Approx(-1.95996398454005449) for: -1.95996398454005405 == Approx( -1.95996398454005449 ) +# not allowed +ok {test-number} - +# not prints unscoped info from previous failures +ok {test-number} - true with 1 message: 'this MAY be seen only for the FIRST assertion IF info is printed for passing assertions' +# not prints unscoped info from previous failures +ok {test-number} - true with 1 message: 'this MAY be seen only for the SECOND assertion IF info is printed for passing assertions' +# not prints unscoped info from previous failures +not ok {test-number} - false with 1 message: 'this SHOULD be seen' +# null strings +ok {test-number} - makeString( false ) != static_cast(0) for: "valid string" != {null string} +# null strings +ok {test-number} - makeString( true ) == static_cast(0) for: {null string} == {null string} +# null_ptr +ok {test-number} - ptr.get() == 0 for: 0 == 0 +# pair > -> toString +ok {test-number} - ::Catch::Detail::stringify( pair ) == "{ { 42, \"Arthur\" }, { \"Ford\", 24 } }" for: "{ { 42, "Arthur" }, { "Ford", 24 } }" == "{ { 42, "Arthur" }, { "Ford", 24 } }" +# parseEnums +ok {test-number} - parseEnums( "" ), Equals( std::vector{} ) for: { } Equals: { } +# parseEnums +ok {test-number} - parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector{"Value1"} ) for: { Value1 } Equals: { Value1 } +# parseEnums +ok {test-number} - parseEnums( "Value1" ), Equals( std::vector{"Value1"} ) for: { Value1 } Equals: { Value1 } +# parseEnums +ok {test-number} - parseEnums( "EnumName::Value1" ), Equals(std::vector{"Value1"} ) for: { Value1 } Equals: { Value1 } +# parseEnums +ok {test-number} - parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector{"Value1", "Value2"} ) for: { Value1, Value2 } Equals: { Value1, Value2 } +# parseEnums +ok {test-number} - parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector{"Value1", "Value2", "Value3"} ) for: { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 } +# parseEnums +ok {test-number} - parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector{"Value1", "Value2", "Value3"} ) for: { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 } +# pointer to class +ok {test-number} - p == 0 for: 0 == 0 +# print unscoped info if passing unscoped info is printed +ok {test-number} - true with 1 message: 'this MAY be seen IF info is printed for passing assertions' +# prints unscoped info on failure +not ok {test-number} - false with 2 messages: 'this SHOULD be seen' and 'this SHOULD also be seen' +# prints unscoped info only for the first assertion +not ok {test-number} - false with 1 message: 'this SHOULD be seen only ONCE' +# prints unscoped info only for the first assertion +ok {test-number} - true +# prints unscoped info only for the first assertion +ok {test-number} - true with 1 message: 'this MAY also be seen only ONCE IF info is printed for passing assertions' +# prints unscoped info only for the first assertion +ok {test-number} - true +# random SECTION tests +ok {test-number} - a != b for: 1 != 2 +# random SECTION tests +ok {test-number} - b != a for: 2 != 1 +# random SECTION tests +ok {test-number} - a != b for: 1 != 2 +# replaceInPlace +ok {test-number} - Catch::replaceInPlace(letters, "b", "z") for: true +# replaceInPlace +ok {test-number} - letters == "azcdefcg" for: "azcdefcg" == "azcdefcg" +# replaceInPlace +ok {test-number} - Catch::replaceInPlace(letters, "c", "z") for: true +# replaceInPlace +ok {test-number} - letters == "abzdefzg" for: "abzdefzg" == "abzdefzg" +# replaceInPlace +ok {test-number} - Catch::replaceInPlace(letters, "a", "z") for: true +# replaceInPlace +ok {test-number} - letters == "zbcdefcg" for: "zbcdefcg" == "zbcdefcg" +# replaceInPlace +ok {test-number} - Catch::replaceInPlace(letters, "g", "z") for: true +# replaceInPlace +ok {test-number} - letters == "abcdefcz" for: "abcdefcz" == "abcdefcz" +# replaceInPlace +ok {test-number} - Catch::replaceInPlace(letters, letters, "replaced") for: true +# replaceInPlace +ok {test-number} - letters == "replaced" for: "replaced" == "replaced" +# replaceInPlace +ok {test-number} - !(Catch::replaceInPlace(letters, "x", "z")) for: !false +# replaceInPlace +ok {test-number} - letters == letters for: "abcdefcg" == "abcdefcg" +# replaceInPlace +ok {test-number} - Catch::replaceInPlace(letters, "c", "cc") for: true +# replaceInPlace +ok {test-number} - letters == "abccdefccg" for: "abccdefccg" == "abccdefccg" +# replaceInPlace +ok {test-number} - Catch::replaceInPlace(s, "--", "-") for: true +# replaceInPlace +ok {test-number} - s == "--" for: "--" == "--" +# replaceInPlace +ok {test-number} - Catch::replaceInPlace(s, "'", "|'") for: true +# replaceInPlace +ok {test-number} - s == "didn|'t" for: "didn|'t" == "didn|'t" +# request an unknown %-starting stream fails +ok {test-number} - Catch::makeStream( "%somestream" ) +# resolution +ok {test-number} - res.size() == count for: 10 == 10 +# resolution +ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x) +# resolution +ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x) +# resolution +ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x) +# resolution +ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x) +# resolution +ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x) +# resolution +ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x) +# resolution +ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x) +# resolution +ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x) +# resolution +ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x) +# run_for_at_least, chronometer +ok {test-number} - meter.runs() >= old_runs for: 1 >= 1 +# run_for_at_least, chronometer +ok {test-number} - meter.runs() >= old_runs for: 2 >= 1 +# run_for_at_least, chronometer +ok {test-number} - meter.runs() >= old_runs for: 4 >= 2 +# run_for_at_least, chronometer +ok {test-number} - meter.runs() >= old_runs for: 8 >= 4 +# run_for_at_least, chronometer +ok {test-number} - meter.runs() >= old_runs for: 16 >= 8 +# run_for_at_least, chronometer +ok {test-number} - meter.runs() >= old_runs for: 32 >= 16 +# run_for_at_least, chronometer +ok {test-number} - meter.runs() >= old_runs for: 64 >= 32 +# run_for_at_least, chronometer +ok {test-number} - meter.runs() >= old_runs for: 128 >= 64 +# run_for_at_least, chronometer +ok {test-number} - Timing.elapsed >= time for: 128 ns >= 100 ns +# run_for_at_least, chronometer +ok {test-number} - Timing.result == Timing.iterations + 17 for: 145 == 145 +# run_for_at_least, chronometer +ok {test-number} - Timing.iterations >= time.count() for: 128 >= 100 +# run_for_at_least, int +ok {test-number} - x >= old_x for: 1 >= 1 +# run_for_at_least, int +ok {test-number} - x >= old_x for: 2 >= 1 +# run_for_at_least, int +ok {test-number} - x >= old_x for: 4 >= 2 +# run_for_at_least, int +ok {test-number} - x >= old_x for: 8 >= 4 +# run_for_at_least, int +ok {test-number} - x >= old_x for: 16 >= 8 +# run_for_at_least, int +ok {test-number} - x >= old_x for: 32 >= 16 +# run_for_at_least, int +ok {test-number} - x >= old_x for: 64 >= 32 +# run_for_at_least, int +ok {test-number} - x >= old_x for: 128 >= 64 +# run_for_at_least, int +ok {test-number} - Timing.elapsed >= time for: 128 ns >= 100 ns +# run_for_at_least, int +ok {test-number} - Timing.result == Timing.iterations + 17 for: 145 == 145 +# run_for_at_least, int +ok {test-number} - Timing.iterations >= time.count() for: 128 >= 100 +# sections can be skipped dynamically at runtime +ok {test-number} - +# sections can be skipped dynamically at runtime +ok {test-number} - # SKIP +# sections can be skipped dynamically at runtime +ok {test-number} - +# send a single char to INFO +not ok {test-number} - false with 1 message: '3' +# sends information to INFO +not ok {test-number} - false with 2 messages: 'hi' and 'i := 7' +# shortened hide tags are split apart +ok {test-number} - testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "."_catch_sr ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} ) +# skipped tests can optionally provide a reason +ok {test-number} - # SKIP 'skipping because answer = 43' +# splitString +ok {test-number} - splitStringRef("", ','), Equals(std::vector()) for: { } Equals: { } +# splitString +ok {test-number} - splitStringRef("abc", ','), Equals(std::vector{"abc"}) for: { abc } Equals: { abc } +# splitString +ok {test-number} - splitStringRef("abc,def", ','), Equals(std::vector{"abc", "def"}) for: { abc, def } Equals: { abc, def } +# stacks unscoped info in loops +not ok {test-number} - false with 4 messages: 'Count 1 to 3...' and '1' and '2' and '3' +# stacks unscoped info in loops +not ok {test-number} - false with 4 messages: 'Count 4 to 6...' and '4' and '5' and '6' +# startsWith +ok {test-number} - !(startsWith("", 'c')) for: !false +# startsWith +ok {test-number} - startsWith(std::string("abc"), 'a') for: true +# startsWith +ok {test-number} - startsWith("def"_catch_sr, 'd') for: true +# std::map is convertible string +ok {test-number} - Catch::Detail::stringify( emptyMap ) == "{ }" for: "{ }" == "{ }" +# std::map is convertible string +ok {test-number} - Catch::Detail::stringify( map ) == "{ { \"one\", 1 } }" for: "{ { "one", 1 } }" == "{ { "one", 1 } }" +# std::map is convertible string +ok {test-number} - Catch::Detail::stringify( map ) == "{ { \"abc\", 1 }, { \"def\", 2 }, { \"ghi\", 3 } }" for: "{ { "abc", 1 }, { "def", 2 }, { "ghi", 3 } }" == "{ { "abc", 1 }, { "def", 2 }, { "ghi", 3 } }" +# std::pair -> toString +ok {test-number} - ::Catch::Detail::stringify(value) == "{ 34, \"xyzzy\" }" for: "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" +# std::pair -> toString +ok {test-number} - ::Catch::Detail::stringify( value ) == "{ 34, \"xyzzy\" }" for: "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" +# std::set is convertible string +ok {test-number} - Catch::Detail::stringify( emptySet ) == "{ }" for: "{ }" == "{ }" +# std::set is convertible string +ok {test-number} - Catch::Detail::stringify( set ) == "{ \"one\" }" for: "{ "one" }" == "{ "one" }" +# std::set is convertible string +ok {test-number} - Catch::Detail::stringify( set ) == "{ \"abc\", \"def\", \"ghi\" }" for: "{ "abc", "def", "ghi" }" == "{ "abc", "def", "ghi" }" +# std::vector > -> toString +ok {test-number} - ::Catch::Detail::stringify( pr ) == "{ { \"green\", 55 } }" for: "{ { "green", 55 } }" == "{ { "green", 55 } }" +# stdout and stderr streams have %-starting name +ok {test-number} - Catch::makeStream( "%stderr" )->isConsole() for: true +# stdout and stderr streams have %-starting name +ok {test-number} - Catch::makeStream( "%stdout" )->isConsole() for: true +# stringify ranges +ok {test-number} - ::Catch::Detail::stringify(streamable_range{}) == "op<<(streamable_range)" for: "op<<(streamable_range)" == "op<<(streamable_range)" +# stringify ranges +ok {test-number} - ::Catch::Detail::stringify(stringmaker_range{}) == "stringmaker(streamable_range)" for: "stringmaker(streamable_range)" == "stringmaker(streamable_range)" +# stringify ranges +ok {test-number} - ::Catch::Detail::stringify(just_range{}) == "{ 1, 2, 3, 4 }" for: "{ 1, 2, 3, 4 }" == "{ 1, 2, 3, 4 }" +# stringify ranges +ok {test-number} - ::Catch::Detail::stringify(disabled_range{}) == "{?}" for: "{?}" == "{?}" +# stringify( has_maker ) +ok {test-number} - ::Catch::Detail::stringify( item ) == "StringMaker" for: "StringMaker" == "StringMaker" +# stringify( has_maker_and_operator ) +ok {test-number} - ::Catch::Detail::stringify( item ) == "StringMaker" for: "StringMaker" == "StringMaker" +# stringify( has_neither ) +ok {test-number} - ::Catch::Detail::stringify(item) == "{?}" for: "{?}" == "{?}" +# stringify( has_operator ) +ok {test-number} - ::Catch::Detail::stringify( item ) == "operator<<( has_operator )" for: "operator<<( has_operator )" == "operator<<( has_operator )" +# stringify( has_template_operator ) +ok {test-number} - ::Catch::Detail::stringify( item ) == "operator<<( has_template_operator )" for: "operator<<( has_template_operator )" == "operator<<( has_template_operator )" +# stringify( vectors ) +ok {test-number} - ::Catch::Detail::stringify( v ) == "{ StringMaker }" for: "{ StringMaker }" == "{ StringMaker }" +# stringify( vectors ) +ok {test-number} - ::Catch::Detail::stringify( v ) == "{ StringMaker }" for: "{ StringMaker }" == "{ StringMaker }" +# stringify( vectors ) +ok {test-number} - ::Catch::Detail::stringify( v ) == "{ operator<<( has_operator ) }" for: "{ operator<<( has_operator ) }" == "{ operator<<( has_operator ) }" +# strlen3 +ok {test-number} - data.str.size() == data.len for: 3 == 3 +# strlen3 +ok {test-number} - data.str.size() == data.len for: 3 == 3 +# strlen3 +ok {test-number} - data.str.size() == data.len for: 5 == 5 +# strlen3 +ok {test-number} - data.str.size() == data.len for: 4 == 4 +# tables +ok {test-number} - strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) for: 5 == 5 +# tables +ok {test-number} - strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) for: 6 == 6 +# tables +ok {test-number} - strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) for: 5 == 5 +# tables +ok {test-number} - strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) for: 6 == 6 +# tags with dots in later positions are not parsed as hidden +ok {test-number} - testcase.tags.size() == 1 for: 1 == 1 +# tags with dots in later positions are not parsed as hidden +ok {test-number} - testcase.tags[0].original == "magic.tag"_catch_sr for: magic.tag == magic.tag +# tests can be skipped dynamically at runtime +ok {test-number} - # SKIP +# thrown std::strings are translated +not ok {test-number} - unexpected exception with message: 'Why would you throw a std::string?' +# toString on const wchar_t const pointer returns the string contents +ok {test-number} - result == "\"wide load\"" for: ""wide load"" == ""wide load"" +# toString on const wchar_t pointer returns the string contents +ok {test-number} - result == "\"wide load\"" for: ""wide load"" == ""wide load"" +# toString on wchar_t const pointer returns the string contents +ok {test-number} - result == "\"wide load\"" for: ""wide load"" == ""wide load"" +# toString on wchar_t returns the string contents +ok {test-number} - result == "\"wide load\"" for: ""wide load"" == ""wide load"" +# toString(enum class w/operator<<) +ok {test-number} - ::Catch::Detail::stringify(e0) == "E2/V0" for: "E2/V0" == "E2/V0" +# toString(enum class w/operator<<) +ok {test-number} - ::Catch::Detail::stringify(e1) == "E2/V1" for: "E2/V1" == "E2/V1" +# toString(enum class w/operator<<) +ok {test-number} - ::Catch::Detail::stringify(e3) == "Unknown enum value 10" for: "Unknown enum value 10" == "Unknown enum value 10" +# toString(enum class) +ok {test-number} - ::Catch::Detail::stringify(e0) == "0" for: "0" == "0" +# toString(enum class) +ok {test-number} - ::Catch::Detail::stringify(e1) == "1" for: "1" == "1" +# toString(enum w/operator<<) +ok {test-number} - ::Catch::Detail::stringify(e0) == "E2{0}" for: "E2{0}" == "E2{0}" +# toString(enum w/operator<<) +ok {test-number} - ::Catch::Detail::stringify(e1) == "E2{1}" for: "E2{1}" == "E2{1}" +# toString(enum) +ok {test-number} - ::Catch::Detail::stringify(e0) == "0" for: "0" == "0" +# toString(enum) +ok {test-number} - ::Catch::Detail::stringify(e1) == "1" for: "1" == "1" +# tuple<> +ok {test-number} - "{ }" == ::Catch::Detail::stringify(type{}) for: "{ }" == "{ }" +# tuple<> +ok {test-number} - "{ }" == ::Catch::Detail::stringify(value) for: "{ }" == "{ }" +# tuple +ok {test-number} - "1.5f" == ::Catch::Detail::stringify(float(1.5)) for: "1.5f" == "1.5f" +# tuple +ok {test-number} - "{ 1.5f, 0 }" == ::Catch::Detail::stringify(type{1.5f,0}) for: "{ 1.5f, 0 }" == "{ 1.5f, 0 }" +# tuple +ok {test-number} - "{ 0 }" == ::Catch::Detail::stringify(type{0}) for: "{ 0 }" == "{ 0 }" +# tuple +ok {test-number} - "{ \"hello\", \"world\" }" == ::Catch::Detail::stringify(type{"hello","world"}) for: "{ "hello", "world" }" == "{ "hello", "world" }" +# tuple,tuple<>,float> +ok {test-number} - "{ { 42 }, { }, 1.5f }" == ::Catch::Detail::stringify(value) for: "{ { 42 }, { }, 1.5f }" == "{ { 42 }, { }, 1.5f }" +# uniform samples +ok {test-number} - e.point == 23 for: 23.0 == 23 +# uniform samples +ok {test-number} - e.upper_bound == 23 for: 23.0 == 23 +# uniform samples +ok {test-number} - e.lower_bound == 23 for: 23.0 == 23 +# uniform samples +ok {test-number} - e.confidence_interval == 0.95 for: 0.94999999999999996 == 0.94999999999999996 +# uniform_integer_distribution can return the bounds +ok {test-number} - dist.a() == -10 for: -10 == -10 +# uniform_integer_distribution can return the bounds +ok {test-number} - dist.b() == 10 for: 10 == 10 +# unique_ptr reimplementation: basic functionality +ok {test-number} - !(ptr) for: !{?} +# unique_ptr reimplementation: basic functionality +ok {test-number} - ptr.get() == 0 for: 0 == 0 +# unique_ptr reimplementation: basic functionality +ok {test-number} - ptr for: {?} +# unique_ptr reimplementation: basic functionality +ok {test-number} - *ptr == 0 for: 0 == 0 +# unique_ptr reimplementation: basic functionality +ok {test-number} - ptr.get() == naked_ptr for: 0x == 0x +# unique_ptr reimplementation: basic functionality +ok {test-number} - !(ptr) for: !{?} +# unique_ptr reimplementation: basic functionality +ok {test-number} - ptr.get() == 0 for: 0 == 0 +# unique_ptr reimplementation: basic functionality +ok {test-number} - ptr for: {?} +# unique_ptr reimplementation: basic functionality +ok {test-number} - *ptr == 0 for: 0 == 0 +# unique_ptr reimplementation: basic functionality +ok {test-number} - ptr.get() == naked_ptr for: 0x == 0x +# unique_ptr reimplementation: basic functionality +ok {test-number} - ptr for: {?} +# unique_ptr reimplementation: basic functionality +ok {test-number} - ptr.get() != 0 for: 0x != 0 +# unique_ptr reimplementation: basic functionality +ok {test-number} - *ptr == 2 for: 2 == 2 +# unique_ptr reimplementation: basic functionality +ok {test-number} - !(ptr) for: !{?} +# unique_ptr reimplementation: basic functionality +ok {test-number} - ptr.get() == 0 for: 0 == 0 +# unique_ptr reimplementation: basic functionality +ok {test-number} - !(ptr1) for: !{?} +# unique_ptr reimplementation: basic functionality +ok {test-number} - ptr2 for: {?} +# unique_ptr reimplementation: basic functionality +ok {test-number} - *ptr2 == 1 for: 1 == 1 +# unique_ptr reimplementation: basic functionality +ok {test-number} - !(ptr2) for: !{?} +# unique_ptr reimplementation: basic functionality +ok {test-number} - ptr1 for: {?} +# unique_ptr reimplementation: basic functionality +ok {test-number} - *ptr1 == 2 for: 2 == 2 +# unique_ptr reimplementation: basic functionality +ok {test-number} - *ptr1 == 2 for: 2 == 2 +# unique_ptr reimplementation: basic functionality +ok {test-number} - *ptr2 == 1 for: 1 == 1 +# vec> -> toString +ok {test-number} - ::Catch::Detail::stringify(v) == "{ }" for: "{ }" == "{ }" +# vec> -> toString +ok {test-number} - ::Catch::Detail::stringify(v) == "{ { \"hello\" }, { \"world\" } }" for: "{ { "hello" }, { "world" } }" == "{ { "hello" }, { "world" } }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(bools) == "{ }" for: "{ }" == "{ }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(bools) == "{ true }" for: "{ true }" == "{ true }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(bools) == "{ true, false }" for: "{ true, false }" == "{ true, false }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(vv) == "{ }" for: "{ }" == "{ }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(vv) == "{ 42 }" for: "{ 42 }" == "{ 42 }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(vv) == "{ 42, 250 }" for: "{ 42, 250 }" == "{ 42, 250 }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(vv) == "{ }" for: "{ }" == "{ }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(vv) == "{ 42 }" for: "{ 42 }" == "{ 42 }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(vv) == "{ 42, 250 }" for: "{ 42, 250 }" == "{ 42, 250 }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(vv) == "{ }" for: "{ }" == "{ }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(vv) == "{ \"hello\" }" for: "{ "hello" }" == "{ "hello" }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(vv) == "{ \"hello\", \"world\" }" for: "{ "hello", "world" }" == "{ "hello", "world" }" +# vectors can be sized and resized +ok {test-number} - v.size() == 5 for: 5 == 5 +# vectors can be sized and resized +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# vectors can be sized and resized +ok {test-number} - v.size() == 10 for: 10 == 10 +# vectors can be sized and resized +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# vectors can be sized and resized +ok {test-number} - v.size() == 5 for: 5 == 5 +# vectors can be sized and resized +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# vectors can be sized and resized +ok {test-number} - v.size() == 0 for: 0 == 0 +# vectors can be sized and resized +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# vectors can be sized and resized +ok {test-number} - v.capacity() == 0 for: 0 == 0 +# vectors can be sized and resized +ok {test-number} - v.size() == 5 for: 5 == 5 +# vectors can be sized and resized +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# vectors can be sized and resized +ok {test-number} - v.size() == 5 for: 5 == 5 +# vectors can be sized and resized +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# vectors can be sized and resized +ok {test-number} - v.size() == 5 for: 5 == 5 +# vectors can be sized and resized +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# vectors can be sized and resized +ok {test-number} - v.size() == 5 for: 5 == 5 +# vectors can be sized and resized +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# warmup +ok {test-number} - (iterations * rate) > Catch::Benchmark::Detail::warmup_time.count() for: 160000000 (0x) > 100 +# warmup +ok {test-number} - (end - start) > Catch::Benchmark::Detail::warmup_time for: 310016000 ns > 100 ms +# weighted_average_quantile +ok {test-number} - q1 == 14.5 for: 14.5 == 14.5 +# weighted_average_quantile +ok {test-number} - med == 18. for: 18.0 == 18.0 +# weighted_average_quantile +ok {test-number} - q3 == 23. for: 23.0 == 23.0 +# xmlentitycheck +ok {test-number} - +# xmlentitycheck +ok {test-number} - +1..2281 + diff --git a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt new file mode 100644 index 0000000..7f281f6 --- /dev/null +++ b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt @@ -0,0 +1,4560 @@ +# filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals] +# rng-seed: 1 +# # A test name that starts with a # +ok {test-number} - with 1 message: 'yay' +# #1027: Bitfields can be captured +ok {test-number} - y.v == 0 for: 0 == 0 +# #1027: Bitfields can be captured +ok {test-number} - 0 == y.v for: 0 == 0 +# #1147 +ok {test-number} - t1 == t2 for: {?} == {?} +# #1147 +ok {test-number} - t1 != t2 for: {?} != {?} +# #1147 +ok {test-number} - t1 < t2 for: {?} < {?} +# #1147 +ok {test-number} - t1 > t2 for: {?} > {?} +# #1147 +ok {test-number} - t1 <= t2 for: {?} <= {?} +# #1147 +ok {test-number} - t1 >= t2 for: {?} >= {?} +# #1175 - Hidden Test +ok {test-number} - +# #1238 +ok {test-number} - std::memcmp(uarr, "123", sizeof(uarr)) == 0 for: 0 == 0 with 2 messages: 'uarr := "123"' and 'sarr := "456"' +# #1238 +ok {test-number} - std::memcmp(sarr, "456", sizeof(sarr)) == 0 for: 0 == 0 with 2 messages: 'uarr := "123"' and 'sarr := "456"' +# #1245 +ok {test-number} - +# #1319: Sections can have description (even if it is not saved +ok {test-number} - +# #1403 +ok {test-number} - h1 == h2 for: [1403 helper] == [1403 helper] +# #1455 - INFO and WARN can start with a linebreak +warning {test-number} - ' +This info message starts with a linebreak' with 1 message: ' +This warning message starts with a linebreak' +# #1514: stderr/stdout is not captured in tests aborted by an exception +not ok {test-number} - explicitly with 1 message: '1514' +# #1548 +ok {test-number} - std::is_same, TypeList>::value for: true +# #1905 -- test spec parser properly clears internal state between compound tests +ok {test-number} - spec.matches(*fakeTestCase("spec . char")) for: true +# #1905 -- test spec parser properly clears internal state between compound tests +ok {test-number} - spec.matches(*fakeTestCase("spec , char")) for: true +# #1905 -- test spec parser properly clears internal state between compound tests +ok {test-number} - !(spec.matches(*fakeTestCase(R"(spec \, char)"))) for: !false +# #1912 -- test spec parser handles escaping +ok {test-number} - spec.matches(*fakeTestCase(R"(spec {a} char)")) for: true +# #1912 -- test spec parser handles escaping +ok {test-number} - spec.matches(*fakeTestCase(R"(spec [a] char)")) for: true +# #1912 -- test spec parser handles escaping +ok {test-number} - !(spec.matches(*fakeTestCase("differs but has similar tag", "[a]"))) for: !false +# #1912 -- test spec parser handles escaping +ok {test-number} - spec.matches(*fakeTestCase(R"(spec \ char)")) for: true +# #1913 - GENERATE inside a for loop should not keep recreating the generator +ok {test-number} - counter < 7 for: 3 < 7 +# #1913 - GENERATE inside a for loop should not keep recreating the generator +ok {test-number} - counter < 7 for: 6 < 7 +# #1913 - GENERATEs can share a line +ok {test-number} - i != j for: 1 != 3 +# #1913 - GENERATEs can share a line +ok {test-number} - i != j for: 1 != 4 +# #1913 - GENERATEs can share a line +ok {test-number} - i != j for: 2 != 3 +# #1913 - GENERATEs can share a line +ok {test-number} - i != j for: 2 != 4 +# #1938 - GENERATE after a section +ok {test-number} - with 1 message: 'A' +# #1938 - GENERATE after a section +ok {test-number} - m for: 1 +# #1938 - GENERATE after a section +ok {test-number} - m for: 2 +# #1938 - GENERATE after a section +ok {test-number} - m for: 3 +# #1938 - Section followed by flat generate +ok {test-number} - 1 +# #1938 - Section followed by flat generate +ok {test-number} - m for: 2 +# #1938 - Section followed by flat generate +ok {test-number} - m for: 3 +# #1938 - flat generate +ok {test-number} - m for: 1 +# #1938 - flat generate +ok {test-number} - m for: 2 +# #1938 - flat generate +ok {test-number} - m for: 3 +# #1938 - mixed sections and generates +ok {test-number} - with 1 message: 'A' +# #1938 - mixed sections and generates +ok {test-number} - with 3 messages: 'i := 1' and 'j := 3' and 'k := 5' +# #1938 - mixed sections and generates +ok {test-number} - with 1 message: 'B' +# #1938 - mixed sections and generates +ok {test-number} - with 3 messages: 'i := 1' and 'j := 3' and 'k := 6' +# #1938 - mixed sections and generates +ok {test-number} - with 1 message: 'B' +# #1938 - mixed sections and generates +ok {test-number} - with 3 messages: 'i := 1' and 'j := 4' and 'k := 5' +# #1938 - mixed sections and generates +ok {test-number} - with 3 messages: 'i := 1' and 'j := 4' and 'k := 6' +# #1938 - mixed sections and generates +ok {test-number} - with 1 message: 'A' +# #1938 - mixed sections and generates +ok {test-number} - with 3 messages: 'i := 2' and 'j := 3' and 'k := 5' +# #1938 - mixed sections and generates +ok {test-number} - with 1 message: 'B' +# #1938 - mixed sections and generates +ok {test-number} - with 3 messages: 'i := 2' and 'j := 3' and 'k := 6' +# #1938 - mixed sections and generates +ok {test-number} - with 1 message: 'B' +# #1938 - mixed sections and generates +ok {test-number} - with 3 messages: 'i := 2' and 'j := 4' and 'k := 5' +# #1938 - mixed sections and generates +ok {test-number} - with 3 messages: 'i := 2' and 'j := 4' and 'k := 6' +# #1938 - nested generate +ok {test-number} - m for: 1 +# #1938 - nested generate +ok {test-number} - n for: 1 +# #1938 - nested generate +ok {test-number} - m for: 1 +# #1938 - nested generate +ok {test-number} - n for: 2 +# #1938 - nested generate +ok {test-number} - m for: 1 +# #1938 - nested generate +ok {test-number} - n for: 3 +# #1938 - nested generate +ok {test-number} - m for: 2 +# #1938 - nested generate +ok {test-number} - n for: 1 +# #1938 - nested generate +ok {test-number} - m for: 2 +# #1938 - nested generate +ok {test-number} - n for: 2 +# #1938 - nested generate +ok {test-number} - m for: 2 +# #1938 - nested generate +ok {test-number} - n for: 3 +# #1938 - nested generate +ok {test-number} - m for: 3 +# #1938 - nested generate +ok {test-number} - n for: 1 +# #1938 - nested generate +ok {test-number} - m for: 3 +# #1938 - nested generate +ok {test-number} - n for: 2 +# #1938 - nested generate +ok {test-number} - m for: 3 +# #1938 - nested generate +ok {test-number} - n for: 3 +# #1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0 +ok {test-number} - +# #1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0 +ok {test-number} - +# #1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0 +ok {test-number} - +# #2152 - ULP checks between differently signed values were wrong - double +ok {test-number} - smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) for: 0.0 is within 2 ULPs of -4.9406564584124654e-324 ([-1.4821969375237396e-323, 4.9406564584124654e-324]) +# #2152 - ULP checks between differently signed values were wrong - double +ok {test-number} - smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) for: 0.0 not is within 1 ULPs of -4.9406564584124654e-324 ([-9.8813129168249309e-324, -0.0000000000000000e+00]) +# #2152 - ULP checks between differently signed values were wrong - float +ok {test-number} - smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) for: 0.0f is within 2 ULPs of -1.40129846e-45f ([-4.20389539e-45, 1.40129846e-45]) +# #2152 - ULP checks between differently signed values were wrong - float +ok {test-number} - smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) for: 0.0f not is within 1 ULPs of -1.40129846e-45f ([-2.80259693e-45, -0.00000000e+00]) +# #2615 - Throwing in constructor generator fails test case but does not abort +not ok {test-number} - unexpected exception with message: 'failure to init' +# #748 - captures with unexpected exceptions +not ok {test-number} - unexpected exception with message: 'answer := 42' with 1 message: 'expected exception' +# #748 - captures with unexpected exceptions +not ok {test-number} - unexpected exception with message: 'answer := 42'; expression was: thisThrows() with 1 message: 'expected exception' +# #748 - captures with unexpected exceptions +ok {test-number} - thisThrows() with 1 message: 'answer := 42' +# #809 +ok {test-number} - 42 == f for: 42 == {?} +# #833 +ok {test-number} - a == t for: 3 == 3 +# #833 +ok {test-number} - a == t for: 3 == 3 +# #833 +ok {test-number} - throws_int(true) +# #833 +ok {test-number} - throws_int(true), int +# #833 +ok {test-number} - throws_int(false) +# #833 +ok {test-number} - "aaa", Catch::Matchers::EndsWith("aaa") for: "aaa" ends with: "aaa" +# #833 +ok {test-number} - templated_tests(3) for: true +# #835 -- errno should not be touched by Catch2 +not ok {test-number} - f() == 0 for: 1 == 0 +# #835 -- errno should not be touched by Catch2 +ok {test-number} - errno_after == 1 for: 1 == 1 +# #872 +ok {test-number} - x == 4 for: {?} == 4 with 1 message: 'dummy := 0' +# #961 -- Dynamically created sections should all be reported +ok {test-number} - with 1 message: 'Everything is OK' +# #961 -- Dynamically created sections should all be reported +ok {test-number} - with 1 message: 'Everything is OK' +# #961 -- Dynamically created sections should all be reported +ok {test-number} - with 1 message: 'Everything is OK' +# #961 -- Dynamically created sections should all be reported +ok {test-number} - with 1 message: 'Everything is OK' +# #961 -- Dynamically created sections should all be reported +ok {test-number} - with 1 message: 'Everything is OK' +# 'Not' checks that should fail +not ok {test-number} - false != false +# 'Not' checks that should fail +not ok {test-number} - true != true +# 'Not' checks that should fail +not ok {test-number} - !true for: false +# 'Not' checks that should fail +not ok {test-number} - !(true) for: !true +# 'Not' checks that should fail +not ok {test-number} - !trueValue for: false +# 'Not' checks that should fail +not ok {test-number} - !(trueValue) for: !true +# 'Not' checks that should fail +not ok {test-number} - !(1 == 1) for: false +# 'Not' checks that should fail +not ok {test-number} - !(1 == 1) +# 'Not' checks that should succeed +ok {test-number} - false == false +# 'Not' checks that should succeed +ok {test-number} - true == true +# 'Not' checks that should succeed +ok {test-number} - !false for: true +# 'Not' checks that should succeed +ok {test-number} - !(false) for: !false +# 'Not' checks that should succeed +ok {test-number} - !falseValue for: true +# 'Not' checks that should succeed +ok {test-number} - !(falseValue) for: !false +# 'Not' checks that should succeed +ok {test-number} - !(1 == 2) for: true +# 'Not' checks that should succeed +ok {test-number} - !(1 == 2) +# (unimplemented) static bools can be evaluated +ok {test-number} - is_true::value == true for: true == true +# (unimplemented) static bools can be evaluated +ok {test-number} - true == is_true::value for: true == true +# (unimplemented) static bools can be evaluated +ok {test-number} - is_true::value == false for: false == false +# (unimplemented) static bools can be evaluated +ok {test-number} - false == is_true::value for: false == false +# (unimplemented) static bools can be evaluated +ok {test-number} - !is_true::value for: true +# (unimplemented) static bools can be evaluated +ok {test-number} - !!is_true::value for: true +# (unimplemented) static bools can be evaluated +ok {test-number} - is_true::value for: true +# (unimplemented) static bools can be evaluated +ok {test-number} - !(is_true::value) for: !false +# 3x3x3 ints +ok {test-number} - x < y for: 1 < 4 +# 3x3x3 ints +ok {test-number} - y < z for: 4 < 7 +# 3x3x3 ints +ok {test-number} - x < z for: 1 < 7 +# 3x3x3 ints +ok {test-number} - x < y for: 1 < 4 +# 3x3x3 ints +ok {test-number} - y < z for: 4 < 8 +# 3x3x3 ints +ok {test-number} - x < z for: 1 < 8 +# 3x3x3 ints +ok {test-number} - x < y for: 1 < 4 +# 3x3x3 ints +ok {test-number} - y < z for: 4 < 9 +# 3x3x3 ints +ok {test-number} - x < z for: 1 < 9 +# 3x3x3 ints +ok {test-number} - x < y for: 1 < 5 +# 3x3x3 ints +ok {test-number} - y < z for: 5 < 7 +# 3x3x3 ints +ok {test-number} - x < z for: 1 < 7 +# 3x3x3 ints +ok {test-number} - x < y for: 1 < 5 +# 3x3x3 ints +ok {test-number} - y < z for: 5 < 8 +# 3x3x3 ints +ok {test-number} - x < z for: 1 < 8 +# 3x3x3 ints +ok {test-number} - x < y for: 1 < 5 +# 3x3x3 ints +ok {test-number} - y < z for: 5 < 9 +# 3x3x3 ints +ok {test-number} - x < z for: 1 < 9 +# 3x3x3 ints +ok {test-number} - x < y for: 1 < 6 +# 3x3x3 ints +ok {test-number} - y < z for: 6 < 7 +# 3x3x3 ints +ok {test-number} - x < z for: 1 < 7 +# 3x3x3 ints +ok {test-number} - x < y for: 1 < 6 +# 3x3x3 ints +ok {test-number} - y < z for: 6 < 8 +# 3x3x3 ints +ok {test-number} - x < z for: 1 < 8 +# 3x3x3 ints +ok {test-number} - x < y for: 1 < 6 +# 3x3x3 ints +ok {test-number} - y < z for: 6 < 9 +# 3x3x3 ints +ok {test-number} - x < z for: 1 < 9 +# 3x3x3 ints +ok {test-number} - x < y for: 2 < 4 +# 3x3x3 ints +ok {test-number} - y < z for: 4 < 7 +# 3x3x3 ints +ok {test-number} - x < z for: 2 < 7 +# 3x3x3 ints +ok {test-number} - x < y for: 2 < 4 +# 3x3x3 ints +ok {test-number} - y < z for: 4 < 8 +# 3x3x3 ints +ok {test-number} - x < z for: 2 < 8 +# 3x3x3 ints +ok {test-number} - x < y for: 2 < 4 +# 3x3x3 ints +ok {test-number} - y < z for: 4 < 9 +# 3x3x3 ints +ok {test-number} - x < z for: 2 < 9 +# 3x3x3 ints +ok {test-number} - x < y for: 2 < 5 +# 3x3x3 ints +ok {test-number} - y < z for: 5 < 7 +# 3x3x3 ints +ok {test-number} - x < z for: 2 < 7 +# 3x3x3 ints +ok {test-number} - x < y for: 2 < 5 +# 3x3x3 ints +ok {test-number} - y < z for: 5 < 8 +# 3x3x3 ints +ok {test-number} - x < z for: 2 < 8 +# 3x3x3 ints +ok {test-number} - x < y for: 2 < 5 +# 3x3x3 ints +ok {test-number} - y < z for: 5 < 9 +# 3x3x3 ints +ok {test-number} - x < z for: 2 < 9 +# 3x3x3 ints +ok {test-number} - x < y for: 2 < 6 +# 3x3x3 ints +ok {test-number} - y < z for: 6 < 7 +# 3x3x3 ints +ok {test-number} - x < z for: 2 < 7 +# 3x3x3 ints +ok {test-number} - x < y for: 2 < 6 +# 3x3x3 ints +ok {test-number} - y < z for: 6 < 8 +# 3x3x3 ints +ok {test-number} - x < z for: 2 < 8 +# 3x3x3 ints +ok {test-number} - x < y for: 2 < 6 +# 3x3x3 ints +ok {test-number} - y < z for: 6 < 9 +# 3x3x3 ints +ok {test-number} - x < z for: 2 < 9 +# 3x3x3 ints +ok {test-number} - x < y for: 3 < 4 +# 3x3x3 ints +ok {test-number} - y < z for: 4 < 7 +# 3x3x3 ints +ok {test-number} - x < z for: 3 < 7 +# 3x3x3 ints +ok {test-number} - x < y for: 3 < 4 +# 3x3x3 ints +ok {test-number} - y < z for: 4 < 8 +# 3x3x3 ints +ok {test-number} - x < z for: 3 < 8 +# 3x3x3 ints +ok {test-number} - x < y for: 3 < 4 +# 3x3x3 ints +ok {test-number} - y < z for: 4 < 9 +# 3x3x3 ints +ok {test-number} - x < z for: 3 < 9 +# 3x3x3 ints +ok {test-number} - x < y for: 3 < 5 +# 3x3x3 ints +ok {test-number} - y < z for: 5 < 7 +# 3x3x3 ints +ok {test-number} - x < z for: 3 < 7 +# 3x3x3 ints +ok {test-number} - x < y for: 3 < 5 +# 3x3x3 ints +ok {test-number} - y < z for: 5 < 8 +# 3x3x3 ints +ok {test-number} - x < z for: 3 < 8 +# 3x3x3 ints +ok {test-number} - x < y for: 3 < 5 +# 3x3x3 ints +ok {test-number} - y < z for: 5 < 9 +# 3x3x3 ints +ok {test-number} - x < z for: 3 < 9 +# 3x3x3 ints +ok {test-number} - x < y for: 3 < 6 +# 3x3x3 ints +ok {test-number} - y < z for: 6 < 7 +# 3x3x3 ints +ok {test-number} - x < z for: 3 < 7 +# 3x3x3 ints +ok {test-number} - x < y for: 3 < 6 +# 3x3x3 ints +ok {test-number} - y < z for: 6 < 8 +# 3x3x3 ints +ok {test-number} - x < z for: 3 < 8 +# 3x3x3 ints +ok {test-number} - x < y for: 3 < 6 +# 3x3x3 ints +ok {test-number} - y < z for: 6 < 9 +# 3x3x3 ints +ok {test-number} - x < z for: 3 < 9 +# A METHOD_AS_TEST_CASE based test run that fails +not ok {test-number} - s == "world" for: "hello" == "world" +# A METHOD_AS_TEST_CASE based test run that succeeds +ok {test-number} - s == "hello" for: "hello" == "hello" +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo +not ok {test-number} - Template_Fixture_2::m_a.size() == 1 for: 0 == 1 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo +not ok {test-number} - Template_Fixture_2::m_a.size() == 1 for: 0 == 1 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector +not ok {test-number} - Template_Fixture_2::m_a.size() == 1 for: 0 == 1 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector +not ok {test-number} - Template_Fixture_2::m_a.size() == 1 for: 0 == 1 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo +ok {test-number} - Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo +ok {test-number} - Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector +ok {test-number} - Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector +ok {test-number} - Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2 +not ok {test-number} - Template_Fixture_2{}.m_a.size() < 2 for: 6 < 2 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2 +not ok {test-number} - Template_Fixture_2{}.m_a.size() < 2 for: 2 < 2 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array +not ok {test-number} - Template_Fixture_2{}.m_a.size() < 2 for: 6 < 2 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array +not ok {test-number} - Template_Fixture_2{}.m_a.size() < 2 for: 2 < 2 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2 +ok {test-number} - Template_Fixture_2{}.m_a.size() >= 2 for: 6 >= 2 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2 +ok {test-number} - Template_Fixture_2{}.m_a.size() >= 2 for: 2 >= 2 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array +ok {test-number} - Template_Fixture_2{}.m_a.size() >= 2 for: 6 >= 2 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array +ok {test-number} - Template_Fixture_2{}.m_a.size() >= 2 for: 2 >= 2 +# A TEMPLATE_TEST_CASE_METHOD based test run that fails - double +not ok {test-number} - Template_Fixture::m_a == 2 for: 1.0 == 2 +# A TEMPLATE_TEST_CASE_METHOD based test run that fails - float +not ok {test-number} - Template_Fixture::m_a == 2 for: 1.0f == 2 +# A TEMPLATE_TEST_CASE_METHOD based test run that fails - int +not ok {test-number} - Template_Fixture::m_a == 2 for: 1 == 2 +# A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - double +ok {test-number} - Template_Fixture::m_a == 1 for: 1.0 == 1 +# A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - float +ok {test-number} - Template_Fixture::m_a == 1 for: 1.0f == 1 +# A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - int +ok {test-number} - Template_Fixture::m_a == 1 for: 1 == 1 +# A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1 +not ok {test-number} - Nttp_Fixture::value == 0 for: 1 == 0 +# A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3 +not ok {test-number} - Nttp_Fixture::value == 0 for: 3 == 0 +# A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6 +not ok {test-number} - Nttp_Fixture::value == 0 for: 6 == 0 +# A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1 +ok {test-number} - Nttp_Fixture::value > 0 for: 1 > 0 +# A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 3 +ok {test-number} - Nttp_Fixture::value > 0 for: 3 > 0 +# A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 6 +ok {test-number} - Nttp_Fixture::value > 0 for: 6 > 0 +# A TEST_CASE_METHOD based test run that fails +not ok {test-number} - m_a == 2 for: 1 == 2 +# A TEST_CASE_METHOD based test run that succeeds +ok {test-number} - m_a == 1 for: 1 == 1 +# A TEST_CASE_PERSISTENT_FIXTURE based test run that fails +ok {test-number} - m_a++ == 0 for: 0 == 0 +# A TEST_CASE_PERSISTENT_FIXTURE based test run that fails +not ok {test-number} - m_a == 0 for: 1 == 0 +# A TEST_CASE_PERSISTENT_FIXTURE based test run that succeeds +ok {test-number} - m_a++ == 0 for: 0 == 0 +# A TEST_CASE_PERSISTENT_FIXTURE based test run that succeeds +ok {test-number} - m_a == 1 for: 1 == 1 +# A Template product test case - Foo +ok {test-number} - x.size() == 0 for: 0 == 0 +# A Template product test case - Foo +ok {test-number} - x.size() == 0 for: 0 == 0 +# A Template product test case - std::vector +ok {test-number} - x.size() == 0 for: 0 == 0 +# A Template product test case - std::vector +ok {test-number} - x.size() == 0 for: 0 == 0 +# A Template product test case with array signature - Bar +ok {test-number} - x.size() > 0 for: 42 > 0 +# A Template product test case with array signature - Bar +ok {test-number} - x.size() > 0 for: 9 > 0 +# A Template product test case with array signature - std::array +ok {test-number} - x.size() > 0 for: 42 > 0 +# A Template product test case with array signature - std::array +ok {test-number} - x.size() > 0 for: 9 > 0 +# A comparison that uses literals instead of the normal constructor +ok {test-number} - d == 1.23_a for: 1.22999999999999998 == Approx( 1.22999999999999998 ) +# A comparison that uses literals instead of the normal constructor +ok {test-number} - d != 1.22_a for: 1.22999999999999998 != Approx( 1.21999999999999997 ) +# A comparison that uses literals instead of the normal constructor +ok {test-number} - -d == -1.23_a for: -1.22999999999999998 == Approx( -1.22999999999999998 ) +# A comparison that uses literals instead of the normal constructor +ok {test-number} - d == 1.2_a .epsilon(.1) for: 1.22999999999999998 == Approx( 1.19999999999999996 ) +# A comparison that uses literals instead of the normal constructor +ok {test-number} - d != 1.2_a .epsilon(.001) for: 1.22999999999999998 != Approx( 1.19999999999999996 ) +# A comparison that uses literals instead of the normal constructor +ok {test-number} - d == 1_a .epsilon(.3) for: 1.22999999999999998 == Approx( 1.0 ) +# A couple of nested sections followed by a failure +ok {test-number} - with 1 message: 'that's not flying - that's failing in style' +# A couple of nested sections followed by a failure +not ok {test-number} - explicitly with 1 message: 'to infinity and beyond' +# A failing expression with a non streamable type is still captured +not ok {test-number} - &o1 == &o2 for: 0x == 0x +# A failing expression with a non streamable type is still captured +not ok {test-number} - o1 == o2 for: {?} == {?} +# Absolute margin +ok {test-number} - 104.0 != Approx(100.0) for: 104.0 != Approx( 100.0 ) +# Absolute margin +ok {test-number} - 104.0 == Approx(100.0).margin(5) for: 104.0 == Approx( 100.0 ) +# Absolute margin +ok {test-number} - 104.0 == Approx(100.0).margin(4) for: 104.0 == Approx( 100.0 ) +# Absolute margin +ok {test-number} - 104.0 != Approx(100.0).margin(3) for: 104.0 != Approx( 100.0 ) +# Absolute margin +ok {test-number} - 100.3 != Approx(100.0) for: 100.29999999999999716 != Approx( 100.0 ) +# Absolute margin +ok {test-number} - 100.3 == Approx(100.0).margin(0.5) for: 100.29999999999999716 == Approx( 100.0 ) +# An expression with side-effects should only be evaluated once +ok {test-number} - i++ == 7 for: 7 == 7 +# An expression with side-effects should only be evaluated once +ok {test-number} - i++ == 8 for: 8 == 8 +# An unchecked exception reports the line of the last assertion +ok {test-number} - 1 == 1 +# An unchecked exception reports the line of the last assertion +not ok {test-number} - unexpected exception with message: 'unexpected exception'; expression was: {Unknown expression after the reported line} +# Anonymous test case 1 +ok {test-number} - with 1 message: 'anonymous test case' +# Approx setters validate their arguments +ok {test-number} - Approx(0).margin(0) +# Approx setters validate their arguments +ok {test-number} - Approx(0).margin(1234656) +# Approx setters validate their arguments +ok {test-number} - Approx(0).margin(-2), std::domain_error +# Approx setters validate their arguments +ok {test-number} - Approx(0).epsilon(0) +# Approx setters validate their arguments +ok {test-number} - Approx(0).epsilon(1) +# Approx setters validate their arguments +ok {test-number} - Approx(0).epsilon(-0.001), std::domain_error +# Approx setters validate their arguments +ok {test-number} - Approx(0).epsilon(1.0001), std::domain_error +# Approx with exactly-representable margin +ok {test-number} - 0.25f == Approx(0.0f).margin(0.25f) for: 0.25f == Approx( 0.0 ) +# Approx with exactly-representable margin +ok {test-number} - 0.0f == Approx(0.25f).margin(0.25f) for: 0.0f == Approx( 0.25 ) +# Approx with exactly-representable margin +ok {test-number} - 0.5f == Approx(0.25f).margin(0.25f) for: 0.5f == Approx( 0.25 ) +# Approx with exactly-representable margin +ok {test-number} - 245.0f == Approx(245.25f).margin(0.25f) for: 245.0f == Approx( 245.25 ) +# Approx with exactly-representable margin +ok {test-number} - 245.5f == Approx(245.25f).margin(0.25f) for: 245.5f == Approx( 245.25 ) +# Approximate PI +ok {test-number} - divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) for: 3.14285714285714279 == Approx( 3.14100000000000001 ) +# Approximate PI +ok {test-number} - divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) for: 3.14285714285714279 != Approx( 3.14100000000000001 ) +# Approximate comparisons with different epsilons +ok {test-number} - d != Approx( 1.231 ) for: 1.22999999999999998 != Approx( 1.23100000000000009 ) +# Approximate comparisons with different epsilons +ok {test-number} - d == Approx( 1.231 ).epsilon( 0.1 ) for: 1.22999999999999998 == Approx( 1.23100000000000009 ) +# Approximate comparisons with floats +ok {test-number} - 1.23f == Approx( 1.23f ) for: 1.230000019f == Approx( 1.23000001907348633 ) +# Approximate comparisons with floats +ok {test-number} - 0.0f == Approx( 0.0f ) for: 0.0f == Approx( 0.0 ) +# Approximate comparisons with ints +ok {test-number} - 1 == Approx( 1 ) for: 1 == Approx( 1.0 ) +# Approximate comparisons with ints +ok {test-number} - 0 == Approx( 0 ) for: 0 == Approx( 0.0 ) +# Approximate comparisons with mixed numeric types +ok {test-number} - 1.0f == Approx( 1 ) for: 1.0f == Approx( 1.0 ) +# Approximate comparisons with mixed numeric types +ok {test-number} - 0 == Approx( dZero) for: 0 == Approx( 0.0 ) +# Approximate comparisons with mixed numeric types +ok {test-number} - 0 == Approx( dSmall ).margin( 0.001 ) for: 0 == Approx( 0.00001 ) +# Approximate comparisons with mixed numeric types +ok {test-number} - 1.234f == Approx( dMedium ) for: 1.233999968f == Approx( 1.23399999999999999 ) +# Approximate comparisons with mixed numeric types +ok {test-number} - dMedium == Approx( 1.234f ) for: 1.23399999999999999 == Approx( 1.23399996757507324 ) +# Arbitrary predicate matcher +ok {test-number} - 1, Predicate( alwaysTrue, "always true" ) for: 1 matches predicate: "always true" +# Arbitrary predicate matcher +ok {test-number} - 1, !Predicate( alwaysFalse, "always false" ) for: 1 not matches predicate: "always false" +# Arbitrary predicate matcher +ok {test-number} - "Hello olleH", Predicate( []( std::string const& str ) -> bool { return str.front() == str.back(); }, "First and last character should be equal" ) for: "Hello olleH" matches predicate: "First and last character should be equal" +# Arbitrary predicate matcher +ok {test-number} - "This wouldn't pass", !Predicate( []( std::string const& str ) -> bool { return str.front() == str.back(); } ) for: "This wouldn't pass" not matches undescribed predicate +# Assertion macros support bit operators and bool conversions +ok {test-number} - lhs | rhs for: Val: 1 | Val: 2 +# Assertion macros support bit operators and bool conversions +ok {test-number} - !(lhs & rhs) for: !(Val: 1 & Val: 2) +# Assertion macros support bit operators and bool conversions +ok {test-number} - HasBitOperators{ 1 } & HasBitOperators{ 1 } for: Val: 1 & Val: 1 +# Assertion macros support bit operators and bool conversions +ok {test-number} - lhs ^ rhs for: Val: 1 ^ Val: 2 +# Assertion macros support bit operators and bool conversions +ok {test-number} - !(lhs ^ lhs) for: !(Val: 1 ^ Val: 1) +# Assertions then sections +ok {test-number} - true +# Assertions then sections +ok {test-number} - true +# Assertions then sections +ok {test-number} - true +# Assertions then sections +ok {test-number} - true +# Assertions then sections +ok {test-number} - true +# Assertions then sections +ok {test-number} - true +# Basic use of the Contains range matcher +ok {test-number} - a, Contains(1) for: { 1, 2, 3 } contains element 1 +# Basic use of the Contains range matcher +ok {test-number} - b, Contains(1) for: { 0, 1, 2 } contains element 1 +# Basic use of the Contains range matcher +ok {test-number} - c, !Contains(1) for: { 4, 5, 6 } not contains element 1 +# Basic use of the Contains range matcher +ok {test-number} - a, Contains(0, close_enough) for: { 1, 2, 3 } contains element 0 +# Basic use of the Contains range matcher +ok {test-number} - b, Contains(0, close_enough) for: { 0, 1, 2 } contains element 0 +# Basic use of the Contains range matcher +ok {test-number} - c, !Contains(0, close_enough) for: { 4, 5, 6 } not contains element 0 +# Basic use of the Contains range matcher +ok {test-number} - a, Contains(4, [](auto&& lhs, size_t sz) { return lhs.size() == sz; }) for: { "abc", "abcd", "abcde" } contains element 4 +# Basic use of the Contains range matcher +ok {test-number} - in, Contains(1) for: { 1, 2, 3, 4, 5 } contains element 1 +# Basic use of the Contains range matcher +ok {test-number} - in, !Contains(8) for: { 1, 2, 3, 4, 5 } not contains element 8 +# Basic use of the Contains range matcher +ok {test-number} - in, Contains(MoveOnlyTestElement{ 2 }) for: { 1, 2, 3 } contains element 2 +# Basic use of the Contains range matcher +ok {test-number} - in, !Contains(MoveOnlyTestElement{ 9 }) for: { 1, 2, 3 } not contains element 9 +# Basic use of the Contains range matcher +ok {test-number} - in, Contains(Catch::Matchers::WithinAbs(0.5, 0.5)) for: { 1.0, 2.0, 3.0, 0.0 } contains element matching is within 0.5 of 0.5 +# Basic use of the Empty range matcher +ok {test-number} - empty_array, IsEmpty() for: { } is empty +# Basic use of the Empty range matcher +ok {test-number} - non_empty_array, !IsEmpty() for: { 0.0 } not is empty +# Basic use of the Empty range matcher +ok {test-number} - empty_vec, IsEmpty() for: { } is empty +# Basic use of the Empty range matcher +ok {test-number} - non_empty_vec, !IsEmpty() for: { 'a', 'b', 'c' } not is empty +# Basic use of the Empty range matcher +ok {test-number} - inner_lists_are_empty, !IsEmpty() for: { { } } not is empty +# Basic use of the Empty range matcher +ok {test-number} - inner_lists_are_empty.front(), IsEmpty() for: { } is empty +# Basic use of the Empty range matcher +ok {test-number} - has_empty{}, !IsEmpty() for: {?} not is empty +# Basic use of the Empty range matcher +ok {test-number} - unrelated::ADL_empty{}, IsEmpty() for: {?} is empty +# CAPTURE can deal with complex expressions +ok {test-number} - with 7 messages: 'a := 1' and 'b := 2' and 'c := 3' and 'a + b := 3' and 'a+b := 3' and 'c > b := true' and 'a == 1 := true' +# CAPTURE can deal with complex expressions involving commas +ok {test-number} - with 7 messages: 'custom_index_op{1, 2, 3}[0, 1, 2] := 0' and 'custom_index_op{1, 2, 3}[(0, 1)] := 0' and 'custom_index_op{1, 2, 3}[0] := 0' and '(helper_1436{12, -12}) := { 12, -12 }' and '(helper_1436(-12, 12)) := { -12, 12 }' and '(1, 2) := 2' and '(2, 3) := 3' +# CAPTURE parses string and character constants +ok {test-number} - with 11 messages: '("comma, in string", "escaped, \", ") := "escaped, ", "' and '"single quote in string,'," := "single quote in string,',"' and '"some escapes, \\,\\\\" := "some escapes, \,\\"' and '"some, ), unmatched, } prenheses {[<" := "some, ), unmatched, } prenheses {[<"' and ''"' := '"'' and ''\'' := '''' and '',' := ','' and ''}' := '}'' and '')' := ')'' and ''(' := '('' and ''{' := '{'' +# Capture and info messages +ok {test-number} - true with 1 message: 'i := 2' +# Capture and info messages +ok {test-number} - true with 1 message: '3' +# CaseInsensitiveEqualsTo is case insensitive +ok {test-number} - eq( "", "" ) for: true +# CaseInsensitiveEqualsTo is case insensitive +ok {test-number} - !(eq( "", "a" )) for: !false +# CaseInsensitiveEqualsTo is case insensitive +ok {test-number} - eq( "a", "a" ) for: true +# CaseInsensitiveEqualsTo is case insensitive +ok {test-number} - eq( "a", "A" ) for: true +# CaseInsensitiveEqualsTo is case insensitive +ok {test-number} - eq( "A", "a" ) for: true +# CaseInsensitiveEqualsTo is case insensitive +ok {test-number} - eq( "A", "A" ) for: true +# CaseInsensitiveEqualsTo is case insensitive +ok {test-number} - !(eq( "a", "b" )) for: !false +# CaseInsensitiveEqualsTo is case insensitive +ok {test-number} - !(eq( "a", "B" )) for: !false +# CaseInsensitiveLess is case insensitive +ok {test-number} - lt( "", "a" ) for: true +# CaseInsensitiveLess is case insensitive +ok {test-number} - !(lt( "a", "a" )) for: !false +# CaseInsensitiveLess is case insensitive +ok {test-number} - !(lt( "", "" )) for: !false +# CaseInsensitiveLess is case insensitive +ok {test-number} - lt( "a", "b" ) for: true +# CaseInsensitiveLess is case insensitive +ok {test-number} - lt( "a", "B" ) for: true +# CaseInsensitiveLess is case insensitive +ok {test-number} - lt( "A", "b" ) for: true +# CaseInsensitiveLess is case insensitive +ok {test-number} - lt( "A", "B" ) for: true +# Character pretty printing +ok {test-number} - ::Catch::Detail::stringify('\t') == "'\\t'" for: "'\t'" == "'\t'" +# Character pretty printing +ok {test-number} - ::Catch::Detail::stringify('\n') == "'\\n'" for: "'\n'" == "'\n'" +# Character pretty printing +ok {test-number} - ::Catch::Detail::stringify('\r') == "'\\r'" for: "'\r'" == "'\r'" +# Character pretty printing +ok {test-number} - ::Catch::Detail::stringify('\f') == "'\\f'" for: "'\f'" == "'\f'" +# Character pretty printing +ok {test-number} - ::Catch::Detail::stringify( ' ' ) == "' '" for: "' '" == "' '" +# Character pretty printing +ok {test-number} - ::Catch::Detail::stringify( 'A' ) == "'A'" for: "'A'" == "'A'" +# Character pretty printing +ok {test-number} - ::Catch::Detail::stringify( 'z' ) == "'z'" for: "'z'" == "'z'" +# Character pretty printing +ok {test-number} - ::Catch::Detail::stringify( '\0' ) == "0" for: "0" == "0" +# Character pretty printing +ok {test-number} - ::Catch::Detail::stringify( static_cast(2) ) == "2" for: "2" == "2" +# Character pretty printing +ok {test-number} - ::Catch::Detail::stringify( static_cast(5) ) == "5" for: "5" == "5" +# Clara::Arg does not crash on incomplete input +ok {test-number} - name.empty() for: true +# Clara::Arg does not crash on incomplete input +ok {test-number} - result for: {?} +# Clara::Arg does not crash on incomplete input +ok {test-number} - result.type() == Catch::Clara::Detail::ResultType::Ok for: 0 == 0 +# Clara::Arg does not crash on incomplete input +ok {test-number} - parsed.type() == Catch::Clara::ParseResultType::NoMatch for: 1 == 1 +# Clara::Arg does not crash on incomplete input +ok {test-number} - parsed.remainingTokens().count() == 2 for: 2 == 2 +# Clara::Arg does not crash on incomplete input +ok {test-number} - name.empty() for: true +# Clara::Arg supports single-arg parse the way Opt does +ok {test-number} - name.empty() for: true +# Clara::Arg supports single-arg parse the way Opt does +ok {test-number} - name == "foo" for: "foo" == "foo" +# Clara::Opt supports accept-many lambdas +ok {test-number} - !(parse_result) for: !{?} +# Clara::Opt supports accept-many lambdas +ok {test-number} - parse_result for: {?} +# Clara::Opt supports accept-many lambdas +ok {test-number} - res == std::vector{ "aaa", "bbb" } for: { "aaa", "bbb" } == { "aaa", "bbb" } +# ColourGuard behaviour +ok {test-number} - streamWrapper.str().empty() for: true +# ColourGuard behaviour +ok {test-number} - streamWrapper.str() == "1\nUsing code: 2\n2\nUsing code: 0\n3\n" for: "1 Using code: 2 2 Using code: 0 3 " == "1 Using code: 2 2 Using code: 0 3 " +# ColourGuard behaviour +ok {test-number} - streamWrapper.str() == "Using code: 2\nA\nB\nUsing code: 0\nC\n" for: "Using code: 2 A B Using code: 0 C " == "Using code: 2 A B Using code: 0 C " +# Combining MatchAllOfGeneric does not nest +ok {test-number} - with 1 message: 'std::is_same< decltype( ( MatcherA() && MatcherB() ) && MatcherC() ), Catch::Matchers::Detail:: MatchAllOfGeneric>::value' +# Combining MatchAllOfGeneric does not nest +ok {test-number} - 1, ( MatcherA() && MatcherB() ) && MatcherC() for: 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 ) +# Combining MatchAllOfGeneric does not nest +ok {test-number} - with 1 message: 'std::is_same< decltype( MatcherA() && ( MatcherB() && MatcherC() ) ), Catch::Matchers::Detail:: MatchAllOfGeneric>::value' +# Combining MatchAllOfGeneric does not nest +ok {test-number} - 1, MatcherA() && ( MatcherB() && MatcherC() ) for: 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 ) +# Combining MatchAllOfGeneric does not nest +ok {test-number} - with 1 message: 'std::is_same< decltype( ( MatcherA() && MatcherB() ) && ( MatcherC() && MatcherD() ) ), Catch::Matchers::Detail:: MatchAllOfGeneric>:: value' +# Combining MatchAllOfGeneric does not nest +ok {test-number} - 1, ( MatcherA() && MatcherB() ) && ( MatcherC() && MatcherD() ) for: 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 and equals: true ) +# Combining MatchAnyOfGeneric does not nest +ok {test-number} - with 1 message: 'std::is_same< decltype( ( MatcherA() || MatcherB() ) || MatcherC() ), Catch::Matchers::Detail:: MatchAnyOfGeneric>::value' +# Combining MatchAnyOfGeneric does not nest +ok {test-number} - 1, ( MatcherA() || MatcherB() ) || MatcherC() for: 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 ) +# Combining MatchAnyOfGeneric does not nest +ok {test-number} - with 1 message: 'std::is_same< decltype( MatcherA() || ( MatcherB() || MatcherC() ) ), Catch::Matchers::Detail:: MatchAnyOfGeneric>::value' +# Combining MatchAnyOfGeneric does not nest +ok {test-number} - 1, MatcherA() || ( MatcherB() || MatcherC() ) for: 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 ) +# Combining MatchAnyOfGeneric does not nest +ok {test-number} - with 1 message: 'std::is_same< decltype( ( MatcherA() || MatcherB() ) || ( MatcherC() || MatcherD() ) ), Catch::Matchers::Detail:: MatchAnyOfGeneric>:: value' +# Combining MatchAnyOfGeneric does not nest +ok {test-number} - 1, ( MatcherA() || MatcherB() ) || ( MatcherC() || MatcherD() ) for: 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 or equals: true ) +# Combining MatchNotOfGeneric does not nest +ok {test-number} - with 1 message: 'std::is_same< decltype( !MatcherA() ), Catch::Matchers::Detail::MatchNotOfGeneric>::value' +# Combining MatchNotOfGeneric does not nest +ok {test-number} - 0, !MatcherA() for: 0 not equals: (int) 1 or (string) "1" +# Combining MatchNotOfGeneric does not nest +ok {test-number} - with 1 message: 'std::is_same::value' +# Combining MatchNotOfGeneric does not nest +ok {test-number} - 1, !!MatcherA() for: 1 equals: (int) 1 or (string) "1" +# Combining MatchNotOfGeneric does not nest +ok {test-number} - with 1 message: 'std::is_same< decltype( !!!MatcherA() ), Catch::Matchers::Detail::MatchNotOfGeneric>::value' +# Combining MatchNotOfGeneric does not nest +ok {test-number} - 0, !!!MatcherA() for: 0 not equals: (int) 1 or (string) "1" +# Combining MatchNotOfGeneric does not nest +ok {test-number} - with 1 message: 'std::is_same::value' +# Combining MatchNotOfGeneric does not nest +ok {test-number} - 1, !!!!MatcherA() for: 1 equals: (int) 1 or (string) "1" +# Combining concrete matchers does not use templated matchers +ok {test-number} - with 1 message: 'std::is_same>::value' +# Combining only templated matchers +ok {test-number} - with 1 message: 'std::is_same>::value' +# Combining only templated matchers +ok {test-number} - 1, MatcherA() || MatcherB() for: 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 ) +# Combining only templated matchers +ok {test-number} - with 1 message: 'std::is_same>::value' +# Combining only templated matchers +ok {test-number} - 1, MatcherA() && MatcherB() for: 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 ) +# Combining only templated matchers +ok {test-number} - with 1 message: 'std::is_same< decltype( MatcherA() || !MatcherB() ), Catch::Matchers::Detail::MatchAnyOfGeneric< MatcherA, Catch::Matchers::Detail::MatchNotOfGeneric>>::value' +# Combining only templated matchers +ok {test-number} - 1, MatcherA() || !MatcherB() for: 1 ( equals: (int) 1 or (string) "1" or not equals: (long long) 1 ) +# Combining templated and concrete matchers +ok {test-number} - vec, Predicate>( []( auto const& v ) { return std::all_of( v.begin(), v.end(), []( int elem ) { return elem % 2 == 1; } ); }, "All elements are odd" ) && !EqualsRange( a ) for: { 1, 3, 5 } ( matches predicate: "All elements are odd" and not Equals: { 5, 3, 1 } ) +# Combining templated and concrete matchers +ok {test-number} - str, StartsWith( "foo" ) && EqualsRange( arr ) && EndsWith( "bar" ) for: "foobar" ( starts with: "foo" and Equals: { 'f', 'o', 'o', 'b', 'a', 'r' } and ends with: "bar" ) +# Combining templated and concrete matchers +ok {test-number} - str, StartsWith( "foo" ) && !EqualsRange( bad_arr ) && EndsWith( "bar" ) for: "foobar" ( starts with: "foo" and not Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } and ends with: "bar" ) +# Combining templated and concrete matchers +ok {test-number} - str, EqualsRange( arr ) && StartsWith( "foo" ) && EndsWith( "bar" ) for: "foobar" ( Equals: { 'f', 'o', 'o', 'b', 'a', 'r' } and starts with: "foo" and ends with: "bar" ) +# Combining templated and concrete matchers +ok {test-number} - str, !EqualsRange( bad_arr ) && StartsWith( "foo" ) && EndsWith( "bar" ) for: "foobar" ( not Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } and starts with: "foo" and ends with: "bar" ) +# Combining templated and concrete matchers +ok {test-number} - str, EqualsRange( bad_arr ) || ( StartsWith( "foo" ) && EndsWith( "bar" ) ) for: "foobar" ( Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } or ( starts with: "foo" and ends with: "bar" ) ) +# Combining templated and concrete matchers +ok {test-number} - str, ( StartsWith( "foo" ) && EndsWith( "bar" ) ) || EqualsRange( bad_arr ) for: "foobar" ( ( starts with: "foo" and ends with: "bar" ) or Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } ) +# Combining templated matchers +ok {test-number} - container, EqualsRange( a ) || EqualsRange( b ) || EqualsRange( c ) for: { 1, 2, 3 } ( Equals: { 1, 2, 3 } or Equals: { 0, 1, 2 } or Equals: { 4, 5, 6 } ) +# Commas in various macros are allowed +ok {test-number} - std::vector{constructor_throws{}, constructor_throws{}} +# Commas in various macros are allowed +ok {test-number} - std::vector{constructor_throws{}, constructor_throws{}} +# Commas in various macros are allowed +ok {test-number} - std::vector{1, 2, 3} == std::vector{1, 2, 3} +# Commas in various macros are allowed +ok {test-number} - std::vector{1, 2, 3} == std::vector{1, 2, 3} +# Commas in various macros are allowed +ok {test-number} - std::vector{1, 2} == std::vector{1, 2} for: { 1, 2 } == { 1, 2 } +# Commas in various macros are allowed +ok {test-number} - std::vector{1, 2} == std::vector{1, 2} for: { 1, 2 } == { 1, 2 } +# Commas in various macros are allowed +ok {test-number} - !(std::vector{1, 2} == std::vector{1, 2, 3}) for: !({ 1, 2 } == { 1, 2, 3 }) +# Commas in various macros are allowed +ok {test-number} - !(std::vector{1, 2} == std::vector{1, 2, 3}) for: !({ 1, 2 } == { 1, 2, 3 }) +# Commas in various macros are allowed +ok {test-number} - std::vector{1, 2} == std::vector{1, 2} for: { 1, 2 } == { 1, 2 } +# Commas in various macros are allowed +ok {test-number} - std::vector{1, 2} == std::vector{1, 2} for: { 1, 2 } == { 1, 2 } +# Commas in various macros are allowed +ok {test-number} - true +# Commas in various macros are allowed +ok {test-number} - std::vector{1, 2} == std::vector{1, 2} for: { 1, 2 } == { 1, 2 } +# Comparing function pointers +ok {test-number} - a for: 0x +# Comparing function pointers +ok {test-number} - a == &foo for: 0x == 0x +# Comparison ops +ok {test-number} - SimplePcg32{} == SimplePcg32{} for: {?} == {?} +# Comparison ops +ok {test-number} - SimplePcg32{ 0 } != SimplePcg32{} for: {?} != {?} +# Comparison ops +ok {test-number} - !(SimplePcg32{ 1 } == SimplePcg32{ 2 }) for: !({?} == {?}) +# Comparison ops +ok {test-number} - !(SimplePcg32{ 1 } != SimplePcg32{ 1 }) for: !({?} != {?}) +# Comparison with explicitly convertible types +ok {test-number} - td == Approx(10.0) for: StrongDoubleTypedef(10) == Approx( 10.0 ) +# Comparison with explicitly convertible types +ok {test-number} - Approx(10.0) == td for: Approx( 10.0 ) == StrongDoubleTypedef(10) +# Comparison with explicitly convertible types +ok {test-number} - td != Approx(11.0) for: StrongDoubleTypedef(10) != Approx( 11.0 ) +# Comparison with explicitly convertible types +ok {test-number} - Approx(11.0) != td for: Approx( 11.0 ) != StrongDoubleTypedef(10) +# Comparison with explicitly convertible types +ok {test-number} - td <= Approx(10.0) for: StrongDoubleTypedef(10) <= Approx( 10.0 ) +# Comparison with explicitly convertible types +ok {test-number} - td <= Approx(11.0) for: StrongDoubleTypedef(10) <= Approx( 11.0 ) +# Comparison with explicitly convertible types +ok {test-number} - Approx(10.0) <= td for: Approx( 10.0 ) <= StrongDoubleTypedef(10) +# Comparison with explicitly convertible types +ok {test-number} - Approx(9.0) <= td for: Approx( 9.0 ) <= StrongDoubleTypedef(10) +# Comparison with explicitly convertible types +ok {test-number} - td >= Approx(9.0) for: StrongDoubleTypedef(10) >= Approx( 9.0 ) +# Comparison with explicitly convertible types +ok {test-number} - td >= Approx(td) for: StrongDoubleTypedef(10) >= Approx( 10.0 ) +# Comparison with explicitly convertible types +ok {test-number} - Approx(td) >= td for: Approx( 10.0 ) >= StrongDoubleTypedef(10) +# Comparison with explicitly convertible types +ok {test-number} - Approx(11.0) >= td for: Approx( 11.0 ) >= StrongDoubleTypedef(10) +# Comparisons between ints where one side is computed +ok {test-number} - 54 == 6*9 for: 54 == 54 +# Comparisons between unsigned ints and negative signed ints match c++ standard behaviour +ok {test-number} - ( -1 > 2u ) for: true +# Comparisons between unsigned ints and negative signed ints match c++ standard behaviour +ok {test-number} - -1 > 2u for: -1 > 2 +# Comparisons between unsigned ints and negative signed ints match c++ standard behaviour +ok {test-number} - ( 2u < -1 ) for: true +# Comparisons between unsigned ints and negative signed ints match c++ standard behaviour +ok {test-number} - 2u < -1 for: 2 < -1 +# Comparisons between unsigned ints and negative signed ints match c++ standard behaviour +ok {test-number} - ( minInt > 2u ) for: true +# Comparisons between unsigned ints and negative signed ints match c++ standard behaviour +ok {test-number} - minInt > 2u for: -2147483648 > 2 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - i == 1 for: 1 == 1 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - ui == 2 for: 2 == 2 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - l == 3 for: 3 == 3 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - ul == 4 for: 4 == 4 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - c == 5 for: 5 == 5 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - uc == 6 for: 6 == 6 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - 1 == i for: 1 == 1 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - 2 == ui for: 2 == 2 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - 3 == l for: 3 == 3 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - 4 == ul for: 4 == 4 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - 5 == c for: 5 == 5 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - 6 == uc for: 6 == 6 +# Comparisons with int literals don't warn when mixing signed/ unsigned +ok {test-number} - (std::numeric_limits::max)() > ul for: 4294967295 (0x) > 4 +# Composed generic matchers shortcircuit +ok {test-number} - !(matcher.match( 1 )) for: !false +# Composed generic matchers shortcircuit +ok {test-number} - first.matchCalled for: true +# Composed generic matchers shortcircuit +ok {test-number} - !second.matchCalled for: true +# Composed generic matchers shortcircuit +ok {test-number} - matcher.match( 1 ) for: true +# Composed generic matchers shortcircuit +ok {test-number} - first.matchCalled for: true +# Composed generic matchers shortcircuit +ok {test-number} - !second.matchCalled for: true +# Composed matchers shortcircuit +ok {test-number} - !(matcher.match( 1 )) for: !false +# Composed matchers shortcircuit +ok {test-number} - first.matchCalled for: true +# Composed matchers shortcircuit +ok {test-number} - !second.matchCalled for: true +# Composed matchers shortcircuit +ok {test-number} - matcher.match( 1 ) for: true +# Composed matchers shortcircuit +ok {test-number} - first.matchCalled for: true +# Composed matchers shortcircuit +ok {test-number} - !second.matchCalled for: true +# Contains string matcher +not ok {test-number} - testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "not there" (case insensitive) +# Contains string matcher +not ok {test-number} - testStringForMatching(), ContainsSubstring( "STRING" ) for: "this string contains 'abc' as a substring" contains: "STRING" +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - elem % 2 == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - call_count == 1 for: 1 == 1 +# Copy and then generate a range +ok {test-number} - make_data().size() == test_count for: 6 == 6 +# Cout stream properly declares it writes to stdout +ok {test-number} - Catch::makeStream( "-" )->isConsole() for: true +# Custom exceptions can be translated when testing for nothrow +not ok {test-number} - unexpected exception with message: 'custom exception - not std'; expression was: throwCustom() +# Custom exceptions can be translated when testing for throwing as something else +not ok {test-number} - unexpected exception with message: 'custom exception - not std'; expression was: throwCustom(), std::exception +# Custom std-exceptions can be custom translated +not ok {test-number} - unexpected exception with message: 'custom std exception' +# Default scale is invisible to comparison +ok {test-number} - 101.000001 != Approx(100).epsilon(0.01) for: 101.00000099999999748 != Approx( 100.0 ) +# Default scale is invisible to comparison +ok {test-number} - std::pow(10, -5) != Approx(std::pow(10, -7)) for: 0.00001 != Approx( 0.0000001 ) +# Directly creating an EnumInfo +ok {test-number} - enumInfo->lookup(0) == "Value1" for: Value1 == "Value1" +# Directly creating an EnumInfo +ok {test-number} - enumInfo->lookup(1) == "Value2" for: Value2 == "Value2" +# Directly creating an EnumInfo +ok {test-number} - enumInfo->lookup(3) == "{** unexpected enum value **}" for: {** unexpected enum value **} == "{** unexpected enum value **}" +# Empty generators can SKIP in constructor +ok {test-number} - # SKIP 'This generator is empty' +# Empty stream name opens cout stream +ok {test-number} - Catch::makeStream( "" )->isConsole() for: true +# EndsWith string matcher +not ok {test-number} - testStringForMatching(), EndsWith( "Substring" ) for: "this string contains 'abc' as a substring" ends with: "Substring" +# EndsWith string matcher +not ok {test-number} - testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" ends with: "this" (case insensitive) +# Enums can quickly have stringification enabled using CATCH_REGISTER_ENUM +ok {test-number} - stringify( EnumClass3::Value1 ) == "Value1" for: "Value1" == "Value1" +# Enums can quickly have stringification enabled using CATCH_REGISTER_ENUM +ok {test-number} - stringify( EnumClass3::Value2 ) == "Value2" for: "Value2" == "Value2" +# Enums can quickly have stringification enabled using CATCH_REGISTER_ENUM +ok {test-number} - stringify( EnumClass3::Value3 ) == "Value3" for: "Value3" == "Value3" +# Enums can quickly have stringification enabled using CATCH_REGISTER_ENUM +ok {test-number} - stringify( EnumClass3::Value4 ) == "{** unexpected enum value **}" for: "{** unexpected enum value **}" == "{** unexpected enum value **}" +# Enums can quickly have stringification enabled using CATCH_REGISTER_ENUM +ok {test-number} - stringify( ec3 ) == "Value2" for: "Value2" == "Value2" +# Enums in namespaces can quickly have stringification enabled using CATCH_REGISTER_ENUM +ok {test-number} - stringify( Bikeshed::Colours::Red ) == "Red" for: "Red" == "Red" +# Enums in namespaces can quickly have stringification enabled using CATCH_REGISTER_ENUM +ok {test-number} - stringify( Bikeshed::Colours::Blue ) == "Blue" for: "Blue" == "Blue" +# Epsilon only applies to Approx's value +ok {test-number} - 101.01 != Approx(100).epsilon(0.01) for: 101.01000000000000512 != Approx( 100.0 ) +# Equality checks that should fail +not ok {test-number} - data.int_seven == 6 for: 7 == 6 +# Equality checks that should fail +not ok {test-number} - data.int_seven == 8 for: 7 == 8 +# Equality checks that should fail +not ok {test-number} - data.int_seven == 0 for: 7 == 0 +# Equality checks that should fail +not ok {test-number} - data.float_nine_point_one == Approx( 9.11f ) for: 9.100000381f == Approx( 9.10999965667724609 ) +# Equality checks that should fail +not ok {test-number} - data.float_nine_point_one == Approx( 9.0f ) for: 9.100000381f == Approx( 9.0 ) +# Equality checks that should fail +not ok {test-number} - data.float_nine_point_one == Approx( 1 ) for: 9.100000381f == Approx( 1.0 ) +# Equality checks that should fail +not ok {test-number} - data.float_nine_point_one == Approx( 0 ) for: 9.100000381f == Approx( 0.0 ) +# Equality checks that should fail +not ok {test-number} - data.double_pi == Approx( 3.1415 ) for: 3.14159265350000005 == Approx( 3.14150000000000018 ) +# Equality checks that should fail +not ok {test-number} - data.str_hello == "goodbye" for: "hello" == "goodbye" +# Equality checks that should fail +not ok {test-number} - data.str_hello == "hell" for: "hello" == "hell" +# Equality checks that should fail +not ok {test-number} - data.str_hello == "hello1" for: "hello" == "hello1" +# Equality checks that should fail +not ok {test-number} - data.str_hello.size() == 6 for: 5 == 6 +# Equality checks that should fail +not ok {test-number} - x == Approx( 1.301 ) for: 1.30000000000000027 == Approx( 1.30099999999999993 ) +# Equality checks that should succeed +ok {test-number} - data.int_seven == 7 for: 7 == 7 +# Equality checks that should succeed +ok {test-number} - data.float_nine_point_one == Approx( 9.1f ) for: 9.100000381f == Approx( 9.10000038146972656 ) +# Equality checks that should succeed +ok {test-number} - data.double_pi == Approx( 3.1415926535 ) for: 3.14159265350000005 == Approx( 3.14159265350000005 ) +# Equality checks that should succeed +ok {test-number} - data.str_hello == "hello" for: "hello" == "hello" +# Equality checks that should succeed +ok {test-number} - "hello" == data.str_hello for: "hello" == "hello" +# Equality checks that should succeed +ok {test-number} - data.str_hello.size() == 5 for: 5 == 5 +# Equality checks that should succeed +ok {test-number} - x == Approx( 1.3 ) for: 1.30000000000000027 == Approx( 1.30000000000000004 ) +# Equals +ok {test-number} - testStringForMatching(), Equals( "this string contains 'abc' as a substring" ) for: "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" +# Equals +ok {test-number} - testStringForMatching(), Equals( "this string contains 'ABC' as a substring", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" (case insensitive) +# Equals string matcher +not ok {test-number} - testStringForMatching(), Equals( "this string contains 'ABC' as a substring" ) for: "this string contains 'abc' as a substring" equals: "this string contains 'ABC' as a substring" +# Equals string matcher +not ok {test-number} - testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" equals: "something else" (case insensitive) +# Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified +ok {test-number} - ::Catch::Detail::stringify(WhatException{}) == "This exception has overridden what() method" for: "This exception has overridden what() method" == "This exception has overridden what() method" +# Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified +ok {test-number} - ::Catch::Detail::stringify(OperatorException{}) == "OperatorException" for: "OperatorException" == "OperatorException" +# Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified +ok {test-number} - ::Catch::Detail::stringify(StringMakerException{}) == "StringMakerException" for: "StringMakerException" == "StringMakerException" +# Exception matchers that fail +not ok {test-number} - expected exception, got none; expression was: doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } +# Exception matchers that fail +not ok {test-number} - expected exception, got none; expression was: doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } +# Exception matchers that fail +not ok {test-number} - unexpected exception with message: 'Unknown exception'; expression was: throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } +# Exception matchers that fail +not ok {test-number} - unexpected exception with message: 'Unknown exception'; expression was: throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } +# Exception matchers that fail +not ok {test-number} - throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } for: SpecialException::what special exception has value of 1 +# Exception matchers that fail +not ok {test-number} - throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } for: SpecialException::what special exception has value of 1 +# Exception matchers that succeed +ok {test-number} - throwsSpecialException( 1 ), SpecialException, ExceptionMatcher{ 1 } for: SpecialException::what special exception has value of 1 +# Exception matchers that succeed +ok {test-number} - throwsSpecialException( 2 ), SpecialException, ExceptionMatcher{ 2 } for: SpecialException::what special exception has value of 2 +# Exception message can be matched +ok {test-number} - throwsDerivedException(), DerivedException, MessageMatches( StartsWith( "Derived" ) ) for: DerivedException::what matches "starts with: "Derived"" +# Exception message can be matched +ok {test-number} - throwsDerivedException(), DerivedException, MessageMatches( EndsWith( "::what" ) ) for: DerivedException::what matches "ends with: "::what"" +# Exception message can be matched +ok {test-number} - throwsDerivedException(), DerivedException, MessageMatches( !StartsWith( "::what" ) ) for: DerivedException::what matches "not starts with: "::what"" +# Exception message can be matched +ok {test-number} - throwsSpecialException( 2 ), SpecialException, MessageMatches( StartsWith( "Special" ) ) for: SpecialException::what matches "starts with: "Special"" +# Exception messages can be tested for +ok {test-number} - thisThrows(), "expected exception" for: "expected exception" equals: "expected exception" +# Exception messages can be tested for +ok {test-number} - thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) for: "expected exception" equals: "expected exception" (case insensitive) +# Exception messages can be tested for +ok {test-number} - thisThrows(), StartsWith( "expected" ) for: "expected exception" starts with: "expected" +# Exception messages can be tested for +ok {test-number} - thisThrows(), EndsWith( "exception" ) for: "expected exception" ends with: "exception" +# Exception messages can be tested for +ok {test-number} - thisThrows(), ContainsSubstring( "except" ) for: "expected exception" contains: "except" +# Exception messages can be tested for +ok {test-number} - thisThrows(), ContainsSubstring( "exCept", Catch::CaseSensitive::No ) for: "expected exception" contains: "except" (case insensitive) +# Exceptions matchers +ok {test-number} - throwsDerivedException(), DerivedException, Message( "DerivedException::what" ) for: DerivedException::what exception message matches "DerivedException::what" +# Exceptions matchers +ok {test-number} - throwsDerivedException(), DerivedException, !Message( "derivedexception::what" ) for: DerivedException::what not exception message matches "derivedexception::what" +# Exceptions matchers +ok {test-number} - throwsSpecialException( 2 ), SpecialException, !Message( "DerivedException::what" ) for: SpecialException::what not exception message matches "DerivedException::what" +# Exceptions matchers +ok {test-number} - throwsSpecialException( 2 ), SpecialException, Message( "SpecialException::what" ) for: SpecialException::what exception message matches "SpecialException::what" +# Expected exceptions that don't throw or unexpected exceptions fail the test +not ok {test-number} - unexpected exception with message: 'expected exception'; expression was: thisThrows(), std::string +# Expected exceptions that don't throw or unexpected exceptions fail the test +not ok {test-number} - expected exception, got none; expression was: thisDoesntThrow(), std::domain_error +# Expected exceptions that don't throw or unexpected exceptions fail the test +not ok {test-number} - unexpected exception with message: 'expected exception'; expression was: thisThrows() +# FAIL aborts the test +not ok {test-number} - explicitly with 1 message: 'This is a failure' +# FAIL does not require an argument +not ok {test-number} - explicitly +# FAIL_CHECK does not abort the test +not ok {test-number} - explicitly with 1 message: 'This is a failure' +# FAIL_CHECK does not abort the test +warning {test-number} - 'This message appears in the output' +# Factorials are computed +ok {test-number} - Factorial(0) == 1 for: 1 == 1 +# Factorials are computed +ok {test-number} - Factorial(1) == 1 for: 1 == 1 +# Factorials are computed +ok {test-number} - Factorial(2) == 2 for: 2 == 2 +# Factorials are computed +ok {test-number} - Factorial(3) == 6 for: 6 == 6 +# Factorials are computed +ok {test-number} - Factorial(10) == 3628800 for: 3628800 (0x) == 3628800 (0x) +# Filter generator throws exception for empty generator +ok {test-number} - filter( []( int ) { return false; }, value( 3 ) ), Catch::GeneratorException +# Floating point matchers: double +ok {test-number} - 10., WithinRel( 11.1, 0.1 ) for: 10.0 and 11.09999999999999964 are within 10% of each other +# Floating point matchers: double +ok {test-number} - 10., !WithinRel( 11.2, 0.1 ) for: 10.0 not and 11.19999999999999929 are within 10% of each other +# Floating point matchers: double +ok {test-number} - 1., !WithinRel( 0., 0.99 ) for: 1.0 not and 0.0 are within 99% of each other +# Floating point matchers: double +ok {test-number} - -0., WithinRel( 0. ) for: -0.0 and 0.0 are within 2.22045e-12% of each other +# Floating point matchers: double +ok {test-number} - v1, WithinRel( v2 ) for: 0.0 and 0.0 are within 2.22045e-12% of each other +# Floating point matchers: double +ok {test-number} - 1., WithinAbs( 1., 0 ) for: 1.0 is within 0.0 of 1.0 +# Floating point matchers: double +ok {test-number} - 0., WithinAbs( 1., 1 ) for: 0.0 is within 1.0 of 1.0 +# Floating point matchers: double +ok {test-number} - 0., !WithinAbs( 1., 0.99 ) for: 0.0 not is within 0.98999999999999999 of 1.0 +# Floating point matchers: double +ok {test-number} - 0., !WithinAbs( 1., 0.99 ) for: 0.0 not is within 0.98999999999999999 of 1.0 +# Floating point matchers: double +ok {test-number} - 11., !WithinAbs( 10., 0.5 ) for: 11.0 not is within 0.5 of 10.0 +# Floating point matchers: double +ok {test-number} - 10., !WithinAbs( 11., 0.5 ) for: 10.0 not is within 0.5 of 11.0 +# Floating point matchers: double +ok {test-number} - -10., WithinAbs( -10., 0.5 ) for: -10.0 is within 0.5 of -10.0 +# Floating point matchers: double +ok {test-number} - -10., WithinAbs( -9.6, 0.5 ) for: -10.0 is within 0.5 of -9.59999999999999964 +# Floating point matchers: double +ok {test-number} - 1., WithinULP( 1., 0 ) for: 1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00]) +# Floating point matchers: double +ok {test-number} - nextafter( 1., 2. ), WithinULP( 1., 1 ) for: 1.00000000000000022 is within 1 ULPs of 1.0000000000000000e+00 ([9.9999999999999989e-01, 1.0000000000000002e+00]) +# Floating point matchers: double +ok {test-number} - 0., WithinULP( nextafter( 0., 1. ), 1 ) for: 0.0 is within 1 ULPs of 4.9406564584124654e-324 ([0.0000000000000000e+00, 9.8813129168249309e-324]) +# Floating point matchers: double +ok {test-number} - 1., WithinULP( nextafter( 1., 0. ), 1 ) for: 1.0 is within 1 ULPs of 9.9999999999999989e-01 ([9.9999999999999978e-01, 1.0000000000000000e+00]) +# Floating point matchers: double +ok {test-number} - 1., !WithinULP( nextafter( 1., 2. ), 0 ) for: 1.0 not is within 0 ULPs of 1.0000000000000002e+00 ([1.0000000000000002e+00, 1.0000000000000002e+00]) +# Floating point matchers: double +ok {test-number} - 1., WithinULP( 1., 0 ) for: 1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00]) +# Floating point matchers: double +ok {test-number} - -0., WithinULP( 0., 0 ) for: -0.0 is within 0 ULPs of 0.0000000000000000e+00 ([0.0000000000000000e+00, 0.0000000000000000e+00]) +# Floating point matchers: double +ok {test-number} - 1., WithinAbs( 1., 0.5 ) || WithinULP( 2., 1 ) for: 1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0000000000000000e+00 ([1.9999999999999998e+00, 2.0000000000000004e+00]) ) +# Floating point matchers: double +ok {test-number} - 1., WithinAbs( 2., 0.5 ) || WithinULP( 1., 0 ) for: 1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00]) ) +# Floating point matchers: double +ok {test-number} - 0.0001, WithinAbs( 0., 0.001 ) || WithinRel( 0., 0.1 ) for: 0.0001 ( is within 0.001 of 0.0 or and 0.0 are within 10% of each other ) +# Floating point matchers: double +ok {test-number} - WithinAbs( 1., 0. ) +# Floating point matchers: double +ok {test-number} - WithinAbs( 1., -1. ), std::domain_error +# Floating point matchers: double +ok {test-number} - WithinULP( 1., 0 ) +# Floating point matchers: double +ok {test-number} - WithinRel( 1., 0. ) +# Floating point matchers: double +ok {test-number} - WithinRel( 1., -0.2 ), std::domain_error +# Floating point matchers: double +ok {test-number} - WithinRel( 1., 1. ), std::domain_error +# Floating point matchers: double +ok {test-number} - 1., !IsNaN() for: 1.0 not is NaN +# Floating point matchers: float +ok {test-number} - 10.f, WithinRel( 11.1f, 0.1f ) for: 10.0f and 11.10000038146972656 are within 10% of each other +# Floating point matchers: float +ok {test-number} - 10.f, !WithinRel( 11.2f, 0.1f ) for: 10.0f not and 11.19999980926513672 are within 10% of each other +# Floating point matchers: float +ok {test-number} - 1.f, !WithinRel( 0.f, 0.99f ) for: 1.0f not and 0.0 are within 99% of each other +# Floating point matchers: float +ok {test-number} - -0.f, WithinRel( 0.f ) for: -0.0f and 0.0 are within 0.00119209% of each other +# Floating point matchers: float +ok {test-number} - v1, WithinRel( v2 ) for: 0.0f and 0.0 are within 0.00119209% of each other +# Floating point matchers: float +ok {test-number} - 1.f, WithinAbs( 1.f, 0 ) for: 1.0f is within 0.0 of 1.0 +# Floating point matchers: float +ok {test-number} - 0.f, WithinAbs( 1.f, 1 ) for: 0.0f is within 1.0 of 1.0 +# Floating point matchers: float +ok {test-number} - 0.f, !WithinAbs( 1.f, 0.99f ) for: 0.0f not is within 0.99000000953674316 of 1.0 +# Floating point matchers: float +ok {test-number} - 0.f, !WithinAbs( 1.f, 0.99f ) for: 0.0f not is within 0.99000000953674316 of 1.0 +# Floating point matchers: float +ok {test-number} - 0.f, WithinAbs( -0.f, 0 ) for: 0.0f is within 0.0 of -0.0 +# Floating point matchers: float +ok {test-number} - 11.f, !WithinAbs( 10.f, 0.5f ) for: 11.0f not is within 0.5 of 10.0 +# Floating point matchers: float +ok {test-number} - 10.f, !WithinAbs( 11.f, 0.5f ) for: 10.0f not is within 0.5 of 11.0 +# Floating point matchers: float +ok {test-number} - -10.f, WithinAbs( -10.f, 0.5f ) for: -10.0f is within 0.5 of -10.0 +# Floating point matchers: float +ok {test-number} - -10.f, WithinAbs( -9.6f, 0.5f ) for: -10.0f is within 0.5 of -9.60000038146972656 +# Floating point matchers: float +ok {test-number} - 1.f, WithinULP( 1.f, 0 ) for: 1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) +# Floating point matchers: float +ok {test-number} - -1.f, WithinULP( -1.f, 0 ) for: -1.0f is within 0 ULPs of -1.00000000e+00f ([-1.00000000e+00, -1.00000000e+00]) +# Floating point matchers: float +ok {test-number} - nextafter( 1.f, 2.f ), WithinULP( 1.f, 1 ) for: 1.000000119f is within 1 ULPs of 1.00000000e+00f ([9.99999940e-01, 1.00000012e+00]) +# Floating point matchers: float +ok {test-number} - 0.f, WithinULP( nextafter( 0.f, 1.f ), 1 ) for: 0.0f is within 1 ULPs of 1.40129846e-45f ([0.00000000e+00, 2.80259693e-45]) +# Floating point matchers: float +ok {test-number} - 1.f, WithinULP( nextafter( 1.f, 0.f ), 1 ) for: 1.0f is within 1 ULPs of 9.99999940e-01f ([9.99999881e-01, 1.00000000e+00]) +# Floating point matchers: float +ok {test-number} - 1.f, !WithinULP( nextafter( 1.f, 2.f ), 0 ) for: 1.0f not is within 0 ULPs of 1.00000012e+00f ([1.00000012e+00, 1.00000012e+00]) +# Floating point matchers: float +ok {test-number} - 1.f, WithinULP( 1.f, 0 ) for: 1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) +# Floating point matchers: float +ok {test-number} - -0.f, WithinULP( 0.f, 0 ) for: -0.0f is within 0 ULPs of 0.00000000e+00f ([0.00000000e+00, 0.00000000e+00]) +# Floating point matchers: float +ok {test-number} - 1.f, WithinAbs( 1.f, 0.5 ) || WithinULP( 1.f, 1 ) for: 1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.00000000e+00f ([9.99999940e-01, 1.00000012e+00]) ) +# Floating point matchers: float +ok {test-number} - 1.f, WithinAbs( 2.f, 0.5 ) || WithinULP( 1.f, 0 ) for: 1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) ) +# Floating point matchers: float +ok {test-number} - 0.0001f, WithinAbs( 0.f, 0.001f ) || WithinRel( 0.f, 0.1f ) for: 0.0001f ( is within 0.00100000004749745 of 0.0 or and 0.0 are within 10% of each other ) +# Floating point matchers: float +ok {test-number} - WithinAbs( 1.f, 0.f ) +# Floating point matchers: float +ok {test-number} - WithinAbs( 1.f, -1.f ), std::domain_error +# Floating point matchers: float +ok {test-number} - WithinULP( 1.f, 0 ) +# Floating point matchers: float +ok {test-number} - WithinULP( 1.f, static_cast( -1 ) ), std::domain_error +# Floating point matchers: float +ok {test-number} - WithinRel( 1.f, 0.f ) +# Floating point matchers: float +ok {test-number} - WithinRel( 1.f, -0.2f ), std::domain_error +# Floating point matchers: float +ok {test-number} - WithinRel( 1.f, 1.f ), std::domain_error +# Floating point matchers: float +ok {test-number} - 1., !IsNaN() for: 1.0 not is NaN +# GENERATE can combine literals and generators +ok {test-number} - i % 2 == 0 for: 0 == 0 +# GENERATE can combine literals and generators +ok {test-number} - i % 2 == 0 for: 0 == 0 +# GENERATE can combine literals and generators +ok {test-number} - i % 2 == 0 for: 0 == 0 +# GENERATE can combine literals and generators +ok {test-number} - i % 2 == 0 for: 0 == 0 +# Generators -- adapters +ok {test-number} - i % 2 == 0 for: 0 == 0 +# Generators -- adapters +ok {test-number} - i % 2 == 0 for: 0 == 0 +# Generators -- adapters +ok {test-number} - i % 2 == 0 for: 0 == 0 +# Generators -- adapters +ok {test-number} - filter([] (int) {return false; }, value(1)), Catch::GeneratorException +# Generators -- adapters +ok {test-number} - i < 4 for: 1 < 4 +# Generators -- adapters +ok {test-number} - i < 4 for: 2 < 4 +# Generators -- adapters +ok {test-number} - i < 4 for: 3 < 4 +# Generators -- adapters +ok {test-number} - i % 2 == 0 for: 0 == 0 +# Generators -- adapters +ok {test-number} - i % 2 == 0 for: 0 == 0 +# Generators -- adapters +ok {test-number} - i % 2 == 0 for: 0 == 0 +# Generators -- adapters +ok {test-number} - i.size() == 1 for: 1 == 1 +# Generators -- adapters +ok {test-number} - i.size() == 1 for: 1 == 1 +# Generators -- adapters +ok {test-number} - i.size() == 1 for: 1 == 1 +# Generators -- adapters +ok {test-number} - i.size() == 1 for: 1 == 1 +# Generators -- adapters +ok {test-number} - i.size() == 1 for: 1 == 1 +# Generators -- adapters +ok {test-number} - i.size() == 1 for: 1 == 1 +# Generators -- adapters +ok {test-number} - j > 0 for: 1 > 0 +# Generators -- adapters +ok {test-number} - j > 0 for: 2 > 0 +# Generators -- adapters +ok {test-number} - j > 0 for: 3 > 0 +# Generators -- adapters +ok {test-number} - j > 0 for: 1 > 0 +# Generators -- adapters +ok {test-number} - j > 0 for: 2 > 0 +# Generators -- adapters +ok {test-number} - j > 0 for: 3 > 0 +# Generators -- adapters +ok {test-number} - chunk2.size() == 2 for: 2 == 2 +# Generators -- adapters +ok {test-number} - chunk2.front() == chunk2.back() for: 1 == 1 +# Generators -- adapters +ok {test-number} - chunk2.size() == 2 for: 2 == 2 +# Generators -- adapters +ok {test-number} - chunk2.front() == chunk2.back() for: 2 == 2 +# Generators -- adapters +ok {test-number} - chunk2.size() == 2 for: 2 == 2 +# Generators -- adapters +ok {test-number} - chunk2.front() == chunk2.back() for: 3 == 3 +# Generators -- adapters +ok {test-number} - chunk2.size() == 2 for: 2 == 2 +# Generators -- adapters +ok {test-number} - chunk2.front() == chunk2.back() for: 1 == 1 +# Generators -- adapters +ok {test-number} - chunk2.front() < 3 for: 1 < 3 +# Generators -- adapters +ok {test-number} - chunk2.size() == 2 for: 2 == 2 +# Generators -- adapters +ok {test-number} - chunk2.front() == chunk2.back() for: 2 == 2 +# Generators -- adapters +ok {test-number} - chunk2.front() < 3 for: 2 < 3 +# Generators -- adapters +ok {test-number} - chunk2.size() == 0 for: 0 == 0 +# Generators -- adapters +ok {test-number} - chunk2.size() == 0 for: 0 == 0 +# Generators -- adapters +ok {test-number} - chunk2.size() == 0 for: 0 == 0 +# Generators -- adapters +ok {test-number} - chunk(2, value(1)), Catch::GeneratorException +# Generators -- simple +ok {test-number} - j < i for: -3 < 1 +# Generators -- simple +ok {test-number} - j < i for: -2 < 1 +# Generators -- simple +ok {test-number} - j < i for: -1 < 1 +# Generators -- simple +ok {test-number} - 4u * i > str.size() for: 4 > 1 +# Generators -- simple +ok {test-number} - 4u * i > str.size() for: 4 > 2 +# Generators -- simple +ok {test-number} - 4u * i > str.size() for: 4 > 3 +# Generators -- simple +ok {test-number} - j < i for: -3 < 2 +# Generators -- simple +ok {test-number} - j < i for: -2 < 2 +# Generators -- simple +ok {test-number} - j < i for: -1 < 2 +# Generators -- simple +ok {test-number} - 4u * i > str.size() for: 8 > 1 +# Generators -- simple +ok {test-number} - 4u * i > str.size() for: 8 > 2 +# Generators -- simple +ok {test-number} - 4u * i > str.size() for: 8 > 3 +# Generators -- simple +ok {test-number} - j < i for: -3 < 3 +# Generators -- simple +ok {test-number} - j < i for: -2 < 3 +# Generators -- simple +ok {test-number} - j < i for: -1 < 3 +# Generators -- simple +ok {test-number} - 4u * i > str.size() for: 12 > 1 +# Generators -- simple +ok {test-number} - 4u * i > str.size() for: 12 > 2 +# Generators -- simple +ok {test-number} - 4u * i > str.size() for: 12 > 3 +# Generators internals +ok {test-number} - gen.get() == 123 for: 123 == 123 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 1 for: 1 == 1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 3 for: 3 == 3 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 5 for: 5 == 5 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 1 for: 1 == 1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 5 for: 5 == 5 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 4 for: 4 == 4 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 0 for: 0 == 0 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get().size() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - gen.get() == "aa" for: "aa" == "aa" +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == "bb" for: "bb" == "bb" +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == "cc" for: "cc" == "cc" +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 1 for: 1 == 1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 3 for: 3 == 3 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 1 for: 1 == 1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 3 for: 3 == 3 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - filter([](int) { return false; }, value(1)), Catch::GeneratorException +# Generators internals +ok {test-number} - filter([](int) { return false; }, values({ 1, 2, 3 })), Catch::GeneratorException +# Generators internals +ok {test-number} - gen.get() == 1 for: 1 == 1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 1 for: 1 == 1 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 2.0 for: 2.0 == 2.0 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 4.0 for: 4.0 == 4.0 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 6.0 for: 6.0 == 6.0 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 2.0 for: 2.0 == 2.0 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 4.0 for: 4.0 == 4.0 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 6.0 for: 6.0 == 6.0 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 3 for: 3 == 3 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 1 for: 1 == 1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 3 for: 3 == 3 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 1 for: 1 == 1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 3 for: 3 == 3 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == -2 for: -2 == -2 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -1 for: -1 == -1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 0 for: 0 == 0 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 1 for: 1 == 1 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 1 for: 1 == 1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 0 for: 0 == 0 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -1 for: -1 == -1 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == -7 for: -7 == -7 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -4 for: -4 == -4 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -1 for: -1 == -1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == -7 for: -7 == -7 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -4 for: -4 == -4 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -1 for: -1 == -1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == -7 for: -7 == -7 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -4 for: -4 == -4 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -1 for: -1 == -1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 5 for: 5 == 5 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -1.0 == Approx( -1.0 ) with 1 message: 'Current expected value is -1' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -1' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.90000000000000002 == Approx( -0.90000000000000002 ) with 1 message: 'Current expected value is -0.9' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.9' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.80000000000000004 == Approx( -0.80000000000000004 ) with 1 message: 'Current expected value is -0.8' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.8' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.70000000000000007 == Approx( -0.70000000000000007 ) with 1 message: 'Current expected value is -0.7' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.7' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.60000000000000009 == Approx( -0.60000000000000009 ) with 1 message: 'Current expected value is -0.6' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.6' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.50000000000000011 == Approx( -0.50000000000000011 ) with 1 message: 'Current expected value is -0.5' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.5' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.40000000000000013 == Approx( -0.40000000000000013 ) with 1 message: 'Current expected value is -0.4' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.4' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.30000000000000016 == Approx( -0.30000000000000016 ) with 1 message: 'Current expected value is -0.3' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.3' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.20000000000000015 == Approx( -0.20000000000000015 ) with 1 message: 'Current expected value is -0.2' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.2' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.10000000000000014 == Approx( -0.10000000000000014 ) with 1 message: 'Current expected value is -0.1' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.1' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.00000000000000014 == Approx( -0.00000000000000014 ) with 1 message: 'Current expected value is -1.38778e-16' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -1.38778e-16' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.09999999999999987 == Approx( 0.09999999999999987 ) with 1 message: 'Current expected value is 0.1' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.1' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.19999999999999987 == Approx( 0.19999999999999987 ) with 1 message: 'Current expected value is 0.2' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.2' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.29999999999999988 == Approx( 0.29999999999999988 ) with 1 message: 'Current expected value is 0.3' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.3' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.39999999999999991 == Approx( 0.39999999999999991 ) with 1 message: 'Current expected value is 0.4' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.4' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.49999999999999989 == Approx( 0.49999999999999989 ) with 1 message: 'Current expected value is 0.5' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.5' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.59999999999999987 == Approx( 0.59999999999999987 ) with 1 message: 'Current expected value is 0.6' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.6' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.69999999999999984 == Approx( 0.69999999999999984 ) with 1 message: 'Current expected value is 0.7' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.7' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.79999999999999982 == Approx( 0.79999999999999982 ) with 1 message: 'Current expected value is 0.8' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.8' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.8999999999999998 == Approx( 0.8999999999999998 ) with 1 message: 'Current expected value is 0.9' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.9' +# Generators internals +ok {test-number} - gen.get() == Approx( rangeEnd ) for: 0.99999999999999978 == Approx( 1.0 ) +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -1.0 == Approx( -1.0 ) with 1 message: 'Current expected value is -1' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -1' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.69999999999999996 == Approx( -0.69999999999999996 ) with 1 message: 'Current expected value is -0.7' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.7' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.39999999999999997 == Approx( -0.39999999999999997 ) with 1 message: 'Current expected value is -0.4' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.4' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.09999999999999998 == Approx( -0.09999999999999998 ) with 1 message: 'Current expected value is -0.1' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.1' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.20000000000000001 == Approx( 0.20000000000000001 ) with 1 message: 'Current expected value is 0.2' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.2' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.5 == Approx( 0.5 ) with 1 message: 'Current expected value is 0.5' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.5' +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -1.0 == Approx( -1.0 ) with 1 message: 'Current expected value is -1' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -1' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.69999999999999996 == Approx( -0.69999999999999996 ) with 1 message: 'Current expected value is -0.7' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.7' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.39999999999999997 == Approx( -0.39999999999999997 ) with 1 message: 'Current expected value is -0.4' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.4' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: -0.09999999999999998 == Approx( -0.09999999999999998 ) with 1 message: 'Current expected value is -0.1' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.1' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.20000000000000001 == Approx( 0.20000000000000001 ) with 1 message: 'Current expected value is 0.2' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.2' +# Generators internals +ok {test-number} - gen.get() == Approx(expected) for: 0.5 == Approx( 0.5 ) with 1 message: 'Current expected value is 0.5' +# Generators internals +ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.5' +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 5 for: 5 == 5 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -1 for: -1 == -1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -4 for: -4 == -4 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 5 for: 5 == 5 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -1 for: -1 == -1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -4 for: -4 == -4 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Generators internals +ok {test-number} - gen.get() == 5 for: 5 == 5 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == 2 for: 2 == 2 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -1 for: -1 == -1 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -4 for: -4 == -4 +# Generators internals +ok {test-number} - gen.next() for: true +# Generators internals +ok {test-number} - gen.get() == -7 for: -7 == -7 +# Generators internals +ok {test-number} - !(gen.next()) for: !false +# Greater-than inequalities with different epsilons +ok {test-number} - d >= Approx( 1.22 ) for: 1.22999999999999998 >= Approx( 1.21999999999999997 ) +# Greater-than inequalities with different epsilons +ok {test-number} - d >= Approx( 1.23 ) for: 1.22999999999999998 >= Approx( 1.22999999999999998 ) +# Greater-than inequalities with different epsilons +ok {test-number} - !(d >= Approx( 1.24 )) for: !(1.22999999999999998 >= Approx( 1.23999999999999999 )) +# Greater-than inequalities with different epsilons +ok {test-number} - d >= Approx( 1.24 ).epsilon(0.1) for: 1.22999999999999998 >= Approx( 1.23999999999999999 ) +# Hashers with different seed produce different hash with same test case +ok {test-number} - h1( dummy ) != h2( dummy ) for: 3422778688 (0x) != 130711275 (0x) +# Hashers with same seed produce same hash +ok {test-number} - h1( dummy ) == h2( dummy ) for: 3422778688 (0x) == 3422778688 (0x) +# Hashing different test cases produces different result +ok {test-number} - h( dummy1 ) != h( dummy2 ) for: 2903002874 (0x) != 2668622104 (0x) +# Hashing different test cases produces different result +ok {test-number} - h( dummy1 ) != h( dummy2 ) for: 2673152918 (0x) != 3916075712 (0x) +# Hashing different test cases produces different result +ok {test-number} - h( dummy1 ) != h( dummy2 ) for: 2074929312 (0x) != 3429949824 (0x) +# Hashing test case produces same hash across multiple calls +ok {test-number} - h( dummy ) == h( dummy ) for: 3422778688 (0x) == 3422778688 (0x) +# INFO and UNSCOPED_INFO can stream multiple arguments +not ok {test-number} - explicitly with 3 messages: 'This info has multiple parts.' and 'This unscoped info has multiple parts.' and 'Show infos!' +# INFO and WARN do not abort tests +warning {test-number} - 'this is a message' with 1 message: 'this is a warning' +# INFO gets logged on failure +not ok {test-number} - a == 1 for: 2 == 1 with 2 messages: 'this message should be logged' and 'so should this' +# INFO gets logged on failure, even if captured before successful assertions +ok {test-number} - a == 2 for: 2 == 2 with 1 message: 'this message may be logged later' +# INFO gets logged on failure, even if captured before successful assertions +not ok {test-number} - a == 1 for: 2 == 1 with 2 messages: 'this message may be logged later' and 'this message should be logged' +# INFO gets logged on failure, even if captured before successful assertions +not ok {test-number} - a == 0 for: 2 == 0 with 3 messages: 'this message may be logged later' and 'this message should be logged' and 'and this, but later' +# INFO gets logged on failure, even if captured before successful assertions +ok {test-number} - a == 2 for: 2 == 2 with 4 messages: 'this message may be logged later' and 'this message should be logged' and 'and this, but later' and 'but not this' +# INFO is reset for each loop +ok {test-number} - i < 10 for: 0 < 10 with 2 messages: 'current counter 0' and 'i := 0' +# INFO is reset for each loop +ok {test-number} - i < 10 for: 1 < 10 with 2 messages: 'current counter 1' and 'i := 1' +# INFO is reset for each loop +ok {test-number} - i < 10 for: 2 < 10 with 2 messages: 'current counter 2' and 'i := 2' +# INFO is reset for each loop +ok {test-number} - i < 10 for: 3 < 10 with 2 messages: 'current counter 3' and 'i := 3' +# INFO is reset for each loop +ok {test-number} - i < 10 for: 4 < 10 with 2 messages: 'current counter 4' and 'i := 4' +# INFO is reset for each loop +ok {test-number} - i < 10 for: 5 < 10 with 2 messages: 'current counter 5' and 'i := 5' +# INFO is reset for each loop +ok {test-number} - i < 10 for: 6 < 10 with 2 messages: 'current counter 6' and 'i := 6' +# INFO is reset for each loop +ok {test-number} - i < 10 for: 7 < 10 with 2 messages: 'current counter 7' and 'i := 7' +# INFO is reset for each loop +ok {test-number} - i < 10 for: 8 < 10 with 2 messages: 'current counter 8' and 'i := 8' +# INFO is reset for each loop +ok {test-number} - i < 10 for: 9 < 10 with 2 messages: 'current counter 9' and 'i := 9' +# INFO is reset for each loop +not ok {test-number} - i < 10 for: 10 < 10 with 2 messages: 'current counter 10' and 'i := 10' +# Incomplete AssertionHandler +not ok {test-number} - unexpected exception with message: 'Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE'; expression was: Dummy +# Inequality checks that should fail +not ok {test-number} - data.int_seven != 7 for: 7 != 7 +# Inequality checks that should fail +not ok {test-number} - data.float_nine_point_one != Approx( 9.1f ) for: 9.100000381f != Approx( 9.10000038146972656 ) +# Inequality checks that should fail +not ok {test-number} - data.double_pi != Approx( 3.1415926535 ) for: 3.14159265350000005 != Approx( 3.14159265350000005 ) +# Inequality checks that should fail +not ok {test-number} - data.str_hello != "hello" for: "hello" != "hello" +# Inequality checks that should fail +not ok {test-number} - data.str_hello.size() != 5 for: 5 != 5 +# Inequality checks that should succeed +ok {test-number} - data.int_seven != 6 for: 7 != 6 +# Inequality checks that should succeed +ok {test-number} - data.int_seven != 8 for: 7 != 8 +# Inequality checks that should succeed +ok {test-number} - data.float_nine_point_one != Approx( 9.11f ) for: 9.100000381f != Approx( 9.10999965667724609 ) +# Inequality checks that should succeed +ok {test-number} - data.float_nine_point_one != Approx( 9.0f ) for: 9.100000381f != Approx( 9.0 ) +# Inequality checks that should succeed +ok {test-number} - data.float_nine_point_one != Approx( 1 ) for: 9.100000381f != Approx( 1.0 ) +# Inequality checks that should succeed +ok {test-number} - data.float_nine_point_one != Approx( 0 ) for: 9.100000381f != Approx( 0.0 ) +# Inequality checks that should succeed +ok {test-number} - data.double_pi != Approx( 3.1415 ) for: 3.14159265350000005 != Approx( 3.14150000000000018 ) +# Inequality checks that should succeed +ok {test-number} - data.str_hello != "goodbye" for: "hello" != "goodbye" +# Inequality checks that should succeed +ok {test-number} - data.str_hello != "hell" for: "hello" != "hell" +# Inequality checks that should succeed +ok {test-number} - data.str_hello != "hello1" for: "hello" != "hello1" +# Inequality checks that should succeed +ok {test-number} - data.str_hello.size() != 6 for: 5 != 6 +# JsonWriter +ok {test-number} - stream.str() == "" for: "" == "" +# JsonWriter +ok {test-number} - stream.str() == "{\n}" for: "{ }" == "{ }" +# JsonWriter +ok {test-number} - stream.str(), ContainsSubstring( "\"int\": 1," ) && ContainsSubstring( "\"double\": 1.5," ) && ContainsSubstring( "\"true\": true," ) && ContainsSubstring( "\"false\": false," ) && ContainsSubstring( "\"string\": \"this is a string\"," ) && ContainsSubstring( "\"array\": [\n 1,\n 2\n ]\n}" ) for: "{ "int": 1, "double": 1.5, "true": true, "false": false, "string": "this is a string", "array": [ 1, 2 ] }" ( contains: ""int": 1," and contains: ""double": 1.5," and contains: ""true": true," and contains: ""false": false," and contains: ""string": "this is a string"," and contains: ""array": [ 1, 2 ] }" ) +# JsonWriter +ok {test-number} - stream.str(), ContainsSubstring( "\"empty_object\": {\n }," ) && ContainsSubstring( "\"fully_object\": {\n \"key\": 1\n }" ) for: "{ "empty_object": { }, "fully_object": { "key": 1 } }" ( contains: ""empty_object": { }," and contains: ""fully_object": { "key": 1 }" ) +# JsonWriter +ok {test-number} - stream.str() == "[\n]" for: "[ ]" == "[ ]" +# JsonWriter +ok {test-number} - stream.str() == "[\n 1,\n 1.5,\n true,\n false,\n \"this is a string\",\n {\n \"object\": 42\n },\n [\n \"array\",\n 42.5\n ]\n]" for: "[ 1, 1.5, true, false, "this is a string", { "object": 42 }, [ "array", 42.5 ] ]" == "[ 1, 1.5, true, false, "this is a string", { "object": 42 }, [ "array", 42.5 ] ]" +# JsonWriter +ok {test-number} - stream.str() == "{\n}" for: "{ }" == "{ }" +# JsonWriter +ok {test-number} - stream.str() == "[\n]" for: "[ ]" == "[ ]" +# JsonWriter +ok {test-number} - stream.str() == "\"custom\"" for: ""custom"" == ""custom"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\\"\"" for: ""\""" == ""\""" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\\\\"" for: ""\\"" == ""\\"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"/\"" for: ""/"" == ""/"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\b\"" for: ""\b"" == ""\b"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\f\"" for: ""\f"" == ""\f"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\n\"" for: ""\n"" == ""\n"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\r\"" for: ""\r"" == ""\r"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\t\"" for: ""\t"" == ""\t"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\\\/\\t\\r\\n\"" for: ""\\/\t\r\n"" == ""\\/\t\r\n"" +# Lambdas in assertions +ok {test-number} - []() { return true; }() for: true +# Less-than inequalities with different epsilons +ok {test-number} - d <= Approx( 1.24 ) for: 1.22999999999999998 <= Approx( 1.23999999999999999 ) +# Less-than inequalities with different epsilons +ok {test-number} - d <= Approx( 1.23 ) for: 1.22999999999999998 <= Approx( 1.22999999999999998 ) +# Less-than inequalities with different epsilons +ok {test-number} - !(d <= Approx( 1.22 )) for: !(1.22999999999999998 <= Approx( 1.21999999999999997 )) +# Less-than inequalities with different epsilons +ok {test-number} - d <= Approx( 1.22 ).epsilon(0.1) for: 1.22999999999999998 <= Approx( 1.21999999999999997 ) +# ManuallyRegistered +ok {test-number} - with 1 message: 'was called' +# Matchers can be (AllOf) composed with the && operator +ok {test-number} - testStringForMatching(), ContainsSubstring( "string" ) && ContainsSubstring( "abc" ) && ContainsSubstring( "substring" ) && ContainsSubstring( "contains" ) for: "this string contains 'abc' as a substring" ( contains: "string" and contains: "abc" and contains: "substring" and contains: "contains" ) +# Matchers can be (AnyOf) composed with the || operator +ok {test-number} - testStringForMatching(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) for: "this string contains 'abc' as a substring" ( contains: "string" or contains: "different" or contains: "random" ) +# Matchers can be (AnyOf) composed with the || operator +ok {test-number} - testStringForMatching2(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) for: "some completely different text that contains one common word" ( contains: "string" or contains: "different" or contains: "random" ) +# Matchers can be composed with both && and || +ok {test-number} - testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "substring" ) for: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "substring" ) +# Matchers can be composed with both && and || - failing +not ok {test-number} - testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) for: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" ) +# Matchers can be negated (Not) with the ! operator +ok {test-number} - testStringForMatching(), !ContainsSubstring( "different" ) for: "this string contains 'abc' as a substring" not contains: "different" +# Matchers can be negated (Not) with the ! operator - failing +not ok {test-number} - testStringForMatching(), !ContainsSubstring( "substring" ) for: "this string contains 'abc' as a substring" not contains: "substring" +# Mayfail test case with nested sections +not ok {test-number} - explicitly +# Mayfail test case with nested sections +not ok {test-number} - explicitly +# Mayfail test case with nested sections +not ok {test-number} - explicitly +# Mayfail test case with nested sections +not ok {test-number} - explicitly +# Mismatching exception messages failing the test +ok {test-number} - thisThrows(), "expected exception" for: "expected exception" equals: "expected exception" +# Mismatching exception messages failing the test +not ok {test-number} - thisThrows(), "should fail" for: "expected exception" equals: "should fail" +# Multireporter calls reporters and listeners in correct order +ok {test-number} - records == expected for: { "Hello", "world", "Goodbye", "world" } == { "Hello", "world", "Goodbye", "world" } +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == false for: false == false +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == false for: false == false +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true +# Multireporter updates ReporterPreferences properly +ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true +# Nested generators and captured variables +ok {test-number} - values > -6 for: 3 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 4 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 5 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 6 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: -5 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: -4 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 90 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 91 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 92 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 93 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 94 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 95 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 96 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 97 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 98 > -6 +# Nested generators and captured variables +ok {test-number} - values > -6 for: 99 > -6 +# Nice descriptive name +warning {test-number} - 'This one ran' +# Non-std exceptions can be translated +not ok {test-number} - unexpected exception with message: 'custom exception' +# Objects that evaluated in boolean contexts can be checked +ok {test-number} - True for: {?} +# Objects that evaluated in boolean contexts can be checked +ok {test-number} - !False for: true +# Objects that evaluated in boolean contexts can be checked +ok {test-number} - !(False) for: !{?} +# Optionally static assertions +ok {test-number} - with 1 message: 'std::is_void::value' +# Optionally static assertions +ok {test-number} - with 1 message: '!(std::is_void::value)' +# Optionally static assertions +ok {test-number} - with 1 message: 'std::is_void::value' +# Optionally static assertions +ok {test-number} - with 1 message: '!(std::is_void::value)' +# Ordering comparison checks that should fail +not ok {test-number} - data.int_seven > 7 for: 7 > 7 +# Ordering comparison checks that should fail +not ok {test-number} - data.int_seven < 7 for: 7 < 7 +# Ordering comparison checks that should fail +not ok {test-number} - data.int_seven > 8 for: 7 > 8 +# Ordering comparison checks that should fail +not ok {test-number} - data.int_seven < 6 for: 7 < 6 +# Ordering comparison checks that should fail +not ok {test-number} - data.int_seven < 0 for: 7 < 0 +# Ordering comparison checks that should fail +not ok {test-number} - data.int_seven < -1 for: 7 < -1 +# Ordering comparison checks that should fail +not ok {test-number} - data.int_seven >= 8 for: 7 >= 8 +# Ordering comparison checks that should fail +not ok {test-number} - data.int_seven <= 6 for: 7 <= 6 +# Ordering comparison checks that should fail +not ok {test-number} - data.float_nine_point_one < 9 for: 9.100000381f < 9 +# Ordering comparison checks that should fail +not ok {test-number} - data.float_nine_point_one > 10 for: 9.100000381f > 10 +# Ordering comparison checks that should fail +not ok {test-number} - data.float_nine_point_one > 9.2 for: 9.100000381f > 9.19999999999999929 +# Ordering comparison checks that should fail +not ok {test-number} - data.str_hello > "hello" for: "hello" > "hello" +# Ordering comparison checks that should fail +not ok {test-number} - data.str_hello < "hello" for: "hello" < "hello" +# Ordering comparison checks that should fail +not ok {test-number} - data.str_hello > "hellp" for: "hello" > "hellp" +# Ordering comparison checks that should fail +not ok {test-number} - data.str_hello > "z" for: "hello" > "z" +# Ordering comparison checks that should fail +not ok {test-number} - data.str_hello < "hellm" for: "hello" < "hellm" +# Ordering comparison checks that should fail +not ok {test-number} - data.str_hello < "a" for: "hello" < "a" +# Ordering comparison checks that should fail +not ok {test-number} - data.str_hello >= "z" for: "hello" >= "z" +# Ordering comparison checks that should fail +not ok {test-number} - data.str_hello <= "a" for: "hello" <= "a" +# Ordering comparison checks that should succeed +ok {test-number} - data.int_seven < 8 for: 7 < 8 +# Ordering comparison checks that should succeed +ok {test-number} - data.int_seven > 6 for: 7 > 6 +# Ordering comparison checks that should succeed +ok {test-number} - data.int_seven > 0 for: 7 > 0 +# Ordering comparison checks that should succeed +ok {test-number} - data.int_seven > -1 for: 7 > -1 +# Ordering comparison checks that should succeed +ok {test-number} - data.int_seven >= 7 for: 7 >= 7 +# Ordering comparison checks that should succeed +ok {test-number} - data.int_seven >= 6 for: 7 >= 6 +# Ordering comparison checks that should succeed +ok {test-number} - data.int_seven <= 7 for: 7 <= 7 +# Ordering comparison checks that should succeed +ok {test-number} - data.int_seven <= 8 for: 7 <= 8 +# Ordering comparison checks that should succeed +ok {test-number} - data.float_nine_point_one > 9 for: 9.100000381f > 9 +# Ordering comparison checks that should succeed +ok {test-number} - data.float_nine_point_one < 10 for: 9.100000381f < 10 +# Ordering comparison checks that should succeed +ok {test-number} - data.float_nine_point_one < 9.2 for: 9.100000381f < 9.19999999999999929 +# Ordering comparison checks that should succeed +ok {test-number} - data.str_hello <= "hello" for: "hello" <= "hello" +# Ordering comparison checks that should succeed +ok {test-number} - data.str_hello >= "hello" for: "hello" >= "hello" +# Ordering comparison checks that should succeed +ok {test-number} - data.str_hello < "hellp" for: "hello" < "hellp" +# Ordering comparison checks that should succeed +ok {test-number} - data.str_hello < "zebra" for: "hello" < "zebra" +# Ordering comparison checks that should succeed +ok {test-number} - data.str_hello > "hellm" for: "hello" > "hellm" +# Ordering comparison checks that should succeed +ok {test-number} - data.str_hello > "a" for: "hello" > "a" +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 4242248763 (0x) == 4242248763 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 1867888929 (0x) == 1867888929 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 1276619030 (0x) == 1276619030 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 1911218783 (0x) == 1911218783 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 1827115164 (0x) == 1827115164 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 1472234645 (0x) == 1472234645 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 868832940 (0x) == 868832940 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 570883446 (0x) == 570883446 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 889299803 (0x) == 889299803 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 4261393167 (0x) == 4261393167 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 1472234645 (0x) == 1472234645 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 868832940 (0x) == 868832940 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 570883446 (0x) == 570883446 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 889299803 (0x) == 889299803 (0x) +# Our PCG implementation provides expected results for known seeds +ok {test-number} - rng() == 0x for: 4261393167 (0x) == 4261393167 (0x) +# Output from all sections is reported +not ok {test-number} - explicitly with 1 message: 'Message from section one' +# Output from all sections is reported +not ok {test-number} - explicitly with 1 message: 'Message from section two' +# Overloaded comma or address-of operators are not used +ok {test-number} - ( EvilMatcher(), EvilMatcher() ), EvilCommaOperatorUsed +# Overloaded comma or address-of operators are not used +ok {test-number} - &EvilMatcher(), EvilAddressOfOperatorUsed +# Overloaded comma or address-of operators are not used +ok {test-number} - EvilMatcher() || ( EvilMatcher() && !EvilMatcher() ) +# Overloaded comma or address-of operators are not used +ok {test-number} - ( EvilMatcher() && EvilMatcher() ) || !EvilMatcher() +# Parse uints +ok {test-number} - parseUInt( "0" ) == Optional{ 0 } for: {?} == {?} +# Parse uints +ok {test-number} - parseUInt( "100" ) == Optional{ 100 } for: {?} == {?} +# Parse uints +ok {test-number} - parseUInt( "4294967295" ) == Optional{ 4294967295 } for: {?} == {?} +# Parse uints +ok {test-number} - parseUInt( "0x", 16 ) == Optional{ 255 } for: {?} == {?} +# Parse uints +ok {test-number} - !(parseUInt( "" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "!!KJHF*#" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "-1" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "4294967296" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "42949672964294967296429496729642949672964294967296" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "2 4" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "0x", 10 )) for: !{?} +# Parsed tags are matched case insensitive +ok {test-number} - spec.hasFilters() for: true +# Parsed tags are matched case insensitive +ok {test-number} - spec.getInvalidSpecs().empty() for: true +# Parsed tags are matched case insensitive +ok {test-number} - spec.matches( testCase ) for: true +# Parsing sharding-related cli flags +ok {test-number} - cli.parse({ "test", "--shard-count=8" }) for: {?} +# Parsing sharding-related cli flags +ok {test-number} - config.shardCount == 8 for: 8 == 8 +# Parsing sharding-related cli flags +ok {test-number} - !(result) for: !{?} +# Parsing sharding-related cli flags +ok {test-number} - result.errorMessage(), ContainsSubstring( "Could not parse '-1' as shard count" ) for: "Could not parse '-1' as shard count" contains: "Could not parse '-1' as shard count" +# Parsing sharding-related cli flags +ok {test-number} - !(result) for: !{?} +# Parsing sharding-related cli flags +ok {test-number} - result.errorMessage(), ContainsSubstring( "Shard count must be positive" ) for: "Shard count must be positive" contains: "Shard count must be positive" +# Parsing sharding-related cli flags +ok {test-number} - cli.parse({ "test", "--shard-index=2" }) for: {?} +# Parsing sharding-related cli flags +ok {test-number} - config.shardIndex == 2 for: 2 == 2 +# Parsing sharding-related cli flags +ok {test-number} - !(result) for: !{?} +# Parsing sharding-related cli flags +ok {test-number} - result.errorMessage(), ContainsSubstring( "Could not parse '-12' as shard index" ) for: "Could not parse '-12' as shard index" contains: "Could not parse '-12' as shard index" +# Parsing sharding-related cli flags +ok {test-number} - cli.parse({ "test", "--shard-index=0" }) for: {?} +# Parsing sharding-related cli flags +ok {test-number} - config.shardIndex == 0 for: 0 == 0 +# Parsing tags with non-alphabetical characters is pass-through +ok {test-number} - spec.hasFilters() for: true with 1 message: 'tagString := "[tag with spaces]"' +# Parsing tags with non-alphabetical characters is pass-through +ok {test-number} - spec.getInvalidSpecs().empty() for: true with 1 message: 'tagString := "[tag with spaces]"' +# Parsing tags with non-alphabetical characters is pass-through +ok {test-number} - spec.matches( testCase ) for: true with 1 message: 'tagString := "[tag with spaces]"' +# Parsing tags with non-alphabetical characters is pass-through +ok {test-number} - spec.hasFilters() for: true with 1 message: 'tagString := "[I said "good day" sir!]"' +# Parsing tags with non-alphabetical characters is pass-through +ok {test-number} - spec.getInvalidSpecs().empty() for: true with 1 message: 'tagString := "[I said "good day" sir!]"' +# Parsing tags with non-alphabetical characters is pass-through +ok {test-number} - spec.matches( testCase ) for: true with 1 message: 'tagString := "[I said "good day" sir!]"' +# Parsing warnings +ok {test-number} - cli.parse( { "test", "-w", "NoAssertions" } ) for: {?} +# Parsing warnings +ok {test-number} - config.warnings == WarnAbout::NoAssertions for: 1 == 1 +# Parsing warnings +ok {test-number} - !(cli.parse( { "test", "-w", "NoTests" } )) for: !{?} +# Parsing warnings +ok {test-number} - cli.parse( { "test", "--warn", "NoAssertions", "--warn", "UnmatchedTestSpec" } ) for: {?} +# Parsing warnings +ok {test-number} - config.warnings == ( WarnAbout::NoAssertions | WarnAbout::UnmatchedTestSpec ) for: 3 == 3 +# Pointers can be compared to null +ok {test-number} - p == 0 for: 0 == 0 +# Pointers can be compared to null +ok {test-number} - p == pNULL for: 0 == 0 +# Pointers can be compared to null +ok {test-number} - p != 0 for: 0x != 0 +# Pointers can be compared to null +ok {test-number} - cp != 0 for: 0x != 0 +# Pointers can be compared to null +ok {test-number} - cpc != 0 for: 0x != 0 +# Pointers can be compared to null +ok {test-number} - returnsNull() == 0 for: {null string} == 0 +# Pointers can be compared to null +ok {test-number} - returnsConstNull() == 0 for: {null string} == 0 +# Pointers can be compared to null +ok {test-number} - 0 != p for: 0 != 0x +# Precision of floating point stringification can be set +ok {test-number} - str1.size() == 3 + 5 for: 8 == 8 +# Precision of floating point stringification can be set +ok {test-number} - str2.size() == 3 + 10 for: 13 == 13 +# Precision of floating point stringification can be set +ok {test-number} - str1.size() == 2 + 5 for: 7 == 7 +# Precision of floating point stringification can be set +ok {test-number} - str2.size() == 2 + 15 for: 17 == 17 +# Predicate matcher can accept const char* +ok {test-number} - "foo", Predicate( []( const char* const& ) { return true; } ) for: "foo" matches undescribed predicate +# Process can be configured on command line +ok {test-number} - result for: {?} +# Process can be configured on command line +ok {test-number} - config.processName == "" for: "" == "" +# Process can be configured on command line +ok {test-number} - result for: {?} +# Process can be configured on command line +ok {test-number} - config.processName == "test" for: "test" == "test" +# Process can be configured on command line +ok {test-number} - config.shouldDebugBreak == false for: false == false +# Process can be configured on command line +ok {test-number} - config.abortAfter == -1 for: -1 == -1 +# Process can be configured on command line +ok {test-number} - config.noThrow == false for: false == false +# Process can be configured on command line +ok {test-number} - config.reporterSpecifications.empty() for: true +# Process can be configured on command line +ok {test-number} - !(cfg.hasTestFilters()) for: !false +# Process can be configured on command line +ok {test-number} - cfg.getReporterSpecs().size() == 1 for: 1 == 1 +# Process can be configured on command line +ok {test-number} - cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, {}, {}, {} } for: {?} == {?} +# Process can be configured on command line +ok {test-number} - cfg.getProcessedReporterSpecs().size() == 1 for: 1 == 1 +# Process can be configured on command line +ok {test-number} - cfg.getProcessedReporterSpecs()[0] == Catch::ProcessedReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} } for: {?} == {?} +# Process can be configured on command line +ok {test-number} - result for: {?} +# Process can be configured on command line +ok {test-number} - cfg.hasTestFilters() for: true +# Process can be configured on command line +ok {test-number} - cfg.testSpec().matches(*fakeTestCase("notIncluded")) == false for: false == false +# Process can be configured on command line +ok {test-number} - cfg.testSpec().matches(*fakeTestCase("test1")) for: true +# Process can be configured on command line +ok {test-number} - result for: {?} +# Process can be configured on command line +ok {test-number} - cfg.hasTestFilters() for: true +# Process can be configured on command line +ok {test-number} - cfg.testSpec().matches(*fakeTestCase("test1")) == false for: false == false +# Process can be configured on command line +ok {test-number} - cfg.testSpec().matches(*fakeTestCase("alwaysIncluded")) for: true +# Process can be configured on command line +ok {test-number} - result for: {?} +# Process can be configured on command line +ok {test-number} - cfg.hasTestFilters() for: true +# Process can be configured on command line +ok {test-number} - cfg.testSpec().matches(*fakeTestCase("test1")) == false for: false == false +# Process can be configured on command line +ok {test-number} - cfg.testSpec().matches(*fakeTestCase("alwaysIncluded")) for: true +# Process can be configured on command line +ok {test-number} - result for: {?} with 1 message: 'result.errorMessage() := ""' +# Process can be configured on command line +ok {test-number} - config.reporterSpecifications == vec_Specs{ { "console", {}, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""' +# Process can be configured on command line +ok {test-number} - result for: {?} with 1 message: 'result.errorMessage() := ""' +# Process can be configured on command line +ok {test-number} - config.reporterSpecifications == vec_Specs{ { "xml", {}, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""' +# Process can be configured on command line +ok {test-number} - result for: {?} with 1 message: 'result.errorMessage() := ""' +# Process can be configured on command line +ok {test-number} - config.reporterSpecifications == vec_Specs{ { "junit", {}, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""' +# Process can be configured on command line +ok {test-number} - !result for: true +# Process can be configured on command line +ok {test-number} - result.errorMessage(), ContainsSubstring("Unrecognized reporter") for: "Unrecognized reporter, 'unsupported'. Check available with --list-reporters" contains: "Unrecognized reporter" +# Process can be configured on command line +ok {test-number} - result for: {?} with 1 message: 'result.errorMessage() := ""' +# Process can be configured on command line +ok {test-number} - config.reporterSpecifications == vec_Specs{ { "console", "out.txt"s, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""' +# Process can be configured on command line +ok {test-number} - result for: {?} with 1 message: 'result.errorMessage() := ""' +# Process can be configured on command line +ok {test-number} - config.reporterSpecifications == vec_Specs{ { "console", "C:\\Temp\\out.txt"s, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""' +# Process can be configured on command line +ok {test-number} - cli.parse({ "test", "-r", "xml::out=output.xml", "-r", "junit::out=output-junit.xml" }) for: {?} +# Process can be configured on command line +ok {test-number} - config.reporterSpecifications == vec_Specs{ { "xml", "output.xml"s, {}, {} }, { "junit", "output-junit.xml"s, {}, {} } } for: { {?}, {?} } == { {?}, {?} } +# Process can be configured on command line +ok {test-number} - cli.parse({ "test", "-r", "xml::out=output.xml", "-r", "console" }) for: {?} +# Process can be configured on command line +ok {test-number} - config.reporterSpecifications == vec_Specs{ { "xml", "output.xml"s, {}, {} }, { "console", {}, {}, {} } } for: { {?}, {?} } == { {?}, {?} } +# Process can be configured on command line +ok {test-number} - !result for: true +# Process can be configured on command line +ok {test-number} - result.errorMessage(), ContainsSubstring("Only one reporter may have unspecified output file.") for: "Only one reporter may have unspecified output file." contains: "Only one reporter may have unspecified output file." +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "-b"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.shouldDebugBreak == true for: true == true +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "--break"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.shouldDebugBreak for: true +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "-a"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.abortAfter == 1 for: 1 == 1 +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "-x", "2"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.abortAfter == 2 for: 2 == 2 +# Process can be configured on command line +ok {test-number} - !result for: true +# Process can be configured on command line +ok {test-number} - result.errorMessage(), ContainsSubstring("convert") && ContainsSubstring("oops") for: "Unable to convert 'oops' to destination type" ( contains: "convert" and contains: "oops" ) +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?} +# Process can be configured on command line +ok {test-number} - config.waitForKeypress == std::get<1>(input) for: 0 == 0 +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?} +# Process can be configured on command line +ok {test-number} - config.waitForKeypress == std::get<1>(input) for: 1 == 1 +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?} +# Process can be configured on command line +ok {test-number} - config.waitForKeypress == std::get<1>(input) for: 2 == 2 +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?} +# Process can be configured on command line +ok {test-number} - config.waitForKeypress == std::get<1>(input) for: 3 == 3 +# Process can be configured on command line +ok {test-number} - !result for: true +# Process can be configured on command line +ok {test-number} - result.errorMessage(), ContainsSubstring("never") && ContainsSubstring("both") for: "keypress argument must be one of: never, start, exit or both. 'sometimes' not recognised" ( contains: "never" and contains: "both" ) +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "-e"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.noThrow for: true +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "--nothrow"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.noThrow for: true +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "-o", "filename.ext"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.defaultOutputFilename == "filename.ext" for: "filename.ext" == "filename.ext" +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "--out", "filename.ext"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.defaultOutputFilename == "filename.ext" for: "filename.ext" == "filename.ext" +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "-abe"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.abortAfter == 1 for: 1 == 1 +# Process can be configured on command line +ok {test-number} - config.shouldDebugBreak for: true +# Process can be configured on command line +ok {test-number} - config.noThrow == true for: true == true +# Process can be configured on command line +ok {test-number} - cli.parse({"test"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.defaultColourMode == ColourMode::PlatformDefault for: 0 == 0 +# Process can be configured on command line +ok {test-number} - cli.parse( { "test", "--colour-mode", "default" } ) for: {?} +# Process can be configured on command line +ok {test-number} - config.defaultColourMode == ColourMode::PlatformDefault for: 0 == 0 +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "--colour-mode", "ansi"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.defaultColourMode == ColourMode::ANSI for: 1 == 1 +# Process can be configured on command line +ok {test-number} - cli.parse({"test", "--colour-mode", "none"}) for: {?} +# Process can be configured on command line +ok {test-number} - config.defaultColourMode == ColourMode::None for: 3 == 3 +# Process can be configured on command line +ok {test-number} - !result for: true +# Process can be configured on command line +ok {test-number} - result.errorMessage(), ContainsSubstring( "colour mode must be one of" ) for: "colour mode must be one of: default, ansi, win32, or none. 'wrong' is not recognised" contains: "colour mode must be one of" +# Process can be configured on command line +ok {test-number} - cli.parse({ "test", "--benchmark-samples=200" }) for: {?} +# Process can be configured on command line +ok {test-number} - config.benchmarkSamples == 200 for: 200 == 200 +# Process can be configured on command line +ok {test-number} - cli.parse({ "test", "--benchmark-resamples=20000" }) for: {?} +# Process can be configured on command line +ok {test-number} - config.benchmarkResamples == 20000 for: 20000 (0x) == 20000 (0x) +# Process can be configured on command line +ok {test-number} - cli.parse({ "test", "--benchmark-confidence-interval=0.99" }) for: {?} +# Process can be configured on command line +ok {test-number} - config.benchmarkConfidenceInterval == Catch::Approx(0.99) for: 0.98999999999999999 == Approx( 0.98999999999999999 ) +# Process can be configured on command line +ok {test-number} - cli.parse({ "test", "--benchmark-no-analysis" }) for: {?} +# Process can be configured on command line +ok {test-number} - config.benchmarkNoAnalysis for: true +# Process can be configured on command line +ok {test-number} - cli.parse({ "test", "--benchmark-warmup-time=10" }) for: {?} +# Process can be configured on command line +ok {test-number} - config.benchmarkWarmupTime == 10 for: 10 == 10 +# Product with differing arities - std::tuple +ok {test-number} - std::tuple_size::value >= 1 for: 3 >= 1 +# Product with differing arities - std::tuple +ok {test-number} - std::tuple_size::value >= 1 for: 2 >= 1 +# Product with differing arities - std::tuple +ok {test-number} - std::tuple_size::value >= 1 for: 1 >= 1 +# Random seed generation accepts known methods +ok {test-number} - Catch::generateRandomSeed(method) +# Random seed generation accepts known methods +ok {test-number} - Catch::generateRandomSeed(method) +# Random seed generation accepts known methods +ok {test-number} - Catch::generateRandomSeed(method) +# Random seed generation reports unknown methods +ok {test-number} - Catch::generateRandomSeed(static_cast(77)) +# Range type with sentinel +ok {test-number} - Catch::Detail::stringify(UsesSentinel{}) == "{ }" for: "{ }" == "{ }" +# Reconstruction should be based on stringification: #914 +not ok {test-number} - truthy(false) for: Hey, its truthy! +# Regex string matcher +not ok {test-number} - testStringForMatching(), Matches( "this STRING contains 'abc' as a substring" ) for: "this string contains 'abc' as a substring" matches "this STRING contains 'abc' as a substring" case sensitively +# Regex string matcher +not ok {test-number} - testStringForMatching(), Matches( "contains 'abc' as a substring" ) for: "this string contains 'abc' as a substring" matches "contains 'abc' as a substring" case sensitively +# Regex string matcher +not ok {test-number} - testStringForMatching(), Matches( "this string contains 'abc' as a" ) for: "this string contains 'abc' as a substring" matches "this string contains 'abc' as a" case sensitively +# Registering reporter with '::' in name fails +ok {test-number} - registry.registerReporter( "with::doublecolons", Catch::Detail::make_unique() ), "'::' is not allowed in reporter name: 'with::doublecolons'" for: "'::' is not allowed in reporter name: 'with::doublecolons'" equals: "'::' is not allowed in reporter name: 'with::doublecolons'" +# Regression test #1 +ok {test-number} - actual, !UnorderedEquals( expected ) for: { 'a', 'b' } not UnorderedEquals: { 'c', 'b' } +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: Automake' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: Automake' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: Automake' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: compact' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: compact' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: compact' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: console' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: console' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: console' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "{ "version": 1, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "" }, "listings": { "tags": [ { "aliases": [ "fakeTag" ], "count": 1 } ]" contains: "fakeTag" with 1 message: 'Tested reporter: JSON' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "{ "version": 1, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "" }, "listings": { "reporters": [ { "name": "fake reporter", "description": "fake description" } ]" contains: "fake reporter" with 1 message: 'Tested reporter: JSON' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "{ "version": 1, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "" }, "listings": { "tests": [ { "name": "fake test name", "class-name": "", "tags": [ "fakeTestTag" ], "source-location": { "filename": "fake-file.cpp", "line": 123456789 } } ]" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: JSON' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: " All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: JUnit' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: " Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: JUnit' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: " All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: JUnit' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: " All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: SonarQube' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: " Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: SonarQube' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: " All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: SonarQube' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: TAP' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: TAP' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: TAP' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: TeamCity' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: TeamCity' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: TeamCity' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: " 1 fakeTag " contains: "fakeTag" with 1 message: 'Tested reporter: XML' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: " fake reporter fake description " contains: "fake reporter" with 1 message: 'Tested reporter: XML' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: " fake test name [fakeTestTag] fake-file.cpp 123456789 " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: XML' +# Reproducer for #2309 - a very long description past 80 chars (default console width) with a late colon : blablabla +ok {test-number} - +# SUCCEED counts as a test pass +ok {test-number} - with 1 message: 'this is a success' +# SUCCEED does not require an argument +ok {test-number} - +# Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or methods +ok {test-number} - before == 0 for: 0 == 0 +# Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or methods +ok {test-number} - after > before for: 1 > 0 +# Scenario: Do that thing with the thing +ok {test-number} - itDoesThis() for: true +# Scenario: Do that thing with the thing +ok {test-number} - itDoesThat() for: true +# Scenario: This is a really long scenario name to see how the list command deals with wrapping +ok {test-number} - with 1 message: 'boo!' +# Scenario: Vector resizing affects size and capacity +ok {test-number} - v.size() == 0 for: 0 == 0 +# Scenario: Vector resizing affects size and capacity +ok {test-number} - v.size() == 10 for: 10 == 10 +# Scenario: Vector resizing affects size and capacity +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# Scenario: Vector resizing affects size and capacity +ok {test-number} - v.size() == 5 for: 5 == 5 +# Scenario: Vector resizing affects size and capacity +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# Scenario: Vector resizing affects size and capacity +ok {test-number} - v.size() == 0 for: 0 == 0 +# Scenario: Vector resizing affects size and capacity +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# Scenario: Vector resizing affects size and capacity +ok {test-number} - v.size() == 0 for: 0 == 0 +# Some simple comparisons between doubles +ok {test-number} - d == Approx( 1.23 ) for: 1.22999999999999998 == Approx( 1.22999999999999998 ) +# Some simple comparisons between doubles +ok {test-number} - d != Approx( 1.22 ) for: 1.22999999999999998 != Approx( 1.21999999999999997 ) +# Some simple comparisons between doubles +ok {test-number} - d != Approx( 1.24 ) for: 1.22999999999999998 != Approx( 1.23999999999999999 ) +# Some simple comparisons between doubles +ok {test-number} - d == 1.23_a for: 1.22999999999999998 == Approx( 1.22999999999999998 ) +# Some simple comparisons between doubles +ok {test-number} - d != 1.22_a for: 1.22999999999999998 != Approx( 1.21999999999999997 ) +# Some simple comparisons between doubles +ok {test-number} - Approx( d ) == 1.23 for: Approx( 1.22999999999999998 ) == 1.22999999999999998 +# Some simple comparisons between doubles +ok {test-number} - Approx( d ) != 1.22 for: Approx( 1.22999999999999998 ) != 1.21999999999999997 +# Some simple comparisons between doubles +ok {test-number} - Approx( d ) != 1.24 for: Approx( 1.22999999999999998 ) != 1.23999999999999999 +# StartsWith string matcher +not ok {test-number} - testStringForMatching(), StartsWith( "This String" ) for: "this string contains 'abc' as a substring" starts with: "This String" +# StartsWith string matcher +not ok {test-number} - testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" starts with: "string" (case insensitive) +# Static arrays are convertible to string +ok {test-number} - Catch::Detail::stringify(singular) == "{ 1 }" for: "{ 1 }" == "{ 1 }" +# Static arrays are convertible to string +ok {test-number} - Catch::Detail::stringify(arr) == "{ 3, 2, 1 }" for: "{ 3, 2, 1 }" == "{ 3, 2, 1 }" +# Static arrays are convertible to string +ok {test-number} - Catch::Detail::stringify(arr) == R"({ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } })" for: "{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }" == "{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }" +# String matchers +ok {test-number} - testStringForMatching(), ContainsSubstring( "string" ) for: "this string contains 'abc' as a substring" contains: "string" +# String matchers +ok {test-number} - testStringForMatching(), ContainsSubstring( "string", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "string" (case insensitive) +# String matchers +ok {test-number} - testStringForMatching(), ContainsSubstring( "abc" ) for: "this string contains 'abc' as a substring" contains: "abc" +# String matchers +ok {test-number} - testStringForMatching(), ContainsSubstring( "aBC", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "abc" (case insensitive) +# String matchers +ok {test-number} - testStringForMatching(), StartsWith( "this" ) for: "this string contains 'abc' as a substring" starts with: "this" +# String matchers +ok {test-number} - testStringForMatching(), StartsWith( "THIS", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" starts with: "this" (case insensitive) +# String matchers +ok {test-number} - testStringForMatching(), EndsWith( "substring" ) for: "this string contains 'abc' as a substring" ends with: "substring" +# String matchers +ok {test-number} - testStringForMatching(), EndsWith( " SuBsTrInG", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" ends with: " substring" (case insensitive) +# StringRef +ok {test-number} - empty.empty() for: true +# StringRef +ok {test-number} - empty.size() == 0 for: 0 == 0 +# StringRef +ok {test-number} - std::strcmp( empty.data(), "" ) == 0 for: 0 == 0 +# StringRef +ok {test-number} - s.empty() == false for: false == false +# StringRef +ok {test-number} - s.size() == 5 for: 5 == 5 +# StringRef +ok {test-number} - std::strcmp( rawChars, "hello" ) == 0 for: 0 == 0 +# StringRef +ok {test-number} - s.data() == rawChars for: "hello" == "hello" +# StringRef +ok {test-number} - original == "original" +# StringRef +ok {test-number} - original.data() +# StringRef +ok {test-number} - original.begin() == copy.begin() for: "original string" == "original string" +# StringRef +ok {test-number} - original.begin() == copy.begin() for: "original string" == "original string" +# StringRef +ok {test-number} - ss.empty() == false for: false == false +# StringRef +ok {test-number} - ss.size() == 5 for: 5 == 5 +# StringRef +ok {test-number} - std::strncmp( ss.data(), "hello", 5 ) == 0 for: 0 == 0 +# StringRef +ok {test-number} - ss == "hello" for: hello == "hello" +# StringRef +ok {test-number} - ss.size() == 6 for: 6 == 6 +# StringRef +ok {test-number} - std::strcmp( ss.data(), "world!" ) == 0 for: 0 == 0 +# StringRef +ok {test-number} - s.data() == s2.data() for: "hello world!" == "hello world!" +# StringRef +ok {test-number} - s.data() == ss.data() for: "hello world!" == "hello world!" +# StringRef +ok {test-number} - s.substr(s.size() + 1, 123).empty() for: true +# StringRef +ok {test-number} - std::strcmp(ss.data(), "world!") == 0 for: 0 == 0 +# StringRef +ok {test-number} - s.substr(1'000'000, 1).empty() for: true +# StringRef +ok {test-number} - reinterpret_cast(buffer1) != reinterpret_cast(buffer2) for: "Hello" != "Hello" +# StringRef +ok {test-number} - left == right for: Hello == Hello +# StringRef +ok {test-number} - left != left.substr(0, 3) for: Hello != Hel +# StringRef +ok {test-number} - sr == "a standard string" for: a standard string == "a standard string" +# StringRef +ok {test-number} - sr.size() == stdStr.size() for: 17 == 17 +# StringRef +ok {test-number} - sr == "a standard string" for: a standard string == "a standard string" +# StringRef +ok {test-number} - sr.size() == stdStr.size() for: 17 == 17 +# StringRef +ok {test-number} - sr == "a standard string" for: a standard string == "a standard string" +# StringRef +ok {test-number} - sr.size() == stdStr.size() for: 17 == 17 +# StringRef +ok {test-number} - stdStr == "a stringref" for: "a stringref" == "a stringref" +# StringRef +ok {test-number} - stdStr.size() == sr.size() for: 11 == 11 +# StringRef +ok {test-number} - stdStr == "a stringref" for: "a stringref" == "a stringref" +# StringRef +ok {test-number} - stdStr.size() == sr.size() for: 11 == 11 +# StringRef +ok {test-number} - lhs == "some string += the stringref contents" for: "some string += the stringref contents" == "some string += the stringref contents" +# StringRef +ok {test-number} - together == "abrakadabra" for: "abrakadabra" == "abrakadabra" +# StringRef at compilation time +ok {test-number} - with 1 message: 'empty.size() == 0' +# StringRef at compilation time +ok {test-number} - with 1 message: 'empty.begin() == empty.end()' +# StringRef at compilation time +ok {test-number} - with 1 message: 'stringref.size() == 3' +# StringRef at compilation time +ok {test-number} - with 1 message: 'stringref.data() == abc' +# StringRef at compilation time +ok {test-number} - with 1 message: 'stringref.begin() == abc' +# StringRef at compilation time +ok {test-number} - with 1 message: 'stringref.begin() != stringref.end()' +# StringRef at compilation time +ok {test-number} - with 1 message: 'stringref.substr(10, 0).empty()' +# StringRef at compilation time +ok {test-number} - with 1 message: 'stringref.substr(2, 1).data() == abc + 2' +# StringRef at compilation time +ok {test-number} - with 1 message: 'stringref[1] == 'b'' +# StringRef at compilation time +ok {test-number} - with 1 message: 'shortened.size() == 2' +# StringRef at compilation time +ok {test-number} - with 1 message: 'shortened.data() == abc' +# StringRef at compilation time +ok {test-number} - with 1 message: 'shortened.begin() != shortened.end()' +# StringRef at compilation time +ok {test-number} - with 1 message: '!(sr1.empty())' +# StringRef at compilation time +ok {test-number} - with 1 message: 'sr1.size() == 3' +# StringRef at compilation time +ok {test-number} - with 1 message: 'sr2.empty()' +# StringRef at compilation time +ok {test-number} - with 1 message: 'sr2.size() == 0' +# Stringifying char arrays with statically known sizes - char +ok {test-number} - ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +# Stringifying char arrays with statically known sizes - char +ok {test-number} - ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +# Stringifying char arrays with statically known sizes - signed char +ok {test-number} - ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +# Stringifying char arrays with statically known sizes - signed char +ok {test-number} - ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +# Stringifying char arrays with statically known sizes - unsigned char +ok {test-number} - ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +# Stringifying char arrays with statically known sizes - unsigned char +ok {test-number} - ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc"" +# Stringifying std::chrono::duration helpers +ok {test-number} - minute == seconds for: 1 m == 60 s +# Stringifying std::chrono::duration helpers +ok {test-number} - hour != seconds for: 1 h != 60 s +# Stringifying std::chrono::duration helpers +ok {test-number} - micro != milli for: 1 us != 1 ms +# Stringifying std::chrono::duration helpers +ok {test-number} - nano != micro for: 1 ns != 1 us +# Stringifying std::chrono::duration with weird ratios +ok {test-number} - half_minute != femto_second for: 1 [30/1]s != 1 fs +# Stringifying std::chrono::duration with weird ratios +ok {test-number} - pico_second != atto_second for: 1 ps != 1 as +# Stringifying std::chrono::time_point +ok {test-number} - now != later for: {iso8601-timestamp} != {iso8601-timestamp} +# Tabs and newlines show in output +not ok {test-number} - s1 == s2 for: "if ($b == 10) { $a = 20; }" == "if ($b == 10) { $a = 20; } " +# Tag alias can be registered against tag patterns +ok {test-number} - what, ContainsSubstring( "[@zzz]" ) for: "error: tag alias, '[@zzz]' already registered. First seen at: file:2 Redefined at: file:10" contains: "[@zzz]" +# Tag alias can be registered against tag patterns +ok {test-number} - what, ContainsSubstring( "file" ) for: "error: tag alias, '[@zzz]' already registered. First seen at: file:2 Redefined at: file:10" contains: "file" +# Tag alias can be registered against tag patterns +ok {test-number} - what, ContainsSubstring( "2" ) for: "error: tag alias, '[@zzz]' already registered. First seen at: file:2 Redefined at: file:10" contains: "2" +# Tag alias can be registered against tag patterns +ok {test-number} - what, ContainsSubstring( "10" ) for: "error: tag alias, '[@zzz]' already registered. First seen at: file:2 Redefined at: file:10" contains: "10" +# Tag alias can be registered against tag patterns +ok {test-number} - registry.add( "[no ampersat]", "", Catch::SourceLineInfo( "file", 3 ) ) +# Tag alias can be registered against tag patterns +ok {test-number} - registry.add( "[the @ is not at the start]", "", Catch::SourceLineInfo( "file", 3 ) ) +# Tag alias can be registered against tag patterns +ok {test-number} - registry.add( "@no square bracket at start]", "", Catch::SourceLineInfo( "file", 3 ) ) +# Tag alias can be registered against tag patterns +ok {test-number} - registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) ) +# Tags with spaces and non-alphanumerical characters are accepted +ok {test-number} - testCase.tags.size() == 2 for: 2 == 2 +# Tags with spaces and non-alphanumerical characters are accepted +ok {test-number} - testCase.tags, VectorContains( Tag( "tag with spaces" ) ) && VectorContains( Tag( "I said \"good day\" sir!"_catch_sr ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} ) +# Template test case method with test types specified inside std::tuple - MyTypes - 0 +ok {test-number} - Template_Fixture::m_a == 1 for: 1 == 1 +# Template test case method with test types specified inside std::tuple - MyTypes - 1 +ok {test-number} - Template_Fixture::m_a == 1 for: 1 == 1 +# Template test case method with test types specified inside std::tuple - MyTypes - 2 +ok {test-number} - Template_Fixture::m_a == 1 for: 1.0 == 1 +# Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 0 +ok {test-number} - std::is_default_constructible::value for: true +# Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 1 +ok {test-number} - std::is_default_constructible::value for: true +# Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 0 +ok {test-number} - std::is_trivially_copyable::value for: true +# Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 1 +ok {test-number} - std::is_trivially_copyable::value for: true +# Template test case with test types specified inside std::tuple - MyTypes - 0 +ok {test-number} - std::is_arithmetic::value for: true +# Template test case with test types specified inside std::tuple - MyTypes - 1 +ok {test-number} - std::is_arithmetic::value for: true +# Template test case with test types specified inside std::tuple - MyTypes - 2 +ok {test-number} - std::is_arithmetic::value for: true +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.size() == 10 for: 10 == 10 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.size() == 0 for: 0 == 0 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.capacity() == 0 for: 0 == 0 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - float +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.size() == 10 for: 10 == 10 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.size() == 0 for: 0 == 0 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.capacity() == 0 for: 0 == 0 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - int +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.size() == 10 for: 10 == 10 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.size() == 0 for: 0 == 0 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.capacity() == 0 for: 0 == 0 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::string +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.size() == 10 for: 10 == 10 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.size() == 0 for: 0 == 0 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.capacity() == 0 for: 0 == 0 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.size() == 5 for: 5 == 5 +# TemplateTest: vectors can be sized and resized - std::tuple +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.size() == V for: 6 == 6 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.capacity() >= V for: 6 >= 6 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.size() == 2 * V for: 12 == 12 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.capacity() >= 2 * V for: 12 >= 12 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.size() == V for: 6 == 6 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.capacity() >= V for: 6 >= 6 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.size() == 0 for: 0 == 0 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.capacity() >= V for: 6 >= 6 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.capacity() == 0 for: 0 == 0 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.size() == V for: 6 == 6 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.capacity() >= V for: 6 >= 6 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.size() == V for: 6 == 6 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.capacity() >= 2 * V for: 12 >= 12 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.size() == V for: 6 == 6 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.capacity() >= V for: 6 >= 6 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.size() == V for: 6 == 6 +# TemplateTestSig: vectors can be sized and resized - (std::tuple), 6 +ok {test-number} - v.capacity() >= V for: 6 >= 6 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.size() == V for: 4 == 4 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.capacity() >= V for: 4 >= 4 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.size() == 2 * V for: 8 == 8 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.capacity() >= 2 * V for: 8 >= 8 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.size() == V for: 4 == 4 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.capacity() >= V for: 4 >= 4 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.size() == 0 for: 0 == 0 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.capacity() >= V for: 4 >= 4 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.capacity() == 0 for: 0 == 0 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.size() == V for: 4 == 4 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.capacity() >= V for: 4 >= 4 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.size() == V for: 4 == 4 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.capacity() >= 2 * V for: 8 >= 8 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.size() == V for: 4 == 4 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.capacity() >= V for: 4 >= 4 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.size() == V for: 4 == 4 +# TemplateTestSig: vectors can be sized and resized - float,4 +ok {test-number} - v.capacity() >= V for: 4 >= 4 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.size() == V for: 5 == 5 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.capacity() >= V for: 5 >= 5 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.size() == 2 * V for: 10 == 10 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.capacity() >= 2 * V for: 10 >= 10 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.size() == V for: 5 == 5 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.capacity() >= V for: 5 >= 5 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.size() == 0 for: 0 == 0 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.capacity() >= V for: 5 >= 5 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.capacity() == 0 for: 0 == 0 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.size() == V for: 5 == 5 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.capacity() >= V for: 5 >= 5 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.size() == V for: 5 == 5 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.capacity() >= 2 * V for: 10 >= 10 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.size() == V for: 5 == 5 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.capacity() >= V for: 5 >= 5 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.size() == V for: 5 == 5 +# TemplateTestSig: vectors can be sized and resized - int,5 +ok {test-number} - v.capacity() >= V for: 5 >= 5 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.size() == V for: 15 == 15 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.capacity() >= V for: 15 >= 15 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.size() == 2 * V for: 30 == 30 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.capacity() >= 2 * V for: 30 >= 30 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.size() == V for: 15 == 15 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.capacity() >= V for: 15 >= 15 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.size() == 0 for: 0 == 0 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.capacity() >= V for: 15 >= 15 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.capacity() == 0 for: 0 == 0 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.size() == V for: 15 == 15 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.capacity() >= V for: 15 >= 15 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.size() == V for: 15 == 15 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.capacity() >= 2 * V for: 30 >= 30 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.size() == V for: 15 == 15 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.capacity() >= V for: 15 >= 15 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.size() == V for: 15 == 15 +# TemplateTestSig: vectors can be sized and resized - std::string,15 +ok {test-number} - v.capacity() >= V for: 15 >= 15 +# Test case with identical tags keeps just one +ok {test-number} - testCase.tags.size() == 1 for: 1 == 1 +# Test case with identical tags keeps just one +ok {test-number} - testCase.tags[0] == Tag( "tag1" ) for: {?} == {?} +# Test case with one argument +ok {test-number} - with 1 message: 'no assertions' +# Test enum bit values +ok {test-number} - 0x == bit30and31 for: 3221225472 (0x) == 3221225472 +# Test with special, characters "in name +ok {test-number} - +# Testing checked-if +ok {test-number} - true +# Testing checked-if +ok {test-number} - +# Testing checked-if +ok {test-number} - false # TODO +# Testing checked-if +ok {test-number} - true +# Testing checked-if +ok {test-number} - false # TODO +# Testing checked-if +ok {test-number} - +# Testing checked-if 2 +ok {test-number} - true +# Testing checked-if 2 +not ok {test-number} - explicitly +# Testing checked-if 3 +ok {test-number} - false # TODO +# Testing checked-if 3 +not ok {test-number} - explicitly +# Testing checked-if 4 +ok {test-number} - true +# Testing checked-if 4 +not ok {test-number} - unexpected exception with message: 'Uncaught exception should fail!'; expression was: {Unknown expression after the reported line} +# Testing checked-if 5 +ok {test-number} - false # TODO +# Testing checked-if 5 +not ok {test-number} - unexpected exception with message: 'Uncaught exception should fail!'; expression was: {Unknown expression after the reported line} +# The NO_FAIL macro reports a failure but does not fail the test +ok {test-number} - 1 == 2 # TODO +# The default listing implementation write to provided stream +ok {test-number} - listingString, ContainsSubstring("[fakeTag]"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "[fakeTag]" +# The default listing implementation write to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake reporter"s ) && ContainsSubstring( "fake description"s ) for: "Available reporters: fake reporter: fake description " ( contains: "fake reporter" and contains: "fake description" ) +# The default listing implementation write to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) +# The default listing implementation write to provided stream +ok {test-number} - listingString, ContainsSubstring( "fakeListener"s ) && ContainsSubstring( "fake description"s ) for: "Registered listeners: fakeListener: fake description " ( contains: "fakeListener" and contains: "fake description" ) +# This test 'should' fail but doesn't +ok {test-number} - with 1 message: 'oops!' +# Thrown string literals are translated +not ok {test-number} - unexpected exception with message: 'For some reason someone is throwing a string literal!' +# Tracker +ok {test-number} - testCase.isOpen() for: true +# Tracker +ok {test-number} - s1.isOpen() for: true +# Tracker +ok {test-number} - s1.isSuccessfullyCompleted() for: true +# Tracker +ok {test-number} - testCase.isComplete() == false for: false == false +# Tracker +ok {test-number} - ctx.completedCycle() for: true +# Tracker +ok {test-number} - testCase.isSuccessfullyCompleted() for: true +# Tracker +ok {test-number} - testCase.isOpen() for: true +# Tracker +ok {test-number} - s1.isOpen() for: true +# Tracker +ok {test-number} - s1.isComplete() for: true +# Tracker +ok {test-number} - s1.isSuccessfullyCompleted() == false for: false == false +# Tracker +ok {test-number} - testCase.isComplete() == false for: false == false +# Tracker +ok {test-number} - ctx.completedCycle() for: true +# Tracker +ok {test-number} - testCase.isSuccessfullyCompleted() == false for: false == false +# Tracker +ok {test-number} - testCase2.isOpen() for: true +# Tracker +ok {test-number} - s1b.isOpen() == false for: false == false +# Tracker +ok {test-number} - ctx.completedCycle() for: true +# Tracker +ok {test-number} - testCase.isComplete() for: true +# Tracker +ok {test-number} - testCase.isSuccessfullyCompleted() for: true +# Tracker +ok {test-number} - testCase.isOpen() for: true +# Tracker +ok {test-number} - s1.isOpen() for: true +# Tracker +ok {test-number} - s1.isComplete() for: true +# Tracker +ok {test-number} - s1.isSuccessfullyCompleted() == false for: false == false +# Tracker +ok {test-number} - testCase.isComplete() == false for: false == false +# Tracker +ok {test-number} - ctx.completedCycle() for: true +# Tracker +ok {test-number} - testCase.isSuccessfullyCompleted() == false for: false == false +# Tracker +ok {test-number} - testCase2.isOpen() for: true +# Tracker +ok {test-number} - s1b.isOpen() == false for: false == false +# Tracker +ok {test-number} - s2.isOpen() for: true +# Tracker +ok {test-number} - ctx.completedCycle() for: true +# Tracker +ok {test-number} - testCase.isComplete() for: true +# Tracker +ok {test-number} - testCase.isSuccessfullyCompleted() for: true +# Tracker +ok {test-number} - testCase.isOpen() for: true +# Tracker +ok {test-number} - s1.isOpen() for: true +# Tracker +ok {test-number} - s2.isOpen() == false for: false == false +# Tracker +ok {test-number} - testCase.isComplete() == false for: false == false +# Tracker +ok {test-number} - testCase2.isOpen() for: true +# Tracker +ok {test-number} - s1b.isOpen() == false for: false == false +# Tracker +ok {test-number} - s2b.isOpen() for: true +# Tracker +ok {test-number} - ctx.completedCycle() == false for: false == false +# Tracker +ok {test-number} - ctx.completedCycle() for: true +# Tracker +ok {test-number} - s2b.isSuccessfullyCompleted() for: true +# Tracker +ok {test-number} - testCase2.isComplete() == false for: false == false +# Tracker +ok {test-number} - testCase2.isSuccessfullyCompleted() for: true +# Tracker +ok {test-number} - testCase.isOpen() for: true +# Tracker +ok {test-number} - s1.isOpen() for: true +# Tracker +ok {test-number} - s2.isOpen() == false for: false == false +# Tracker +ok {test-number} - testCase.isComplete() == false for: false == false +# Tracker +ok {test-number} - testCase2.isOpen() for: true +# Tracker +ok {test-number} - s1b.isOpen() == false for: false == false +# Tracker +ok {test-number} - s2b.isOpen() for: true +# Tracker +ok {test-number} - ctx.completedCycle() == false for: false == false +# Tracker +ok {test-number} - ctx.completedCycle() for: true +# Tracker +ok {test-number} - s2b.isComplete() for: true +# Tracker +ok {test-number} - s2b.isSuccessfullyCompleted() == false for: false == false +# Tracker +ok {test-number} - testCase2.isSuccessfullyCompleted() == false for: false == false +# Tracker +ok {test-number} - testCase3.isOpen() for: true +# Tracker +ok {test-number} - s1c.isOpen() == false for: false == false +# Tracker +ok {test-number} - s2c.isOpen() == false for: false == false +# Tracker +ok {test-number} - testCase3.isSuccessfullyCompleted() for: true +# Tracker +ok {test-number} - testCase.isOpen() for: true +# Tracker +ok {test-number} - s1.isOpen() for: true +# Tracker +ok {test-number} - s2.isOpen() for: true +# Tracker +ok {test-number} - s2.isComplete() for: true +# Tracker +ok {test-number} - s1.isComplete() == false for: false == false +# Tracker +ok {test-number} - s1.isComplete() for: true +# Tracker +ok {test-number} - testCase.isComplete() == false for: false == false +# Tracker +ok {test-number} - testCase.isComplete() for: true +# Trim strings +ok {test-number} - trim(std::string(no_whitespace)) == no_whitespace for: "There is no extra whitespace here" == "There is no extra whitespace here" +# Trim strings +ok {test-number} - trim(std::string(leading_whitespace)) == no_whitespace for: "There is no extra whitespace here" == "There is no extra whitespace here" +# Trim strings +ok {test-number} - trim(std::string(trailing_whitespace)) == no_whitespace for: "There is no extra whitespace here" == "There is no extra whitespace here" +# Trim strings +ok {test-number} - trim(std::string(whitespace_at_both_ends)) == no_whitespace for: "There is no extra whitespace here" == "There is no extra whitespace here" +# Trim strings +ok {test-number} - trim(StringRef(no_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here +# Trim strings +ok {test-number} - trim(StringRef(leading_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here +# Trim strings +ok {test-number} - trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here +# Trim strings +ok {test-number} - trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, RangeEquals( c_array ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, UnorderedRangeEquals( c_array ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_3, !RangeEquals( array_int_4 ) for: { 1, 2, 3 } not elements are { 1, 2, 3, 4 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_3, !UnorderedRangeEquals( array_int_4 ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, RangeEquals( vector_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, UnorderedRangeEquals( vector_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - with 1 message: 'ContainerIsRandomAccess( array_int_a ) != ContainerIsRandomAccess( list_char_a )' +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, RangeEquals( list_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, UnorderedRangeEquals( list_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_int_a, RangeEquals( vector_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_int_a, UnorderedRangeEquals( vector_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_int_a, !RangeEquals( vector_char_b ) for: { 1, 2, 3 } not elements are { 1, 2, 2 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_int_a, !UnorderedRangeEquals( vector_char_b ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 2 } +# Type conversions of RangeEquals and similar +ok {test-number} - a, !RangeEquals( b ) for: { 1, 2, 3 } not elements are { 3, 2, 1 } +# Type conversions of RangeEquals and similar +ok {test-number} - a, UnorderedRangeEquals( b ) for: { 1, 2, 3 } unordered elements are { 3, 2, 1 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_a, RangeEquals( array_a_plus_1, close_enough ) for: { 1, 2, 3 } elements are { 2, 3, 4 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_a, UnorderedRangeEquals( array_a_plus_1, close_enough ) for: { 1, 2, 3 } unordered elements are { 2, 3, 4 } +# Unexpected exceptions can be translated +not ok {test-number} - unexpected exception with message: '3.14000000000000012' +# Upcasting special member functions +ok {test-number} - bptr->i == 3 for: 3 == 3 +# Upcasting special member functions +ok {test-number} - bptr->i == 3 for: 3 == 3 +# Usage of AllMatch range matcher +ok {test-number} - data, AllMatch(SizeIs(5)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } all match has size == 5 +# Usage of AllMatch range matcher +ok {test-number} - data, !AllMatch(Contains(0) && Contains(1)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not all match ( contains element 0 and contains element 1 ) +# Usage of AllMatch range matcher +ok {test-number} - needs_adl, AllMatch( Predicate( []( int elem ) { return elem < 6; } ) ) for: { 1, 2, 3, 4, 5 } all match matches undescribed predicate +# Usage of AllMatch range matcher +ok {test-number} - mocked, allMatch for: { 1, 2, 3, 4, 5 } all match matches undescribed predicate +# Usage of AllMatch range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of AllMatch range matcher +ok {test-number} - mocked.m_derefed[1] for: true +# Usage of AllMatch range matcher +ok {test-number} - mocked.m_derefed[2] for: true +# Usage of AllMatch range matcher +ok {test-number} - mocked.m_derefed[3] for: true +# Usage of AllMatch range matcher +ok {test-number} - mocked.m_derefed[4] for: true +# Usage of AllMatch range matcher +ok {test-number} - mocked, !allMatch for: { 1, 2, 3, 4, 5 } not all match matches undescribed predicate +# Usage of AllMatch range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of AllMatch range matcher +ok {test-number} - mocked.m_derefed[1] for: true +# Usage of AllMatch range matcher +ok {test-number} - mocked.m_derefed[2] for: true +# Usage of AllMatch range matcher +ok {test-number} - !(mocked.m_derefed[3]) for: !false +# Usage of AllMatch range matcher +ok {test-number} - !(mocked.m_derefed[4]) for: !false +# Usage of AllTrue range matcher +ok {test-number} - data, AllTrue() for: { true, true, true, true, true } contains only true +# Usage of AllTrue range matcher +ok {test-number} - data, AllTrue() for: { } contains only true +# Usage of AllTrue range matcher +ok {test-number} - data, !AllTrue() for: { true, true, false, true, true } not contains only true +# Usage of AllTrue range matcher +ok {test-number} - data, !AllTrue() for: { false, false, false, false, false } not contains only true +# Usage of AllTrue range matcher +ok {test-number} - data, AllTrue() for: { true, true, true, true, true } contains only true +# Usage of AllTrue range matcher +ok {test-number} - data, !AllTrue() for: { true, true, false, true, true } not contains only true +# Usage of AllTrue range matcher +ok {test-number} - data, !AllTrue() for: { false, false, false, false, false } not contains only true +# Usage of AllTrue range matcher +ok {test-number} - mocked, AllTrue() for: { true, true, true, true, true } contains only true +# Usage of AllTrue range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of AllTrue range matcher +ok {test-number} - mocked.m_derefed[1] for: true +# Usage of AllTrue range matcher +ok {test-number} - mocked.m_derefed[2] for: true +# Usage of AllTrue range matcher +ok {test-number} - mocked.m_derefed[3] for: true +# Usage of AllTrue range matcher +ok {test-number} - mocked.m_derefed[4] for: true +# Usage of AllTrue range matcher +ok {test-number} - mocked, !AllTrue() for: { true, true, false, true, true } not contains only true +# Usage of AllTrue range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of AllTrue range matcher +ok {test-number} - mocked.m_derefed[1] for: true +# Usage of AllTrue range matcher +ok {test-number} - mocked.m_derefed[2] for: true +# Usage of AllTrue range matcher +ok {test-number} - !(mocked.m_derefed[3]) for: !false +# Usage of AllTrue range matcher +ok {test-number} - !(mocked.m_derefed[4]) for: !false +# Usage of AnyMatch range matcher +ok {test-number} - data, AnyMatch(SizeIs(5)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } any match has size == 5 +# Usage of AnyMatch range matcher +ok {test-number} - data, !AnyMatch(Contains(0) && Contains(10)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not any match ( contains element 0 and contains element 10 ) +# Usage of AnyMatch range matcher +ok {test-number} - needs_adl, AnyMatch( Predicate( []( int elem ) { return elem < 3; } ) ) for: { 1, 2, 3, 4, 5 } any match matches undescribed predicate +# Usage of AnyMatch range matcher +ok {test-number} - mocked, !anyMatch for: { 1, 2, 3, 4, 5 } not any match matches undescribed predicate +# Usage of AnyMatch range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of AnyMatch range matcher +ok {test-number} - mocked.m_derefed[1] for: true +# Usage of AnyMatch range matcher +ok {test-number} - mocked.m_derefed[2] for: true +# Usage of AnyMatch range matcher +ok {test-number} - mocked.m_derefed[3] for: true +# Usage of AnyMatch range matcher +ok {test-number} - mocked.m_derefed[4] for: true +# Usage of AnyMatch range matcher +ok {test-number} - mocked, anyMatch for: { 1, 2, 3, 4, 5 } any match matches undescribed predicate +# Usage of AnyMatch range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of AnyMatch range matcher +ok {test-number} - !(mocked.m_derefed[1]) for: !false +# Usage of AnyMatch range matcher +ok {test-number} - !(mocked.m_derefed[2]) for: !false +# Usage of AnyMatch range matcher +ok {test-number} - !(mocked.m_derefed[3]) for: !false +# Usage of AnyMatch range matcher +ok {test-number} - !(mocked.m_derefed[4]) for: !false +# Usage of AnyTrue range matcher +ok {test-number} - data, AnyTrue() for: { true, true, true, true, true } contains at least one true +# Usage of AnyTrue range matcher +ok {test-number} - data, !AnyTrue() for: { } not contains at least one true +# Usage of AnyTrue range matcher +ok {test-number} - data, AnyTrue() for: { false, false, true, false, false } contains at least one true +# Usage of AnyTrue range matcher +ok {test-number} - data, !AnyTrue() for: { false, false, false, false, false } not contains at least one true +# Usage of AnyTrue range matcher +ok {test-number} - data, AnyTrue() for: { true, true, true, true, true } contains at least one true +# Usage of AnyTrue range matcher +ok {test-number} - data, AnyTrue() for: { false, false, true, false, false } contains at least one true +# Usage of AnyTrue range matcher +ok {test-number} - data, !AnyTrue() for: { false, false, false, false, false } not contains at least one true +# Usage of AnyTrue range matcher +ok {test-number} - mocked, AnyTrue() for: { false, false, false, false, true } contains at least one true +# Usage of AnyTrue range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of AnyTrue range matcher +ok {test-number} - mocked.m_derefed[1] for: true +# Usage of AnyTrue range matcher +ok {test-number} - mocked.m_derefed[2] for: true +# Usage of AnyTrue range matcher +ok {test-number} - mocked.m_derefed[3] for: true +# Usage of AnyTrue range matcher +ok {test-number} - mocked.m_derefed[4] for: true +# Usage of AnyTrue range matcher +ok {test-number} - mocked, AnyTrue() for: { false, false, true, true, true } contains at least one true +# Usage of AnyTrue range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of AnyTrue range matcher +ok {test-number} - mocked.m_derefed[1] for: true +# Usage of AnyTrue range matcher +ok {test-number} - mocked.m_derefed[2] for: true +# Usage of AnyTrue range matcher +ok {test-number} - !(mocked.m_derefed[3]) for: !false +# Usage of AnyTrue range matcher +ok {test-number} - !(mocked.m_derefed[4]) for: !false +# Usage of NoneMatch range matcher +ok {test-number} - data, NoneMatch(SizeIs(6)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } none match has size == 6 +# Usage of NoneMatch range matcher +ok {test-number} - data, !NoneMatch(Contains(0) && Contains(1)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not none match ( contains element 0 and contains element 1 ) +# Usage of NoneMatch range matcher +ok {test-number} - needs_adl, NoneMatch( Predicate( []( int elem ) { return elem > 6; } ) ) for: { 1, 2, 3, 4, 5 } none match matches undescribed predicate +# Usage of NoneMatch range matcher +ok {test-number} - mocked, noneMatch for: { 1, 2, 3, 4, 5 } none match matches undescribed predicate +# Usage of NoneMatch range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of NoneMatch range matcher +ok {test-number} - mocked.m_derefed[1] for: true +# Usage of NoneMatch range matcher +ok {test-number} - mocked.m_derefed[2] for: true +# Usage of NoneMatch range matcher +ok {test-number} - mocked.m_derefed[3] for: true +# Usage of NoneMatch range matcher +ok {test-number} - mocked.m_derefed[4] for: true +# Usage of NoneMatch range matcher +ok {test-number} - mocked, !noneMatch for: { 1, 2, 3, 4, 5 } not none match matches undescribed predicate +# Usage of NoneMatch range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of NoneMatch range matcher +ok {test-number} - !(mocked.m_derefed[1]) for: !false +# Usage of NoneMatch range matcher +ok {test-number} - !(mocked.m_derefed[2]) for: !false +# Usage of NoneMatch range matcher +ok {test-number} - !(mocked.m_derefed[3]) for: !false +# Usage of NoneMatch range matcher +ok {test-number} - !(mocked.m_derefed[4]) for: !false +# Usage of NoneTrue range matcher +ok {test-number} - data, !NoneTrue() for: { true, true, true, true, true } not contains no true +# Usage of NoneTrue range matcher +ok {test-number} - data, NoneTrue() for: { } contains no true +# Usage of NoneTrue range matcher +ok {test-number} - data, !NoneTrue() for: { false, false, true, false, false } not contains no true +# Usage of NoneTrue range matcher +ok {test-number} - data, NoneTrue() for: { false, false, false, false, false } contains no true +# Usage of NoneTrue range matcher +ok {test-number} - data, !NoneTrue() for: { true, true, true, true, true } not contains no true +# Usage of NoneTrue range matcher +ok {test-number} - data, !NoneTrue() for: { false, false, true, false, false } not contains no true +# Usage of NoneTrue range matcher +ok {test-number} - data, NoneTrue() for: { false, false, false, false, false } contains no true +# Usage of NoneTrue range matcher +ok {test-number} - mocked, NoneTrue() for: { false, false, false, false, false } contains no true +# Usage of NoneTrue range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of NoneTrue range matcher +ok {test-number} - mocked.m_derefed[1] for: true +# Usage of NoneTrue range matcher +ok {test-number} - mocked.m_derefed[2] for: true +# Usage of NoneTrue range matcher +ok {test-number} - mocked.m_derefed[3] for: true +# Usage of NoneTrue range matcher +ok {test-number} - mocked.m_derefed[4] for: true +# Usage of NoneTrue range matcher +ok {test-number} - mocked, !NoneTrue() for: { false, false, true, true, true } not contains no true +# Usage of NoneTrue range matcher +ok {test-number} - mocked.m_derefed[0] for: true +# Usage of NoneTrue range matcher +ok {test-number} - mocked.m_derefed[1] for: true +# Usage of NoneTrue range matcher +ok {test-number} - mocked.m_derefed[2] for: true +# Usage of NoneTrue range matcher +ok {test-number} - !(mocked.m_derefed[3]) for: !false +# Usage of NoneTrue range matcher +ok {test-number} - !(mocked.m_derefed[4]) for: !false +# Usage of RangeEquals range matcher +ok {test-number} - empty_vector, RangeEquals( empty_vector ) for: { } elements are { } +# Usage of RangeEquals range matcher +ok {test-number} - empty_vector, !RangeEquals( non_empty_vector ) for: { } not elements are { 1 } +# Usage of RangeEquals range matcher +ok {test-number} - non_empty_vector, !RangeEquals( empty_vector ) for: { 1 } not elements are { } +# Usage of RangeEquals range matcher +ok {test-number} - non_empty_array, RangeEquals( non_empty_array ) for: { 1 } elements are { 1 } +# Usage of RangeEquals range matcher +ok {test-number} - array_a, RangeEquals( array_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +# Usage of RangeEquals range matcher +ok {test-number} - array_a, !RangeEquals( array_b ) for: { 1, 2, 3 } not elements are { 2, 2, 3 } +# Usage of RangeEquals range matcher +ok {test-number} - array_a, !RangeEquals( array_c ) for: { 1, 2, 3 } not elements are { 1, 2, 2 } +# Usage of RangeEquals range matcher +ok {test-number} - vector_a, !RangeEquals( vector_b ) for: { 1, 2, 3 } not elements are { 1, 2, 3, 4 } +# Usage of RangeEquals range matcher +ok {test-number} - vector_a, RangeEquals( vector_a_plus_1, close_enough ) for: { 1, 2, 3 } elements are { 2, 3, 4 } +# Usage of RangeEquals range matcher +ok {test-number} - vector_a, !RangeEquals( vector_b, close_enough ) for: { 1, 2, 3 } not elements are { 3, 3, 4 } +# Usage of RangeEquals range matcher +ok {test-number} - needs_adl1, RangeEquals( needs_adl2 ) for: { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 } +# Usage of RangeEquals range matcher +ok {test-number} - needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } ) for: { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 } +# Usage of RangeEquals range matcher +ok {test-number} - array_a, RangeEquals( { 1, 2, 3 } ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +# Usage of RangeEquals range matcher +ok {test-number} - array_a, RangeEquals( { 2, 4, 6 }, []( int l, int r ) { return l * 2 == r; } ) for: { 1, 2, 3 } elements are { 2, 4, 6 } +# Usage of RangeEquals range matcher +ok {test-number} - mocked1, !RangeEquals( arr ) for: { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 } +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[0] for: true +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[1] for: true +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[2] for: true +# Usage of RangeEquals range matcher +ok {test-number} - !(mocked1.m_derefed[3]) for: !false +# Usage of RangeEquals range matcher +ok {test-number} - mocked1, RangeEquals( arr ) for: { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 } +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[0] for: true +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[1] for: true +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[2] for: true +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[3] for: true +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - empty_vector, UnorderedRangeEquals( empty_vector ) for: { } unordered elements are { } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - empty_vector, !UnorderedRangeEquals( non_empty_vector ) for: { } not unordered elements are { 1 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - non_empty_vector, !UnorderedRangeEquals( empty_vector ) for: { 1 } not unordered elements are { } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - non_empty_array, UnorderedRangeEquals( non_empty_array ) for: { 1 } unordered elements are { 1 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - array_a, UnorderedRangeEquals( array_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - array_a, !UnorderedRangeEquals( array_b ) for: { 1, 2, 3 } not unordered elements are { 2, 2, 3 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - vector_a, !UnorderedRangeEquals( vector_b ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - vector_a, UnorderedRangeEquals( vector_a_plus_1, close_enough ) for: { 1, 10, 20 } unordered elements are { 11, 21, 2 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - vector_a, !UnorderedRangeEquals( vector_b, close_enough ) for: { 1, 10, 21 } not unordered elements are { 11, 21, 3 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - needs_adl1, UnorderedRangeEquals( needs_adl2 ) for: { 1, 2, 3, 4, 5 } unordered elements are { 1, 2, 3, 4, 5 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - array_a, UnorderedRangeEquals( { 10, 20, 1 } ) for: { 1, 10, 20 } unordered elements are { 10, 20, 1 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - array_a, UnorderedRangeEquals( { 11, 21, 2 }, []( int l, int r ) { return std::abs( l - r ) <= 1; } ) for: { 1, 10, 20 } unordered elements are { 11, 21, 2 } +# Usage of the SizeIs range matcher +ok {test-number} - empty_vec, SizeIs(0) for: { } has size == 0 +# Usage of the SizeIs range matcher +ok {test-number} - empty_vec, !SizeIs(2) for: { } not has size == 2 +# Usage of the SizeIs range matcher +ok {test-number} - empty_vec, SizeIs(Lt(2)) for: { } size matches is less than 2 +# Usage of the SizeIs range matcher +ok {test-number} - arr, SizeIs(2) for: { 0, 0 } has size == 2 +# Usage of the SizeIs range matcher +ok {test-number} - arr, SizeIs( Lt(3)) for: { 0, 0 } size matches is less than 3 +# Usage of the SizeIs range matcher +ok {test-number} - arr, !SizeIs(!Lt(3)) for: { 0, 0 } not size matches not is less than 3 +# Usage of the SizeIs range matcher +ok {test-number} - map, SizeIs(3) for: { {?}, {?}, {?} } has size == 3 +# Usage of the SizeIs range matcher +ok {test-number} - unrelated::ADL_size{}, SizeIs(12) for: {?} has size == 12 +# Usage of the SizeIs range matcher +ok {test-number} - has_size{}, SizeIs(13) for: {?} has size == 13 +# Use a custom approx +ok {test-number} - d == approx( 1.23 ) for: 1.22999999999999998 == Approx( 1.22999999999999998 ) +# Use a custom approx +ok {test-number} - d == approx( 1.22 ) for: 1.22999999999999998 == Approx( 1.21999999999999997 ) +# Use a custom approx +ok {test-number} - d == approx( 1.24 ) for: 1.22999999999999998 == Approx( 1.23999999999999999 ) +# Use a custom approx +ok {test-number} - d != approx( 1.25 ) for: 1.22999999999999998 != Approx( 1.25 ) +# Use a custom approx +ok {test-number} - approx( d ) == 1.23 for: Approx( 1.22999999999999998 ) == 1.22999999999999998 +# Use a custom approx +ok {test-number} - approx( d ) == 1.22 for: Approx( 1.22999999999999998 ) == 1.21999999999999997 +# Use a custom approx +ok {test-number} - approx( d ) == 1.24 for: Approx( 1.22999999999999998 ) == 1.23999999999999999 +# Use a custom approx +ok {test-number} - approx( d ) != 1.25 for: Approx( 1.22999999999999998 ) != 1.25 +# Variadic macros +ok {test-number} - with 1 message: 'no assertions' +# Vector Approx matcher +ok {test-number} - empty, Approx( empty ) for: { } is approx: { } +# Vector Approx matcher +ok {test-number} - v1, Approx( v1 ) for: { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } +# Vector Approx matcher +ok {test-number} - v1, Approx( { 1., 2., 3. } ) for: { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } +# Vector Approx matcher +ok {test-number} - v1, !Approx( temp ) for: { 1.0, 2.0, 3.0 } not is approx: { 1.0, 2.0, 3.0, 4.0 } +# Vector Approx matcher +ok {test-number} - v1, !Approx( v2 ) for: { 1.0, 2.0, 3.0 } not is approx: { 1.5, 2.5, 3.5 } +# Vector Approx matcher +ok {test-number} - v1, Approx( v2 ).margin( 0.5 ) for: { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } +# Vector Approx matcher +ok {test-number} - v1, Approx( v2 ).epsilon( 0.5 ) for: { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } +# Vector Approx matcher +ok {test-number} - v1, Approx( v2 ).epsilon( 0.1 ).scale( 500 ) for: { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } +# Vector Approx matcher -- failing +not ok {test-number} - empty, Approx( t1 ) for: { } is approx: { 1.0, 2.0 } +# Vector Approx matcher -- failing +not ok {test-number} - v1, Approx( v2 ) for: { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 } +# Vector matchers +ok {test-number} - v, VectorContains( 1 ) for: { 1, 2, 3 } Contains: 1 +# Vector matchers +ok {test-number} - v, VectorContains( 2 ) for: { 1, 2, 3 } Contains: 2 +# Vector matchers +ok {test-number} - v5, ( VectorContains>( 2 ) ) for: { 1, 2, 3 } Contains: 2 +# Vector matchers +ok {test-number} - v, Contains( v2 ) for: { 1, 2, 3 } Contains: { 1, 2 } +# Vector matchers +ok {test-number} - v, Contains( { 1, 2 } ) for: { 1, 2, 3 } Contains: { 1, 2 } +# Vector matchers +ok {test-number} - v5, ( Contains, CustomAllocator>( v2 ) ) for: { 1, 2, 3 } Contains: { 1, 2 } +# Vector matchers +ok {test-number} - v, Contains( v2 ) for: { 1, 2, 3 } Contains: { 1, 2, 3 } +# Vector matchers +ok {test-number} - v, Contains( empty ) for: { 1, 2, 3 } Contains: { } +# Vector matchers +ok {test-number} - empty, Contains( empty ) for: { } Contains: { } +# Vector matchers +ok {test-number} - v5, ( Contains, CustomAllocator>( v2 ) ) for: { 1, 2, 3 } Contains: { 1, 2, 3 } +# Vector matchers +ok {test-number} - v5, Contains( v6 ) for: { 1, 2, 3 } Contains: { 1, 2 } +# Vector matchers +ok {test-number} - v, VectorContains( 1 ) && VectorContains( 2 ) for: { 1, 2, 3 } ( Contains: 1 and Contains: 2 ) +# Vector matchers +ok {test-number} - v, Equals( v ) for: { 1, 2, 3 } Equals: { 1, 2, 3 } +# Vector matchers +ok {test-number} - empty, Equals( empty ) for: { } Equals: { } +# Vector matchers +ok {test-number} - v, Equals( { 1, 2, 3 } ) for: { 1, 2, 3 } Equals: { 1, 2, 3 } +# Vector matchers +ok {test-number} - v, Equals( v2 ) for: { 1, 2, 3 } Equals: { 1, 2, 3 } +# Vector matchers +ok {test-number} - v5, ( Equals, CustomAllocator>( v2 ) ) for: { 1, 2, 3 } Equals: { 1, 2, 3 } +# Vector matchers +ok {test-number} - v5, Equals( v6 ) for: { 1, 2, 3 } Equals: { 1, 2, 3 } +# Vector matchers +ok {test-number} - v, UnorderedEquals( v ) for: { 1, 2, 3 } UnorderedEquals: { 1, 2, 3 } +# Vector matchers +ok {test-number} - v, UnorderedEquals( { 3, 2, 1 } ) for: { 1, 2, 3 } UnorderedEquals: { 3, 2, 1 } +# Vector matchers +ok {test-number} - empty, UnorderedEquals( empty ) for: { } UnorderedEquals: { } +# Vector matchers +ok {test-number} - permuted, UnorderedEquals( v ) for: { 1, 3, 2 } UnorderedEquals: { 1, 2, 3 } +# Vector matchers +ok {test-number} - permuted, UnorderedEquals( v ) for: { 2, 3, 1 } UnorderedEquals: { 1, 2, 3 } +# Vector matchers +ok {test-number} - v5, ( UnorderedEquals, CustomAllocator>( permuted ) ) for: { 1, 2, 3 } UnorderedEquals: { 2, 3, 1 } +# Vector matchers +ok {test-number} - v5_permuted, UnorderedEquals( v5 ) for: { 1, 3, 2 } UnorderedEquals: { 1, 2, 3 } +# Vector matchers that fail +not ok {test-number} - v, VectorContains( -1 ) for: { 1, 2, 3 } Contains: -1 +# Vector matchers that fail +not ok {test-number} - empty, VectorContains( 1 ) for: { } Contains: 1 +# Vector matchers that fail +not ok {test-number} - empty, Contains( v ) for: { } Contains: { 1, 2, 3 } +# Vector matchers that fail +not ok {test-number} - v, Contains( v2 ) for: { 1, 2, 3 } Contains: { 1, 2, 4 } +# Vector matchers that fail +not ok {test-number} - v, Equals( v2 ) for: { 1, 2, 3 } Equals: { 1, 2 } +# Vector matchers that fail +not ok {test-number} - v2, Equals( v ) for: { 1, 2 } Equals: { 1, 2, 3 } +# Vector matchers that fail +not ok {test-number} - empty, Equals( v ) for: { } Equals: { 1, 2, 3 } +# Vector matchers that fail +not ok {test-number} - v, Equals( empty ) for: { 1, 2, 3 } Equals: { } +# Vector matchers that fail +not ok {test-number} - v, UnorderedEquals( empty ) for: { 1, 2, 3 } UnorderedEquals: { } +# Vector matchers that fail +not ok {test-number} - empty, UnorderedEquals( v ) for: { } UnorderedEquals: { 1, 2, 3 } +# Vector matchers that fail +not ok {test-number} - permuted, UnorderedEquals( v ) for: { 1, 3 } UnorderedEquals: { 1, 2, 3 } +# Vector matchers that fail +not ok {test-number} - permuted, UnorderedEquals( v ) for: { 3, 1 } UnorderedEquals: { 1, 2, 3 } +# When checked exceptions are thrown they can be expected or unexpected +ok {test-number} - thisThrows(), std::domain_error +# When checked exceptions are thrown they can be expected or unexpected +ok {test-number} - thisDoesntThrow() +# When checked exceptions are thrown they can be expected or unexpected +ok {test-number} - thisThrows() +# When unchecked exceptions are thrown directly they are always failures +not ok {test-number} - unexpected exception with message: 'unexpected exception' +# When unchecked exceptions are thrown during a CHECK the test should continue +not ok {test-number} - unexpected exception with message: 'expected exception'; expression was: thisThrows() == 0 +# When unchecked exceptions are thrown during a REQUIRE the test should abort fail +not ok {test-number} - unexpected exception with message: 'expected exception'; expression was: thisThrows() == 0 +# When unchecked exceptions are thrown from functions they are always failures +not ok {test-number} - unexpected exception with message: 'expected exception'; expression was: thisThrows() == 0 +# When unchecked exceptions are thrown from sections they are always failures +not ok {test-number} - unexpected exception with message: 'unexpected exception' +# X/level/0/a +ok {test-number} - +# X/level/0/b +ok {test-number} - +# X/level/1/a +ok {test-number} - +# X/level/1/b +ok {test-number} - +# XmlEncode +ok {test-number} - encode( "normal string" ) == "normal string" for: "normal string" == "normal string" +# XmlEncode +ok {test-number} - encode( "" ) == "" for: "" == "" +# XmlEncode +ok {test-number} - encode( "smith & jones" ) == "smith & jones" for: "smith & jones" == "smith & jones" +# XmlEncode +ok {test-number} - encode( "smith < jones" ) == "smith < jones" for: "smith < jones" == "smith < jones" +# XmlEncode +ok {test-number} - encode( "smith > jones" ) == "smith > jones" for: "smith > jones" == "smith > jones" +# XmlEncode +ok {test-number} - encode( "smith ]]> jones" ) == "smith ]]> jones" for: "smith ]]> jones" == "smith ]]> jones" +# XmlEncode +ok {test-number} - encode( stringWithQuotes ) == stringWithQuotes for: "don't "quote" me on that" == "don't "quote" me on that" +# XmlEncode +ok {test-number} - encode( stringWithQuotes, Catch::XmlEncode::ForAttributes ) == "don't "quote" me on that" for: "don't "quote" me on that" == "don't "quote" me on that" +# XmlEncode +ok {test-number} - encode( "[\x01]" ) == "[\\x01]" for: "[\x01]" == "[\x01]" +# XmlEncode +ok {test-number} - encode( "[\x7F]" ) == "[\\x7F]" for: "[\x7F]" == "[\x7F]" +# XmlWriter writes boolean attributes as true/false +ok {test-number} - stream.str(), ContainsSubstring(R"(attr1="true")") && ContainsSubstring(R"(attr2="false")") for: " " ( contains: "attr1="true"" and contains: "attr2="false"" ) +# a succeeding test can still be skipped +ok {test-number} - +# a succeeding test can still be skipped +ok {test-number} - # SKIP +# analyse no analysis +ok {test-number} - analysis.mean.point.count() == 23 for: 23.0 == 23 +# analyse no analysis +ok {test-number} - analysis.mean.lower_bound.count() == 23 for: 23.0 == 23 +# analyse no analysis +ok {test-number} - analysis.mean.upper_bound.count() == 23 for: 23.0 == 23 +# analyse no analysis +ok {test-number} - analysis.standard_deviation.point.count() == 0 for: 0.0 == 0 +# analyse no analysis +ok {test-number} - analysis.standard_deviation.lower_bound.count() == 0 for: 0.0 == 0 +# analyse no analysis +ok {test-number} - analysis.standard_deviation.upper_bound.count() == 0 for: 0.0 == 0 +# analyse no analysis +ok {test-number} - analysis.outliers.total() == 0 for: 0 == 0 +# analyse no analysis +ok {test-number} - analysis.outliers.low_mild == 0 for: 0 == 0 +# analyse no analysis +ok {test-number} - analysis.outliers.low_severe == 0 for: 0 == 0 +# analyse no analysis +ok {test-number} - analysis.outliers.high_mild == 0 for: 0 == 0 +# analyse no analysis +ok {test-number} - analysis.outliers.high_severe == 0 for: 0 == 0 +# analyse no analysis +ok {test-number} - analysis.outliers.samples_seen == 0 for: 0 == 0 +# analyse no analysis +ok {test-number} - analysis.outlier_variance == 0 for: 0.0 == 0 +# array -> toString +ok {test-number} - Catch::Detail::stringify( empty ) == "{ }" for: "{ }" == "{ }" +# array -> toString +ok {test-number} - Catch::Detail::stringify( oneValue ) == "{ 42 }" for: "{ 42 }" == "{ 42 }" +# array -> toString +ok {test-number} - Catch::Detail::stringify( twoValues ) == "{ 42, 250 }" for: "{ 42, 250 }" == "{ 42, 250 }" +# benchmark function call +ok {test-number} - model.started == 1 for: 1 == 1 +# benchmark function call +ok {test-number} - model.finished == 0 for: 0 == 0 +# benchmark function call +ok {test-number} - model.started == 1 for: 1 == 1 +# benchmark function call +ok {test-number} - model.finished == 1 for: 1 == 1 +# benchmark function call +ok {test-number} - called == 1 for: 1 == 1 +# benchmark function call +ok {test-number} - model.started == 0 for: 0 == 0 +# benchmark function call +ok {test-number} - model.finished == 0 for: 0 == 0 +# benchmark function call +ok {test-number} - model.started == 0 for: 0 == 0 +# benchmark function call +ok {test-number} - model.finished == 0 for: 0 == 0 +# benchmark function call +ok {test-number} - called == 1 for: 1 == 1 +# boolean member +ok {test-number} - obj.prop != 0 for: 0x != 0 +# checkedElse +ok {test-number} - flag for: true +# checkedElse +ok {test-number} - testCheckedElse( true ) for: true +# checkedElse, failing +ok {test-number} - flag for: false # TODO +# checkedElse, failing +not ok {test-number} - testCheckedElse( false ) for: false +# checkedIf +ok {test-number} - flag for: true +# checkedIf +ok {test-number} - testCheckedIf( true ) for: true +# checkedIf, failing +ok {test-number} - flag for: false # TODO +# checkedIf, failing +not ok {test-number} - testCheckedIf( false ) for: false +# classify_outliers +ok {test-number} - o.samples_seen == static_cast(x.size()) for: 6 == 6 +# classify_outliers +ok {test-number} - o.low_severe == los for: 0 == 0 +# classify_outliers +ok {test-number} - o.low_mild == lom for: 0 == 0 +# classify_outliers +ok {test-number} - o.high_mild == him for: 0 == 0 +# classify_outliers +ok {test-number} - o.high_severe == his for: 0 == 0 +# classify_outliers +ok {test-number} - o.total() == los + lom + him + his for: 0 == 0 +# classify_outliers +ok {test-number} - o.samples_seen == static_cast(x.size()) for: 6 == 6 +# classify_outliers +ok {test-number} - o.low_severe == los for: 1 == 1 +# classify_outliers +ok {test-number} - o.low_mild == lom for: 0 == 0 +# classify_outliers +ok {test-number} - o.high_mild == him for: 0 == 0 +# classify_outliers +ok {test-number} - o.high_severe == his for: 0 == 0 +# classify_outliers +ok {test-number} - o.total() == los + lom + him + his for: 1 == 1 +# classify_outliers +ok {test-number} - o.samples_seen == static_cast(x.size()) for: 6 == 6 +# classify_outliers +ok {test-number} - o.low_severe == los for: 0 == 0 +# classify_outliers +ok {test-number} - o.low_mild == lom for: 1 == 1 +# classify_outliers +ok {test-number} - o.high_mild == him for: 0 == 0 +# classify_outliers +ok {test-number} - o.high_severe == his for: 0 == 0 +# classify_outliers +ok {test-number} - o.total() == los + lom + him + his for: 1 == 1 +# classify_outliers +ok {test-number} - o.samples_seen == static_cast(x.size()) for: 6 == 6 +# classify_outliers +ok {test-number} - o.low_severe == los for: 0 == 0 +# classify_outliers +ok {test-number} - o.low_mild == lom for: 0 == 0 +# classify_outliers +ok {test-number} - o.high_mild == him for: 1 == 1 +# classify_outliers +ok {test-number} - o.high_severe == his for: 0 == 0 +# classify_outliers +ok {test-number} - o.total() == los + lom + him + his for: 1 == 1 +# classify_outliers +ok {test-number} - o.samples_seen == static_cast(x.size()) for: 6 == 6 +# classify_outliers +ok {test-number} - o.low_severe == los for: 0 == 0 +# classify_outliers +ok {test-number} - o.low_mild == lom for: 0 == 0 +# classify_outliers +ok {test-number} - o.high_mild == him for: 0 == 0 +# classify_outliers +ok {test-number} - o.high_severe == his for: 1 == 1 +# classify_outliers +ok {test-number} - o.total() == los + lom + him + his for: 1 == 1 +# classify_outliers +ok {test-number} - o.samples_seen == static_cast(x.size()) for: 6 == 6 +# classify_outliers +ok {test-number} - o.low_severe == los for: 1 == 1 +# classify_outliers +ok {test-number} - o.low_mild == lom for: 0 == 0 +# classify_outliers +ok {test-number} - o.high_mild == him for: 1 == 1 +# classify_outliers +ok {test-number} - o.high_severe == his for: 0 == 0 +# classify_outliers +ok {test-number} - o.total() == los + lom + him + his for: 2 == 2 +# comparisons between const int variables +ok {test-number} - unsigned_char_var == 1 for: 1 == 1 +# comparisons between const int variables +ok {test-number} - unsigned_short_var == 1 for: 1 == 1 +# comparisons between const int variables +ok {test-number} - unsigned_int_var == 1 for: 1 == 1 +# comparisons between const int variables +ok {test-number} - unsigned_long_var == 1 for: 1 == 1 +# comparisons between int variables +ok {test-number} - long_var == unsigned_char_var for: 1 == 1 +# comparisons between int variables +ok {test-number} - long_var == unsigned_short_var for: 1 == 1 +# comparisons between int variables +ok {test-number} - long_var == unsigned_int_var for: 1 == 1 +# comparisons between int variables +ok {test-number} - long_var == unsigned_long_var for: 1 == 1 +# convertToBits +ok {test-number} - convertToBits( 0.f ) == 0 for: 0 == 0 +# convertToBits +ok {test-number} - convertToBits( -0.f ) == ( 1ULL << 31 ) for: 2147483648 (0x) == 2147483648 (0x) +# convertToBits +ok {test-number} - convertToBits( 0. ) == 0 for: 0 == 0 +# convertToBits +ok {test-number} - convertToBits( -0. ) == ( 1ULL << 63 ) for: 9223372036854775808 (0x) == 9223372036854775808 (0x) +# convertToBits +ok {test-number} - convertToBits( std::numeric_limits::denorm_min() ) == 1 for: 1 == 1 +# convertToBits +ok {test-number} - convertToBits( std::numeric_limits::denorm_min() ) == 1 for: 1 == 1 +# dynamic skipping works with generators +ok {test-number} - # SKIP 'skipping because answer = 41' +# dynamic skipping works with generators +ok {test-number} - +# dynamic skipping works with generators +ok {test-number} - # SKIP 'skipping because answer = 43' +# empty tags are not allowed +ok {test-number} - Catch::TestCaseInfo("", { "test with an empty tag", "[]" }, dummySourceLineInfo) +# erfc_inv +ok {test-number} - erfc_inv(1.103560) == Approx(-0.09203687623843015) for: -0.09203687623843014 == Approx( -0.09203687623843015 ) +# erfc_inv +ok {test-number} - erfc_inv(1.067400) == Approx(-0.05980291115763361) for: -0.05980291115763361 == Approx( -0.05980291115763361 ) +# erfc_inv +ok {test-number} - erfc_inv(0.050000) == Approx(1.38590382434967796) for: 1.38590382434967774 == Approx( 1.38590382434967796 ) +# estimate_clock_resolution +ok {test-number} - res.mean.count() == rate for: 2000.0 == 2000 (0x) +# estimate_clock_resolution +ok {test-number} - res.outliers.total() == 0 for: 0 == 0 +# even more nested SECTION tests +ok {test-number} - +# even more nested SECTION tests +ok {test-number} - +# even more nested SECTION tests +ok {test-number} - +# failed assertions before SKIP cause test case to fail +not ok {test-number} - 3 == 4 +# failed assertions before SKIP cause test case to fail +ok {test-number} - # SKIP +# failing for some generator values causes entire test case to fail +not ok {test-number} - explicitly +# failing for some generator values causes entire test case to fail +ok {test-number} - # SKIP +# failing for some generator values causes entire test case to fail +not ok {test-number} - explicitly +# failing for some generator values causes entire test case to fail +ok {test-number} - # SKIP +# failing in some unskipped sections causes entire test case to fail +ok {test-number} - # SKIP +# failing in some unskipped sections causes entire test case to fail +not ok {test-number} - explicitly +# is_unary_function +ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +# is_unary_function +ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +# is_unary_function +ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +# is_unary_function +ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +# is_unary_function +ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +# is_unary_function +ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function::value' +# is_unary_function +ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +# is_unary_function +ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +# is_unary_function +ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +# is_unary_function +ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +# is_unary_function +ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +# is_unary_function +ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function::value)' +# just failure +not ok {test-number} - explicitly with 1 message: 'Previous info should not be seen' +# just failure after unscoped info +not ok {test-number} - explicitly with 1 message: 'previous unscoped info SHOULD not be seen' +# long long +ok {test-number} - l == std::numeric_limits::max() for: 9223372036854775807 (0x) == 9223372036854775807 (0x) +# looped SECTION tests +not ok {test-number} - b > a for: 0 > 1 +# looped SECTION tests +not ok {test-number} - b > a for: 1 > 1 +# looped SECTION tests +ok {test-number} - b > a for: 2 > 1 +# looped SECTION tests +ok {test-number} - b > a for: 3 > 1 +# looped SECTION tests +ok {test-number} - b > a for: 4 > 1 +# looped SECTION tests +ok {test-number} - b > a for: 5 > 1 +# looped SECTION tests +ok {test-number} - b > a for: 6 > 1 +# looped SECTION tests +ok {test-number} - b > a for: 7 > 1 +# looped SECTION tests +ok {test-number} - b > a for: 8 > 1 +# looped SECTION tests +ok {test-number} - b > a for: 9 > 1 +# looped tests +not ok {test-number} - ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[0] (1) is even' +# looped tests +not ok {test-number} - ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[1] (1) is even' +# looped tests +ok {test-number} - ( fib[i] % 2 ) == 0 for: 0 == 0 with 1 message: 'Testing if fib[2] (2) is even' +# looped tests +not ok {test-number} - ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[3] (3) is even' +# looped tests +not ok {test-number} - ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[4] (5) is even' +# looped tests +ok {test-number} - ( fib[i] % 2 ) == 0 for: 0 == 0 with 1 message: 'Testing if fib[5] (8) is even' +# looped tests +not ok {test-number} - ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[6] (13) is even' +# looped tests +not ok {test-number} - ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[7] (21) is even' +# makeStream recognizes %debug stream name +ok {test-number} - Catch::makeStream( "%debug" ) +# make_unique reimplementation +ok {test-number} - !(lval.has_moved) for: !false +# make_unique reimplementation +ok {test-number} - rval.has_moved for: true +# make_unique reimplementation +ok {test-number} - *ptr == std::tuple{1, 2., 3} for: {?} == {?} +# mean +ok {test-number} - m == 19. for: 19.0 == 19.0 +# measure +ok {test-number} - x == 17 for: 17 == 17 +# measure +ok {test-number} - x == 23 for: 23 == 23 +# measure +ok {test-number} - r.elapsed.count() == 42 for: 42 == 42 +# measure +ok {test-number} - r.result == 23 for: 23 == 23 +# measure +ok {test-number} - r.iterations == 1 for: 1 == 1 +# measure +ok {test-number} - s.elapsed.count() == 69 for: 69 == 69 +# measure +ok {test-number} - s.result == 17 for: 17 == 17 +# measure +ok {test-number} - s.iterations == 1 for: 1 == 1 +# mix info, unscoped info and warning +warning {test-number} - 'info' with 2 messages: 'unscoped info' and 'and warn may mix' +# mix info, unscoped info and warning +warning {test-number} - 'info' with 2 messages: 'unscoped info' and 'they are not cleared after warnings' +# more nested SECTION tests +not ok {test-number} - a == b for: 1 == 2 +# more nested SECTION tests +ok {test-number} - a != b for: 1 != 2 +# more nested SECTION tests +ok {test-number} - a < b for: 1 < 2 +# nested SECTION tests +ok {test-number} - a != b for: 1 != 2 +# nested SECTION tests +ok {test-number} - b != a for: 2 != 1 +# nested SECTION tests +ok {test-number} - a != b for: 1 != 2 +# nested sections can be skipped dynamically at runtime +ok {test-number} - # SKIP +# non streamable - with conv. op +ok {test-number} - s == "7" for: "7" == "7" +# non-copyable objects +ok {test-number} - ti == typeid(int) for: {?} == {?} +# normal_quantile +ok {test-number} - normal_quantile(0.551780) == Approx(0.13015979861484198) for: 0.13015979861484195 == Approx( 0.13015979861484198 ) +# normal_quantile +ok {test-number} - normal_quantile(0.533700) == Approx(0.08457408802851875) for: 0.08457408802851875 == Approx( 0.08457408802851875 ) +# normal_quantile +ok {test-number} - normal_quantile(0.025000) == Approx(-1.95996398454005449) for: -1.95996398454005405 == Approx( -1.95996398454005449 ) +# not allowed +ok {test-number} - +# not prints unscoped info from previous failures +ok {test-number} - true with 1 message: 'this MAY be seen only for the FIRST assertion IF info is printed for passing assertions' +# not prints unscoped info from previous failures +ok {test-number} - true with 1 message: 'this MAY be seen only for the SECOND assertion IF info is printed for passing assertions' +# not prints unscoped info from previous failures +not ok {test-number} - false with 1 message: 'this SHOULD be seen' +# null strings +ok {test-number} - makeString( false ) != static_cast(0) for: "valid string" != {null string} +# null strings +ok {test-number} - makeString( true ) == static_cast(0) for: {null string} == {null string} +# null_ptr +ok {test-number} - ptr.get() == 0 for: 0 == 0 +# pair > -> toString +ok {test-number} - ::Catch::Detail::stringify( pair ) == "{ { 42, \"Arthur\" }, { \"Ford\", 24 } }" for: "{ { 42, "Arthur" }, { "Ford", 24 } }" == "{ { 42, "Arthur" }, { "Ford", 24 } }" +# parseEnums +ok {test-number} - parseEnums( "" ), Equals( std::vector{} ) for: { } Equals: { } +# parseEnums +ok {test-number} - parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector{"Value1"} ) for: { Value1 } Equals: { Value1 } +# parseEnums +ok {test-number} - parseEnums( "Value1" ), Equals( std::vector{"Value1"} ) for: { Value1 } Equals: { Value1 } +# parseEnums +ok {test-number} - parseEnums( "EnumName::Value1" ), Equals(std::vector{"Value1"} ) for: { Value1 } Equals: { Value1 } +# parseEnums +ok {test-number} - parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector{"Value1", "Value2"} ) for: { Value1, Value2 } Equals: { Value1, Value2 } +# parseEnums +ok {test-number} - parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector{"Value1", "Value2", "Value3"} ) for: { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 } +# parseEnums +ok {test-number} - parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector{"Value1", "Value2", "Value3"} ) for: { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 } +# pointer to class +ok {test-number} - p == 0 for: 0 == 0 +# print unscoped info if passing unscoped info is printed +ok {test-number} - true with 1 message: 'this MAY be seen IF info is printed for passing assertions' +# prints unscoped info on failure +not ok {test-number} - false with 2 messages: 'this SHOULD be seen' and 'this SHOULD also be seen' +# prints unscoped info only for the first assertion +not ok {test-number} - false with 1 message: 'this SHOULD be seen only ONCE' +# prints unscoped info only for the first assertion +ok {test-number} - true +# prints unscoped info only for the first assertion +ok {test-number} - true with 1 message: 'this MAY also be seen only ONCE IF info is printed for passing assertions' +# prints unscoped info only for the first assertion +ok {test-number} - true +# random SECTION tests +ok {test-number} - a != b for: 1 != 2 +# random SECTION tests +ok {test-number} - b != a for: 2 != 1 +# random SECTION tests +ok {test-number} - a != b for: 1 != 2 +# replaceInPlace +ok {test-number} - Catch::replaceInPlace(letters, "b", "z") for: true +# replaceInPlace +ok {test-number} - letters == "azcdefcg" for: "azcdefcg" == "azcdefcg" +# replaceInPlace +ok {test-number} - Catch::replaceInPlace(letters, "c", "z") for: true +# replaceInPlace +ok {test-number} - letters == "abzdefzg" for: "abzdefzg" == "abzdefzg" +# replaceInPlace +ok {test-number} - Catch::replaceInPlace(letters, "a", "z") for: true +# replaceInPlace +ok {test-number} - letters == "zbcdefcg" for: "zbcdefcg" == "zbcdefcg" +# replaceInPlace +ok {test-number} - Catch::replaceInPlace(letters, "g", "z") for: true +# replaceInPlace +ok {test-number} - letters == "abcdefcz" for: "abcdefcz" == "abcdefcz" +# replaceInPlace +ok {test-number} - Catch::replaceInPlace(letters, letters, "replaced") for: true +# replaceInPlace +ok {test-number} - letters == "replaced" for: "replaced" == "replaced" +# replaceInPlace +ok {test-number} - !(Catch::replaceInPlace(letters, "x", "z")) for: !false +# replaceInPlace +ok {test-number} - letters == letters for: "abcdefcg" == "abcdefcg" +# replaceInPlace +ok {test-number} - Catch::replaceInPlace(letters, "c", "cc") for: true +# replaceInPlace +ok {test-number} - letters == "abccdefccg" for: "abccdefccg" == "abccdefccg" +# replaceInPlace +ok {test-number} - Catch::replaceInPlace(s, "--", "-") for: true +# replaceInPlace +ok {test-number} - s == "--" for: "--" == "--" +# replaceInPlace +ok {test-number} - Catch::replaceInPlace(s, "'", "|'") for: true +# replaceInPlace +ok {test-number} - s == "didn|'t" for: "didn|'t" == "didn|'t" +# request an unknown %-starting stream fails +ok {test-number} - Catch::makeStream( "%somestream" ) +# resolution +ok {test-number} - res.size() == count for: 10 == 10 +# resolution +ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x) +# resolution +ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x) +# resolution +ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x) +# resolution +ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x) +# resolution +ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x) +# resolution +ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x) +# resolution +ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x) +# resolution +ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x) +# resolution +ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x) +# run_for_at_least, chronometer +ok {test-number} - meter.runs() >= old_runs for: 1 >= 1 +# run_for_at_least, chronometer +ok {test-number} - meter.runs() >= old_runs for: 2 >= 1 +# run_for_at_least, chronometer +ok {test-number} - meter.runs() >= old_runs for: 4 >= 2 +# run_for_at_least, chronometer +ok {test-number} - meter.runs() >= old_runs for: 8 >= 4 +# run_for_at_least, chronometer +ok {test-number} - meter.runs() >= old_runs for: 16 >= 8 +# run_for_at_least, chronometer +ok {test-number} - meter.runs() >= old_runs for: 32 >= 16 +# run_for_at_least, chronometer +ok {test-number} - meter.runs() >= old_runs for: 64 >= 32 +# run_for_at_least, chronometer +ok {test-number} - meter.runs() >= old_runs for: 128 >= 64 +# run_for_at_least, chronometer +ok {test-number} - Timing.elapsed >= time for: 128 ns >= 100 ns +# run_for_at_least, chronometer +ok {test-number} - Timing.result == Timing.iterations + 17 for: 145 == 145 +# run_for_at_least, chronometer +ok {test-number} - Timing.iterations >= time.count() for: 128 >= 100 +# run_for_at_least, int +ok {test-number} - x >= old_x for: 1 >= 1 +# run_for_at_least, int +ok {test-number} - x >= old_x for: 2 >= 1 +# run_for_at_least, int +ok {test-number} - x >= old_x for: 4 >= 2 +# run_for_at_least, int +ok {test-number} - x >= old_x for: 8 >= 4 +# run_for_at_least, int +ok {test-number} - x >= old_x for: 16 >= 8 +# run_for_at_least, int +ok {test-number} - x >= old_x for: 32 >= 16 +# run_for_at_least, int +ok {test-number} - x >= old_x for: 64 >= 32 +# run_for_at_least, int +ok {test-number} - x >= old_x for: 128 >= 64 +# run_for_at_least, int +ok {test-number} - Timing.elapsed >= time for: 128 ns >= 100 ns +# run_for_at_least, int +ok {test-number} - Timing.result == Timing.iterations + 17 for: 145 == 145 +# run_for_at_least, int +ok {test-number} - Timing.iterations >= time.count() for: 128 >= 100 +# sections can be skipped dynamically at runtime +ok {test-number} - +# sections can be skipped dynamically at runtime +ok {test-number} - # SKIP +# sections can be skipped dynamically at runtime +ok {test-number} - +# send a single char to INFO +not ok {test-number} - false with 1 message: '3' +# sends information to INFO +not ok {test-number} - false with 2 messages: 'hi' and 'i := 7' +# shortened hide tags are split apart +ok {test-number} - testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "."_catch_sr ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} ) +# skipped tests can optionally provide a reason +ok {test-number} - # SKIP 'skipping because answer = 43' +# splitString +ok {test-number} - splitStringRef("", ','), Equals(std::vector()) for: { } Equals: { } +# splitString +ok {test-number} - splitStringRef("abc", ','), Equals(std::vector{"abc"}) for: { abc } Equals: { abc } +# splitString +ok {test-number} - splitStringRef("abc,def", ','), Equals(std::vector{"abc", "def"}) for: { abc, def } Equals: { abc, def } +# stacks unscoped info in loops +not ok {test-number} - false with 4 messages: 'Count 1 to 3...' and '1' and '2' and '3' +# stacks unscoped info in loops +not ok {test-number} - false with 4 messages: 'Count 4 to 6...' and '4' and '5' and '6' +# startsWith +ok {test-number} - !(startsWith("", 'c')) for: !false +# startsWith +ok {test-number} - startsWith(std::string("abc"), 'a') for: true +# startsWith +ok {test-number} - startsWith("def"_catch_sr, 'd') for: true +# std::map is convertible string +ok {test-number} - Catch::Detail::stringify( emptyMap ) == "{ }" for: "{ }" == "{ }" +# std::map is convertible string +ok {test-number} - Catch::Detail::stringify( map ) == "{ { \"one\", 1 } }" for: "{ { "one", 1 } }" == "{ { "one", 1 } }" +# std::map is convertible string +ok {test-number} - Catch::Detail::stringify( map ) == "{ { \"abc\", 1 }, { \"def\", 2 }, { \"ghi\", 3 } }" for: "{ { "abc", 1 }, { "def", 2 }, { "ghi", 3 } }" == "{ { "abc", 1 }, { "def", 2 }, { "ghi", 3 } }" +# std::pair -> toString +ok {test-number} - ::Catch::Detail::stringify(value) == "{ 34, \"xyzzy\" }" for: "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" +# std::pair -> toString +ok {test-number} - ::Catch::Detail::stringify( value ) == "{ 34, \"xyzzy\" }" for: "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" +# std::set is convertible string +ok {test-number} - Catch::Detail::stringify( emptySet ) == "{ }" for: "{ }" == "{ }" +# std::set is convertible string +ok {test-number} - Catch::Detail::stringify( set ) == "{ \"one\" }" for: "{ "one" }" == "{ "one" }" +# std::set is convertible string +ok {test-number} - Catch::Detail::stringify( set ) == "{ \"abc\", \"def\", \"ghi\" }" for: "{ "abc", "def", "ghi" }" == "{ "abc", "def", "ghi" }" +# std::vector > -> toString +ok {test-number} - ::Catch::Detail::stringify( pr ) == "{ { \"green\", 55 } }" for: "{ { "green", 55 } }" == "{ { "green", 55 } }" +# stdout and stderr streams have %-starting name +ok {test-number} - Catch::makeStream( "%stderr" )->isConsole() for: true +# stdout and stderr streams have %-starting name +ok {test-number} - Catch::makeStream( "%stdout" )->isConsole() for: true +# stringify ranges +ok {test-number} - ::Catch::Detail::stringify(streamable_range{}) == "op<<(streamable_range)" for: "op<<(streamable_range)" == "op<<(streamable_range)" +# stringify ranges +ok {test-number} - ::Catch::Detail::stringify(stringmaker_range{}) == "stringmaker(streamable_range)" for: "stringmaker(streamable_range)" == "stringmaker(streamable_range)" +# stringify ranges +ok {test-number} - ::Catch::Detail::stringify(just_range{}) == "{ 1, 2, 3, 4 }" for: "{ 1, 2, 3, 4 }" == "{ 1, 2, 3, 4 }" +# stringify ranges +ok {test-number} - ::Catch::Detail::stringify(disabled_range{}) == "{?}" for: "{?}" == "{?}" +# stringify( has_maker ) +ok {test-number} - ::Catch::Detail::stringify( item ) == "StringMaker" for: "StringMaker" == "StringMaker" +# stringify( has_maker_and_operator ) +ok {test-number} - ::Catch::Detail::stringify( item ) == "StringMaker" for: "StringMaker" == "StringMaker" +# stringify( has_neither ) +ok {test-number} - ::Catch::Detail::stringify(item) == "{?}" for: "{?}" == "{?}" +# stringify( has_operator ) +ok {test-number} - ::Catch::Detail::stringify( item ) == "operator<<( has_operator )" for: "operator<<( has_operator )" == "operator<<( has_operator )" +# stringify( has_template_operator ) +ok {test-number} - ::Catch::Detail::stringify( item ) == "operator<<( has_template_operator )" for: "operator<<( has_template_operator )" == "operator<<( has_template_operator )" +# stringify( vectors ) +ok {test-number} - ::Catch::Detail::stringify( v ) == "{ StringMaker }" for: "{ StringMaker }" == "{ StringMaker }" +# stringify( vectors ) +ok {test-number} - ::Catch::Detail::stringify( v ) == "{ StringMaker }" for: "{ StringMaker }" == "{ StringMaker }" +# stringify( vectors ) +ok {test-number} - ::Catch::Detail::stringify( v ) == "{ operator<<( has_operator ) }" for: "{ operator<<( has_operator ) }" == "{ operator<<( has_operator ) }" +# strlen3 +ok {test-number} - data.str.size() == data.len for: 3 == 3 +# strlen3 +ok {test-number} - data.str.size() == data.len for: 3 == 3 +# strlen3 +ok {test-number} - data.str.size() == data.len for: 5 == 5 +# strlen3 +ok {test-number} - data.str.size() == data.len for: 4 == 4 +# tables +ok {test-number} - strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) for: 5 == 5 +# tables +ok {test-number} - strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) for: 6 == 6 +# tables +ok {test-number} - strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) for: 5 == 5 +# tables +ok {test-number} - strlen(std::get<0>(data)) == static_cast(std::get<1>(data)) for: 6 == 6 +# tags with dots in later positions are not parsed as hidden +ok {test-number} - testcase.tags.size() == 1 for: 1 == 1 +# tags with dots in later positions are not parsed as hidden +ok {test-number} - testcase.tags[0].original == "magic.tag"_catch_sr for: magic.tag == magic.tag +# tests can be skipped dynamically at runtime +ok {test-number} - # SKIP +# thrown std::strings are translated +not ok {test-number} - unexpected exception with message: 'Why would you throw a std::string?' +# toString on const wchar_t const pointer returns the string contents +ok {test-number} - result == "\"wide load\"" for: ""wide load"" == ""wide load"" +# toString on const wchar_t pointer returns the string contents +ok {test-number} - result == "\"wide load\"" for: ""wide load"" == ""wide load"" +# toString on wchar_t const pointer returns the string contents +ok {test-number} - result == "\"wide load\"" for: ""wide load"" == ""wide load"" +# toString on wchar_t returns the string contents +ok {test-number} - result == "\"wide load\"" for: ""wide load"" == ""wide load"" +# toString(enum class w/operator<<) +ok {test-number} - ::Catch::Detail::stringify(e0) == "E2/V0" for: "E2/V0" == "E2/V0" +# toString(enum class w/operator<<) +ok {test-number} - ::Catch::Detail::stringify(e1) == "E2/V1" for: "E2/V1" == "E2/V1" +# toString(enum class w/operator<<) +ok {test-number} - ::Catch::Detail::stringify(e3) == "Unknown enum value 10" for: "Unknown enum value 10" == "Unknown enum value 10" +# toString(enum class) +ok {test-number} - ::Catch::Detail::stringify(e0) == "0" for: "0" == "0" +# toString(enum class) +ok {test-number} - ::Catch::Detail::stringify(e1) == "1" for: "1" == "1" +# toString(enum w/operator<<) +ok {test-number} - ::Catch::Detail::stringify(e0) == "E2{0}" for: "E2{0}" == "E2{0}" +# toString(enum w/operator<<) +ok {test-number} - ::Catch::Detail::stringify(e1) == "E2{1}" for: "E2{1}" == "E2{1}" +# toString(enum) +ok {test-number} - ::Catch::Detail::stringify(e0) == "0" for: "0" == "0" +# toString(enum) +ok {test-number} - ::Catch::Detail::stringify(e1) == "1" for: "1" == "1" +# tuple<> +ok {test-number} - "{ }" == ::Catch::Detail::stringify(type{}) for: "{ }" == "{ }" +# tuple<> +ok {test-number} - "{ }" == ::Catch::Detail::stringify(value) for: "{ }" == "{ }" +# tuple +ok {test-number} - "1.5f" == ::Catch::Detail::stringify(float(1.5)) for: "1.5f" == "1.5f" +# tuple +ok {test-number} - "{ 1.5f, 0 }" == ::Catch::Detail::stringify(type{1.5f,0}) for: "{ 1.5f, 0 }" == "{ 1.5f, 0 }" +# tuple +ok {test-number} - "{ 0 }" == ::Catch::Detail::stringify(type{0}) for: "{ 0 }" == "{ 0 }" +# tuple +ok {test-number} - "{ \"hello\", \"world\" }" == ::Catch::Detail::stringify(type{"hello","world"}) for: "{ "hello", "world" }" == "{ "hello", "world" }" +# tuple,tuple<>,float> +ok {test-number} - "{ { 42 }, { }, 1.5f }" == ::Catch::Detail::stringify(value) for: "{ { 42 }, { }, 1.5f }" == "{ { 42 }, { }, 1.5f }" +# uniform samples +ok {test-number} - e.point == 23 for: 23.0 == 23 +# uniform samples +ok {test-number} - e.upper_bound == 23 for: 23.0 == 23 +# uniform samples +ok {test-number} - e.lower_bound == 23 for: 23.0 == 23 +# uniform samples +ok {test-number} - e.confidence_interval == 0.95 for: 0.94999999999999996 == 0.94999999999999996 +# uniform_integer_distribution can return the bounds +ok {test-number} - dist.a() == -10 for: -10 == -10 +# uniform_integer_distribution can return the bounds +ok {test-number} - dist.b() == 10 for: 10 == 10 +# unique_ptr reimplementation: basic functionality +ok {test-number} - !(ptr) for: !{?} +# unique_ptr reimplementation: basic functionality +ok {test-number} - ptr.get() == 0 for: 0 == 0 +# unique_ptr reimplementation: basic functionality +ok {test-number} - ptr for: {?} +# unique_ptr reimplementation: basic functionality +ok {test-number} - *ptr == 0 for: 0 == 0 +# unique_ptr reimplementation: basic functionality +ok {test-number} - ptr.get() == naked_ptr for: 0x == 0x +# unique_ptr reimplementation: basic functionality +ok {test-number} - !(ptr) for: !{?} +# unique_ptr reimplementation: basic functionality +ok {test-number} - ptr.get() == 0 for: 0 == 0 +# unique_ptr reimplementation: basic functionality +ok {test-number} - ptr for: {?} +# unique_ptr reimplementation: basic functionality +ok {test-number} - *ptr == 0 for: 0 == 0 +# unique_ptr reimplementation: basic functionality +ok {test-number} - ptr.get() == naked_ptr for: 0x == 0x +# unique_ptr reimplementation: basic functionality +ok {test-number} - ptr for: {?} +# unique_ptr reimplementation: basic functionality +ok {test-number} - ptr.get() != 0 for: 0x != 0 +# unique_ptr reimplementation: basic functionality +ok {test-number} - *ptr == 2 for: 2 == 2 +# unique_ptr reimplementation: basic functionality +ok {test-number} - !(ptr) for: !{?} +# unique_ptr reimplementation: basic functionality +ok {test-number} - ptr.get() == 0 for: 0 == 0 +# unique_ptr reimplementation: basic functionality +ok {test-number} - !(ptr1) for: !{?} +# unique_ptr reimplementation: basic functionality +ok {test-number} - ptr2 for: {?} +# unique_ptr reimplementation: basic functionality +ok {test-number} - *ptr2 == 1 for: 1 == 1 +# unique_ptr reimplementation: basic functionality +ok {test-number} - !(ptr2) for: !{?} +# unique_ptr reimplementation: basic functionality +ok {test-number} - ptr1 for: {?} +# unique_ptr reimplementation: basic functionality +ok {test-number} - *ptr1 == 2 for: 2 == 2 +# unique_ptr reimplementation: basic functionality +ok {test-number} - *ptr1 == 2 for: 2 == 2 +# unique_ptr reimplementation: basic functionality +ok {test-number} - *ptr2 == 1 for: 1 == 1 +# vec> -> toString +ok {test-number} - ::Catch::Detail::stringify(v) == "{ }" for: "{ }" == "{ }" +# vec> -> toString +ok {test-number} - ::Catch::Detail::stringify(v) == "{ { \"hello\" }, { \"world\" } }" for: "{ { "hello" }, { "world" } }" == "{ { "hello" }, { "world" } }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(bools) == "{ }" for: "{ }" == "{ }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(bools) == "{ true }" for: "{ true }" == "{ true }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(bools) == "{ true, false }" for: "{ true, false }" == "{ true, false }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(vv) == "{ }" for: "{ }" == "{ }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(vv) == "{ 42 }" for: "{ 42 }" == "{ 42 }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(vv) == "{ 42, 250 }" for: "{ 42, 250 }" == "{ 42, 250 }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(vv) == "{ }" for: "{ }" == "{ }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(vv) == "{ 42 }" for: "{ 42 }" == "{ 42 }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(vv) == "{ 42, 250 }" for: "{ 42, 250 }" == "{ 42, 250 }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(vv) == "{ }" for: "{ }" == "{ }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(vv) == "{ \"hello\" }" for: "{ "hello" }" == "{ "hello" }" +# vector -> toString +ok {test-number} - ::Catch::Detail::stringify(vv) == "{ \"hello\", \"world\" }" for: "{ "hello", "world" }" == "{ "hello", "world" }" +# vectors can be sized and resized +ok {test-number} - v.size() == 5 for: 5 == 5 +# vectors can be sized and resized +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# vectors can be sized and resized +ok {test-number} - v.size() == 10 for: 10 == 10 +# vectors can be sized and resized +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# vectors can be sized and resized +ok {test-number} - v.size() == 5 for: 5 == 5 +# vectors can be sized and resized +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# vectors can be sized and resized +ok {test-number} - v.size() == 0 for: 0 == 0 +# vectors can be sized and resized +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# vectors can be sized and resized +ok {test-number} - v.capacity() == 0 for: 0 == 0 +# vectors can be sized and resized +ok {test-number} - v.size() == 5 for: 5 == 5 +# vectors can be sized and resized +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# vectors can be sized and resized +ok {test-number} - v.size() == 5 for: 5 == 5 +# vectors can be sized and resized +ok {test-number} - v.capacity() >= 10 for: 10 >= 10 +# vectors can be sized and resized +ok {test-number} - v.size() == 5 for: 5 == 5 +# vectors can be sized and resized +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# vectors can be sized and resized +ok {test-number} - v.size() == 5 for: 5 == 5 +# vectors can be sized and resized +ok {test-number} - v.capacity() >= 5 for: 5 >= 5 +# warmup +ok {test-number} - (iterations * rate) > Catch::Benchmark::Detail::warmup_time.count() for: 160000000 (0x) > 100 +# warmup +ok {test-number} - (end - start) > Catch::Benchmark::Detail::warmup_time for: 310016000 ns > 100 ms +# weighted_average_quantile +ok {test-number} - q1 == 14.5 for: 14.5 == 14.5 +# weighted_average_quantile +ok {test-number} - med == 18. for: 18.0 == 18.0 +# weighted_average_quantile +ok {test-number} - q3 == 23. for: 23.0 == 23.0 +# xmlentitycheck +ok {test-number} - +# xmlentitycheck +ok {test-number} - +1..2281 + diff --git a/tests/SelfTest/Baselines/teamcity.sw.approved.txt b/tests/SelfTest/Baselines/teamcity.sw.approved.txt new file mode 100644 index 0000000..db48552 --- /dev/null +++ b/tests/SelfTest/Baselines/teamcity.sw.approved.txt @@ -0,0 +1,1024 @@ +##teamcity[testSuiteStarted name=''] +##teamcity[testStarted name='# A test name that starts with a #'] +##teamcity[testFinished name='# A test name that starts with a #' duration="{duration}"] +##teamcity[testStarted name='#1027: Bitfields can be captured'] +##teamcity[testFinished name='#1027: Bitfields can be captured' duration="{duration}"] +##teamcity[testStarted name='#1147'] +##teamcity[testFinished name='#1147' duration="{duration}"] +##teamcity[testStarted name='#1175 - Hidden Test'] +##teamcity[testFinished name='#1175 - Hidden Test' duration="{duration}"] +##teamcity[testStarted name='#1238'] +##teamcity[testFinished name='#1238' duration="{duration}"] +##teamcity[testStarted name='#1245'] +##teamcity[testFinished name='#1245' duration="{duration}"] +##teamcity[testStarted name='#1319: Sections can have description (even if it is not saved'] +##teamcity[testFinished name='#1319: Sections can have description (even if it is not saved' duration="{duration}"] +##teamcity[testStarted name='#1403'] +##teamcity[testFinished name='#1403' duration="{duration}"] +##teamcity[testStarted name='#1455 - INFO and WARN can start with a linebreak'] +##teamcity[testFinished name='#1455 - INFO and WARN can start with a linebreak' duration="{duration}"] +##teamcity[testStarted name='#1514: stderr/stdout is not captured in tests aborted by an exception'] +##teamcity[testFailed name='#1514: stderr/stdout is not captured in tests aborted by an exception' message='Tricky.tests.cpp:|n...............................................................................|n|nTricky.tests.cpp:|nexplicit failure with message:|n "1514"'] +##teamcity[testStdOut name='#1514: stderr/stdout is not captured in tests aborted by an exception' out='This would not be caught previously|n'] +##teamcity[testStdErr name='#1514: stderr/stdout is not captured in tests aborted by an exception' out='Nor would this|n'] +##teamcity[testFinished name='#1514: stderr/stdout is not captured in tests aborted by an exception' duration="{duration}"] +##teamcity[testStarted name='#1548'] +##teamcity[testFinished name='#1548' duration="{duration}"] +##teamcity[testStarted name='#1905 -- test spec parser properly clears internal state between compound tests'] +##teamcity[testFinished name='#1905 -- test spec parser properly clears internal state between compound tests' duration="{duration}"] +##teamcity[testStarted name='#1912 -- test spec parser handles escaping'] +##teamcity[testFinished name='#1912 -- test spec parser handles escaping' duration="{duration}"] +##teamcity[testStarted name='#1913 - GENERATE inside a for loop should not keep recreating the generator'] +##teamcity[testFinished name='#1913 - GENERATE inside a for loop should not keep recreating the generator' duration="{duration}"] +##teamcity[testStarted name='#1913 - GENERATEs can share a line'] +##teamcity[testFinished name='#1913 - GENERATEs can share a line' duration="{duration}"] +##teamcity[testStarted name='#1938 - GENERATE after a section'] +##teamcity[testFinished name='#1938 - GENERATE after a section' duration="{duration}"] +##teamcity[testStarted name='#1938 - Section followed by flat generate'] +##teamcity[testFinished name='#1938 - Section followed by flat generate' duration="{duration}"] +##teamcity[testStarted name='#1938 - flat generate'] +##teamcity[testFinished name='#1938 - flat generate' duration="{duration}"] +##teamcity[testStarted name='#1938 - mixed sections and generates'] +##teamcity[testFinished name='#1938 - mixed sections and generates' duration="{duration}"] +##teamcity[testStarted name='#1938 - nested generate'] +##teamcity[testFinished name='#1938 - nested generate' duration="{duration}"] +##teamcity[testStarted name='#1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0'] +##teamcity[testFinished name='#1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0' duration="{duration}"] +##teamcity[testStarted name='#1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0'] +##teamcity[testFinished name='#1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0' duration="{duration}"] +##teamcity[testStarted name='#1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0'] +##teamcity[testFinished name='#1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0' duration="{duration}"] +##teamcity[testStarted name='#2152 - ULP checks between differently signed values were wrong - double'] +##teamcity[testFinished name='#2152 - ULP checks between differently signed values were wrong - double' duration="{duration}"] +##teamcity[testStarted name='#2152 - ULP checks between differently signed values were wrong - float'] +##teamcity[testFinished name='#2152 - ULP checks between differently signed values were wrong - float' duration="{duration}"] +##teamcity[testStarted name='#2615 - Throwing in constructor generator fails test case but does not abort'] +##teamcity[testIgnored name='#2615 - Throwing in constructor generator fails test case but does not abort' message='Generators.tests.cpp:|n...............................................................................|n|nGenerators.tests.cpp:|nunexpected exception with message:|n "failure to init"- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='#2615 - Throwing in constructor generator fails test case but does not abort' duration="{duration}"] +##teamcity[testStarted name='#748 - captures with unexpected exceptions'] +##teamcity[testIgnored name='#748 - captures with unexpected exceptions' message='-------------------------------------------------------------------------------|noutside assertions|n-------------------------------------------------------------------------------|nException.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with messages:|n "answer := 42"|n "expected exception"- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='#748 - captures with unexpected exceptions' message='-------------------------------------------------------------------------------|ninside REQUIRE_NOTHROW|n-------------------------------------------------------------------------------|nException.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with messages:|n "answer := 42"|n "expected exception"|n REQUIRE_NOTHROW( thisThrows() )|nwith expansion:|n thisThrows()|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='#748 - captures with unexpected exceptions' duration="{duration}"] +##teamcity[testStarted name='#809'] +##teamcity[testFinished name='#809' duration="{duration}"] +##teamcity[testStarted name='#833'] +##teamcity[testFinished name='#833' duration="{duration}"] +##teamcity[testStarted name='#835 -- errno should not be touched by Catch2'] +##teamcity[testIgnored name='#835 -- errno should not be touched by Catch2' message='Misc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexpression failed|n CHECK( f() == 0 )|nwith expansion:|n 1 == 0|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='#835 -- errno should not be touched by Catch2' duration="{duration}"] +##teamcity[testStarted name='#872'] +##teamcity[testFinished name='#872' duration="{duration}"] +##teamcity[testStarted name='#961 -- Dynamically created sections should all be reported'] +##teamcity[testFinished name='#961 -- Dynamically created sections should all be reported' duration="{duration}"] +##teamcity[testStarted name='|'Not|' checks that should fail'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:|n...............................................................................|n|nCondition.tests.cpp:|nexpression failed|n CHECK( false != false )|nwith expansion:|n false != false|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( true != true )|nwith expansion:|n true != true|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( !true )|nwith expansion:|n false|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK_FALSE( true )|nwith expansion:|n !true|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( !trueValue )|nwith expansion:|n false|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK_FALSE( trueValue )|nwith expansion:|n !true|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( !(1 == 1) )|nwith expansion:|n false|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK_FALSE( 1 == 1 )|nwith expansion:|n !(1 == 1)|n'] +##teamcity[testFinished name='|'Not|' checks that should fail' duration="{duration}"] +##teamcity[testStarted name='|'Not|' checks that should succeed'] +##teamcity[testFinished name='|'Not|' checks that should succeed' duration="{duration}"] +##teamcity[testStarted name='(unimplemented) static bools can be evaluated'] +##teamcity[testFinished name='(unimplemented) static bools can be evaluated' duration="{duration}"] +##teamcity[testStarted name='3x3x3 ints'] +##teamcity[testFinished name='3x3x3 ints' duration="{duration}"] +##teamcity[testStarted name='A METHOD_AS_TEST_CASE based test run that fails'] +##teamcity[testFailed name='A METHOD_AS_TEST_CASE based test run that fails' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( s == "world" )|nwith expansion:|n "hello" == "world"|n'] +##teamcity[testFinished name='A METHOD_AS_TEST_CASE based test run that fails' duration="{duration}"] +##teamcity[testStarted name='A METHOD_AS_TEST_CASE based test run that succeeds'] +##teamcity[testFinished name='A METHOD_AS_TEST_CASE based test run that succeeds' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Template_Fixture_2::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Template_Fixture_2::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Template_Fixture_2::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Template_Fixture_2::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Template_Fixture_2{}.m_a.size() < 2 )|nwith expansion:|n 6 < 2|n'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Template_Fixture_2{}.m_a.size() < 2 )|nwith expansion:|n 2 < 2|n'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Template_Fixture_2{}.m_a.size() < 2 )|nwith expansion:|n 6 < 2|n'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Template_Fixture_2{}.m_a.size() < 2 )|nwith expansion:|n 2 < 2|n'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - double'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - double' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Template_Fixture::m_a == 2 )|nwith expansion:|n 1.0 == 2|n'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - double' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - float'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - float' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Template_Fixture::m_a == 2 )|nwith expansion:|n 1.0f == 2|n'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - float' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - int'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - int' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Template_Fixture::m_a == 2 )|nwith expansion:|n 1 == 2|n'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - int' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - double'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - double' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - float'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - float' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - int'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - int' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Nttp_Fixture::value == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Nttp_Fixture::value == 0 )|nwith expansion:|n 3 == 0|n'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Nttp_Fixture::value == 0 )|nwith expansion:|n 6 == 0|n'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 3'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 3' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 6'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 6' duration="{duration}"] +##teamcity[testStarted name='A TEST_CASE_METHOD based test run that fails'] +##teamcity[testFailed name='A TEST_CASE_METHOD based test run that fails' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( m_a == 2 )|nwith expansion:|n 1 == 2|n'] +##teamcity[testFinished name='A TEST_CASE_METHOD based test run that fails' duration="{duration}"] +##teamcity[testStarted name='A TEST_CASE_METHOD based test run that succeeds'] +##teamcity[testFinished name='A TEST_CASE_METHOD based test run that succeeds' duration="{duration}"] +##teamcity[testStarted name='A TEST_CASE_PERSISTENT_FIXTURE based test run that fails'] +##teamcity[testFailed name='A TEST_CASE_PERSISTENT_FIXTURE based test run that fails' message='-------------------------------------------------------------------------------|nSecond partial run|n-------------------------------------------------------------------------------|nClass.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( m_a == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFinished name='A TEST_CASE_PERSISTENT_FIXTURE based test run that fails' duration="{duration}"] +##teamcity[testStarted name='A TEST_CASE_PERSISTENT_FIXTURE based test run that succeeds'] +##teamcity[testFinished name='A TEST_CASE_PERSISTENT_FIXTURE based test run that succeeds' duration="{duration}"] +##teamcity[testStarted name='A Template product test case - Foo'] +##teamcity[testFinished name='A Template product test case - Foo' duration="{duration}"] +##teamcity[testStarted name='A Template product test case - Foo'] +##teamcity[testFinished name='A Template product test case - Foo' duration="{duration}"] +##teamcity[testStarted name='A Template product test case - std::vector'] +##teamcity[testFinished name='A Template product test case - std::vector' duration="{duration}"] +##teamcity[testStarted name='A Template product test case - std::vector'] +##teamcity[testFinished name='A Template product test case - std::vector' duration="{duration}"] +##teamcity[testStarted name='A Template product test case with array signature - Bar'] +##teamcity[testFinished name='A Template product test case with array signature - Bar' duration="{duration}"] +##teamcity[testStarted name='A Template product test case with array signature - Bar'] +##teamcity[testFinished name='A Template product test case with array signature - Bar' duration="{duration}"] +##teamcity[testStarted name='A Template product test case with array signature - std::array'] +##teamcity[testFinished name='A Template product test case with array signature - std::array' duration="{duration}"] +##teamcity[testStarted name='A Template product test case with array signature - std::array'] +##teamcity[testFinished name='A Template product test case with array signature - std::array' duration="{duration}"] +##teamcity[testStarted name='A comparison that uses literals instead of the normal constructor'] +##teamcity[testFinished name='A comparison that uses literals instead of the normal constructor' duration="{duration}"] +##teamcity[testStarted name='A couple of nested sections followed by a failure'] +##teamcity[testFailed name='A couple of nested sections followed by a failure' message='Misc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexplicit failure with message:|n "to infinity and beyond"'] +##teamcity[testFinished name='A couple of nested sections followed by a failure' duration="{duration}"] +##teamcity[testStarted name='A failing expression with a non streamable type is still captured'] +##teamcity[testFailed name='A failing expression with a non streamable type is still captured' message='Tricky.tests.cpp:|n...............................................................................|n|nTricky.tests.cpp:|nexpression failed|n CHECK( &o1 == &o2 )|nwith expansion:|n 0x == 0x|n'] +##teamcity[testFailed name='A failing expression with a non streamable type is still captured' message='Tricky.tests.cpp:|nexpression failed|n CHECK( o1 == o2 )|nwith expansion:|n {?} == {?}|n'] +##teamcity[testFinished name='A failing expression with a non streamable type is still captured' duration="{duration}"] +##teamcity[testStarted name='Absolute margin'] +##teamcity[testFinished name='Absolute margin' duration="{duration}"] +##teamcity[testStarted name='An empty test with no assertions'] +##teamcity[testFinished name='An empty test with no assertions' duration="{duration}"] +##teamcity[testStarted name='An expression with side-effects should only be evaluated once'] +##teamcity[testFinished name='An expression with side-effects should only be evaluated once' duration="{duration}"] +##teamcity[testStarted name='An unchecked exception reports the line of the last assertion'] +##teamcity[testFailed name='An unchecked exception reports the line of the last assertion' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "unexpected exception"|n {Unknown expression after the reported line}|nwith expansion:|n {Unknown expression after the reported line}|n'] +##teamcity[testFinished name='An unchecked exception reports the line of the last assertion' duration="{duration}"] +##teamcity[testStarted name='Anonymous test case 1'] +##teamcity[testFinished name='Anonymous test case 1' duration="{duration}"] +##teamcity[testStarted name='Approx setters validate their arguments'] +##teamcity[testFinished name='Approx setters validate their arguments' duration="{duration}"] +##teamcity[testStarted name='Approx with exactly-representable margin'] +##teamcity[testFinished name='Approx with exactly-representable margin' duration="{duration}"] +##teamcity[testStarted name='Approximate PI'] +##teamcity[testFinished name='Approximate PI' duration="{duration}"] +##teamcity[testStarted name='Approximate comparisons with different epsilons'] +##teamcity[testFinished name='Approximate comparisons with different epsilons' duration="{duration}"] +##teamcity[testStarted name='Approximate comparisons with floats'] +##teamcity[testFinished name='Approximate comparisons with floats' duration="{duration}"] +##teamcity[testStarted name='Approximate comparisons with ints'] +##teamcity[testFinished name='Approximate comparisons with ints' duration="{duration}"] +##teamcity[testStarted name='Approximate comparisons with mixed numeric types'] +##teamcity[testFinished name='Approximate comparisons with mixed numeric types' duration="{duration}"] +##teamcity[testStarted name='Arbitrary predicate matcher'] +##teamcity[testFinished name='Arbitrary predicate matcher' duration="{duration}"] +##teamcity[testStarted name='Assertion macros support bit operators and bool conversions'] +##teamcity[testFinished name='Assertion macros support bit operators and bool conversions' duration="{duration}"] +##teamcity[testStarted name='Assertions then sections'] +##teamcity[testFinished name='Assertions then sections' duration="{duration}"] +##teamcity[testStarted name='Basic use of the Contains range matcher'] +##teamcity[testFinished name='Basic use of the Contains range matcher' duration="{duration}"] +##teamcity[testStarted name='Basic use of the Empty range matcher'] +##teamcity[testFinished name='Basic use of the Empty range matcher' duration="{duration}"] +##teamcity[testStarted name='CAPTURE can deal with complex expressions'] +##teamcity[testFinished name='CAPTURE can deal with complex expressions' duration="{duration}"] +##teamcity[testStarted name='CAPTURE can deal with complex expressions involving commas'] +##teamcity[testFinished name='CAPTURE can deal with complex expressions involving commas' duration="{duration}"] +##teamcity[testStarted name='CAPTURE parses string and character constants'] +##teamcity[testFinished name='CAPTURE parses string and character constants' duration="{duration}"] +##teamcity[testStarted name='Capture and info messages'] +##teamcity[testFinished name='Capture and info messages' duration="{duration}"] +##teamcity[testStarted name='CaseInsensitiveEqualsTo is case insensitive'] +##teamcity[testFinished name='CaseInsensitiveEqualsTo is case insensitive' duration="{duration}"] +##teamcity[testStarted name='CaseInsensitiveLess is case insensitive'] +##teamcity[testFinished name='CaseInsensitiveLess is case insensitive' duration="{duration}"] +##teamcity[testStarted name='Character pretty printing'] +##teamcity[testFinished name='Character pretty printing' duration="{duration}"] +##teamcity[testStarted name='Clara::Arg does not crash on incomplete input'] +##teamcity[testFinished name='Clara::Arg does not crash on incomplete input' duration="{duration}"] +##teamcity[testStarted name='Clara::Arg supports single-arg parse the way Opt does'] +##teamcity[testFinished name='Clara::Arg supports single-arg parse the way Opt does' duration="{duration}"] +##teamcity[testStarted name='Clara::Opt supports accept-many lambdas'] +##teamcity[testFinished name='Clara::Opt supports accept-many lambdas' duration="{duration}"] +##teamcity[testStarted name='ColourGuard behaviour'] +##teamcity[testFinished name='ColourGuard behaviour' duration="{duration}"] +##teamcity[testStarted name='Combining MatchAllOfGeneric does not nest'] +##teamcity[testFinished name='Combining MatchAllOfGeneric does not nest' duration="{duration}"] +##teamcity[testStarted name='Combining MatchAnyOfGeneric does not nest'] +##teamcity[testFinished name='Combining MatchAnyOfGeneric does not nest' duration="{duration}"] +##teamcity[testStarted name='Combining MatchNotOfGeneric does not nest'] +##teamcity[testFinished name='Combining MatchNotOfGeneric does not nest' duration="{duration}"] +##teamcity[testStarted name='Combining concrete matchers does not use templated matchers'] +##teamcity[testFinished name='Combining concrete matchers does not use templated matchers' duration="{duration}"] +##teamcity[testStarted name='Combining only templated matchers'] +##teamcity[testFinished name='Combining only templated matchers' duration="{duration}"] +##teamcity[testStarted name='Combining templated and concrete matchers'] +##teamcity[testFinished name='Combining templated and concrete matchers' duration="{duration}"] +##teamcity[testStarted name='Combining templated matchers'] +##teamcity[testFinished name='Combining templated matchers' duration="{duration}"] +##teamcity[testStarted name='Commas in various macros are allowed'] +##teamcity[testFinished name='Commas in various macros are allowed' duration="{duration}"] +##teamcity[testStarted name='Comparing function pointers'] +##teamcity[testFinished name='Comparing function pointers' duration="{duration}"] +##teamcity[testStarted name='Comparison ops'] +##teamcity[testFinished name='Comparison ops' duration="{duration}"] +##teamcity[testStarted name='Comparison with explicitly convertible types'] +##teamcity[testFinished name='Comparison with explicitly convertible types' duration="{duration}"] +##teamcity[testStarted name='Comparisons between ints where one side is computed'] +##teamcity[testFinished name='Comparisons between ints where one side is computed' duration="{duration}"] +##teamcity[testStarted name='Comparisons between unsigned ints and negative signed ints match c++ standard behaviour'] +##teamcity[testFinished name='Comparisons between unsigned ints and negative signed ints match c++ standard behaviour' duration="{duration}"] +##teamcity[testStarted name='Comparisons with int literals don|'t warn when mixing signed/ unsigned'] +##teamcity[testFinished name='Comparisons with int literals don|'t warn when mixing signed/ unsigned' duration="{duration}"] +##teamcity[testStarted name='Composed generic matchers shortcircuit'] +##teamcity[testFinished name='Composed generic matchers shortcircuit' duration="{duration}"] +##teamcity[testStarted name='Composed matchers shortcircuit'] +##teamcity[testFinished name='Composed matchers shortcircuit' duration="{duration}"] +##teamcity[testStarted name='Contains string matcher'] +##teamcity[testFailed name='Contains string matcher' message='Matchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" contains: "not there" (case insensitive)|n'] +##teamcity[testFailed name='Contains string matcher' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" contains: "STRING"|n'] +##teamcity[testFinished name='Contains string matcher' duration="{duration}"] +##teamcity[testStarted name='Copy and then generate a range'] +##teamcity[testFinished name='Copy and then generate a range' duration="{duration}"] +##teamcity[testStarted name='Cout stream properly declares it writes to stdout'] +##teamcity[testFinished name='Cout stream properly declares it writes to stdout' duration="{duration}"] +##teamcity[testStarted name='Custom exceptions can be translated when testing for nothrow'] +##teamcity[testFailed name='Custom exceptions can be translated when testing for nothrow' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "custom exception - not std"|n REQUIRE_NOTHROW( throwCustom() )|nwith expansion:|n throwCustom()|n'] +##teamcity[testFinished name='Custom exceptions can be translated when testing for nothrow' duration="{duration}"] +##teamcity[testStarted name='Custom exceptions can be translated when testing for throwing as something else'] +##teamcity[testFailed name='Custom exceptions can be translated when testing for throwing as something else' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "custom exception - not std"|n REQUIRE_THROWS_AS( throwCustom(), std::exception )|nwith expansion:|n throwCustom(), std::exception|n'] +##teamcity[testFinished name='Custom exceptions can be translated when testing for throwing as something else' duration="{duration}"] +##teamcity[testStarted name='Custom std-exceptions can be custom translated'] +##teamcity[testFailed name='Custom std-exceptions can be custom translated' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "custom std exception"'] +##teamcity[testFinished name='Custom std-exceptions can be custom translated' duration="{duration}"] +##teamcity[testStarted name='Default scale is invisible to comparison'] +##teamcity[testFinished name='Default scale is invisible to comparison' duration="{duration}"] +##teamcity[testStarted name='Directly creating an EnumInfo'] +##teamcity[testFinished name='Directly creating an EnumInfo' duration="{duration}"] +##teamcity[testStarted name='Empty generators can SKIP in constructor'] +##teamcity[testIgnored name='Empty generators can SKIP in constructor' message='Skip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit skip with message:|n "This generator is empty"'] +##teamcity[testFinished name='Empty generators can SKIP in constructor' duration="{duration}"] +##teamcity[testStarted name='Empty stream name opens cout stream'] +##teamcity[testFinished name='Empty stream name opens cout stream' duration="{duration}"] +##teamcity[testStarted name='EndsWith string matcher'] +##teamcity[testFailed name='EndsWith string matcher' message='Matchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), EndsWith( "Substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" ends with: "Substring"|n'] +##teamcity[testFailed name='EndsWith string matcher' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" ends with: "this" (case insensitive)|n'] +##teamcity[testFinished name='EndsWith string matcher' duration="{duration}"] +##teamcity[testStarted name='Enums can quickly have stringification enabled using CATCH_REGISTER_ENUM'] +##teamcity[testFinished name='Enums can quickly have stringification enabled using CATCH_REGISTER_ENUM' duration="{duration}"] +##teamcity[testStarted name='Enums in namespaces can quickly have stringification enabled using CATCH_REGISTER_ENUM'] +##teamcity[testFinished name='Enums in namespaces can quickly have stringification enabled using CATCH_REGISTER_ENUM' duration="{duration}"] +##teamcity[testStarted name='Epsilon only applies to Approx|'s value'] +##teamcity[testFinished name='Epsilon only applies to Approx|'s value' duration="{duration}"] +##teamcity[testStarted name='Equality checks that should fail'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|n...............................................................................|n|nCondition.tests.cpp:|nexpression failed|n CHECK( data.int_seven == 6 )|nwith expansion:|n 7 == 6|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.int_seven == 8 )|nwith expansion:|n 7 == 8|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.int_seven == 0 )|nwith expansion:|n 7 == 0|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 9.11f ) )|nwith expansion:|n 9.100000381f|n==|nApprox( 9.10999965667724609 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 9.0f ) )|nwith expansion:|n 9.100000381f == Approx( 9.0 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 1 ) )|nwith expansion:|n 9.100000381f == Approx( 1.0 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 0 ) )|nwith expansion:|n 9.100000381f == Approx( 0.0 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.double_pi == Approx( 3.1415 ) )|nwith expansion:|n 3.14159265350000005|n==|nApprox( 3.14150000000000018 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello == "goodbye" )|nwith expansion:|n "hello" == "goodbye"|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello == "hell" )|nwith expansion:|n "hello" == "hell"|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello == "hello1" )|nwith expansion:|n "hello" == "hello1"|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello.size() == 6 )|nwith expansion:|n 5 == 6|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( x == Approx( 1.301 ) )|nwith expansion:|n 1.30000000000000027|n==|nApprox( 1.30099999999999993 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Equality checks that should fail' duration="{duration}"] +##teamcity[testStarted name='Equality checks that should succeed'] +##teamcity[testFinished name='Equality checks that should succeed' duration="{duration}"] +##teamcity[testStarted name='Equals'] +##teamcity[testFinished name='Equals' duration="{duration}"] +##teamcity[testStarted name='Equals string matcher'] +##teamcity[testFailed name='Equals string matcher' message='Matchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), Equals( "this string contains |'ABC|' as a substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" equals: "this string contains |'ABC|' as a substring"|n'] +##teamcity[testFailed name='Equals string matcher' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" equals: "something else" (case insensitive)|n'] +##teamcity[testFinished name='Equals string matcher' duration="{duration}"] +##teamcity[testStarted name='Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified'] +##teamcity[testFinished name='Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified' duration="{duration}"] +##teamcity[testStarted name='Exception matchers that fail'] +##teamcity[testFailed name='Exception matchers that fail' message='-------------------------------------------------------------------------------|nNo exception|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nno exception was thrown where one was expected|n CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n doesNotThrow(), SpecialException, ExceptionMatcher{ 1 }|n'] +##teamcity[testFailed name='Exception matchers that fail' message='Matchers.tests.cpp:|nno exception was thrown where one was expected|n REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n doesNotThrow(), SpecialException, ExceptionMatcher{ 1 }|n'] +##teamcity[testFailed name='Exception matchers that fail' message='-------------------------------------------------------------------------------|nType mismatch|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nunexpected exception with message:|n "Unknown exception"|n CHECK_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 }|n'] +##teamcity[testFailed name='Exception matchers that fail' message='Matchers.tests.cpp:|nunexpected exception with message:|n "Unknown exception"|n REQUIRE_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 }|n'] +##teamcity[testFailed name='Exception matchers that fail' message='-------------------------------------------------------------------------------|nContents are wrong|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THROWS_MATCHES( throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n SpecialException::what special exception has value of 1|n'] +##teamcity[testFailed name='Exception matchers that fail' message='Matchers.tests.cpp:|nexpression failed|n REQUIRE_THROWS_MATCHES( throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n SpecialException::what special exception has value of 1|n'] +##teamcity[testFinished name='Exception matchers that fail' duration="{duration}"] +##teamcity[testStarted name='Exception matchers that succeed'] +##teamcity[testFinished name='Exception matchers that succeed' duration="{duration}"] +##teamcity[testStarted name='Exception message can be matched'] +##teamcity[testFinished name='Exception message can be matched' duration="{duration}"] +##teamcity[testStarted name='Exception messages can be tested for'] +##teamcity[testFinished name='Exception messages can be tested for' duration="{duration}"] +##teamcity[testStarted name='Exceptions matchers'] +##teamcity[testFinished name='Exceptions matchers' duration="{duration}"] +##teamcity[testStarted name='Expected exceptions that don|'t throw or unexpected exceptions fail the test'] +##teamcity[testFailed name='Expected exceptions that don|'t throw or unexpected exceptions fail the test' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "expected exception"|n CHECK_THROWS_AS( thisThrows(), std::string )|nwith expansion:|n thisThrows(), std::string|n'] +##teamcity[testFailed name='Expected exceptions that don|'t throw or unexpected exceptions fail the test' message='Exception.tests.cpp:|nno exception was thrown where one was expected|n CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error )|nwith expansion:|n thisDoesntThrow(), std::domain_error|n'] +##teamcity[testFailed name='Expected exceptions that don|'t throw or unexpected exceptions fail the test' message='Exception.tests.cpp:|nunexpected exception with message:|n "expected exception"|n CHECK_NOTHROW( thisThrows() )|nwith expansion:|n thisThrows()|n'] +##teamcity[testFinished name='Expected exceptions that don|'t throw or unexpected exceptions fail the test' duration="{duration}"] +##teamcity[testStarted name='FAIL aborts the test'] +##teamcity[testFailed name='FAIL aborts the test' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexplicit failure with message:|n "This is a failure"'] +##teamcity[testFinished name='FAIL aborts the test' duration="{duration}"] +##teamcity[testStarted name='FAIL does not require an argument'] +##teamcity[testFailed name='FAIL does not require an argument' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexplicit failure'] +##teamcity[testFinished name='FAIL does not require an argument' duration="{duration}"] +##teamcity[testStarted name='FAIL_CHECK does not abort the test'] +##teamcity[testFailed name='FAIL_CHECK does not abort the test' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexplicit failure with message:|n "This is a failure"'] +##teamcity[testFinished name='FAIL_CHECK does not abort the test' duration="{duration}"] +##teamcity[testStarted name='Factorials are computed'] +##teamcity[testFinished name='Factorials are computed' duration="{duration}"] +##teamcity[testStarted name='Filter generator throws exception for empty generator'] +##teamcity[testFinished name='Filter generator throws exception for empty generator' duration="{duration}"] +##teamcity[testStarted name='Floating point matchers: double'] +##teamcity[testFinished name='Floating point matchers: double' duration="{duration}"] +##teamcity[testStarted name='Floating point matchers: float'] +##teamcity[testFinished name='Floating point matchers: float' duration="{duration}"] +##teamcity[testStarted name='GENERATE can combine literals and generators'] +##teamcity[testFinished name='GENERATE can combine literals and generators' duration="{duration}"] +##teamcity[testStarted name='Generators -- adapters'] +##teamcity[testFinished name='Generators -- adapters' duration="{duration}"] +##teamcity[testStarted name='Generators -- simple'] +##teamcity[testFinished name='Generators -- simple' duration="{duration}"] +##teamcity[testStarted name='Generators internals'] +##teamcity[testFinished name='Generators internals' duration="{duration}"] +##teamcity[testStarted name='Greater-than inequalities with different epsilons'] +##teamcity[testFinished name='Greater-than inequalities with different epsilons' duration="{duration}"] +##teamcity[testStarted name='Hashers with different seed produce different hash with same test case'] +##teamcity[testFinished name='Hashers with different seed produce different hash with same test case' duration="{duration}"] +##teamcity[testStarted name='Hashers with same seed produce same hash'] +##teamcity[testFinished name='Hashers with same seed produce same hash' duration="{duration}"] +##teamcity[testStarted name='Hashing different test cases produces different result'] +##teamcity[testFinished name='Hashing different test cases produces different result' duration="{duration}"] +##teamcity[testStarted name='Hashing test case produces same hash across multiple calls'] +##teamcity[testFinished name='Hashing test case produces same hash across multiple calls' duration="{duration}"] +##teamcity[testStarted name='INFO and UNSCOPED_INFO can stream multiple arguments'] +##teamcity[testFailed name='INFO and UNSCOPED_INFO can stream multiple arguments' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexplicit failure with messages:|n "This info has multiple parts."|n "This unscoped info has multiple parts."|n "Show infos!"'] +##teamcity[testFinished name='INFO and UNSCOPED_INFO can stream multiple arguments' duration="{duration}"] +##teamcity[testStarted name='INFO and WARN do not abort tests'] +##teamcity[testFinished name='INFO and WARN do not abort tests' duration="{duration}"] +##teamcity[testStarted name='INFO gets logged on failure'] +##teamcity[testFailed name='INFO gets logged on failure' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexpression failed with messages:|n "this message should be logged"|n "so should this"|n REQUIRE( a == 1 )|nwith expansion:|n 2 == 1|n'] +##teamcity[testFinished name='INFO gets logged on failure' duration="{duration}"] +##teamcity[testStarted name='INFO gets logged on failure, even if captured before successful assertions'] +##teamcity[testFailed name='INFO gets logged on failure, even if captured before successful assertions' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexpression failed with messages:|n "this message may be logged later"|n "this message should be logged"|n CHECK( a == 1 )|nwith expansion:|n 2 == 1|n'] +##teamcity[testFailed name='INFO gets logged on failure, even if captured before successful assertions' message='Message.tests.cpp:|nexpression failed with messages:|n "this message may be logged later"|n "this message should be logged"|n "and this, but later"|n CHECK( a == 0 )|nwith expansion:|n 2 == 0|n'] +##teamcity[testFinished name='INFO gets logged on failure, even if captured before successful assertions' duration="{duration}"] +##teamcity[testStarted name='INFO is reset for each loop'] +##teamcity[testFailed name='INFO is reset for each loop' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexpression failed with messages:|n "current counter 10"|n "i := 10"|n REQUIRE( i < 10 )|nwith expansion:|n 10 < 10|n'] +##teamcity[testFinished name='INFO is reset for each loop' duration="{duration}"] +##teamcity[testStarted name='Incomplete AssertionHandler'] +##teamcity[testIgnored name='Incomplete AssertionHandler' message='AssertionHandler.tests.cpp:|n...............................................................................|n|nAssertionHandler.tests.cpp:|nunexpected exception with message:|n "Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE"|n REQUIRE( Dummy )|nwith expansion:|n Dummy|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Incomplete AssertionHandler' duration="{duration}"] +##teamcity[testStarted name='Inequality checks that should fail'] +##teamcity[testIgnored name='Inequality checks that should fail' message='Condition.tests.cpp:|n...............................................................................|n|nCondition.tests.cpp:|nexpression failed|n CHECK( data.int_seven != 7 )|nwith expansion:|n 7 != 7|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Inequality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.float_nine_point_one != Approx( 9.1f ) )|nwith expansion:|n 9.100000381f|n!=|nApprox( 9.10000038146972656 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Inequality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.double_pi != Approx( 3.1415926535 ) )|nwith expansion:|n 3.14159265350000005|n!=|nApprox( 3.14159265350000005 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Inequality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello != "hello" )|nwith expansion:|n "hello" != "hello"|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Inequality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello.size() != 5 )|nwith expansion:|n 5 != 5|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Inequality checks that should fail' duration="{duration}"] +##teamcity[testStarted name='Inequality checks that should succeed'] +##teamcity[testFinished name='Inequality checks that should succeed' duration="{duration}"] +##teamcity[testStarted name='JsonWriter'] +##teamcity[testFinished name='JsonWriter' duration="{duration}"] +##teamcity[testStarted name='JsonWriter escapes charaters in strings properly'] +##teamcity[testFinished name='JsonWriter escapes charaters in strings properly' duration="{duration}"] +##teamcity[testStarted name='Lambdas in assertions'] +##teamcity[testFinished name='Lambdas in assertions' duration="{duration}"] +##teamcity[testStarted name='Less-than inequalities with different epsilons'] +##teamcity[testFinished name='Less-than inequalities with different epsilons' duration="{duration}"] +##teamcity[testStarted name='ManuallyRegistered'] +##teamcity[testFinished name='ManuallyRegistered' duration="{duration}"] +##teamcity[testStarted name='Matchers can be (AllOf) composed with the && operator'] +##teamcity[testFinished name='Matchers can be (AllOf) composed with the && operator' duration="{duration}"] +##teamcity[testStarted name='Matchers can be (AnyOf) composed with the |||| operator'] +##teamcity[testFinished name='Matchers can be (AnyOf) composed with the |||| operator' duration="{duration}"] +##teamcity[testStarted name='Matchers can be composed with both && and ||||'] +##teamcity[testFinished name='Matchers can be composed with both && and ||||' duration="{duration}"] +##teamcity[testStarted name='Matchers can be composed with both && and |||| - failing'] +##teamcity[testFailed name='Matchers can be composed with both && and |||| - failing' message='Matchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) |||| ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" )|n'] +##teamcity[testFinished name='Matchers can be composed with both && and |||| - failing' duration="{duration}"] +##teamcity[testStarted name='Matchers can be negated (Not) with the ! operator'] +##teamcity[testFinished name='Matchers can be negated (Not) with the ! operator' duration="{duration}"] +##teamcity[testStarted name='Matchers can be negated (Not) with the ! operator - failing'] +##teamcity[testFailed name='Matchers can be negated (Not) with the ! operator - failing' message='Matchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" not contains: "substring"|n'] +##teamcity[testFinished name='Matchers can be negated (Not) with the ! operator - failing' duration="{duration}"] +##teamcity[testStarted name='Mayfail test case with nested sections'] +##teamcity[testIgnored name='Mayfail test case with nested sections' message='-------------------------------------------------------------------------------|nA|n1|n-------------------------------------------------------------------------------|nCondition.tests.cpp:|n...............................................................................|n|nCondition.tests.cpp:|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Mayfail test case with nested sections' message='-------------------------------------------------------------------------------|nA|n2|n-------------------------------------------------------------------------------|nCondition.tests.cpp:|n...............................................................................|n|nCondition.tests.cpp:|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Mayfail test case with nested sections' message='-------------------------------------------------------------------------------|nB|n1|n-------------------------------------------------------------------------------|nCondition.tests.cpp:|n...............................................................................|n|nCondition.tests.cpp:|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Mayfail test case with nested sections' message='-------------------------------------------------------------------------------|nB|n2|n-------------------------------------------------------------------------------|nCondition.tests.cpp:|n...............................................................................|n|nCondition.tests.cpp:|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Mayfail test case with nested sections' duration="{duration}"] +##teamcity[testStarted name='Mismatching exception messages failing the test'] +##teamcity[testFailed name='Mismatching exception messages failing the test' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nexpression failed|n REQUIRE_THROWS_WITH( thisThrows(), "should fail" )|nwith expansion:|n "expected exception" equals: "should fail"|n'] +##teamcity[testFinished name='Mismatching exception messages failing the test' duration="{duration}"] +##teamcity[testStarted name='Multireporter calls reporters and listeners in correct order'] +##teamcity[testFinished name='Multireporter calls reporters and listeners in correct order' duration="{duration}"] +##teamcity[testStarted name='Multireporter updates ReporterPreferences properly'] +##teamcity[testFinished name='Multireporter updates ReporterPreferences properly' duration="{duration}"] +##teamcity[testStarted name='Nested generators and captured variables'] +##teamcity[testFinished name='Nested generators and captured variables' duration="{duration}"] +##teamcity[testStarted name='Nice descriptive name'] +##teamcity[testFinished name='Nice descriptive name' duration="{duration}"] +##teamcity[testStarted name='Non-std exceptions can be translated'] +##teamcity[testFailed name='Non-std exceptions can be translated' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "custom exception"'] +##teamcity[testFinished name='Non-std exceptions can be translated' duration="{duration}"] +##teamcity[testStarted name='Objects that evaluated in boolean contexts can be checked'] +##teamcity[testFinished name='Objects that evaluated in boolean contexts can be checked' duration="{duration}"] +##teamcity[testStarted name='Optionally static assertions'] +##teamcity[testFinished name='Optionally static assertions' duration="{duration}"] +##teamcity[testStarted name='Ordering comparison checks that should fail'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|n...............................................................................|n|nCondition.tests.cpp:|nexpression failed|n CHECK( data.int_seven > 7 )|nwith expansion:|n 7 > 7|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.int_seven < 7 )|nwith expansion:|n 7 < 7|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.int_seven > 8 )|nwith expansion:|n 7 > 8|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.int_seven < 6 )|nwith expansion:|n 7 < 6|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.int_seven < 0 )|nwith expansion:|n 7 < 0|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.int_seven < -1 )|nwith expansion:|n 7 < -1|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.int_seven >= 8 )|nwith expansion:|n 7 >= 8|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.int_seven <= 6 )|nwith expansion:|n 7 <= 6|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.float_nine_point_one < 9 )|nwith expansion:|n 9.100000381f < 9|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.float_nine_point_one > 10 )|nwith expansion:|n 9.100000381f > 10|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.float_nine_point_one > 9.2 )|nwith expansion:|n 9.100000381f > 9.19999999999999929|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello > "hello" )|nwith expansion:|n "hello" > "hello"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello < "hello" )|nwith expansion:|n "hello" < "hello"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello > "hellp" )|nwith expansion:|n "hello" > "hellp"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello > "z" )|nwith expansion:|n "hello" > "z"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello < "hellm" )|nwith expansion:|n "hello" < "hellm"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello < "a" )|nwith expansion:|n "hello" < "a"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello >= "z" )|nwith expansion:|n "hello" >= "z"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello <= "a" )|nwith expansion:|n "hello" <= "a"|n'] +##teamcity[testFinished name='Ordering comparison checks that should fail' duration="{duration}"] +##teamcity[testStarted name='Ordering comparison checks that should succeed'] +##teamcity[testFinished name='Ordering comparison checks that should succeed' duration="{duration}"] +##teamcity[testStarted name='Our PCG implementation provides expected results for known seeds'] +##teamcity[testFinished name='Our PCG implementation provides expected results for known seeds' duration="{duration}"] +##teamcity[testStarted name='Output from all sections is reported'] +##teamcity[testFailed name='Output from all sections is reported' message='-------------------------------------------------------------------------------|none|n-------------------------------------------------------------------------------|nMessage.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexplicit failure with message:|n "Message from section one"'] +##teamcity[testFailed name='Output from all sections is reported' message='-------------------------------------------------------------------------------|ntwo|n-------------------------------------------------------------------------------|nMessage.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexplicit failure with message:|n "Message from section two"'] +##teamcity[testFinished name='Output from all sections is reported' duration="{duration}"] +##teamcity[testStarted name='Overloaded comma or address-of operators are not used'] +##teamcity[testFinished name='Overloaded comma or address-of operators are not used' duration="{duration}"] +##teamcity[testStarted name='Parse uints'] +##teamcity[testFinished name='Parse uints' duration="{duration}"] +##teamcity[testStarted name='Parsed tags are matched case insensitive'] +##teamcity[testFinished name='Parsed tags are matched case insensitive' duration="{duration}"] +##teamcity[testStarted name='Parsing sharding-related cli flags'] +##teamcity[testFinished name='Parsing sharding-related cli flags' duration="{duration}"] +##teamcity[testStarted name='Parsing tags with non-alphabetical characters is pass-through'] +##teamcity[testFinished name='Parsing tags with non-alphabetical characters is pass-through' duration="{duration}"] +##teamcity[testStarted name='Parsing warnings'] +##teamcity[testFinished name='Parsing warnings' duration="{duration}"] +##teamcity[testStarted name='Pointers can be compared to null'] +##teamcity[testFinished name='Pointers can be compared to null' duration="{duration}"] +##teamcity[testStarted name='Precision of floating point stringification can be set'] +##teamcity[testFinished name='Precision of floating point stringification can be set' duration="{duration}"] +##teamcity[testStarted name='Predicate matcher can accept const char*'] +##teamcity[testFinished name='Predicate matcher can accept const char*' duration="{duration}"] +##teamcity[testStarted name='Process can be configured on command line'] +##teamcity[testFinished name='Process can be configured on command line' duration="{duration}"] +##teamcity[testStarted name='Product with differing arities - std::tuple'] +##teamcity[testFinished name='Product with differing arities - std::tuple' duration="{duration}"] +##teamcity[testStarted name='Product with differing arities - std::tuple'] +##teamcity[testFinished name='Product with differing arities - std::tuple' duration="{duration}"] +##teamcity[testStarted name='Product with differing arities - std::tuple'] +##teamcity[testFinished name='Product with differing arities - std::tuple' duration="{duration}"] +##teamcity[testStarted name='Random seed generation accepts known methods'] +##teamcity[testFinished name='Random seed generation accepts known methods' duration="{duration}"] +##teamcity[testStarted name='Random seed generation reports unknown methods'] +##teamcity[testFinished name='Random seed generation reports unknown methods' duration="{duration}"] +##teamcity[testStarted name='Range type with sentinel'] +##teamcity[testFinished name='Range type with sentinel' duration="{duration}"] +##teamcity[testStarted name='Reconstruction should be based on stringification: #914'] +##teamcity[testFailed name='Reconstruction should be based on stringification: #914' message='Decomposition.tests.cpp:|n...............................................................................|n|nDecomposition.tests.cpp:|nexpression failed|n CHECK( truthy(false) )|nwith expansion:|n Hey, its truthy!|n'] +##teamcity[testFinished name='Reconstruction should be based on stringification: #914' duration="{duration}"] +##teamcity[testStarted name='Regex string matcher'] +##teamcity[testFailed name='Regex string matcher' message='Matchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), Matches( "this STRING contains |'abc|' as a substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" matches "this STRING contains |'abc|' as a substring" case sensitively|n'] +##teamcity[testFailed name='Regex string matcher' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), Matches( "contains |'abc|' as a substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" matches "contains |'abc|' as a substring" case sensitively|n'] +##teamcity[testFailed name='Regex string matcher' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), Matches( "this string contains |'abc|' as a" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" matches "this string contains |'abc|' as a" case sensitively|n'] +##teamcity[testFinished name='Regex string matcher' duration="{duration}"] +##teamcity[testStarted name='Registering reporter with |'::|' in name fails'] +##teamcity[testFinished name='Registering reporter with |'::|' in name fails' duration="{duration}"] +##teamcity[testStarted name='Regression test #1'] +##teamcity[testFinished name='Regression test #1' duration="{duration}"] +##teamcity[testStarted name='Reporter|'s write listings to provided stream'] +##teamcity[testFinished name='Reporter|'s write listings to provided stream' duration="{duration}"] +##teamcity[testStarted name='Reproducer for #2309 - a very long description past 80 chars (default console width) with a late colon : blablabla'] +##teamcity[testFinished name='Reproducer for #2309 - a very long description past 80 chars (default console width) with a late colon : blablabla' duration="{duration}"] +##teamcity[testStarted name='SUCCEED counts as a test pass'] +##teamcity[testFinished name='SUCCEED counts as a test pass' duration="{duration}"] +##teamcity[testStarted name='SUCCEED does not require an argument'] +##teamcity[testFinished name='SUCCEED does not require an argument' duration="{duration}"] +##teamcity[testStarted name='Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or methods'] +##teamcity[testFinished name='Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or methods' duration="{duration}"] +##teamcity[testStarted name='Scenario: Do that thing with the thing'] +##teamcity[testFinished name='Scenario: Do that thing with the thing' duration="{duration}"] +##teamcity[testStarted name='Scenario: This is a really long scenario name to see how the list command deals with wrapping'] +##teamcity[testFinished name='Scenario: This is a really long scenario name to see how the list command deals with wrapping' duration="{duration}"] +##teamcity[testStarted name='Scenario: Vector resizing affects size and capacity'] +##teamcity[testFinished name='Scenario: Vector resizing affects size and capacity' duration="{duration}"] +##teamcity[testStarted name='Sends stuff to stdout and stderr'] +##teamcity[testStdOut name='Sends stuff to stdout and stderr' out='A string sent directly to stdout|n'] +##teamcity[testStdErr name='Sends stuff to stdout and stderr' out='A string sent directly to stderr|nA string sent to stderr via clog|n'] +##teamcity[testFinished name='Sends stuff to stdout and stderr' duration="{duration}"] +##teamcity[testStarted name='Some simple comparisons between doubles'] +##teamcity[testFinished name='Some simple comparisons between doubles' duration="{duration}"] +##teamcity[testStarted name='Standard output from all sections is reported'] +##teamcity[testStdOut name='Standard output from all sections is reported' out='Message from section one|nMessage from section two|n'] +##teamcity[testFinished name='Standard output from all sections is reported' duration="{duration}"] +##teamcity[testStarted name='StartsWith string matcher'] +##teamcity[testFailed name='StartsWith string matcher' message='Matchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), StartsWith( "This String" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" starts with: "This String"|n'] +##teamcity[testFailed name='StartsWith string matcher' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" starts with: "string" (case insensitive)|n'] +##teamcity[testFinished name='StartsWith string matcher' duration="{duration}"] +##teamcity[testStarted name='Static arrays are convertible to string'] +##teamcity[testFinished name='Static arrays are convertible to string' duration="{duration}"] +##teamcity[testStarted name='String matchers'] +##teamcity[testFinished name='String matchers' duration="{duration}"] +##teamcity[testStarted name='StringRef'] +##teamcity[testFinished name='StringRef' duration="{duration}"] +##teamcity[testStarted name='StringRef at compilation time'] +##teamcity[testFinished name='StringRef at compilation time' duration="{duration}"] +##teamcity[testStarted name='Stringifying char arrays with statically known sizes - char'] +##teamcity[testFinished name='Stringifying char arrays with statically known sizes - char' duration="{duration}"] +##teamcity[testStarted name='Stringifying char arrays with statically known sizes - signed char'] +##teamcity[testFinished name='Stringifying char arrays with statically known sizes - signed char' duration="{duration}"] +##teamcity[testStarted name='Stringifying char arrays with statically known sizes - unsigned char'] +##teamcity[testFinished name='Stringifying char arrays with statically known sizes - unsigned char' duration="{duration}"] +##teamcity[testStarted name='Stringifying std::chrono::duration helpers'] +##teamcity[testFinished name='Stringifying std::chrono::duration helpers' duration="{duration}"] +##teamcity[testStarted name='Stringifying std::chrono::duration with weird ratios'] +##teamcity[testFinished name='Stringifying std::chrono::duration with weird ratios' duration="{duration}"] +##teamcity[testStarted name='Stringifying std::chrono::time_point'] +##teamcity[testFinished name='Stringifying std::chrono::time_point' duration="{duration}"] +##teamcity[testStarted name='Tabs and newlines show in output'] +##teamcity[testFailed name='Tabs and newlines show in output' message='Misc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexpression failed|n CHECK( s1 == s2 )|nwith expansion:|n "if ($b == 10) {|n $a = 20;|n}"|n==|n"if ($b == 10) {|n $a = 20;|n}|n"|n'] +##teamcity[testFinished name='Tabs and newlines show in output' duration="{duration}"] +##teamcity[testStarted name='Tag alias can be registered against tag patterns'] +##teamcity[testFinished name='Tag alias can be registered against tag patterns' duration="{duration}"] +##teamcity[testStarted name='Tags with spaces and non-alphanumerical characters are accepted'] +##teamcity[testFinished name='Tags with spaces and non-alphanumerical characters are accepted' duration="{duration}"] +##teamcity[testStarted name='Template test case method with test types specified inside std::tuple - MyTypes - 0'] +##teamcity[testFinished name='Template test case method with test types specified inside std::tuple - MyTypes - 0' duration="{duration}"] +##teamcity[testStarted name='Template test case method with test types specified inside std::tuple - MyTypes - 1'] +##teamcity[testFinished name='Template test case method with test types specified inside std::tuple - MyTypes - 1' duration="{duration}"] +##teamcity[testStarted name='Template test case method with test types specified inside std::tuple - MyTypes - 2'] +##teamcity[testFinished name='Template test case method with test types specified inside std::tuple - MyTypes - 2' duration="{duration}"] +##teamcity[testStarted name='Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 0'] +##teamcity[testFinished name='Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 0' duration="{duration}"] +##teamcity[testStarted name='Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 1'] +##teamcity[testFinished name='Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 1' duration="{duration}"] +##teamcity[testStarted name='Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 0'] +##teamcity[testFinished name='Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 0' duration="{duration}"] +##teamcity[testStarted name='Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 1'] +##teamcity[testFinished name='Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 1' duration="{duration}"] +##teamcity[testStarted name='Template test case with test types specified inside std::tuple - MyTypes - 0'] +##teamcity[testFinished name='Template test case with test types specified inside std::tuple - MyTypes - 0' duration="{duration}"] +##teamcity[testStarted name='Template test case with test types specified inside std::tuple - MyTypes - 1'] +##teamcity[testFinished name='Template test case with test types specified inside std::tuple - MyTypes - 1' duration="{duration}"] +##teamcity[testStarted name='Template test case with test types specified inside std::tuple - MyTypes - 2'] +##teamcity[testFinished name='Template test case with test types specified inside std::tuple - MyTypes - 2' duration="{duration}"] +##teamcity[testStarted name='TemplateTest: vectors can be sized and resized - float'] +##teamcity[testFinished name='TemplateTest: vectors can be sized and resized - float' duration="{duration}"] +##teamcity[testStarted name='TemplateTest: vectors can be sized and resized - int'] +##teamcity[testFinished name='TemplateTest: vectors can be sized and resized - int' duration="{duration}"] +##teamcity[testStarted name='TemplateTest: vectors can be sized and resized - std::string'] +##teamcity[testFinished name='TemplateTest: vectors can be sized and resized - std::string' duration="{duration}"] +##teamcity[testStarted name='TemplateTest: vectors can be sized and resized - std::tuple'] +##teamcity[testFinished name='TemplateTest: vectors can be sized and resized - std::tuple' duration="{duration}"] +##teamcity[testStarted name='TemplateTestSig: vectors can be sized and resized - (std::tuple), 6'] +##teamcity[testFinished name='TemplateTestSig: vectors can be sized and resized - (std::tuple), 6' duration="{duration}"] +##teamcity[testStarted name='TemplateTestSig: vectors can be sized and resized - float,4'] +##teamcity[testFinished name='TemplateTestSig: vectors can be sized and resized - float,4' duration="{duration}"] +##teamcity[testStarted name='TemplateTestSig: vectors can be sized and resized - int,5'] +##teamcity[testFinished name='TemplateTestSig: vectors can be sized and resized - int,5' duration="{duration}"] +##teamcity[testStarted name='TemplateTestSig: vectors can be sized and resized - std::string,15'] +##teamcity[testFinished name='TemplateTestSig: vectors can be sized and resized - std::string,15' duration="{duration}"] +##teamcity[testStarted name='Test case with identical tags keeps just one'] +##teamcity[testFinished name='Test case with identical tags keeps just one' duration="{duration}"] +##teamcity[testStarted name='Test case with one argument'] +##teamcity[testFinished name='Test case with one argument' duration="{duration}"] +##teamcity[testStarted name='Test enum bit values'] +##teamcity[testFinished name='Test enum bit values' duration="{duration}"] +##teamcity[testStarted name='Test with special, characters "in name'] +##teamcity[testFinished name='Test with special, characters "in name' duration="{duration}"] +##teamcity[testStarted name='Testing checked-if'] +##teamcity[testFinished name='Testing checked-if' duration="{duration}"] +##teamcity[testStarted name='Testing checked-if 2'] +##teamcity[testIgnored name='Testing checked-if 2' message='Misc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Testing checked-if 2' duration="{duration}"] +##teamcity[testStarted name='Testing checked-if 3'] +##teamcity[testIgnored name='Testing checked-if 3' message='Misc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Testing checked-if 3' duration="{duration}"] +##teamcity[testStarted name='Testing checked-if 4'] +##teamcity[testIgnored name='Testing checked-if 4' message='Misc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nunexpected exception with message:|n "Uncaught exception should fail!"|n {Unknown expression after the reported line}|nwith expansion:|n {Unknown expression after the reported line}|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Testing checked-if 4' duration="{duration}"] +##teamcity[testStarted name='Testing checked-if 5'] +##teamcity[testIgnored name='Testing checked-if 5' message='Misc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nunexpected exception with message:|n "Uncaught exception should fail!"|n {Unknown expression after the reported line}|nwith expansion:|n {Unknown expression after the reported line}|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Testing checked-if 5' duration="{duration}"] +##teamcity[testStarted name='The NO_FAIL macro reports a failure but does not fail the test'] +##teamcity[testFinished name='The NO_FAIL macro reports a failure but does not fail the test' duration="{duration}"] +##teamcity[testStarted name='The default listing implementation write to provided stream'] +##teamcity[testFinished name='The default listing implementation write to provided stream' duration="{duration}"] +##teamcity[testStarted name='This test |'should|' fail but doesn|'t'] +##teamcity[testFinished name='This test |'should|' fail but doesn|'t' duration="{duration}"] +##teamcity[testStarted name='Thrown string literals are translated'] +##teamcity[testFailed name='Thrown string literals are translated' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "For some reason someone is throwing a string literal!"'] +##teamcity[testFinished name='Thrown string literals are translated' duration="{duration}"] +##teamcity[testStarted name='Tracker'] +##teamcity[testFinished name='Tracker' duration="{duration}"] +##teamcity[testStarted name='Trim strings'] +##teamcity[testFinished name='Trim strings' duration="{duration}"] +##teamcity[testStarted name='Type conversions of RangeEquals and similar'] +##teamcity[testFinished name='Type conversions of RangeEquals and similar' duration="{duration}"] +##teamcity[testStarted name='Unexpected exceptions can be translated'] +##teamcity[testFailed name='Unexpected exceptions can be translated' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "3.14000000000000012"'] +##teamcity[testFinished name='Unexpected exceptions can be translated' duration="{duration}"] +##teamcity[testStarted name='Upcasting special member functions'] +##teamcity[testFinished name='Upcasting special member functions' duration="{duration}"] +##teamcity[testStarted name='Usage of AllMatch range matcher'] +##teamcity[testFinished name='Usage of AllMatch range matcher' duration="{duration}"] +##teamcity[testStarted name='Usage of AllTrue range matcher'] +##teamcity[testFinished name='Usage of AllTrue range matcher' duration="{duration}"] +##teamcity[testStarted name='Usage of AnyMatch range matcher'] +##teamcity[testFinished name='Usage of AnyMatch range matcher' duration="{duration}"] +##teamcity[testStarted name='Usage of AnyTrue range matcher'] +##teamcity[testFinished name='Usage of AnyTrue range matcher' duration="{duration}"] +##teamcity[testStarted name='Usage of NoneMatch range matcher'] +##teamcity[testFinished name='Usage of NoneMatch range matcher' duration="{duration}"] +##teamcity[testStarted name='Usage of NoneTrue range matcher'] +##teamcity[testFinished name='Usage of NoneTrue range matcher' duration="{duration}"] +##teamcity[testStarted name='Usage of RangeEquals range matcher'] +##teamcity[testFinished name='Usage of RangeEquals range matcher' duration="{duration}"] +##teamcity[testStarted name='Usage of UnorderedRangeEquals range matcher'] +##teamcity[testFinished name='Usage of UnorderedRangeEquals range matcher' duration="{duration}"] +##teamcity[testStarted name='Usage of the SizeIs range matcher'] +##teamcity[testFinished name='Usage of the SizeIs range matcher' duration="{duration}"] +##teamcity[testStarted name='Use a custom approx'] +##teamcity[testFinished name='Use a custom approx' duration="{duration}"] +##teamcity[testStarted name='Variadic macros'] +##teamcity[testFinished name='Variadic macros' duration="{duration}"] +##teamcity[testStarted name='Vector Approx matcher'] +##teamcity[testFinished name='Vector Approx matcher' duration="{duration}"] +##teamcity[testStarted name='Vector Approx matcher -- failing'] +##teamcity[testFailed name='Vector Approx matcher -- failing' message='-------------------------------------------------------------------------------|nEmpty and non empty vectors are not approx equal|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( empty, Approx( t1 ) )|nwith expansion:|n { } is approx: { 1.0, 2.0 }|n'] +##teamcity[testFailed name='Vector Approx matcher -- failing' message='-------------------------------------------------------------------------------|nJust different vectors|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( v1, Approx( v2 ) )|nwith expansion:|n { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 }|n'] +##teamcity[testFinished name='Vector Approx matcher -- failing' duration="{duration}"] +##teamcity[testStarted name='Vector matchers'] +##teamcity[testFinished name='Vector matchers' duration="{duration}"] +##teamcity[testStarted name='Vector matchers that fail'] +##teamcity[testFailed name='Vector matchers that fail' message='-------------------------------------------------------------------------------|nContains (element)|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( v, VectorContains( -1 ) )|nwith expansion:|n { 1, 2, 3 } Contains: -1|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( empty, VectorContains( 1 ) )|nwith expansion:|n { } Contains: 1|n'] +##teamcity[testFailed name='Vector matchers that fail' message='-------------------------------------------------------------------------------|nContains (vector)|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( empty, Contains( v ) )|nwith expansion:|n { } Contains: { 1, 2, 3 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( v, Contains( v2 ) )|nwith expansion:|n { 1, 2, 3 } Contains: { 1, 2, 4 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='-------------------------------------------------------------------------------|nEquals|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( v, Equals( v2 ) )|nwith expansion:|n { 1, 2, 3 } Equals: { 1, 2 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( v2, Equals( v ) )|nwith expansion:|n { 1, 2 } Equals: { 1, 2, 3 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( empty, Equals( v ) )|nwith expansion:|n { } Equals: { 1, 2, 3 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( v, Equals( empty ) )|nwith expansion:|n { 1, 2, 3 } Equals: { }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='-------------------------------------------------------------------------------|nUnorderedEquals|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( v, UnorderedEquals( empty ) )|nwith expansion:|n { 1, 2, 3 } UnorderedEquals: { }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( empty, UnorderedEquals( v ) )|nwith expansion:|n { } UnorderedEquals: { 1, 2, 3 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( permuted, UnorderedEquals( v ) )|nwith expansion:|n { 1, 3 } UnorderedEquals: { 1, 2, 3 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( permuted, UnorderedEquals( v ) )|nwith expansion:|n { 3, 1 } UnorderedEquals: { 1, 2, 3 }|n'] +##teamcity[testFinished name='Vector matchers that fail' duration="{duration}"] +##teamcity[testStarted name='When checked exceptions are thrown they can be expected or unexpected'] +##teamcity[testFinished name='When checked exceptions are thrown they can be expected or unexpected' duration="{duration}"] +##teamcity[testStarted name='When unchecked exceptions are thrown directly they are always failures'] +##teamcity[testFailed name='When unchecked exceptions are thrown directly they are always failures' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "unexpected exception"'] +##teamcity[testFinished name='When unchecked exceptions are thrown directly they are always failures' duration="{duration}"] +##teamcity[testStarted name='When unchecked exceptions are thrown during a CHECK the test should continue'] +##teamcity[testFailed name='When unchecked exceptions are thrown during a CHECK the test should continue' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "expected exception"|n CHECK( thisThrows() == 0 )|nwith expansion:|n thisThrows() == 0|n'] +##teamcity[testFinished name='When unchecked exceptions are thrown during a CHECK the test should continue' duration="{duration}"] +##teamcity[testStarted name='When unchecked exceptions are thrown during a REQUIRE the test should abort fail'] +##teamcity[testFailed name='When unchecked exceptions are thrown during a REQUIRE the test should abort fail' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "expected exception"|n REQUIRE( thisThrows() == 0 )|nwith expansion:|n thisThrows() == 0|n'] +##teamcity[testFinished name='When unchecked exceptions are thrown during a REQUIRE the test should abort fail' duration="{duration}"] +##teamcity[testStarted name='When unchecked exceptions are thrown from functions they are always failures'] +##teamcity[testFailed name='When unchecked exceptions are thrown from functions they are always failures' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "expected exception"|n CHECK( thisThrows() == 0 )|nwith expansion:|n thisThrows() == 0|n'] +##teamcity[testFinished name='When unchecked exceptions are thrown from functions they are always failures' duration="{duration}"] +##teamcity[testStarted name='When unchecked exceptions are thrown from sections they are always failures'] +##teamcity[testFailed name='When unchecked exceptions are thrown from sections they are always failures' message='-------------------------------------------------------------------------------|nsection name|n-------------------------------------------------------------------------------|nException.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "unexpected exception"'] +##teamcity[testFinished name='When unchecked exceptions are thrown from sections they are always failures' duration="{duration}"] +##teamcity[testStarted name='When unchecked exceptions are thrown, but caught, they do not affect the test'] +##teamcity[testFinished name='When unchecked exceptions are thrown, but caught, they do not affect the test' duration="{duration}"] +##teamcity[testStarted name='X/level/0/a'] +##teamcity[testFinished name='X/level/0/a' duration="{duration}"] +##teamcity[testStarted name='X/level/0/b'] +##teamcity[testFinished name='X/level/0/b' duration="{duration}"] +##teamcity[testStarted name='X/level/1/a'] +##teamcity[testFinished name='X/level/1/a' duration="{duration}"] +##teamcity[testStarted name='X/level/1/b'] +##teamcity[testFinished name='X/level/1/b' duration="{duration}"] +##teamcity[testStarted name='XmlEncode'] +##teamcity[testFinished name='XmlEncode' duration="{duration}"] +##teamcity[testStarted name='XmlWriter writes boolean attributes as true/false'] +##teamcity[testFinished name='XmlWriter writes boolean attributes as true/false' duration="{duration}"] +##teamcity[testStarted name='a succeeding test can still be skipped'] +##teamcity[testIgnored name='a succeeding test can still be skipped' message='Skip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit skip'] +##teamcity[testFinished name='a succeeding test can still be skipped' duration="{duration}"] +##teamcity[testStarted name='analyse no analysis'] +##teamcity[testFinished name='analyse no analysis' duration="{duration}"] +##teamcity[testStarted name='array -> toString'] +##teamcity[testFinished name='array -> toString' duration="{duration}"] +##teamcity[testStarted name='benchmark function call'] +##teamcity[testFinished name='benchmark function call' duration="{duration}"] +##teamcity[testStarted name='boolean member'] +##teamcity[testFinished name='boolean member' duration="{duration}"] +##teamcity[testStarted name='checkedElse'] +##teamcity[testFinished name='checkedElse' duration="{duration}"] +##teamcity[testStarted name='checkedElse, failing'] +##teamcity[testFailed name='checkedElse, failing' message='Misc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexpression failed|n REQUIRE( testCheckedElse( false ) )|nwith expansion:|n false|n'] +##teamcity[testFinished name='checkedElse, failing' duration="{duration}"] +##teamcity[testStarted name='checkedIf'] +##teamcity[testFinished name='checkedIf' duration="{duration}"] +##teamcity[testStarted name='checkedIf, failing'] +##teamcity[testFailed name='checkedIf, failing' message='Misc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexpression failed|n REQUIRE( testCheckedIf( false ) )|nwith expansion:|n false|n'] +##teamcity[testFinished name='checkedIf, failing' duration="{duration}"] +##teamcity[testStarted name='classify_outliers'] +##teamcity[testFinished name='classify_outliers' duration="{duration}"] +##teamcity[testStarted name='comparisons between const int variables'] +##teamcity[testFinished name='comparisons between const int variables' duration="{duration}"] +##teamcity[testStarted name='comparisons between int variables'] +##teamcity[testFinished name='comparisons between int variables' duration="{duration}"] +##teamcity[testStarted name='convertToBits'] +##teamcity[testFinished name='convertToBits' duration="{duration}"] +##teamcity[testStarted name='dynamic skipping works with generators'] +##teamcity[testIgnored name='dynamic skipping works with generators' message='Skip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit skip with message:|n "skipping because answer = 41"'] +##teamcity[testIgnored name='dynamic skipping works with generators' message='Skip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit skip with message:|n "skipping because answer = 43"'] +##teamcity[testFinished name='dynamic skipping works with generators' duration="{duration}"] +##teamcity[testStarted name='empty tags are not allowed'] +##teamcity[testFinished name='empty tags are not allowed' duration="{duration}"] +##teamcity[testStarted name='erfc_inv'] +##teamcity[testFinished name='erfc_inv' duration="{duration}"] +##teamcity[testStarted name='estimate_clock_resolution'] +##teamcity[testFinished name='estimate_clock_resolution' duration="{duration}"] +##teamcity[testStarted name='even more nested SECTION tests'] +##teamcity[testFinished name='even more nested SECTION tests' duration="{duration}"] +##teamcity[testStarted name='failed assertions before SKIP cause test case to fail'] +##teamcity[testIgnored name='failed assertions before SKIP cause test case to fail' message='Skip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexpression failed|n CHECK( 3 == 4 )|nwith expansion:|n 3 == 4|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='failed assertions before SKIP cause test case to fail' message='Skip.tests.cpp:|nexplicit skip'] +##teamcity[testFinished name='failed assertions before SKIP cause test case to fail' duration="{duration}"] +##teamcity[testStarted name='failing for some generator values causes entire test case to fail'] +##teamcity[testIgnored name='failing for some generator values causes entire test case to fail' message='Skip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='failing for some generator values causes entire test case to fail' message='Skip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit skip'] +##teamcity[testIgnored name='failing for some generator values causes entire test case to fail' message='Skip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='failing for some generator values causes entire test case to fail' message='Skip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit skip'] +##teamcity[testFinished name='failing for some generator values causes entire test case to fail' duration="{duration}"] +##teamcity[testStarted name='failing in some unskipped sections causes entire test case to fail'] +##teamcity[testIgnored name='failing in some unskipped sections causes entire test case to fail' message='-------------------------------------------------------------------------------|nskipped|n-------------------------------------------------------------------------------|nSkip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit skip'] +##teamcity[testIgnored name='failing in some unskipped sections causes entire test case to fail' message='-------------------------------------------------------------------------------|nnot skipped|n-------------------------------------------------------------------------------|nSkip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='failing in some unskipped sections causes entire test case to fail' duration="{duration}"] +##teamcity[testStarted name='first tag'] +##teamcity[testFinished name='first tag' duration="{duration}"] +##teamcity[testStarted name='has printf'] +loose text artifact +##teamcity[testFinished name='has printf' duration="{duration}"] +##teamcity[testStarted name='is_unary_function'] +##teamcity[testFinished name='is_unary_function' duration="{duration}"] +##teamcity[testStarted name='just failure'] +##teamcity[testFailed name='just failure' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexplicit failure with message:|n "Previous info should not be seen"'] +##teamcity[testFinished name='just failure' duration="{duration}"] +##teamcity[testStarted name='just failure after unscoped info'] +##teamcity[testFailed name='just failure after unscoped info' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexplicit failure with message:|n "previous unscoped info SHOULD not be seen"'] +##teamcity[testFinished name='just failure after unscoped info' duration="{duration}"] +##teamcity[testStarted name='just info'] +##teamcity[testFinished name='just info' duration="{duration}"] +##teamcity[testStarted name='just unscoped info'] +##teamcity[testFinished name='just unscoped info' duration="{duration}"] +##teamcity[testStarted name='long long'] +##teamcity[testFinished name='long long' duration="{duration}"] +##teamcity[testStarted name='looped SECTION tests'] +##teamcity[testFailed name='looped SECTION tests' message='-------------------------------------------------------------------------------|nb is currently: 0|n-------------------------------------------------------------------------------|nMisc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexpression failed|n CHECK( b > a )|nwith expansion:|n 0 > 1|n'] +##teamcity[testFailed name='looped SECTION tests' message='-------------------------------------------------------------------------------|nb is currently: 1|n-------------------------------------------------------------------------------|nMisc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexpression failed|n CHECK( b > a )|nwith expansion:|n 1 > 1|n'] +##teamcity[testFinished name='looped SECTION tests' duration="{duration}"] +##teamcity[testStarted name='looped tests'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexpression failed with message:|n "Testing if fib|[0|] (1) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:|nexpression failed with message:|n "Testing if fib|[1|] (1) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:|nexpression failed with message:|n "Testing if fib|[3|] (3) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:|nexpression failed with message:|n "Testing if fib|[4|] (5) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:|nexpression failed with message:|n "Testing if fib|[6|] (13) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:|nexpression failed with message:|n "Testing if fib|[7|] (21) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFinished name='looped tests' duration="{duration}"] +##teamcity[testStarted name='makeStream recognizes %debug stream name'] +##teamcity[testFinished name='makeStream recognizes %debug stream name' duration="{duration}"] +##teamcity[testStarted name='make_unique reimplementation'] +##teamcity[testFinished name='make_unique reimplementation' duration="{duration}"] +##teamcity[testStarted name='mean'] +##teamcity[testFinished name='mean' duration="{duration}"] +##teamcity[testStarted name='measure'] +##teamcity[testFinished name='measure' duration="{duration}"] +##teamcity[testStarted name='mix info, unscoped info and warning'] +##teamcity[testFinished name='mix info, unscoped info and warning' duration="{duration}"] +##teamcity[testStarted name='more nested SECTION tests'] +##teamcity[testFailed name='more nested SECTION tests' message='-------------------------------------------------------------------------------|ndoesn|'t equal|nequal|n-------------------------------------------------------------------------------|nMisc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexpression failed|n REQUIRE( a == b )|nwith expansion:|n 1 == 2|n'] +##teamcity[testFinished name='more nested SECTION tests' duration="{duration}"] +##teamcity[testStarted name='nested SECTION tests'] +##teamcity[testFinished name='nested SECTION tests' duration="{duration}"] +##teamcity[testStarted name='nested sections can be skipped dynamically at runtime'] +##teamcity[testIgnored name='nested sections can be skipped dynamically at runtime' message='-------------------------------------------------------------------------------|nB|nB2|n-------------------------------------------------------------------------------|nSkip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit skip'] +##teamcity[testStdOut name='nested sections can be skipped dynamically at runtime' out='a!|nb1!|n!|n'] +##teamcity[testFinished name='nested sections can be skipped dynamically at runtime' duration="{duration}"] +##teamcity[testStarted name='non streamable - with conv. op'] +##teamcity[testFinished name='non streamable - with conv. op' duration="{duration}"] +##teamcity[testStarted name='non-copyable objects'] +##teamcity[testFinished name='non-copyable objects' duration="{duration}"] +##teamcity[testStarted name='normal_quantile'] +##teamcity[testFinished name='normal_quantile' duration="{duration}"] +##teamcity[testStarted name='not allowed'] +##teamcity[testFinished name='not allowed' duration="{duration}"] +##teamcity[testStarted name='not prints unscoped info from previous failures'] +##teamcity[testFailed name='not prints unscoped info from previous failures' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexpression failed with message:|n "this SHOULD be seen"|n REQUIRE( false )|nwith expansion:|n false|n'] +##teamcity[testFinished name='not prints unscoped info from previous failures' duration="{duration}"] +##teamcity[testStarted name='null strings'] +##teamcity[testFinished name='null strings' duration="{duration}"] +##teamcity[testStarted name='null_ptr'] +##teamcity[testFinished name='null_ptr' duration="{duration}"] +##teamcity[testStarted name='pair > -> toString'] +##teamcity[testFinished name='pair > -> toString' duration="{duration}"] +##teamcity[testStarted name='parseEnums'] +##teamcity[testFinished name='parseEnums' duration="{duration}"] +##teamcity[testStarted name='pointer to class'] +##teamcity[testFinished name='pointer to class' duration="{duration}"] +##teamcity[testStarted name='print unscoped info if passing unscoped info is printed'] +##teamcity[testFinished name='print unscoped info if passing unscoped info is printed' duration="{duration}"] +##teamcity[testStarted name='prints unscoped info on failure'] +##teamcity[testFailed name='prints unscoped info on failure' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexpression failed with messages:|n "this SHOULD be seen"|n "this SHOULD also be seen"|n REQUIRE( false )|nwith expansion:|n false|n'] +##teamcity[testFinished name='prints unscoped info on failure' duration="{duration}"] +##teamcity[testStarted name='prints unscoped info only for the first assertion'] +##teamcity[testFailed name='prints unscoped info only for the first assertion' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexpression failed with message:|n "this SHOULD be seen only ONCE"|n CHECK( false )|nwith expansion:|n false|n'] +##teamcity[testFinished name='prints unscoped info only for the first assertion' duration="{duration}"] +##teamcity[testStarted name='random SECTION tests'] +##teamcity[testFinished name='random SECTION tests' duration="{duration}"] +##teamcity[testStarted name='replaceInPlace'] +##teamcity[testFinished name='replaceInPlace' duration="{duration}"] +##teamcity[testStarted name='request an unknown %-starting stream fails'] +##teamcity[testFinished name='request an unknown %-starting stream fails' duration="{duration}"] +##teamcity[testStarted name='resolution'] +##teamcity[testFinished name='resolution' duration="{duration}"] +##teamcity[testStarted name='run_for_at_least, chronometer'] +##teamcity[testFinished name='run_for_at_least, chronometer' duration="{duration}"] +##teamcity[testStarted name='run_for_at_least, int'] +##teamcity[testFinished name='run_for_at_least, int' duration="{duration}"] +##teamcity[testStarted name='second tag'] +##teamcity[testFinished name='second tag' duration="{duration}"] +##teamcity[testStarted name='sections can be skipped dynamically at runtime'] +##teamcity[testIgnored name='sections can be skipped dynamically at runtime' message='-------------------------------------------------------------------------------|nskipped|n-------------------------------------------------------------------------------|nSkip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit skip'] +##teamcity[testFinished name='sections can be skipped dynamically at runtime' duration="{duration}"] +##teamcity[testStarted name='send a single char to INFO'] +##teamcity[testFailed name='send a single char to INFO' message='Misc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexpression failed with message:|n "3"|n REQUIRE( false )|nwith expansion:|n false|n'] +##teamcity[testFinished name='send a single char to INFO' duration="{duration}"] +##teamcity[testStarted name='sends information to INFO'] +##teamcity[testFailed name='sends information to INFO' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexpression failed with messages:|n "hi"|n "i := 7"|n REQUIRE( false )|nwith expansion:|n false|n'] +##teamcity[testFinished name='sends information to INFO' duration="{duration}"] +##teamcity[testStarted name='shortened hide tags are split apart'] +##teamcity[testFinished name='shortened hide tags are split apart' duration="{duration}"] +##teamcity[testStarted name='skipped tests can optionally provide a reason'] +##teamcity[testIgnored name='skipped tests can optionally provide a reason' message='Skip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit skip with message:|n "skipping because answer = 43"'] +##teamcity[testFinished name='skipped tests can optionally provide a reason' duration="{duration}"] +##teamcity[testStarted name='splitString'] +##teamcity[testFinished name='splitString' duration="{duration}"] +##teamcity[testStarted name='stacks unscoped info in loops'] +##teamcity[testFailed name='stacks unscoped info in loops' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexpression failed with messages:|n "Count 1 to 3..."|n "1"|n "2"|n "3"|n CHECK( false )|nwith expansion:|n false|n'] +##teamcity[testFailed name='stacks unscoped info in loops' message='Message.tests.cpp:|nexpression failed with messages:|n "Count 4 to 6..."|n "4"|n "5"|n "6"|n CHECK( false )|nwith expansion:|n false|n'] +##teamcity[testFinished name='stacks unscoped info in loops' duration="{duration}"] +##teamcity[testStarted name='startsWith'] +##teamcity[testFinished name='startsWith' duration="{duration}"] +##teamcity[testStarted name='std::map is convertible string'] +##teamcity[testFinished name='std::map is convertible string' duration="{duration}"] +##teamcity[testStarted name='std::pair -> toString'] +##teamcity[testFinished name='std::pair -> toString' duration="{duration}"] +##teamcity[testStarted name='std::pair -> toString'] +##teamcity[testFinished name='std::pair -> toString' duration="{duration}"] +##teamcity[testStarted name='std::set is convertible string'] +##teamcity[testFinished name='std::set is convertible string' duration="{duration}"] +##teamcity[testStarted name='std::vector > -> toString'] +##teamcity[testFinished name='std::vector > -> toString' duration="{duration}"] +##teamcity[testStarted name='stdout and stderr streams have %-starting name'] +##teamcity[testFinished name='stdout and stderr streams have %-starting name' duration="{duration}"] +##teamcity[testStarted name='stringify ranges'] +##teamcity[testFinished name='stringify ranges' duration="{duration}"] +##teamcity[testStarted name='stringify( has_maker )'] +##teamcity[testFinished name='stringify( has_maker )' duration="{duration}"] +##teamcity[testStarted name='stringify( has_maker_and_operator )'] +##teamcity[testFinished name='stringify( has_maker_and_operator )' duration="{duration}"] +##teamcity[testStarted name='stringify( has_neither )'] +##teamcity[testFinished name='stringify( has_neither )' duration="{duration}"] +##teamcity[testStarted name='stringify( has_operator )'] +##teamcity[testFinished name='stringify( has_operator )' duration="{duration}"] +##teamcity[testStarted name='stringify( has_template_operator )'] +##teamcity[testFinished name='stringify( has_template_operator )' duration="{duration}"] +##teamcity[testStarted name='stringify( vectors )'] +##teamcity[testFinished name='stringify( vectors )' duration="{duration}"] +##teamcity[testStarted name='stringify( vectors )'] +##teamcity[testFinished name='stringify( vectors )' duration="{duration}"] +##teamcity[testStarted name='stringify( vectors )'] +##teamcity[testFinished name='stringify( vectors )' duration="{duration}"] +##teamcity[testStarted name='strlen3'] +##teamcity[testFinished name='strlen3' duration="{duration}"] +##teamcity[testStarted name='tables'] +##teamcity[testFinished name='tables' duration="{duration}"] +##teamcity[testStarted name='tags with dots in later positions are not parsed as hidden'] +##teamcity[testFinished name='tags with dots in later positions are not parsed as hidden' duration="{duration}"] +##teamcity[testStarted name='tests can be skipped dynamically at runtime'] +##teamcity[testIgnored name='tests can be skipped dynamically at runtime' message='Skip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit skip'] +##teamcity[testFinished name='tests can be skipped dynamically at runtime' duration="{duration}"] +##teamcity[testStarted name='thrown std::strings are translated'] +##teamcity[testFailed name='thrown std::strings are translated' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "Why would you throw a std::string?"'] +##teamcity[testFinished name='thrown std::strings are translated' duration="{duration}"] +##teamcity[testStarted name='toString on const wchar_t const pointer returns the string contents'] +##teamcity[testFinished name='toString on const wchar_t const pointer returns the string contents' duration="{duration}"] +##teamcity[testStarted name='toString on const wchar_t pointer returns the string contents'] +##teamcity[testFinished name='toString on const wchar_t pointer returns the string contents' duration="{duration}"] +##teamcity[testStarted name='toString on wchar_t const pointer returns the string contents'] +##teamcity[testFinished name='toString on wchar_t const pointer returns the string contents' duration="{duration}"] +##teamcity[testStarted name='toString on wchar_t returns the string contents'] +##teamcity[testFinished name='toString on wchar_t returns the string contents' duration="{duration}"] +##teamcity[testStarted name='toString(enum class w/operator<<)'] +##teamcity[testFinished name='toString(enum class w/operator<<)' duration="{duration}"] +##teamcity[testStarted name='toString(enum class)'] +##teamcity[testFinished name='toString(enum class)' duration="{duration}"] +##teamcity[testStarted name='toString(enum w/operator<<)'] +##teamcity[testFinished name='toString(enum w/operator<<)' duration="{duration}"] +##teamcity[testStarted name='toString(enum)'] +##teamcity[testFinished name='toString(enum)' duration="{duration}"] +##teamcity[testStarted name='tuple<>'] +##teamcity[testFinished name='tuple<>' duration="{duration}"] +##teamcity[testStarted name='tuple'] +##teamcity[testFinished name='tuple' duration="{duration}"] +##teamcity[testStarted name='tuple'] +##teamcity[testFinished name='tuple' duration="{duration}"] +##teamcity[testStarted name='tuple'] +##teamcity[testFinished name='tuple' duration="{duration}"] +##teamcity[testStarted name='tuple,tuple<>,float>'] +##teamcity[testFinished name='tuple,tuple<>,float>' duration="{duration}"] +##teamcity[testStarted name='uniform samples'] +##teamcity[testFinished name='uniform samples' duration="{duration}"] +##teamcity[testStarted name='uniform_integer_distribution can return the bounds'] +##teamcity[testFinished name='uniform_integer_distribution can return the bounds' duration="{duration}"] +##teamcity[testStarted name='unique_ptr reimplementation: basic functionality'] +##teamcity[testFinished name='unique_ptr reimplementation: basic functionality' duration="{duration}"] +##teamcity[testStarted name='vec> -> toString'] +##teamcity[testFinished name='vec> -> toString' duration="{duration}"] +##teamcity[testStarted name='vector -> toString'] +##teamcity[testFinished name='vector -> toString' duration="{duration}"] +##teamcity[testStarted name='vector -> toString'] +##teamcity[testFinished name='vector -> toString' duration="{duration}"] +##teamcity[testStarted name='vector -> toString'] +##teamcity[testFinished name='vector -> toString' duration="{duration}"] +##teamcity[testStarted name='vector -> toString'] +##teamcity[testFinished name='vector -> toString' duration="{duration}"] +##teamcity[testStarted name='vectors can be sized and resized'] +##teamcity[testFinished name='vectors can be sized and resized' duration="{duration}"] +##teamcity[testStarted name='warmup'] +##teamcity[testFinished name='warmup' duration="{duration}"] +##teamcity[testStarted name='weighted_average_quantile'] +##teamcity[testFinished name='weighted_average_quantile' duration="{duration}"] +##teamcity[testStarted name='xmlentitycheck'] +##teamcity[testFinished name='xmlentitycheck' duration="{duration}"] +##teamcity[testSuiteFinished name=''] diff --git a/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt b/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt new file mode 100644 index 0000000..dde8a68 --- /dev/null +++ b/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt @@ -0,0 +1,1023 @@ +##teamcity[testSuiteStarted name=''] +##teamcity[testStarted name='# A test name that starts with a #'] +##teamcity[testFinished name='# A test name that starts with a #' duration="{duration}"] +##teamcity[testStarted name='#1027: Bitfields can be captured'] +##teamcity[testFinished name='#1027: Bitfields can be captured' duration="{duration}"] +##teamcity[testStarted name='#1147'] +##teamcity[testFinished name='#1147' duration="{duration}"] +##teamcity[testStarted name='#1175 - Hidden Test'] +##teamcity[testFinished name='#1175 - Hidden Test' duration="{duration}"] +##teamcity[testStarted name='#1238'] +##teamcity[testFinished name='#1238' duration="{duration}"] +##teamcity[testStarted name='#1245'] +##teamcity[testFinished name='#1245' duration="{duration}"] +##teamcity[testStarted name='#1319: Sections can have description (even if it is not saved'] +##teamcity[testFinished name='#1319: Sections can have description (even if it is not saved' duration="{duration}"] +##teamcity[testStarted name='#1403'] +##teamcity[testFinished name='#1403' duration="{duration}"] +##teamcity[testStarted name='#1455 - INFO and WARN can start with a linebreak'] +##teamcity[testFinished name='#1455 - INFO and WARN can start with a linebreak' duration="{duration}"] +##teamcity[testStarted name='#1514: stderr/stdout is not captured in tests aborted by an exception'] +##teamcity[testFailed name='#1514: stderr/stdout is not captured in tests aborted by an exception' message='Tricky.tests.cpp:|n...............................................................................|n|nTricky.tests.cpp:|nexplicit failure with message:|n "1514"'] +##teamcity[testStdOut name='#1514: stderr/stdout is not captured in tests aborted by an exception' out='This would not be caught previously|n'] +##teamcity[testStdErr name='#1514: stderr/stdout is not captured in tests aborted by an exception' out='Nor would this|n'] +##teamcity[testFinished name='#1514: stderr/stdout is not captured in tests aborted by an exception' duration="{duration}"] +##teamcity[testStarted name='#1548'] +##teamcity[testFinished name='#1548' duration="{duration}"] +##teamcity[testStarted name='#1905 -- test spec parser properly clears internal state between compound tests'] +##teamcity[testFinished name='#1905 -- test spec parser properly clears internal state between compound tests' duration="{duration}"] +##teamcity[testStarted name='#1912 -- test spec parser handles escaping'] +##teamcity[testFinished name='#1912 -- test spec parser handles escaping' duration="{duration}"] +##teamcity[testStarted name='#1913 - GENERATE inside a for loop should not keep recreating the generator'] +##teamcity[testFinished name='#1913 - GENERATE inside a for loop should not keep recreating the generator' duration="{duration}"] +##teamcity[testStarted name='#1913 - GENERATEs can share a line'] +##teamcity[testFinished name='#1913 - GENERATEs can share a line' duration="{duration}"] +##teamcity[testStarted name='#1938 - GENERATE after a section'] +##teamcity[testFinished name='#1938 - GENERATE after a section' duration="{duration}"] +##teamcity[testStarted name='#1938 - Section followed by flat generate'] +##teamcity[testFinished name='#1938 - Section followed by flat generate' duration="{duration}"] +##teamcity[testStarted name='#1938 - flat generate'] +##teamcity[testFinished name='#1938 - flat generate' duration="{duration}"] +##teamcity[testStarted name='#1938 - mixed sections and generates'] +##teamcity[testFinished name='#1938 - mixed sections and generates' duration="{duration}"] +##teamcity[testStarted name='#1938 - nested generate'] +##teamcity[testFinished name='#1938 - nested generate' duration="{duration}"] +##teamcity[testStarted name='#1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0'] +##teamcity[testFinished name='#1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0' duration="{duration}"] +##teamcity[testStarted name='#1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0'] +##teamcity[testFinished name='#1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0' duration="{duration}"] +##teamcity[testStarted name='#1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0'] +##teamcity[testFinished name='#1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0' duration="{duration}"] +##teamcity[testStarted name='#2152 - ULP checks between differently signed values were wrong - double'] +##teamcity[testFinished name='#2152 - ULP checks between differently signed values were wrong - double' duration="{duration}"] +##teamcity[testStarted name='#2152 - ULP checks between differently signed values were wrong - float'] +##teamcity[testFinished name='#2152 - ULP checks between differently signed values were wrong - float' duration="{duration}"] +##teamcity[testStarted name='#2615 - Throwing in constructor generator fails test case but does not abort'] +##teamcity[testIgnored name='#2615 - Throwing in constructor generator fails test case but does not abort' message='Generators.tests.cpp:|n...............................................................................|n|nGenerators.tests.cpp:|nunexpected exception with message:|n "failure to init"- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='#2615 - Throwing in constructor generator fails test case but does not abort' duration="{duration}"] +##teamcity[testStarted name='#748 - captures with unexpected exceptions'] +##teamcity[testIgnored name='#748 - captures with unexpected exceptions' message='-------------------------------------------------------------------------------|noutside assertions|n-------------------------------------------------------------------------------|nException.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with messages:|n "answer := 42"|n "expected exception"- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='#748 - captures with unexpected exceptions' message='-------------------------------------------------------------------------------|ninside REQUIRE_NOTHROW|n-------------------------------------------------------------------------------|nException.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with messages:|n "answer := 42"|n "expected exception"|n REQUIRE_NOTHROW( thisThrows() )|nwith expansion:|n thisThrows()|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='#748 - captures with unexpected exceptions' duration="{duration}"] +##teamcity[testStarted name='#809'] +##teamcity[testFinished name='#809' duration="{duration}"] +##teamcity[testStarted name='#833'] +##teamcity[testFinished name='#833' duration="{duration}"] +##teamcity[testStarted name='#835 -- errno should not be touched by Catch2'] +##teamcity[testIgnored name='#835 -- errno should not be touched by Catch2' message='Misc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexpression failed|n CHECK( f() == 0 )|nwith expansion:|n 1 == 0|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='#835 -- errno should not be touched by Catch2' duration="{duration}"] +##teamcity[testStarted name='#872'] +##teamcity[testFinished name='#872' duration="{duration}"] +##teamcity[testStarted name='#961 -- Dynamically created sections should all be reported'] +##teamcity[testFinished name='#961 -- Dynamically created sections should all be reported' duration="{duration}"] +##teamcity[testStarted name='|'Not|' checks that should fail'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:|n...............................................................................|n|nCondition.tests.cpp:|nexpression failed|n CHECK( false != false )|nwith expansion:|n false != false|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( true != true )|nwith expansion:|n true != true|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( !true )|nwith expansion:|n false|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK_FALSE( true )|nwith expansion:|n !true|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( !trueValue )|nwith expansion:|n false|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK_FALSE( trueValue )|nwith expansion:|n !true|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( !(1 == 1) )|nwith expansion:|n false|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK_FALSE( 1 == 1 )|nwith expansion:|n !(1 == 1)|n'] +##teamcity[testFinished name='|'Not|' checks that should fail' duration="{duration}"] +##teamcity[testStarted name='|'Not|' checks that should succeed'] +##teamcity[testFinished name='|'Not|' checks that should succeed' duration="{duration}"] +##teamcity[testStarted name='(unimplemented) static bools can be evaluated'] +##teamcity[testFinished name='(unimplemented) static bools can be evaluated' duration="{duration}"] +##teamcity[testStarted name='3x3x3 ints'] +##teamcity[testFinished name='3x3x3 ints' duration="{duration}"] +##teamcity[testStarted name='A METHOD_AS_TEST_CASE based test run that fails'] +##teamcity[testFailed name='A METHOD_AS_TEST_CASE based test run that fails' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( s == "world" )|nwith expansion:|n "hello" == "world"|n'] +##teamcity[testFinished name='A METHOD_AS_TEST_CASE based test run that fails' duration="{duration}"] +##teamcity[testStarted name='A METHOD_AS_TEST_CASE based test run that succeeds'] +##teamcity[testFinished name='A METHOD_AS_TEST_CASE based test run that succeeds' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Template_Fixture_2::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Template_Fixture_2::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Template_Fixture_2::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Template_Fixture_2::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Template_Fixture_2{}.m_a.size() < 2 )|nwith expansion:|n 6 < 2|n'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Template_Fixture_2{}.m_a.size() < 2 )|nwith expansion:|n 2 < 2|n'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Template_Fixture_2{}.m_a.size() < 2 )|nwith expansion:|n 6 < 2|n'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Template_Fixture_2{}.m_a.size() < 2 )|nwith expansion:|n 2 < 2|n'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - double'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - double' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Template_Fixture::m_a == 2 )|nwith expansion:|n 1.0 == 2|n'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - double' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - float'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - float' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Template_Fixture::m_a == 2 )|nwith expansion:|n 1.0f == 2|n'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - float' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - int'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - int' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Template_Fixture::m_a == 2 )|nwith expansion:|n 1 == 2|n'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - int' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - double'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - double' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - float'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - float' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - int'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - int' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Nttp_Fixture::value == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Nttp_Fixture::value == 0 )|nwith expansion:|n 3 == 0|n'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( Nttp_Fixture::value == 0 )|nwith expansion:|n 6 == 0|n'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 3'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 3' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 6'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 6' duration="{duration}"] +##teamcity[testStarted name='A TEST_CASE_METHOD based test run that fails'] +##teamcity[testFailed name='A TEST_CASE_METHOD based test run that fails' message='Class.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( m_a == 2 )|nwith expansion:|n 1 == 2|n'] +##teamcity[testFinished name='A TEST_CASE_METHOD based test run that fails' duration="{duration}"] +##teamcity[testStarted name='A TEST_CASE_METHOD based test run that succeeds'] +##teamcity[testFinished name='A TEST_CASE_METHOD based test run that succeeds' duration="{duration}"] +##teamcity[testStarted name='A TEST_CASE_PERSISTENT_FIXTURE based test run that fails'] +##teamcity[testFailed name='A TEST_CASE_PERSISTENT_FIXTURE based test run that fails' message='-------------------------------------------------------------------------------|nSecond partial run|n-------------------------------------------------------------------------------|nClass.tests.cpp:|n...............................................................................|n|nClass.tests.cpp:|nexpression failed|n REQUIRE( m_a == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFinished name='A TEST_CASE_PERSISTENT_FIXTURE based test run that fails' duration="{duration}"] +##teamcity[testStarted name='A TEST_CASE_PERSISTENT_FIXTURE based test run that succeeds'] +##teamcity[testFinished name='A TEST_CASE_PERSISTENT_FIXTURE based test run that succeeds' duration="{duration}"] +##teamcity[testStarted name='A Template product test case - Foo'] +##teamcity[testFinished name='A Template product test case - Foo' duration="{duration}"] +##teamcity[testStarted name='A Template product test case - Foo'] +##teamcity[testFinished name='A Template product test case - Foo' duration="{duration}"] +##teamcity[testStarted name='A Template product test case - std::vector'] +##teamcity[testFinished name='A Template product test case - std::vector' duration="{duration}"] +##teamcity[testStarted name='A Template product test case - std::vector'] +##teamcity[testFinished name='A Template product test case - std::vector' duration="{duration}"] +##teamcity[testStarted name='A Template product test case with array signature - Bar'] +##teamcity[testFinished name='A Template product test case with array signature - Bar' duration="{duration}"] +##teamcity[testStarted name='A Template product test case with array signature - Bar'] +##teamcity[testFinished name='A Template product test case with array signature - Bar' duration="{duration}"] +##teamcity[testStarted name='A Template product test case with array signature - std::array'] +##teamcity[testFinished name='A Template product test case with array signature - std::array' duration="{duration}"] +##teamcity[testStarted name='A Template product test case with array signature - std::array'] +##teamcity[testFinished name='A Template product test case with array signature - std::array' duration="{duration}"] +##teamcity[testStarted name='A comparison that uses literals instead of the normal constructor'] +##teamcity[testFinished name='A comparison that uses literals instead of the normal constructor' duration="{duration}"] +##teamcity[testStarted name='A couple of nested sections followed by a failure'] +##teamcity[testFailed name='A couple of nested sections followed by a failure' message='Misc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexplicit failure with message:|n "to infinity and beyond"'] +##teamcity[testFinished name='A couple of nested sections followed by a failure' duration="{duration}"] +##teamcity[testStarted name='A failing expression with a non streamable type is still captured'] +##teamcity[testFailed name='A failing expression with a non streamable type is still captured' message='Tricky.tests.cpp:|n...............................................................................|n|nTricky.tests.cpp:|nexpression failed|n CHECK( &o1 == &o2 )|nwith expansion:|n 0x == 0x|n'] +##teamcity[testFailed name='A failing expression with a non streamable type is still captured' message='Tricky.tests.cpp:|nexpression failed|n CHECK( o1 == o2 )|nwith expansion:|n {?} == {?}|n'] +##teamcity[testFinished name='A failing expression with a non streamable type is still captured' duration="{duration}"] +##teamcity[testStarted name='Absolute margin'] +##teamcity[testFinished name='Absolute margin' duration="{duration}"] +##teamcity[testStarted name='An empty test with no assertions'] +##teamcity[testFinished name='An empty test with no assertions' duration="{duration}"] +##teamcity[testStarted name='An expression with side-effects should only be evaluated once'] +##teamcity[testFinished name='An expression with side-effects should only be evaluated once' duration="{duration}"] +##teamcity[testStarted name='An unchecked exception reports the line of the last assertion'] +##teamcity[testFailed name='An unchecked exception reports the line of the last assertion' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "unexpected exception"|n {Unknown expression after the reported line}|nwith expansion:|n {Unknown expression after the reported line}|n'] +##teamcity[testFinished name='An unchecked exception reports the line of the last assertion' duration="{duration}"] +##teamcity[testStarted name='Anonymous test case 1'] +##teamcity[testFinished name='Anonymous test case 1' duration="{duration}"] +##teamcity[testStarted name='Approx setters validate their arguments'] +##teamcity[testFinished name='Approx setters validate their arguments' duration="{duration}"] +##teamcity[testStarted name='Approx with exactly-representable margin'] +##teamcity[testFinished name='Approx with exactly-representable margin' duration="{duration}"] +##teamcity[testStarted name='Approximate PI'] +##teamcity[testFinished name='Approximate PI' duration="{duration}"] +##teamcity[testStarted name='Approximate comparisons with different epsilons'] +##teamcity[testFinished name='Approximate comparisons with different epsilons' duration="{duration}"] +##teamcity[testStarted name='Approximate comparisons with floats'] +##teamcity[testFinished name='Approximate comparisons with floats' duration="{duration}"] +##teamcity[testStarted name='Approximate comparisons with ints'] +##teamcity[testFinished name='Approximate comparisons with ints' duration="{duration}"] +##teamcity[testStarted name='Approximate comparisons with mixed numeric types'] +##teamcity[testFinished name='Approximate comparisons with mixed numeric types' duration="{duration}"] +##teamcity[testStarted name='Arbitrary predicate matcher'] +##teamcity[testFinished name='Arbitrary predicate matcher' duration="{duration}"] +##teamcity[testStarted name='Assertion macros support bit operators and bool conversions'] +##teamcity[testFinished name='Assertion macros support bit operators and bool conversions' duration="{duration}"] +##teamcity[testStarted name='Assertions then sections'] +##teamcity[testFinished name='Assertions then sections' duration="{duration}"] +##teamcity[testStarted name='Basic use of the Contains range matcher'] +##teamcity[testFinished name='Basic use of the Contains range matcher' duration="{duration}"] +##teamcity[testStarted name='Basic use of the Empty range matcher'] +##teamcity[testFinished name='Basic use of the Empty range matcher' duration="{duration}"] +##teamcity[testStarted name='CAPTURE can deal with complex expressions'] +##teamcity[testFinished name='CAPTURE can deal with complex expressions' duration="{duration}"] +##teamcity[testStarted name='CAPTURE can deal with complex expressions involving commas'] +##teamcity[testFinished name='CAPTURE can deal with complex expressions involving commas' duration="{duration}"] +##teamcity[testStarted name='CAPTURE parses string and character constants'] +##teamcity[testFinished name='CAPTURE parses string and character constants' duration="{duration}"] +##teamcity[testStarted name='Capture and info messages'] +##teamcity[testFinished name='Capture and info messages' duration="{duration}"] +##teamcity[testStarted name='CaseInsensitiveEqualsTo is case insensitive'] +##teamcity[testFinished name='CaseInsensitiveEqualsTo is case insensitive' duration="{duration}"] +##teamcity[testStarted name='CaseInsensitiveLess is case insensitive'] +##teamcity[testFinished name='CaseInsensitiveLess is case insensitive' duration="{duration}"] +##teamcity[testStarted name='Character pretty printing'] +##teamcity[testFinished name='Character pretty printing' duration="{duration}"] +##teamcity[testStarted name='Clara::Arg does not crash on incomplete input'] +##teamcity[testFinished name='Clara::Arg does not crash on incomplete input' duration="{duration}"] +##teamcity[testStarted name='Clara::Arg supports single-arg parse the way Opt does'] +##teamcity[testFinished name='Clara::Arg supports single-arg parse the way Opt does' duration="{duration}"] +##teamcity[testStarted name='Clara::Opt supports accept-many lambdas'] +##teamcity[testFinished name='Clara::Opt supports accept-many lambdas' duration="{duration}"] +##teamcity[testStarted name='ColourGuard behaviour'] +##teamcity[testFinished name='ColourGuard behaviour' duration="{duration}"] +##teamcity[testStarted name='Combining MatchAllOfGeneric does not nest'] +##teamcity[testFinished name='Combining MatchAllOfGeneric does not nest' duration="{duration}"] +##teamcity[testStarted name='Combining MatchAnyOfGeneric does not nest'] +##teamcity[testFinished name='Combining MatchAnyOfGeneric does not nest' duration="{duration}"] +##teamcity[testStarted name='Combining MatchNotOfGeneric does not nest'] +##teamcity[testFinished name='Combining MatchNotOfGeneric does not nest' duration="{duration}"] +##teamcity[testStarted name='Combining concrete matchers does not use templated matchers'] +##teamcity[testFinished name='Combining concrete matchers does not use templated matchers' duration="{duration}"] +##teamcity[testStarted name='Combining only templated matchers'] +##teamcity[testFinished name='Combining only templated matchers' duration="{duration}"] +##teamcity[testStarted name='Combining templated and concrete matchers'] +##teamcity[testFinished name='Combining templated and concrete matchers' duration="{duration}"] +##teamcity[testStarted name='Combining templated matchers'] +##teamcity[testFinished name='Combining templated matchers' duration="{duration}"] +##teamcity[testStarted name='Commas in various macros are allowed'] +##teamcity[testFinished name='Commas in various macros are allowed' duration="{duration}"] +##teamcity[testStarted name='Comparing function pointers'] +##teamcity[testFinished name='Comparing function pointers' duration="{duration}"] +##teamcity[testStarted name='Comparison ops'] +##teamcity[testFinished name='Comparison ops' duration="{duration}"] +##teamcity[testStarted name='Comparison with explicitly convertible types'] +##teamcity[testFinished name='Comparison with explicitly convertible types' duration="{duration}"] +##teamcity[testStarted name='Comparisons between ints where one side is computed'] +##teamcity[testFinished name='Comparisons between ints where one side is computed' duration="{duration}"] +##teamcity[testStarted name='Comparisons between unsigned ints and negative signed ints match c++ standard behaviour'] +##teamcity[testFinished name='Comparisons between unsigned ints and negative signed ints match c++ standard behaviour' duration="{duration}"] +##teamcity[testStarted name='Comparisons with int literals don|'t warn when mixing signed/ unsigned'] +##teamcity[testFinished name='Comparisons with int literals don|'t warn when mixing signed/ unsigned' duration="{duration}"] +##teamcity[testStarted name='Composed generic matchers shortcircuit'] +##teamcity[testFinished name='Composed generic matchers shortcircuit' duration="{duration}"] +##teamcity[testStarted name='Composed matchers shortcircuit'] +##teamcity[testFinished name='Composed matchers shortcircuit' duration="{duration}"] +##teamcity[testStarted name='Contains string matcher'] +##teamcity[testFailed name='Contains string matcher' message='Matchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" contains: "not there" (case insensitive)|n'] +##teamcity[testFailed name='Contains string matcher' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" contains: "STRING"|n'] +##teamcity[testFinished name='Contains string matcher' duration="{duration}"] +##teamcity[testStarted name='Copy and then generate a range'] +##teamcity[testFinished name='Copy and then generate a range' duration="{duration}"] +##teamcity[testStarted name='Cout stream properly declares it writes to stdout'] +##teamcity[testFinished name='Cout stream properly declares it writes to stdout' duration="{duration}"] +##teamcity[testStarted name='Custom exceptions can be translated when testing for nothrow'] +##teamcity[testFailed name='Custom exceptions can be translated when testing for nothrow' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "custom exception - not std"|n REQUIRE_NOTHROW( throwCustom() )|nwith expansion:|n throwCustom()|n'] +##teamcity[testFinished name='Custom exceptions can be translated when testing for nothrow' duration="{duration}"] +##teamcity[testStarted name='Custom exceptions can be translated when testing for throwing as something else'] +##teamcity[testFailed name='Custom exceptions can be translated when testing for throwing as something else' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "custom exception - not std"|n REQUIRE_THROWS_AS( throwCustom(), std::exception )|nwith expansion:|n throwCustom(), std::exception|n'] +##teamcity[testFinished name='Custom exceptions can be translated when testing for throwing as something else' duration="{duration}"] +##teamcity[testStarted name='Custom std-exceptions can be custom translated'] +##teamcity[testFailed name='Custom std-exceptions can be custom translated' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "custom std exception"'] +##teamcity[testFinished name='Custom std-exceptions can be custom translated' duration="{duration}"] +##teamcity[testStarted name='Default scale is invisible to comparison'] +##teamcity[testFinished name='Default scale is invisible to comparison' duration="{duration}"] +##teamcity[testStarted name='Directly creating an EnumInfo'] +##teamcity[testFinished name='Directly creating an EnumInfo' duration="{duration}"] +##teamcity[testStarted name='Empty generators can SKIP in constructor'] +##teamcity[testIgnored name='Empty generators can SKIP in constructor' message='Skip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit skip with message:|n "This generator is empty"'] +##teamcity[testFinished name='Empty generators can SKIP in constructor' duration="{duration}"] +##teamcity[testStarted name='Empty stream name opens cout stream'] +##teamcity[testFinished name='Empty stream name opens cout stream' duration="{duration}"] +##teamcity[testStarted name='EndsWith string matcher'] +##teamcity[testFailed name='EndsWith string matcher' message='Matchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), EndsWith( "Substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" ends with: "Substring"|n'] +##teamcity[testFailed name='EndsWith string matcher' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" ends with: "this" (case insensitive)|n'] +##teamcity[testFinished name='EndsWith string matcher' duration="{duration}"] +##teamcity[testStarted name='Enums can quickly have stringification enabled using CATCH_REGISTER_ENUM'] +##teamcity[testFinished name='Enums can quickly have stringification enabled using CATCH_REGISTER_ENUM' duration="{duration}"] +##teamcity[testStarted name='Enums in namespaces can quickly have stringification enabled using CATCH_REGISTER_ENUM'] +##teamcity[testFinished name='Enums in namespaces can quickly have stringification enabled using CATCH_REGISTER_ENUM' duration="{duration}"] +##teamcity[testStarted name='Epsilon only applies to Approx|'s value'] +##teamcity[testFinished name='Epsilon only applies to Approx|'s value' duration="{duration}"] +##teamcity[testStarted name='Equality checks that should fail'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|n...............................................................................|n|nCondition.tests.cpp:|nexpression failed|n CHECK( data.int_seven == 6 )|nwith expansion:|n 7 == 6|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.int_seven == 8 )|nwith expansion:|n 7 == 8|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.int_seven == 0 )|nwith expansion:|n 7 == 0|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 9.11f ) )|nwith expansion:|n 9.100000381f|n==|nApprox( 9.10999965667724609 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 9.0f ) )|nwith expansion:|n 9.100000381f == Approx( 9.0 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 1 ) )|nwith expansion:|n 9.100000381f == Approx( 1.0 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 0 ) )|nwith expansion:|n 9.100000381f == Approx( 0.0 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.double_pi == Approx( 3.1415 ) )|nwith expansion:|n 3.14159265350000005|n==|nApprox( 3.14150000000000018 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello == "goodbye" )|nwith expansion:|n "hello" == "goodbye"|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello == "hell" )|nwith expansion:|n "hello" == "hell"|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello == "hello1" )|nwith expansion:|n "hello" == "hello1"|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello.size() == 6 )|nwith expansion:|n 5 == 6|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( x == Approx( 1.301 ) )|nwith expansion:|n 1.30000000000000027|n==|nApprox( 1.30099999999999993 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Equality checks that should fail' duration="{duration}"] +##teamcity[testStarted name='Equality checks that should succeed'] +##teamcity[testFinished name='Equality checks that should succeed' duration="{duration}"] +##teamcity[testStarted name='Equals'] +##teamcity[testFinished name='Equals' duration="{duration}"] +##teamcity[testStarted name='Equals string matcher'] +##teamcity[testFailed name='Equals string matcher' message='Matchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), Equals( "this string contains |'ABC|' as a substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" equals: "this string contains |'ABC|' as a substring"|n'] +##teamcity[testFailed name='Equals string matcher' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" equals: "something else" (case insensitive)|n'] +##teamcity[testFinished name='Equals string matcher' duration="{duration}"] +##teamcity[testStarted name='Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified'] +##teamcity[testFinished name='Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified' duration="{duration}"] +##teamcity[testStarted name='Exception matchers that fail'] +##teamcity[testFailed name='Exception matchers that fail' message='-------------------------------------------------------------------------------|nNo exception|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nno exception was thrown where one was expected|n CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n doesNotThrow(), SpecialException, ExceptionMatcher{ 1 }|n'] +##teamcity[testFailed name='Exception matchers that fail' message='Matchers.tests.cpp:|nno exception was thrown where one was expected|n REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n doesNotThrow(), SpecialException, ExceptionMatcher{ 1 }|n'] +##teamcity[testFailed name='Exception matchers that fail' message='-------------------------------------------------------------------------------|nType mismatch|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nunexpected exception with message:|n "Unknown exception"|n CHECK_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 }|n'] +##teamcity[testFailed name='Exception matchers that fail' message='Matchers.tests.cpp:|nunexpected exception with message:|n "Unknown exception"|n REQUIRE_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 }|n'] +##teamcity[testFailed name='Exception matchers that fail' message='-------------------------------------------------------------------------------|nContents are wrong|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THROWS_MATCHES( throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n SpecialException::what special exception has value of 1|n'] +##teamcity[testFailed name='Exception matchers that fail' message='Matchers.tests.cpp:|nexpression failed|n REQUIRE_THROWS_MATCHES( throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n SpecialException::what special exception has value of 1|n'] +##teamcity[testFinished name='Exception matchers that fail' duration="{duration}"] +##teamcity[testStarted name='Exception matchers that succeed'] +##teamcity[testFinished name='Exception matchers that succeed' duration="{duration}"] +##teamcity[testStarted name='Exception message can be matched'] +##teamcity[testFinished name='Exception message can be matched' duration="{duration}"] +##teamcity[testStarted name='Exception messages can be tested for'] +##teamcity[testFinished name='Exception messages can be tested for' duration="{duration}"] +##teamcity[testStarted name='Exceptions matchers'] +##teamcity[testFinished name='Exceptions matchers' duration="{duration}"] +##teamcity[testStarted name='Expected exceptions that don|'t throw or unexpected exceptions fail the test'] +##teamcity[testFailed name='Expected exceptions that don|'t throw or unexpected exceptions fail the test' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "expected exception"|n CHECK_THROWS_AS( thisThrows(), std::string )|nwith expansion:|n thisThrows(), std::string|n'] +##teamcity[testFailed name='Expected exceptions that don|'t throw or unexpected exceptions fail the test' message='Exception.tests.cpp:|nno exception was thrown where one was expected|n CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error )|nwith expansion:|n thisDoesntThrow(), std::domain_error|n'] +##teamcity[testFailed name='Expected exceptions that don|'t throw or unexpected exceptions fail the test' message='Exception.tests.cpp:|nunexpected exception with message:|n "expected exception"|n CHECK_NOTHROW( thisThrows() )|nwith expansion:|n thisThrows()|n'] +##teamcity[testFinished name='Expected exceptions that don|'t throw or unexpected exceptions fail the test' duration="{duration}"] +##teamcity[testStarted name='FAIL aborts the test'] +##teamcity[testFailed name='FAIL aborts the test' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexplicit failure with message:|n "This is a failure"'] +##teamcity[testFinished name='FAIL aborts the test' duration="{duration}"] +##teamcity[testStarted name='FAIL does not require an argument'] +##teamcity[testFailed name='FAIL does not require an argument' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexplicit failure'] +##teamcity[testFinished name='FAIL does not require an argument' duration="{duration}"] +##teamcity[testStarted name='FAIL_CHECK does not abort the test'] +##teamcity[testFailed name='FAIL_CHECK does not abort the test' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexplicit failure with message:|n "This is a failure"'] +##teamcity[testFinished name='FAIL_CHECK does not abort the test' duration="{duration}"] +##teamcity[testStarted name='Factorials are computed'] +##teamcity[testFinished name='Factorials are computed' duration="{duration}"] +##teamcity[testStarted name='Filter generator throws exception for empty generator'] +##teamcity[testFinished name='Filter generator throws exception for empty generator' duration="{duration}"] +##teamcity[testStarted name='Floating point matchers: double'] +##teamcity[testFinished name='Floating point matchers: double' duration="{duration}"] +##teamcity[testStarted name='Floating point matchers: float'] +##teamcity[testFinished name='Floating point matchers: float' duration="{duration}"] +##teamcity[testStarted name='GENERATE can combine literals and generators'] +##teamcity[testFinished name='GENERATE can combine literals and generators' duration="{duration}"] +##teamcity[testStarted name='Generators -- adapters'] +##teamcity[testFinished name='Generators -- adapters' duration="{duration}"] +##teamcity[testStarted name='Generators -- simple'] +##teamcity[testFinished name='Generators -- simple' duration="{duration}"] +##teamcity[testStarted name='Generators internals'] +##teamcity[testFinished name='Generators internals' duration="{duration}"] +##teamcity[testStarted name='Greater-than inequalities with different epsilons'] +##teamcity[testFinished name='Greater-than inequalities with different epsilons' duration="{duration}"] +##teamcity[testStarted name='Hashers with different seed produce different hash with same test case'] +##teamcity[testFinished name='Hashers with different seed produce different hash with same test case' duration="{duration}"] +##teamcity[testStarted name='Hashers with same seed produce same hash'] +##teamcity[testFinished name='Hashers with same seed produce same hash' duration="{duration}"] +##teamcity[testStarted name='Hashing different test cases produces different result'] +##teamcity[testFinished name='Hashing different test cases produces different result' duration="{duration}"] +##teamcity[testStarted name='Hashing test case produces same hash across multiple calls'] +##teamcity[testFinished name='Hashing test case produces same hash across multiple calls' duration="{duration}"] +##teamcity[testStarted name='INFO and UNSCOPED_INFO can stream multiple arguments'] +##teamcity[testFailed name='INFO and UNSCOPED_INFO can stream multiple arguments' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexplicit failure with messages:|n "This info has multiple parts."|n "This unscoped info has multiple parts."|n "Show infos!"'] +##teamcity[testFinished name='INFO and UNSCOPED_INFO can stream multiple arguments' duration="{duration}"] +##teamcity[testStarted name='INFO and WARN do not abort tests'] +##teamcity[testFinished name='INFO and WARN do not abort tests' duration="{duration}"] +##teamcity[testStarted name='INFO gets logged on failure'] +##teamcity[testFailed name='INFO gets logged on failure' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexpression failed with messages:|n "this message should be logged"|n "so should this"|n REQUIRE( a == 1 )|nwith expansion:|n 2 == 1|n'] +##teamcity[testFinished name='INFO gets logged on failure' duration="{duration}"] +##teamcity[testStarted name='INFO gets logged on failure, even if captured before successful assertions'] +##teamcity[testFailed name='INFO gets logged on failure, even if captured before successful assertions' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexpression failed with messages:|n "this message may be logged later"|n "this message should be logged"|n CHECK( a == 1 )|nwith expansion:|n 2 == 1|n'] +##teamcity[testFailed name='INFO gets logged on failure, even if captured before successful assertions' message='Message.tests.cpp:|nexpression failed with messages:|n "this message may be logged later"|n "this message should be logged"|n "and this, but later"|n CHECK( a == 0 )|nwith expansion:|n 2 == 0|n'] +##teamcity[testFinished name='INFO gets logged on failure, even if captured before successful assertions' duration="{duration}"] +##teamcity[testStarted name='INFO is reset for each loop'] +##teamcity[testFailed name='INFO is reset for each loop' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexpression failed with messages:|n "current counter 10"|n "i := 10"|n REQUIRE( i < 10 )|nwith expansion:|n 10 < 10|n'] +##teamcity[testFinished name='INFO is reset for each loop' duration="{duration}"] +##teamcity[testStarted name='Incomplete AssertionHandler'] +##teamcity[testIgnored name='Incomplete AssertionHandler' message='AssertionHandler.tests.cpp:|n...............................................................................|n|nAssertionHandler.tests.cpp:|nunexpected exception with message:|n "Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE"|n REQUIRE( Dummy )|nwith expansion:|n Dummy|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Incomplete AssertionHandler' duration="{duration}"] +##teamcity[testStarted name='Inequality checks that should fail'] +##teamcity[testIgnored name='Inequality checks that should fail' message='Condition.tests.cpp:|n...............................................................................|n|nCondition.tests.cpp:|nexpression failed|n CHECK( data.int_seven != 7 )|nwith expansion:|n 7 != 7|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Inequality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.float_nine_point_one != Approx( 9.1f ) )|nwith expansion:|n 9.100000381f|n!=|nApprox( 9.10000038146972656 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Inequality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.double_pi != Approx( 3.1415926535 ) )|nwith expansion:|n 3.14159265350000005|n!=|nApprox( 3.14159265350000005 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Inequality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello != "hello" )|nwith expansion:|n "hello" != "hello"|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Inequality checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello.size() != 5 )|nwith expansion:|n 5 != 5|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Inequality checks that should fail' duration="{duration}"] +##teamcity[testStarted name='Inequality checks that should succeed'] +##teamcity[testFinished name='Inequality checks that should succeed' duration="{duration}"] +##teamcity[testStarted name='JsonWriter'] +##teamcity[testFinished name='JsonWriter' duration="{duration}"] +##teamcity[testStarted name='JsonWriter escapes charaters in strings properly'] +##teamcity[testFinished name='JsonWriter escapes charaters in strings properly' duration="{duration}"] +##teamcity[testStarted name='Lambdas in assertions'] +##teamcity[testFinished name='Lambdas in assertions' duration="{duration}"] +##teamcity[testStarted name='Less-than inequalities with different epsilons'] +##teamcity[testFinished name='Less-than inequalities with different epsilons' duration="{duration}"] +##teamcity[testStarted name='ManuallyRegistered'] +##teamcity[testFinished name='ManuallyRegistered' duration="{duration}"] +##teamcity[testStarted name='Matchers can be (AllOf) composed with the && operator'] +##teamcity[testFinished name='Matchers can be (AllOf) composed with the && operator' duration="{duration}"] +##teamcity[testStarted name='Matchers can be (AnyOf) composed with the |||| operator'] +##teamcity[testFinished name='Matchers can be (AnyOf) composed with the |||| operator' duration="{duration}"] +##teamcity[testStarted name='Matchers can be composed with both && and ||||'] +##teamcity[testFinished name='Matchers can be composed with both && and ||||' duration="{duration}"] +##teamcity[testStarted name='Matchers can be composed with both && and |||| - failing'] +##teamcity[testFailed name='Matchers can be composed with both && and |||| - failing' message='Matchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) |||| ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" )|n'] +##teamcity[testFinished name='Matchers can be composed with both && and |||| - failing' duration="{duration}"] +##teamcity[testStarted name='Matchers can be negated (Not) with the ! operator'] +##teamcity[testFinished name='Matchers can be negated (Not) with the ! operator' duration="{duration}"] +##teamcity[testStarted name='Matchers can be negated (Not) with the ! operator - failing'] +##teamcity[testFailed name='Matchers can be negated (Not) with the ! operator - failing' message='Matchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" not contains: "substring"|n'] +##teamcity[testFinished name='Matchers can be negated (Not) with the ! operator - failing' duration="{duration}"] +##teamcity[testStarted name='Mayfail test case with nested sections'] +##teamcity[testIgnored name='Mayfail test case with nested sections' message='-------------------------------------------------------------------------------|nA|n1|n-------------------------------------------------------------------------------|nCondition.tests.cpp:|n...............................................................................|n|nCondition.tests.cpp:|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Mayfail test case with nested sections' message='-------------------------------------------------------------------------------|nA|n2|n-------------------------------------------------------------------------------|nCondition.tests.cpp:|n...............................................................................|n|nCondition.tests.cpp:|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Mayfail test case with nested sections' message='-------------------------------------------------------------------------------|nB|n1|n-------------------------------------------------------------------------------|nCondition.tests.cpp:|n...............................................................................|n|nCondition.tests.cpp:|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Mayfail test case with nested sections' message='-------------------------------------------------------------------------------|nB|n2|n-------------------------------------------------------------------------------|nCondition.tests.cpp:|n...............................................................................|n|nCondition.tests.cpp:|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Mayfail test case with nested sections' duration="{duration}"] +##teamcity[testStarted name='Mismatching exception messages failing the test'] +##teamcity[testFailed name='Mismatching exception messages failing the test' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nexpression failed|n REQUIRE_THROWS_WITH( thisThrows(), "should fail" )|nwith expansion:|n "expected exception" equals: "should fail"|n'] +##teamcity[testFinished name='Mismatching exception messages failing the test' duration="{duration}"] +##teamcity[testStarted name='Multireporter calls reporters and listeners in correct order'] +##teamcity[testFinished name='Multireporter calls reporters and listeners in correct order' duration="{duration}"] +##teamcity[testStarted name='Multireporter updates ReporterPreferences properly'] +##teamcity[testFinished name='Multireporter updates ReporterPreferences properly' duration="{duration}"] +##teamcity[testStarted name='Nested generators and captured variables'] +##teamcity[testFinished name='Nested generators and captured variables' duration="{duration}"] +##teamcity[testStarted name='Nice descriptive name'] +##teamcity[testFinished name='Nice descriptive name' duration="{duration}"] +##teamcity[testStarted name='Non-std exceptions can be translated'] +##teamcity[testFailed name='Non-std exceptions can be translated' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "custom exception"'] +##teamcity[testFinished name='Non-std exceptions can be translated' duration="{duration}"] +##teamcity[testStarted name='Objects that evaluated in boolean contexts can be checked'] +##teamcity[testFinished name='Objects that evaluated in boolean contexts can be checked' duration="{duration}"] +##teamcity[testStarted name='Optionally static assertions'] +##teamcity[testFinished name='Optionally static assertions' duration="{duration}"] +##teamcity[testStarted name='Ordering comparison checks that should fail'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|n...............................................................................|n|nCondition.tests.cpp:|nexpression failed|n CHECK( data.int_seven > 7 )|nwith expansion:|n 7 > 7|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.int_seven < 7 )|nwith expansion:|n 7 < 7|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.int_seven > 8 )|nwith expansion:|n 7 > 8|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.int_seven < 6 )|nwith expansion:|n 7 < 6|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.int_seven < 0 )|nwith expansion:|n 7 < 0|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.int_seven < -1 )|nwith expansion:|n 7 < -1|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.int_seven >= 8 )|nwith expansion:|n 7 >= 8|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.int_seven <= 6 )|nwith expansion:|n 7 <= 6|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.float_nine_point_one < 9 )|nwith expansion:|n 9.100000381f < 9|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.float_nine_point_one > 10 )|nwith expansion:|n 9.100000381f > 10|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.float_nine_point_one > 9.2 )|nwith expansion:|n 9.100000381f > 9.19999999999999929|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello > "hello" )|nwith expansion:|n "hello" > "hello"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello < "hello" )|nwith expansion:|n "hello" < "hello"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello > "hellp" )|nwith expansion:|n "hello" > "hellp"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello > "z" )|nwith expansion:|n "hello" > "z"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello < "hellm" )|nwith expansion:|n "hello" < "hellm"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello < "a" )|nwith expansion:|n "hello" < "a"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello >= "z" )|nwith expansion:|n "hello" >= "z"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:|nexpression failed|n CHECK( data.str_hello <= "a" )|nwith expansion:|n "hello" <= "a"|n'] +##teamcity[testFinished name='Ordering comparison checks that should fail' duration="{duration}"] +##teamcity[testStarted name='Ordering comparison checks that should succeed'] +##teamcity[testFinished name='Ordering comparison checks that should succeed' duration="{duration}"] +##teamcity[testStarted name='Our PCG implementation provides expected results for known seeds'] +##teamcity[testFinished name='Our PCG implementation provides expected results for known seeds' duration="{duration}"] +##teamcity[testStarted name='Output from all sections is reported'] +##teamcity[testFailed name='Output from all sections is reported' message='-------------------------------------------------------------------------------|none|n-------------------------------------------------------------------------------|nMessage.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexplicit failure with message:|n "Message from section one"'] +##teamcity[testFailed name='Output from all sections is reported' message='-------------------------------------------------------------------------------|ntwo|n-------------------------------------------------------------------------------|nMessage.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexplicit failure with message:|n "Message from section two"'] +##teamcity[testFinished name='Output from all sections is reported' duration="{duration}"] +##teamcity[testStarted name='Overloaded comma or address-of operators are not used'] +##teamcity[testFinished name='Overloaded comma or address-of operators are not used' duration="{duration}"] +##teamcity[testStarted name='Parse uints'] +##teamcity[testFinished name='Parse uints' duration="{duration}"] +##teamcity[testStarted name='Parsed tags are matched case insensitive'] +##teamcity[testFinished name='Parsed tags are matched case insensitive' duration="{duration}"] +##teamcity[testStarted name='Parsing sharding-related cli flags'] +##teamcity[testFinished name='Parsing sharding-related cli flags' duration="{duration}"] +##teamcity[testStarted name='Parsing tags with non-alphabetical characters is pass-through'] +##teamcity[testFinished name='Parsing tags with non-alphabetical characters is pass-through' duration="{duration}"] +##teamcity[testStarted name='Parsing warnings'] +##teamcity[testFinished name='Parsing warnings' duration="{duration}"] +##teamcity[testStarted name='Pointers can be compared to null'] +##teamcity[testFinished name='Pointers can be compared to null' duration="{duration}"] +##teamcity[testStarted name='Precision of floating point stringification can be set'] +##teamcity[testFinished name='Precision of floating point stringification can be set' duration="{duration}"] +##teamcity[testStarted name='Predicate matcher can accept const char*'] +##teamcity[testFinished name='Predicate matcher can accept const char*' duration="{duration}"] +##teamcity[testStarted name='Process can be configured on command line'] +##teamcity[testFinished name='Process can be configured on command line' duration="{duration}"] +##teamcity[testStarted name='Product with differing arities - std::tuple'] +##teamcity[testFinished name='Product with differing arities - std::tuple' duration="{duration}"] +##teamcity[testStarted name='Product with differing arities - std::tuple'] +##teamcity[testFinished name='Product with differing arities - std::tuple' duration="{duration}"] +##teamcity[testStarted name='Product with differing arities - std::tuple'] +##teamcity[testFinished name='Product with differing arities - std::tuple' duration="{duration}"] +##teamcity[testStarted name='Random seed generation accepts known methods'] +##teamcity[testFinished name='Random seed generation accepts known methods' duration="{duration}"] +##teamcity[testStarted name='Random seed generation reports unknown methods'] +##teamcity[testFinished name='Random seed generation reports unknown methods' duration="{duration}"] +##teamcity[testStarted name='Range type with sentinel'] +##teamcity[testFinished name='Range type with sentinel' duration="{duration}"] +##teamcity[testStarted name='Reconstruction should be based on stringification: #914'] +##teamcity[testFailed name='Reconstruction should be based on stringification: #914' message='Decomposition.tests.cpp:|n...............................................................................|n|nDecomposition.tests.cpp:|nexpression failed|n CHECK( truthy(false) )|nwith expansion:|n Hey, its truthy!|n'] +##teamcity[testFinished name='Reconstruction should be based on stringification: #914' duration="{duration}"] +##teamcity[testStarted name='Regex string matcher'] +##teamcity[testFailed name='Regex string matcher' message='Matchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), Matches( "this STRING contains |'abc|' as a substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" matches "this STRING contains |'abc|' as a substring" case sensitively|n'] +##teamcity[testFailed name='Regex string matcher' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), Matches( "contains |'abc|' as a substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" matches "contains |'abc|' as a substring" case sensitively|n'] +##teamcity[testFailed name='Regex string matcher' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), Matches( "this string contains |'abc|' as a" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" matches "this string contains |'abc|' as a" case sensitively|n'] +##teamcity[testFinished name='Regex string matcher' duration="{duration}"] +##teamcity[testStarted name='Registering reporter with |'::|' in name fails'] +##teamcity[testFinished name='Registering reporter with |'::|' in name fails' duration="{duration}"] +##teamcity[testStarted name='Regression test #1'] +##teamcity[testFinished name='Regression test #1' duration="{duration}"] +##teamcity[testStarted name='Reporter|'s write listings to provided stream'] +##teamcity[testFinished name='Reporter|'s write listings to provided stream' duration="{duration}"] +##teamcity[testStarted name='Reproducer for #2309 - a very long description past 80 chars (default console width) with a late colon : blablabla'] +##teamcity[testFinished name='Reproducer for #2309 - a very long description past 80 chars (default console width) with a late colon : blablabla' duration="{duration}"] +##teamcity[testStarted name='SUCCEED counts as a test pass'] +##teamcity[testFinished name='SUCCEED counts as a test pass' duration="{duration}"] +##teamcity[testStarted name='SUCCEED does not require an argument'] +##teamcity[testFinished name='SUCCEED does not require an argument' duration="{duration}"] +##teamcity[testStarted name='Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or methods'] +##teamcity[testFinished name='Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or methods' duration="{duration}"] +##teamcity[testStarted name='Scenario: Do that thing with the thing'] +##teamcity[testFinished name='Scenario: Do that thing with the thing' duration="{duration}"] +##teamcity[testStarted name='Scenario: This is a really long scenario name to see how the list command deals with wrapping'] +##teamcity[testFinished name='Scenario: This is a really long scenario name to see how the list command deals with wrapping' duration="{duration}"] +##teamcity[testStarted name='Scenario: Vector resizing affects size and capacity'] +##teamcity[testFinished name='Scenario: Vector resizing affects size and capacity' duration="{duration}"] +##teamcity[testStarted name='Sends stuff to stdout and stderr'] +##teamcity[testStdOut name='Sends stuff to stdout and stderr' out='A string sent directly to stdout|n'] +##teamcity[testStdErr name='Sends stuff to stdout and stderr' out='A string sent directly to stderr|nA string sent to stderr via clog|n'] +##teamcity[testFinished name='Sends stuff to stdout and stderr' duration="{duration}"] +##teamcity[testStarted name='Some simple comparisons between doubles'] +##teamcity[testFinished name='Some simple comparisons between doubles' duration="{duration}"] +##teamcity[testStarted name='Standard output from all sections is reported'] +##teamcity[testStdOut name='Standard output from all sections is reported' out='Message from section one|nMessage from section two|n'] +##teamcity[testFinished name='Standard output from all sections is reported' duration="{duration}"] +##teamcity[testStarted name='StartsWith string matcher'] +##teamcity[testFailed name='StartsWith string matcher' message='Matchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), StartsWith( "This String" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" starts with: "This String"|n'] +##teamcity[testFailed name='StartsWith string matcher' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" starts with: "string" (case insensitive)|n'] +##teamcity[testFinished name='StartsWith string matcher' duration="{duration}"] +##teamcity[testStarted name='Static arrays are convertible to string'] +##teamcity[testFinished name='Static arrays are convertible to string' duration="{duration}"] +##teamcity[testStarted name='String matchers'] +##teamcity[testFinished name='String matchers' duration="{duration}"] +##teamcity[testStarted name='StringRef'] +##teamcity[testFinished name='StringRef' duration="{duration}"] +##teamcity[testStarted name='StringRef at compilation time'] +##teamcity[testFinished name='StringRef at compilation time' duration="{duration}"] +##teamcity[testStarted name='Stringifying char arrays with statically known sizes - char'] +##teamcity[testFinished name='Stringifying char arrays with statically known sizes - char' duration="{duration}"] +##teamcity[testStarted name='Stringifying char arrays with statically known sizes - signed char'] +##teamcity[testFinished name='Stringifying char arrays with statically known sizes - signed char' duration="{duration}"] +##teamcity[testStarted name='Stringifying char arrays with statically known sizes - unsigned char'] +##teamcity[testFinished name='Stringifying char arrays with statically known sizes - unsigned char' duration="{duration}"] +##teamcity[testStarted name='Stringifying std::chrono::duration helpers'] +##teamcity[testFinished name='Stringifying std::chrono::duration helpers' duration="{duration}"] +##teamcity[testStarted name='Stringifying std::chrono::duration with weird ratios'] +##teamcity[testFinished name='Stringifying std::chrono::duration with weird ratios' duration="{duration}"] +##teamcity[testStarted name='Stringifying std::chrono::time_point'] +##teamcity[testFinished name='Stringifying std::chrono::time_point' duration="{duration}"] +##teamcity[testStarted name='Tabs and newlines show in output'] +##teamcity[testFailed name='Tabs and newlines show in output' message='Misc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexpression failed|n CHECK( s1 == s2 )|nwith expansion:|n "if ($b == 10) {|n $a = 20;|n}"|n==|n"if ($b == 10) {|n $a = 20;|n}|n"|n'] +##teamcity[testFinished name='Tabs and newlines show in output' duration="{duration}"] +##teamcity[testStarted name='Tag alias can be registered against tag patterns'] +##teamcity[testFinished name='Tag alias can be registered against tag patterns' duration="{duration}"] +##teamcity[testStarted name='Tags with spaces and non-alphanumerical characters are accepted'] +##teamcity[testFinished name='Tags with spaces and non-alphanumerical characters are accepted' duration="{duration}"] +##teamcity[testStarted name='Template test case method with test types specified inside std::tuple - MyTypes - 0'] +##teamcity[testFinished name='Template test case method with test types specified inside std::tuple - MyTypes - 0' duration="{duration}"] +##teamcity[testStarted name='Template test case method with test types specified inside std::tuple - MyTypes - 1'] +##teamcity[testFinished name='Template test case method with test types specified inside std::tuple - MyTypes - 1' duration="{duration}"] +##teamcity[testStarted name='Template test case method with test types specified inside std::tuple - MyTypes - 2'] +##teamcity[testFinished name='Template test case method with test types specified inside std::tuple - MyTypes - 2' duration="{duration}"] +##teamcity[testStarted name='Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 0'] +##teamcity[testFinished name='Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 0' duration="{duration}"] +##teamcity[testStarted name='Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 1'] +##teamcity[testFinished name='Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 1' duration="{duration}"] +##teamcity[testStarted name='Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 0'] +##teamcity[testFinished name='Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 0' duration="{duration}"] +##teamcity[testStarted name='Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 1'] +##teamcity[testFinished name='Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 1' duration="{duration}"] +##teamcity[testStarted name='Template test case with test types specified inside std::tuple - MyTypes - 0'] +##teamcity[testFinished name='Template test case with test types specified inside std::tuple - MyTypes - 0' duration="{duration}"] +##teamcity[testStarted name='Template test case with test types specified inside std::tuple - MyTypes - 1'] +##teamcity[testFinished name='Template test case with test types specified inside std::tuple - MyTypes - 1' duration="{duration}"] +##teamcity[testStarted name='Template test case with test types specified inside std::tuple - MyTypes - 2'] +##teamcity[testFinished name='Template test case with test types specified inside std::tuple - MyTypes - 2' duration="{duration}"] +##teamcity[testStarted name='TemplateTest: vectors can be sized and resized - float'] +##teamcity[testFinished name='TemplateTest: vectors can be sized and resized - float' duration="{duration}"] +##teamcity[testStarted name='TemplateTest: vectors can be sized and resized - int'] +##teamcity[testFinished name='TemplateTest: vectors can be sized and resized - int' duration="{duration}"] +##teamcity[testStarted name='TemplateTest: vectors can be sized and resized - std::string'] +##teamcity[testFinished name='TemplateTest: vectors can be sized and resized - std::string' duration="{duration}"] +##teamcity[testStarted name='TemplateTest: vectors can be sized and resized - std::tuple'] +##teamcity[testFinished name='TemplateTest: vectors can be sized and resized - std::tuple' duration="{duration}"] +##teamcity[testStarted name='TemplateTestSig: vectors can be sized and resized - (std::tuple), 6'] +##teamcity[testFinished name='TemplateTestSig: vectors can be sized and resized - (std::tuple), 6' duration="{duration}"] +##teamcity[testStarted name='TemplateTestSig: vectors can be sized and resized - float,4'] +##teamcity[testFinished name='TemplateTestSig: vectors can be sized and resized - float,4' duration="{duration}"] +##teamcity[testStarted name='TemplateTestSig: vectors can be sized and resized - int,5'] +##teamcity[testFinished name='TemplateTestSig: vectors can be sized and resized - int,5' duration="{duration}"] +##teamcity[testStarted name='TemplateTestSig: vectors can be sized and resized - std::string,15'] +##teamcity[testFinished name='TemplateTestSig: vectors can be sized and resized - std::string,15' duration="{duration}"] +##teamcity[testStarted name='Test case with identical tags keeps just one'] +##teamcity[testFinished name='Test case with identical tags keeps just one' duration="{duration}"] +##teamcity[testStarted name='Test case with one argument'] +##teamcity[testFinished name='Test case with one argument' duration="{duration}"] +##teamcity[testStarted name='Test enum bit values'] +##teamcity[testFinished name='Test enum bit values' duration="{duration}"] +##teamcity[testStarted name='Test with special, characters "in name'] +##teamcity[testFinished name='Test with special, characters "in name' duration="{duration}"] +##teamcity[testStarted name='Testing checked-if'] +##teamcity[testFinished name='Testing checked-if' duration="{duration}"] +##teamcity[testStarted name='Testing checked-if 2'] +##teamcity[testIgnored name='Testing checked-if 2' message='Misc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Testing checked-if 2' duration="{duration}"] +##teamcity[testStarted name='Testing checked-if 3'] +##teamcity[testIgnored name='Testing checked-if 3' message='Misc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Testing checked-if 3' duration="{duration}"] +##teamcity[testStarted name='Testing checked-if 4'] +##teamcity[testIgnored name='Testing checked-if 4' message='Misc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nunexpected exception with message:|n "Uncaught exception should fail!"|n {Unknown expression after the reported line}|nwith expansion:|n {Unknown expression after the reported line}|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Testing checked-if 4' duration="{duration}"] +##teamcity[testStarted name='Testing checked-if 5'] +##teamcity[testIgnored name='Testing checked-if 5' message='Misc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nunexpected exception with message:|n "Uncaught exception should fail!"|n {Unknown expression after the reported line}|nwith expansion:|n {Unknown expression after the reported line}|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Testing checked-if 5' duration="{duration}"] +##teamcity[testStarted name='The NO_FAIL macro reports a failure but does not fail the test'] +##teamcity[testFinished name='The NO_FAIL macro reports a failure but does not fail the test' duration="{duration}"] +##teamcity[testStarted name='The default listing implementation write to provided stream'] +##teamcity[testFinished name='The default listing implementation write to provided stream' duration="{duration}"] +##teamcity[testStarted name='This test |'should|' fail but doesn|'t'] +##teamcity[testFinished name='This test |'should|' fail but doesn|'t' duration="{duration}"] +##teamcity[testStarted name='Thrown string literals are translated'] +##teamcity[testFailed name='Thrown string literals are translated' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "For some reason someone is throwing a string literal!"'] +##teamcity[testFinished name='Thrown string literals are translated' duration="{duration}"] +##teamcity[testStarted name='Tracker'] +##teamcity[testFinished name='Tracker' duration="{duration}"] +##teamcity[testStarted name='Trim strings'] +##teamcity[testFinished name='Trim strings' duration="{duration}"] +##teamcity[testStarted name='Type conversions of RangeEquals and similar'] +##teamcity[testFinished name='Type conversions of RangeEquals and similar' duration="{duration}"] +##teamcity[testStarted name='Unexpected exceptions can be translated'] +##teamcity[testFailed name='Unexpected exceptions can be translated' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "3.14000000000000012"'] +##teamcity[testFinished name='Unexpected exceptions can be translated' duration="{duration}"] +##teamcity[testStarted name='Upcasting special member functions'] +##teamcity[testFinished name='Upcasting special member functions' duration="{duration}"] +##teamcity[testStarted name='Usage of AllMatch range matcher'] +##teamcity[testFinished name='Usage of AllMatch range matcher' duration="{duration}"] +##teamcity[testStarted name='Usage of AllTrue range matcher'] +##teamcity[testFinished name='Usage of AllTrue range matcher' duration="{duration}"] +##teamcity[testStarted name='Usage of AnyMatch range matcher'] +##teamcity[testFinished name='Usage of AnyMatch range matcher' duration="{duration}"] +##teamcity[testStarted name='Usage of AnyTrue range matcher'] +##teamcity[testFinished name='Usage of AnyTrue range matcher' duration="{duration}"] +##teamcity[testStarted name='Usage of NoneMatch range matcher'] +##teamcity[testFinished name='Usage of NoneMatch range matcher' duration="{duration}"] +##teamcity[testStarted name='Usage of NoneTrue range matcher'] +##teamcity[testFinished name='Usage of NoneTrue range matcher' duration="{duration}"] +##teamcity[testStarted name='Usage of RangeEquals range matcher'] +##teamcity[testFinished name='Usage of RangeEquals range matcher' duration="{duration}"] +##teamcity[testStarted name='Usage of UnorderedRangeEquals range matcher'] +##teamcity[testFinished name='Usage of UnorderedRangeEquals range matcher' duration="{duration}"] +##teamcity[testStarted name='Usage of the SizeIs range matcher'] +##teamcity[testFinished name='Usage of the SizeIs range matcher' duration="{duration}"] +##teamcity[testStarted name='Use a custom approx'] +##teamcity[testFinished name='Use a custom approx' duration="{duration}"] +##teamcity[testStarted name='Variadic macros'] +##teamcity[testFinished name='Variadic macros' duration="{duration}"] +##teamcity[testStarted name='Vector Approx matcher'] +##teamcity[testFinished name='Vector Approx matcher' duration="{duration}"] +##teamcity[testStarted name='Vector Approx matcher -- failing'] +##teamcity[testFailed name='Vector Approx matcher -- failing' message='-------------------------------------------------------------------------------|nEmpty and non empty vectors are not approx equal|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( empty, Approx( t1 ) )|nwith expansion:|n { } is approx: { 1.0, 2.0 }|n'] +##teamcity[testFailed name='Vector Approx matcher -- failing' message='-------------------------------------------------------------------------------|nJust different vectors|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( v1, Approx( v2 ) )|nwith expansion:|n { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 }|n'] +##teamcity[testFinished name='Vector Approx matcher -- failing' duration="{duration}"] +##teamcity[testStarted name='Vector matchers'] +##teamcity[testFinished name='Vector matchers' duration="{duration}"] +##teamcity[testStarted name='Vector matchers that fail'] +##teamcity[testFailed name='Vector matchers that fail' message='-------------------------------------------------------------------------------|nContains (element)|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( v, VectorContains( -1 ) )|nwith expansion:|n { 1, 2, 3 } Contains: -1|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( empty, VectorContains( 1 ) )|nwith expansion:|n { } Contains: 1|n'] +##teamcity[testFailed name='Vector matchers that fail' message='-------------------------------------------------------------------------------|nContains (vector)|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( empty, Contains( v ) )|nwith expansion:|n { } Contains: { 1, 2, 3 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( v, Contains( v2 ) )|nwith expansion:|n { 1, 2, 3 } Contains: { 1, 2, 4 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='-------------------------------------------------------------------------------|nEquals|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( v, Equals( v2 ) )|nwith expansion:|n { 1, 2, 3 } Equals: { 1, 2 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( v2, Equals( v ) )|nwith expansion:|n { 1, 2 } Equals: { 1, 2, 3 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( empty, Equals( v ) )|nwith expansion:|n { } Equals: { 1, 2, 3 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( v, Equals( empty ) )|nwith expansion:|n { 1, 2, 3 } Equals: { }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='-------------------------------------------------------------------------------|nUnorderedEquals|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:|n...............................................................................|n|nMatchers.tests.cpp:|nexpression failed|n CHECK_THAT( v, UnorderedEquals( empty ) )|nwith expansion:|n { 1, 2, 3 } UnorderedEquals: { }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( empty, UnorderedEquals( v ) )|nwith expansion:|n { } UnorderedEquals: { 1, 2, 3 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( permuted, UnorderedEquals( v ) )|nwith expansion:|n { 1, 3 } UnorderedEquals: { 1, 2, 3 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:|nexpression failed|n CHECK_THAT( permuted, UnorderedEquals( v ) )|nwith expansion:|n { 3, 1 } UnorderedEquals: { 1, 2, 3 }|n'] +##teamcity[testFinished name='Vector matchers that fail' duration="{duration}"] +##teamcity[testStarted name='When checked exceptions are thrown they can be expected or unexpected'] +##teamcity[testFinished name='When checked exceptions are thrown they can be expected or unexpected' duration="{duration}"] +##teamcity[testStarted name='When unchecked exceptions are thrown directly they are always failures'] +##teamcity[testFailed name='When unchecked exceptions are thrown directly they are always failures' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "unexpected exception"'] +##teamcity[testFinished name='When unchecked exceptions are thrown directly they are always failures' duration="{duration}"] +##teamcity[testStarted name='When unchecked exceptions are thrown during a CHECK the test should continue'] +##teamcity[testFailed name='When unchecked exceptions are thrown during a CHECK the test should continue' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "expected exception"|n CHECK( thisThrows() == 0 )|nwith expansion:|n thisThrows() == 0|n'] +##teamcity[testFinished name='When unchecked exceptions are thrown during a CHECK the test should continue' duration="{duration}"] +##teamcity[testStarted name='When unchecked exceptions are thrown during a REQUIRE the test should abort fail'] +##teamcity[testFailed name='When unchecked exceptions are thrown during a REQUIRE the test should abort fail' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "expected exception"|n REQUIRE( thisThrows() == 0 )|nwith expansion:|n thisThrows() == 0|n'] +##teamcity[testFinished name='When unchecked exceptions are thrown during a REQUIRE the test should abort fail' duration="{duration}"] +##teamcity[testStarted name='When unchecked exceptions are thrown from functions they are always failures'] +##teamcity[testFailed name='When unchecked exceptions are thrown from functions they are always failures' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "expected exception"|n CHECK( thisThrows() == 0 )|nwith expansion:|n thisThrows() == 0|n'] +##teamcity[testFinished name='When unchecked exceptions are thrown from functions they are always failures' duration="{duration}"] +##teamcity[testStarted name='When unchecked exceptions are thrown from sections they are always failures'] +##teamcity[testFailed name='When unchecked exceptions are thrown from sections they are always failures' message='-------------------------------------------------------------------------------|nsection name|n-------------------------------------------------------------------------------|nException.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "unexpected exception"'] +##teamcity[testFinished name='When unchecked exceptions are thrown from sections they are always failures' duration="{duration}"] +##teamcity[testStarted name='When unchecked exceptions are thrown, but caught, they do not affect the test'] +##teamcity[testFinished name='When unchecked exceptions are thrown, but caught, they do not affect the test' duration="{duration}"] +##teamcity[testStarted name='X/level/0/a'] +##teamcity[testFinished name='X/level/0/a' duration="{duration}"] +##teamcity[testStarted name='X/level/0/b'] +##teamcity[testFinished name='X/level/0/b' duration="{duration}"] +##teamcity[testStarted name='X/level/1/a'] +##teamcity[testFinished name='X/level/1/a' duration="{duration}"] +##teamcity[testStarted name='X/level/1/b'] +##teamcity[testFinished name='X/level/1/b' duration="{duration}"] +##teamcity[testStarted name='XmlEncode'] +##teamcity[testFinished name='XmlEncode' duration="{duration}"] +##teamcity[testStarted name='XmlWriter writes boolean attributes as true/false'] +##teamcity[testFinished name='XmlWriter writes boolean attributes as true/false' duration="{duration}"] +##teamcity[testStarted name='a succeeding test can still be skipped'] +##teamcity[testIgnored name='a succeeding test can still be skipped' message='Skip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit skip'] +##teamcity[testFinished name='a succeeding test can still be skipped' duration="{duration}"] +##teamcity[testStarted name='analyse no analysis'] +##teamcity[testFinished name='analyse no analysis' duration="{duration}"] +##teamcity[testStarted name='array -> toString'] +##teamcity[testFinished name='array -> toString' duration="{duration}"] +##teamcity[testStarted name='benchmark function call'] +##teamcity[testFinished name='benchmark function call' duration="{duration}"] +##teamcity[testStarted name='boolean member'] +##teamcity[testFinished name='boolean member' duration="{duration}"] +##teamcity[testStarted name='checkedElse'] +##teamcity[testFinished name='checkedElse' duration="{duration}"] +##teamcity[testStarted name='checkedElse, failing'] +##teamcity[testFailed name='checkedElse, failing' message='Misc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexpression failed|n REQUIRE( testCheckedElse( false ) )|nwith expansion:|n false|n'] +##teamcity[testFinished name='checkedElse, failing' duration="{duration}"] +##teamcity[testStarted name='checkedIf'] +##teamcity[testFinished name='checkedIf' duration="{duration}"] +##teamcity[testStarted name='checkedIf, failing'] +##teamcity[testFailed name='checkedIf, failing' message='Misc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexpression failed|n REQUIRE( testCheckedIf( false ) )|nwith expansion:|n false|n'] +##teamcity[testFinished name='checkedIf, failing' duration="{duration}"] +##teamcity[testStarted name='classify_outliers'] +##teamcity[testFinished name='classify_outliers' duration="{duration}"] +##teamcity[testStarted name='comparisons between const int variables'] +##teamcity[testFinished name='comparisons between const int variables' duration="{duration}"] +##teamcity[testStarted name='comparisons between int variables'] +##teamcity[testFinished name='comparisons between int variables' duration="{duration}"] +##teamcity[testStarted name='convertToBits'] +##teamcity[testFinished name='convertToBits' duration="{duration}"] +##teamcity[testStarted name='dynamic skipping works with generators'] +##teamcity[testIgnored name='dynamic skipping works with generators' message='Skip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit skip with message:|n "skipping because answer = 41"'] +##teamcity[testIgnored name='dynamic skipping works with generators' message='Skip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit skip with message:|n "skipping because answer = 43"'] +##teamcity[testFinished name='dynamic skipping works with generators' duration="{duration}"] +##teamcity[testStarted name='empty tags are not allowed'] +##teamcity[testFinished name='empty tags are not allowed' duration="{duration}"] +##teamcity[testStarted name='erfc_inv'] +##teamcity[testFinished name='erfc_inv' duration="{duration}"] +##teamcity[testStarted name='estimate_clock_resolution'] +##teamcity[testFinished name='estimate_clock_resolution' duration="{duration}"] +##teamcity[testStarted name='even more nested SECTION tests'] +##teamcity[testFinished name='even more nested SECTION tests' duration="{duration}"] +##teamcity[testStarted name='failed assertions before SKIP cause test case to fail'] +##teamcity[testIgnored name='failed assertions before SKIP cause test case to fail' message='Skip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexpression failed|n CHECK( 3 == 4 )|nwith expansion:|n 3 == 4|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='failed assertions before SKIP cause test case to fail' message='Skip.tests.cpp:|nexplicit skip'] +##teamcity[testFinished name='failed assertions before SKIP cause test case to fail' duration="{duration}"] +##teamcity[testStarted name='failing for some generator values causes entire test case to fail'] +##teamcity[testIgnored name='failing for some generator values causes entire test case to fail' message='Skip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='failing for some generator values causes entire test case to fail' message='Skip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit skip'] +##teamcity[testIgnored name='failing for some generator values causes entire test case to fail' message='Skip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='failing for some generator values causes entire test case to fail' message='Skip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit skip'] +##teamcity[testFinished name='failing for some generator values causes entire test case to fail' duration="{duration}"] +##teamcity[testStarted name='failing in some unskipped sections causes entire test case to fail'] +##teamcity[testIgnored name='failing in some unskipped sections causes entire test case to fail' message='-------------------------------------------------------------------------------|nskipped|n-------------------------------------------------------------------------------|nSkip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit skip'] +##teamcity[testIgnored name='failing in some unskipped sections causes entire test case to fail' message='-------------------------------------------------------------------------------|nnot skipped|n-------------------------------------------------------------------------------|nSkip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='failing in some unskipped sections causes entire test case to fail' duration="{duration}"] +##teamcity[testStarted name='first tag'] +##teamcity[testFinished name='first tag' duration="{duration}"] +##teamcity[testStarted name='has printf'] +##teamcity[testFinished name='has printf' duration="{duration}"] +##teamcity[testStarted name='is_unary_function'] +##teamcity[testFinished name='is_unary_function' duration="{duration}"] +##teamcity[testStarted name='just failure'] +##teamcity[testFailed name='just failure' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexplicit failure with message:|n "Previous info should not be seen"'] +##teamcity[testFinished name='just failure' duration="{duration}"] +##teamcity[testStarted name='just failure after unscoped info'] +##teamcity[testFailed name='just failure after unscoped info' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexplicit failure with message:|n "previous unscoped info SHOULD not be seen"'] +##teamcity[testFinished name='just failure after unscoped info' duration="{duration}"] +##teamcity[testStarted name='just info'] +##teamcity[testFinished name='just info' duration="{duration}"] +##teamcity[testStarted name='just unscoped info'] +##teamcity[testFinished name='just unscoped info' duration="{duration}"] +##teamcity[testStarted name='long long'] +##teamcity[testFinished name='long long' duration="{duration}"] +##teamcity[testStarted name='looped SECTION tests'] +##teamcity[testFailed name='looped SECTION tests' message='-------------------------------------------------------------------------------|nb is currently: 0|n-------------------------------------------------------------------------------|nMisc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexpression failed|n CHECK( b > a )|nwith expansion:|n 0 > 1|n'] +##teamcity[testFailed name='looped SECTION tests' message='-------------------------------------------------------------------------------|nb is currently: 1|n-------------------------------------------------------------------------------|nMisc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexpression failed|n CHECK( b > a )|nwith expansion:|n 1 > 1|n'] +##teamcity[testFinished name='looped SECTION tests' duration="{duration}"] +##teamcity[testStarted name='looped tests'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexpression failed with message:|n "Testing if fib|[0|] (1) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:|nexpression failed with message:|n "Testing if fib|[1|] (1) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:|nexpression failed with message:|n "Testing if fib|[3|] (3) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:|nexpression failed with message:|n "Testing if fib|[4|] (5) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:|nexpression failed with message:|n "Testing if fib|[6|] (13) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:|nexpression failed with message:|n "Testing if fib|[7|] (21) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFinished name='looped tests' duration="{duration}"] +##teamcity[testStarted name='makeStream recognizes %debug stream name'] +##teamcity[testFinished name='makeStream recognizes %debug stream name' duration="{duration}"] +##teamcity[testStarted name='make_unique reimplementation'] +##teamcity[testFinished name='make_unique reimplementation' duration="{duration}"] +##teamcity[testStarted name='mean'] +##teamcity[testFinished name='mean' duration="{duration}"] +##teamcity[testStarted name='measure'] +##teamcity[testFinished name='measure' duration="{duration}"] +##teamcity[testStarted name='mix info, unscoped info and warning'] +##teamcity[testFinished name='mix info, unscoped info and warning' duration="{duration}"] +##teamcity[testStarted name='more nested SECTION tests'] +##teamcity[testFailed name='more nested SECTION tests' message='-------------------------------------------------------------------------------|ndoesn|'t equal|nequal|n-------------------------------------------------------------------------------|nMisc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexpression failed|n REQUIRE( a == b )|nwith expansion:|n 1 == 2|n'] +##teamcity[testFinished name='more nested SECTION tests' duration="{duration}"] +##teamcity[testStarted name='nested SECTION tests'] +##teamcity[testFinished name='nested SECTION tests' duration="{duration}"] +##teamcity[testStarted name='nested sections can be skipped dynamically at runtime'] +##teamcity[testIgnored name='nested sections can be skipped dynamically at runtime' message='-------------------------------------------------------------------------------|nB|nB2|n-------------------------------------------------------------------------------|nSkip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit skip'] +##teamcity[testStdOut name='nested sections can be skipped dynamically at runtime' out='a!|nb1!|n!|n'] +##teamcity[testFinished name='nested sections can be skipped dynamically at runtime' duration="{duration}"] +##teamcity[testStarted name='non streamable - with conv. op'] +##teamcity[testFinished name='non streamable - with conv. op' duration="{duration}"] +##teamcity[testStarted name='non-copyable objects'] +##teamcity[testFinished name='non-copyable objects' duration="{duration}"] +##teamcity[testStarted name='normal_quantile'] +##teamcity[testFinished name='normal_quantile' duration="{duration}"] +##teamcity[testStarted name='not allowed'] +##teamcity[testFinished name='not allowed' duration="{duration}"] +##teamcity[testStarted name='not prints unscoped info from previous failures'] +##teamcity[testFailed name='not prints unscoped info from previous failures' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexpression failed with message:|n "this SHOULD be seen"|n REQUIRE( false )|nwith expansion:|n false|n'] +##teamcity[testFinished name='not prints unscoped info from previous failures' duration="{duration}"] +##teamcity[testStarted name='null strings'] +##teamcity[testFinished name='null strings' duration="{duration}"] +##teamcity[testStarted name='null_ptr'] +##teamcity[testFinished name='null_ptr' duration="{duration}"] +##teamcity[testStarted name='pair > -> toString'] +##teamcity[testFinished name='pair > -> toString' duration="{duration}"] +##teamcity[testStarted name='parseEnums'] +##teamcity[testFinished name='parseEnums' duration="{duration}"] +##teamcity[testStarted name='pointer to class'] +##teamcity[testFinished name='pointer to class' duration="{duration}"] +##teamcity[testStarted name='print unscoped info if passing unscoped info is printed'] +##teamcity[testFinished name='print unscoped info if passing unscoped info is printed' duration="{duration}"] +##teamcity[testStarted name='prints unscoped info on failure'] +##teamcity[testFailed name='prints unscoped info on failure' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexpression failed with messages:|n "this SHOULD be seen"|n "this SHOULD also be seen"|n REQUIRE( false )|nwith expansion:|n false|n'] +##teamcity[testFinished name='prints unscoped info on failure' duration="{duration}"] +##teamcity[testStarted name='prints unscoped info only for the first assertion'] +##teamcity[testFailed name='prints unscoped info only for the first assertion' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexpression failed with message:|n "this SHOULD be seen only ONCE"|n CHECK( false )|nwith expansion:|n false|n'] +##teamcity[testFinished name='prints unscoped info only for the first assertion' duration="{duration}"] +##teamcity[testStarted name='random SECTION tests'] +##teamcity[testFinished name='random SECTION tests' duration="{duration}"] +##teamcity[testStarted name='replaceInPlace'] +##teamcity[testFinished name='replaceInPlace' duration="{duration}"] +##teamcity[testStarted name='request an unknown %-starting stream fails'] +##teamcity[testFinished name='request an unknown %-starting stream fails' duration="{duration}"] +##teamcity[testStarted name='resolution'] +##teamcity[testFinished name='resolution' duration="{duration}"] +##teamcity[testStarted name='run_for_at_least, chronometer'] +##teamcity[testFinished name='run_for_at_least, chronometer' duration="{duration}"] +##teamcity[testStarted name='run_for_at_least, int'] +##teamcity[testFinished name='run_for_at_least, int' duration="{duration}"] +##teamcity[testStarted name='second tag'] +##teamcity[testFinished name='second tag' duration="{duration}"] +##teamcity[testStarted name='sections can be skipped dynamically at runtime'] +##teamcity[testIgnored name='sections can be skipped dynamically at runtime' message='-------------------------------------------------------------------------------|nskipped|n-------------------------------------------------------------------------------|nSkip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit skip'] +##teamcity[testFinished name='sections can be skipped dynamically at runtime' duration="{duration}"] +##teamcity[testStarted name='send a single char to INFO'] +##teamcity[testFailed name='send a single char to INFO' message='Misc.tests.cpp:|n...............................................................................|n|nMisc.tests.cpp:|nexpression failed with message:|n "3"|n REQUIRE( false )|nwith expansion:|n false|n'] +##teamcity[testFinished name='send a single char to INFO' duration="{duration}"] +##teamcity[testStarted name='sends information to INFO'] +##teamcity[testFailed name='sends information to INFO' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexpression failed with messages:|n "hi"|n "i := 7"|n REQUIRE( false )|nwith expansion:|n false|n'] +##teamcity[testFinished name='sends information to INFO' duration="{duration}"] +##teamcity[testStarted name='shortened hide tags are split apart'] +##teamcity[testFinished name='shortened hide tags are split apart' duration="{duration}"] +##teamcity[testStarted name='skipped tests can optionally provide a reason'] +##teamcity[testIgnored name='skipped tests can optionally provide a reason' message='Skip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit skip with message:|n "skipping because answer = 43"'] +##teamcity[testFinished name='skipped tests can optionally provide a reason' duration="{duration}"] +##teamcity[testStarted name='splitString'] +##teamcity[testFinished name='splitString' duration="{duration}"] +##teamcity[testStarted name='stacks unscoped info in loops'] +##teamcity[testFailed name='stacks unscoped info in loops' message='Message.tests.cpp:|n...............................................................................|n|nMessage.tests.cpp:|nexpression failed with messages:|n "Count 1 to 3..."|n "1"|n "2"|n "3"|n CHECK( false )|nwith expansion:|n false|n'] +##teamcity[testFailed name='stacks unscoped info in loops' message='Message.tests.cpp:|nexpression failed with messages:|n "Count 4 to 6..."|n "4"|n "5"|n "6"|n CHECK( false )|nwith expansion:|n false|n'] +##teamcity[testFinished name='stacks unscoped info in loops' duration="{duration}"] +##teamcity[testStarted name='startsWith'] +##teamcity[testFinished name='startsWith' duration="{duration}"] +##teamcity[testStarted name='std::map is convertible string'] +##teamcity[testFinished name='std::map is convertible string' duration="{duration}"] +##teamcity[testStarted name='std::pair -> toString'] +##teamcity[testFinished name='std::pair -> toString' duration="{duration}"] +##teamcity[testStarted name='std::pair -> toString'] +##teamcity[testFinished name='std::pair -> toString' duration="{duration}"] +##teamcity[testStarted name='std::set is convertible string'] +##teamcity[testFinished name='std::set is convertible string' duration="{duration}"] +##teamcity[testStarted name='std::vector > -> toString'] +##teamcity[testFinished name='std::vector > -> toString' duration="{duration}"] +##teamcity[testStarted name='stdout and stderr streams have %-starting name'] +##teamcity[testFinished name='stdout and stderr streams have %-starting name' duration="{duration}"] +##teamcity[testStarted name='stringify ranges'] +##teamcity[testFinished name='stringify ranges' duration="{duration}"] +##teamcity[testStarted name='stringify( has_maker )'] +##teamcity[testFinished name='stringify( has_maker )' duration="{duration}"] +##teamcity[testStarted name='stringify( has_maker_and_operator )'] +##teamcity[testFinished name='stringify( has_maker_and_operator )' duration="{duration}"] +##teamcity[testStarted name='stringify( has_neither )'] +##teamcity[testFinished name='stringify( has_neither )' duration="{duration}"] +##teamcity[testStarted name='stringify( has_operator )'] +##teamcity[testFinished name='stringify( has_operator )' duration="{duration}"] +##teamcity[testStarted name='stringify( has_template_operator )'] +##teamcity[testFinished name='stringify( has_template_operator )' duration="{duration}"] +##teamcity[testStarted name='stringify( vectors )'] +##teamcity[testFinished name='stringify( vectors )' duration="{duration}"] +##teamcity[testStarted name='stringify( vectors )'] +##teamcity[testFinished name='stringify( vectors )' duration="{duration}"] +##teamcity[testStarted name='stringify( vectors )'] +##teamcity[testFinished name='stringify( vectors )' duration="{duration}"] +##teamcity[testStarted name='strlen3'] +##teamcity[testFinished name='strlen3' duration="{duration}"] +##teamcity[testStarted name='tables'] +##teamcity[testFinished name='tables' duration="{duration}"] +##teamcity[testStarted name='tags with dots in later positions are not parsed as hidden'] +##teamcity[testFinished name='tags with dots in later positions are not parsed as hidden' duration="{duration}"] +##teamcity[testStarted name='tests can be skipped dynamically at runtime'] +##teamcity[testIgnored name='tests can be skipped dynamically at runtime' message='Skip.tests.cpp:|n...............................................................................|n|nSkip.tests.cpp:|nexplicit skip'] +##teamcity[testFinished name='tests can be skipped dynamically at runtime' duration="{duration}"] +##teamcity[testStarted name='thrown std::strings are translated'] +##teamcity[testFailed name='thrown std::strings are translated' message='Exception.tests.cpp:|n...............................................................................|n|nException.tests.cpp:|nunexpected exception with message:|n "Why would you throw a std::string?"'] +##teamcity[testFinished name='thrown std::strings are translated' duration="{duration}"] +##teamcity[testStarted name='toString on const wchar_t const pointer returns the string contents'] +##teamcity[testFinished name='toString on const wchar_t const pointer returns the string contents' duration="{duration}"] +##teamcity[testStarted name='toString on const wchar_t pointer returns the string contents'] +##teamcity[testFinished name='toString on const wchar_t pointer returns the string contents' duration="{duration}"] +##teamcity[testStarted name='toString on wchar_t const pointer returns the string contents'] +##teamcity[testFinished name='toString on wchar_t const pointer returns the string contents' duration="{duration}"] +##teamcity[testStarted name='toString on wchar_t returns the string contents'] +##teamcity[testFinished name='toString on wchar_t returns the string contents' duration="{duration}"] +##teamcity[testStarted name='toString(enum class w/operator<<)'] +##teamcity[testFinished name='toString(enum class w/operator<<)' duration="{duration}"] +##teamcity[testStarted name='toString(enum class)'] +##teamcity[testFinished name='toString(enum class)' duration="{duration}"] +##teamcity[testStarted name='toString(enum w/operator<<)'] +##teamcity[testFinished name='toString(enum w/operator<<)' duration="{duration}"] +##teamcity[testStarted name='toString(enum)'] +##teamcity[testFinished name='toString(enum)' duration="{duration}"] +##teamcity[testStarted name='tuple<>'] +##teamcity[testFinished name='tuple<>' duration="{duration}"] +##teamcity[testStarted name='tuple'] +##teamcity[testFinished name='tuple' duration="{duration}"] +##teamcity[testStarted name='tuple'] +##teamcity[testFinished name='tuple' duration="{duration}"] +##teamcity[testStarted name='tuple'] +##teamcity[testFinished name='tuple' duration="{duration}"] +##teamcity[testStarted name='tuple,tuple<>,float>'] +##teamcity[testFinished name='tuple,tuple<>,float>' duration="{duration}"] +##teamcity[testStarted name='uniform samples'] +##teamcity[testFinished name='uniform samples' duration="{duration}"] +##teamcity[testStarted name='uniform_integer_distribution can return the bounds'] +##teamcity[testFinished name='uniform_integer_distribution can return the bounds' duration="{duration}"] +##teamcity[testStarted name='unique_ptr reimplementation: basic functionality'] +##teamcity[testFinished name='unique_ptr reimplementation: basic functionality' duration="{duration}"] +##teamcity[testStarted name='vec> -> toString'] +##teamcity[testFinished name='vec> -> toString' duration="{duration}"] +##teamcity[testStarted name='vector -> toString'] +##teamcity[testFinished name='vector -> toString' duration="{duration}"] +##teamcity[testStarted name='vector -> toString'] +##teamcity[testFinished name='vector -> toString' duration="{duration}"] +##teamcity[testStarted name='vector -> toString'] +##teamcity[testFinished name='vector -> toString' duration="{duration}"] +##teamcity[testStarted name='vector -> toString'] +##teamcity[testFinished name='vector -> toString' duration="{duration}"] +##teamcity[testStarted name='vectors can be sized and resized'] +##teamcity[testFinished name='vectors can be sized and resized' duration="{duration}"] +##teamcity[testStarted name='warmup'] +##teamcity[testFinished name='warmup' duration="{duration}"] +##teamcity[testStarted name='weighted_average_quantile'] +##teamcity[testFinished name='weighted_average_quantile' duration="{duration}"] +##teamcity[testStarted name='xmlentitycheck'] +##teamcity[testFinished name='xmlentitycheck' duration="{duration}"] +##teamcity[testSuiteFinished name=''] diff --git a/tests/SelfTest/Baselines/xml.sw.approved.txt b/tests/SelfTest/Baselines/xml.sw.approved.txt new file mode 100644 index 0000000..aa6bd6a --- /dev/null +++ b/tests/SelfTest/Baselines/xml.sw.approved.txt @@ -0,0 +1,21976 @@ + + + + + + + + + y.v == 0 + + + 0 == 0 + + + + + 0 == y.v + + + 0 == 0 + + + + + + + + t1 == t2 + + + {?} == {?} + + + + + t1 != t2 + + + {?} != {?} + + + + + t1 < t2 + + + {?} < {?} + + + + + t1 > t2 + + + {?} > {?} + + + + + t1 <= t2 + + + {?} <= {?} + + + + + t1 >= t2 + + + {?} >= {?} + + + + + + + + + + uarr := "123" + + + sarr := "456" + + + + std::memcmp(uarr, "123", sizeof(uarr)) == 0 + + + 0 == 0 + + + + uarr := "123" + + + sarr := "456" + + + + std::memcmp(sarr, "456", sizeof(sarr)) == 0 + + + 0 == 0 + + + + + + + + +
+ +
+ +
+ + + + h1 == h2 + + + [1403 helper] == [1403 helper] + + + + + + + +This info message starts with a linebreak + + + +This warning message starts with a linebreak + + + + + + 1514 + + + +This would not be caught previously + + +Nor would this + + + + + + + std::is_same<TypeList<int>, TypeList<int>>::value + + + true + + + + + + + + spec.matches(*fakeTestCase("spec . char")) + + + true + + + + + spec.matches(*fakeTestCase("spec , char")) + + + true + + + + + !(spec.matches(*fakeTestCase(R"(spec \, char)"))) + + + !false + + + + + +
+ + + spec.matches(*fakeTestCase(R"(spec {a} char)")) + + + true + + + + + spec.matches(*fakeTestCase(R"(spec [a] char)")) + + + true + + + + + !(spec.matches(*fakeTestCase("differs but has similar tag", "[a]"))) + + + !false + + + +
+
+ + + spec.matches(*fakeTestCase(R"(spec \ char)")) + + + true + + + +
+ +
+ + + + counter < 7 + + + 3 < 7 + + + + + counter < 7 + + + 6 < 7 + + + + + + + + i != j + + + 1 != 3 + + + + + i != j + + + 1 != 4 + + + + + i != j + + + 2 != 3 + + + + + i != j + + + 2 != 4 + + + + + +
+ +
+
+ + + m + + + 1 + + + +
+
+ + + m + + + 2 + + + +
+
+ + + m + + + 3 + + + +
+ +
+ +
+ + + 1 + + + 1 + + + +
+ + + m + + + 2 + + + + + m + + + 3 + + + +
+ + + + m + + + 1 + + + + + m + + + 2 + + + + + m + + + 3 + + + + + +
+ +
+ + i := 1 + + + j := 3 + + + k := 5 + +
+ +
+ + i := 1 + + + j := 3 + + + k := 6 + +
+ +
+ + i := 1 + + + j := 4 + + + k := 5 + + + i := 1 + + + j := 4 + + + k := 6 + +
+ +
+ + i := 2 + + + j := 3 + + + k := 5 + +
+ +
+ + i := 2 + + + j := 3 + + + k := 6 + +
+ +
+ + i := 2 + + + j := 4 + + + k := 5 + + + i := 2 + + + j := 4 + + + k := 6 + + +
+ + + + m + + + 1 + + + + + n + + + 1 + + + + + m + + + 1 + + + + + n + + + 2 + + + + + m + + + 1 + + + + + n + + + 3 + + + + + m + + + 2 + + + + + n + + + 1 + + + + + m + + + 2 + + + + + n + + + 2 + + + + + m + + + 2 + + + + + n + + + 3 + + + + + m + + + 3 + + + + + n + + + 1 + + + + + m + + + 3 + + + + + n + + + 2 + + + + + m + + + 3 + + + + + n + + + 3 + + + + + + + + + + + + + + + + + smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) + + + 0.0 is within 2 ULPs of -4.9406564584124654e-324 ([-1.4821969375237396e-323, 4.9406564584124654e-324]) + + + + + smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) + + + 0.0 not is within 1 ULPs of -4.9406564584124654e-324 ([-9.8813129168249309e-324, -0.0000000000000000e+00]) + + + + + + + + smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) + + + 0.0f is within 2 ULPs of -1.40129846e-45f ([-4.20389539e-45, 1.40129846e-45]) + + + + + smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) + + + 0.0f not is within 1 ULPs of -1.40129846e-45f ([-2.80259693e-45, -0.00000000e+00]) + + + + + + + failure to init + + + + +
+ + answer := 42 + + + expected exception + + +
+
+ + answer := 42 + + + + thisThrows() + + + thisThrows() + + + expected exception + + + +
+
+ + answer := 42 + + + + thisThrows() + + + thisThrows() + + + +
+ +
+ + + + 42 == f + + + 42 == {?} + + + + + + + + a == t + + + 3 == 3 + + + + + a == t + + + 3 == 3 + + + + + throws_int(true) + + + throws_int(true) + + + + + throws_int(true), int + + + throws_int(true), int + + + + + throws_int(false) + + + throws_int(false) + + + + + "aaa", Catch::Matchers::EndsWith("aaa") + + + "aaa" ends with: "aaa" + + + + + templated_tests<int>(3) + + + true + + + + + + + + f() == 0 + + + 1 == 0 + + + + + errno_after == 1 + + + 1 == 1 + + + + + + + dummy := 0 + + + + x == 4 + + + {?} == 4 + + + + + +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+ + + + false != false + + + false != false + + + + + true != true + + + true != true + + + + + !true + + + false + + + + + !(true) + + + !true + + + + + !trueValue + + + false + + + + + !(trueValue) + + + !true + + + + + !(1 == 1) + + + false + + + + + !(1 == 1) + + + !(1 == 1) + + + + + + + + false == false + + + false == false + + + + + true == true + + + true == true + + + + + !false + + + true + + + + + !(false) + + + !false + + + + + !falseValue + + + true + + + + + !(falseValue) + + + !false + + + + + !(1 == 2) + + + true + + + + + !(1 == 2) + + + !(1 == 2) + + + + + +
+ + + is_true<true>::value == true + + + true == true + + + + + true == is_true<true>::value + + + true == true + + + +
+
+ + + is_true<false>::value == false + + + false == false + + + + + false == is_true<false>::value + + + false == false + + + +
+
+ + + !is_true<false>::value + + + true + + + +
+
+ + + !!is_true<true>::value + + + true + + + +
+
+ + + is_true<true>::value + + + true + + + + + !(is_true<false>::value) + + + !false + + + +
+ +
+ + + + x < y + + + 1 < 4 + + + + + y < z + + + 4 < 7 + + + + + x < z + + + 1 < 7 + + + + + x < y + + + 1 < 4 + + + + + y < z + + + 4 < 8 + + + + + x < z + + + 1 < 8 + + + + + x < y + + + 1 < 4 + + + + + y < z + + + 4 < 9 + + + + + x < z + + + 1 < 9 + + + + + x < y + + + 1 < 5 + + + + + y < z + + + 5 < 7 + + + + + x < z + + + 1 < 7 + + + + + x < y + + + 1 < 5 + + + + + y < z + + + 5 < 8 + + + + + x < z + + + 1 < 8 + + + + + x < y + + + 1 < 5 + + + + + y < z + + + 5 < 9 + + + + + x < z + + + 1 < 9 + + + + + x < y + + + 1 < 6 + + + + + y < z + + + 6 < 7 + + + + + x < z + + + 1 < 7 + + + + + x < y + + + 1 < 6 + + + + + y < z + + + 6 < 8 + + + + + x < z + + + 1 < 8 + + + + + x < y + + + 1 < 6 + + + + + y < z + + + 6 < 9 + + + + + x < z + + + 1 < 9 + + + + + x < y + + + 2 < 4 + + + + + y < z + + + 4 < 7 + + + + + x < z + + + 2 < 7 + + + + + x < y + + + 2 < 4 + + + + + y < z + + + 4 < 8 + + + + + x < z + + + 2 < 8 + + + + + x < y + + + 2 < 4 + + + + + y < z + + + 4 < 9 + + + + + x < z + + + 2 < 9 + + + + + x < y + + + 2 < 5 + + + + + y < z + + + 5 < 7 + + + + + x < z + + + 2 < 7 + + + + + x < y + + + 2 < 5 + + + + + y < z + + + 5 < 8 + + + + + x < z + + + 2 < 8 + + + + + x < y + + + 2 < 5 + + + + + y < z + + + 5 < 9 + + + + + x < z + + + 2 < 9 + + + + + x < y + + + 2 < 6 + + + + + y < z + + + 6 < 7 + + + + + x < z + + + 2 < 7 + + + + + x < y + + + 2 < 6 + + + + + y < z + + + 6 < 8 + + + + + x < z + + + 2 < 8 + + + + + x < y + + + 2 < 6 + + + + + y < z + + + 6 < 9 + + + + + x < z + + + 2 < 9 + + + + + x < y + + + 3 < 4 + + + + + y < z + + + 4 < 7 + + + + + x < z + + + 3 < 7 + + + + + x < y + + + 3 < 4 + + + + + y < z + + + 4 < 8 + + + + + x < z + + + 3 < 8 + + + + + x < y + + + 3 < 4 + + + + + y < z + + + 4 < 9 + + + + + x < z + + + 3 < 9 + + + + + x < y + + + 3 < 5 + + + + + y < z + + + 5 < 7 + + + + + x < z + + + 3 < 7 + + + + + x < y + + + 3 < 5 + + + + + y < z + + + 5 < 8 + + + + + x < z + + + 3 < 8 + + + + + x < y + + + 3 < 5 + + + + + y < z + + + 5 < 9 + + + + + x < z + + + 3 < 9 + + + + + x < y + + + 3 < 6 + + + + + y < z + + + 6 < 7 + + + + + x < z + + + 3 < 7 + + + + + x < y + + + 3 < 6 + + + + + y < z + + + 6 < 8 + + + + + x < z + + + 3 < 8 + + + + + x < y + + + 3 < 6 + + + + + y < z + + + 6 < 9 + + + + + x < z + + + 3 < 9 + + + + + + + + s == "world" + + + "hello" == "world" + + + + + + + + s == "hello" + + + "hello" == "hello" + + + + + + + + Template_Fixture_2<TestType>::m_a.size() == 1 + + + 0 == 1 + + + + + + + + Template_Fixture_2<TestType>::m_a.size() == 1 + + + 0 == 1 + + + + + + + + Template_Fixture_2<TestType>::m_a.size() == 1 + + + 0 == 1 + + + + + + + + Template_Fixture_2<TestType>::m_a.size() == 1 + + + 0 == 1 + + + + + + + + Template_Fixture_2<TestType>::m_a.size() == 0 + + + 0 == 0 + + + + + + + + Template_Fixture_2<TestType>::m_a.size() == 0 + + + 0 == 0 + + + + + + + + Template_Fixture_2<TestType>::m_a.size() == 0 + + + 0 == 0 + + + + + + + + Template_Fixture_2<TestType>::m_a.size() == 0 + + + 0 == 0 + + + + + + + + Template_Fixture_2<TestType>{}.m_a.size() < 2 + + + 6 < 2 + + + + + + + + Template_Fixture_2<TestType>{}.m_a.size() < 2 + + + 2 < 2 + + + + + + + + Template_Fixture_2<TestType>{}.m_a.size() < 2 + + + 6 < 2 + + + + + + + + Template_Fixture_2<TestType>{}.m_a.size() < 2 + + + 2 < 2 + + + + + + + + Template_Fixture_2<TestType>{}.m_a.size() >= 2 + + + 6 >= 2 + + + + + + + + Template_Fixture_2<TestType>{}.m_a.size() >= 2 + + + 2 >= 2 + + + + + + + + Template_Fixture_2<TestType>{}.m_a.size() >= 2 + + + 6 >= 2 + + + + + + + + Template_Fixture_2<TestType>{}.m_a.size() >= 2 + + + 2 >= 2 + + + + + + + + Template_Fixture<TestType>::m_a == 2 + + + 1.0 == 2 + + + + + + + + Template_Fixture<TestType>::m_a == 2 + + + 1.0f == 2 + + + + + + + + Template_Fixture<TestType>::m_a == 2 + + + 1 == 2 + + + + + + + + Template_Fixture<TestType>::m_a == 1 + + + 1.0 == 1 + + + + + + + + Template_Fixture<TestType>::m_a == 1 + + + 1.0f == 1 + + + + + + + + Template_Fixture<TestType>::m_a == 1 + + + 1 == 1 + + + + + + + + Nttp_Fixture<V>::value == 0 + + + 1 == 0 + + + + + + + + Nttp_Fixture<V>::value == 0 + + + 3 == 0 + + + + + + + + Nttp_Fixture<V>::value == 0 + + + 6 == 0 + + + + + + + + Nttp_Fixture<V>::value > 0 + + + 1 > 0 + + + + + + + + Nttp_Fixture<V>::value > 0 + + + 3 > 0 + + + + + + + + Nttp_Fixture<V>::value > 0 + + + 6 > 0 + + + + + + + + m_a == 2 + + + 1 == 2 + + + + + + + + m_a == 1 + + + 1 == 1 + + + + + +
+ + + m_a++ == 0 + + + 0 == 0 + + + +
+
+ + + m_a == 0 + + + 1 == 0 + + + +
+ +
+ +
+ + + m_a++ == 0 + + + 0 == 0 + + + +
+
+ + + m_a == 1 + + + 1 == 1 + + + +
+ +
+ + + + x.size() == 0 + + + 0 == 0 + + + + + + + + x.size() == 0 + + + 0 == 0 + + + + + + + + x.size() == 0 + + + 0 == 0 + + + + + + + + x.size() == 0 + + + 0 == 0 + + + + + + + + x.size() > 0 + + + 42 > 0 + + + + + + + + x.size() > 0 + + + 9 > 0 + + + + + + + + x.size() > 0 + + + 42 > 0 + + + + + + + + x.size() > 0 + + + 9 > 0 + + + + + + + + d == 1.23_a + + + 1.22999999999999998 +== +Approx( 1.22999999999999998 ) + + + + + d != 1.22_a + + + 1.22999999999999998 +!= +Approx( 1.21999999999999997 ) + + + + + -d == -1.23_a + + + -1.22999999999999998 +== +Approx( -1.22999999999999998 ) + + + + + d == 1.2_a .epsilon(.1) + + + 1.22999999999999998 +== +Approx( 1.19999999999999996 ) + + + + + d != 1.2_a .epsilon(.001) + + + 1.22999999999999998 +!= +Approx( 1.19999999999999996 ) + + + + + d == 1_a .epsilon(.3) + + + 1.22999999999999998 == Approx( 1.0 ) + + + + + +
+
+ +
+ +
+ + to infinity and beyond + + +
+ + + + &o1 == &o2 + + + 0x == 0x + + + + + o1 == o2 + + + {?} == {?} + + + + + + + + 104.0 != Approx(100.0) + + + 104.0 != Approx( 100.0 ) + + + + + 104.0 == Approx(100.0).margin(5) + + + 104.0 == Approx( 100.0 ) + + + + + 104.0 == Approx(100.0).margin(4) + + + 104.0 == Approx( 100.0 ) + + + + + 104.0 != Approx(100.0).margin(3) + + + 104.0 != Approx( 100.0 ) + + + + + 100.3 != Approx(100.0) + + + 100.29999999999999716 != Approx( 100.0 ) + + + + + 100.3 == Approx(100.0).margin(0.5) + + + 100.29999999999999716 == Approx( 100.0 ) + + + + + + + + + + + i++ == 7 + + + 7 == 7 + + + + + i++ == 8 + + + 8 == 8 + + + + + + + + 1 == 1 + + + 1 == 1 + + + + + {Unknown expression after the reported line} + + + {Unknown expression after the reported line} + + + unexpected exception + + + + + + + + + + + Approx(0).margin(0) + + + Approx(0).margin(0) + + + + + Approx(0).margin(1234656) + + + Approx(0).margin(1234656) + + + + + Approx(0).margin(-2), std::domain_error + + + Approx(0).margin(-2), std::domain_error + + + + + Approx(0).epsilon(0) + + + Approx(0).epsilon(0) + + + + + Approx(0).epsilon(1) + + + Approx(0).epsilon(1) + + + + + Approx(0).epsilon(-0.001), std::domain_error + + + Approx(0).epsilon(-0.001), std::domain_error + + + + + Approx(0).epsilon(1.0001), std::domain_error + + + Approx(0).epsilon(1.0001), std::domain_error + + + + + + + + 0.25f == Approx(0.0f).margin(0.25f) + + + 0.25f == Approx( 0.0 ) + + + + + 0.0f == Approx(0.25f).margin(0.25f) + + + 0.0f == Approx( 0.25 ) + + + + + 0.5f == Approx(0.25f).margin(0.25f) + + + 0.5f == Approx( 0.25 ) + + + + + 245.0f == Approx(245.25f).margin(0.25f) + + + 245.0f == Approx( 245.25 ) + + + + + 245.5f == Approx(245.25f).margin(0.25f) + + + 245.5f == Approx( 245.25 ) + + + + + + + + divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) + + + 3.14285714285714279 +== +Approx( 3.14100000000000001 ) + + + + + divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) + + + 3.14285714285714279 +!= +Approx( 3.14100000000000001 ) + + + + + + + + d != Approx( 1.231 ) + + + 1.22999999999999998 +!= +Approx( 1.23100000000000009 ) + + + + + d == Approx( 1.231 ).epsilon( 0.1 ) + + + 1.22999999999999998 +== +Approx( 1.23100000000000009 ) + + + + + + + + 1.23f == Approx( 1.23f ) + + + 1.230000019f +== +Approx( 1.23000001907348633 ) + + + + + 0.0f == Approx( 0.0f ) + + + 0.0f == Approx( 0.0 ) + + + + + + + + 1 == Approx( 1 ) + + + 1 == Approx( 1.0 ) + + + + + 0 == Approx( 0 ) + + + 0 == Approx( 0.0 ) + + + + + + + + 1.0f == Approx( 1 ) + + + 1.0f == Approx( 1.0 ) + + + + + 0 == Approx( dZero) + + + 0 == Approx( 0.0 ) + + + + + 0 == Approx( dSmall ).margin( 0.001 ) + + + 0 == Approx( 0.00001 ) + + + + + 1.234f == Approx( dMedium ) + + + 1.233999968f +== +Approx( 1.23399999999999999 ) + + + + + dMedium == Approx( 1.234f ) + + + 1.23399999999999999 +== +Approx( 1.23399996757507324 ) + + + + + +
+ + + 1, Predicate<int>( alwaysTrue, "always true" ) + + + 1 matches predicate: "always true" + + + + + 1, !Predicate<int>( alwaysFalse, "always false" ) + + + 1 not matches predicate: "always false" + + + +
+
+ + + "Hello olleH", Predicate<std::string>( []( std::string const& str ) -> bool { return str.front() == str.back(); }, "First and last character should be equal" ) + + + "Hello olleH" matches predicate: "First and last character should be equal" + + + + + "This wouldn't pass", !Predicate<std::string>( []( std::string const& str ) -> bool { return str.front() == str.back(); } ) + + + "This wouldn't pass" not matches undescribed predicate + + + +
+ +
+ + + + lhs | rhs + + + Val: 1 | Val: 2 + + + + + !(lhs & rhs) + + + !(Val: 1 & Val: 2) + + + + + HasBitOperators{ 1 } & HasBitOperators{ 1 } + + + Val: 1 & Val: 1 + + + + + lhs ^ rhs + + + Val: 1 ^ Val: 2 + + + + + !(lhs ^ lhs) + + + !(Val: 1 ^ Val: 1) + + + + + + + + true + + + true + + +
+ + + true + + + true + + +
+ + + true + + + true + + + +
+ +
+ + + true + + + true + + +
+ + + true + + + true + + +
+ + + true + + + true + + + +
+ +
+ +
+ +
+ + + a, Contains(1) + + + { 1, 2, 3 } contains element 1 + + + + + b, Contains(1) + + + { 0, 1, 2 } contains element 1 + + + + + c, !Contains(1) + + + { 4, 5, 6 } not contains element 1 + + + +
+
+ + + a, Contains(0, close_enough) + + + { 1, 2, 3 } contains element 0 + + + + + b, Contains(0, close_enough) + + + { 0, 1, 2 } contains element 0 + + + + + c, !Contains(0, close_enough) + + + { 4, 5, 6 } not contains element 0 + + + +
+
+ + + a, Contains(4, [](auto&& lhs, size_t sz) { return lhs.size() == sz; }) + + + { "abc", "abcd", "abcde" } contains element 4 + + + +
+
+ + + in, Contains(1) + + + { 1, 2, 3, 4, 5 } contains element 1 + + + + + in, !Contains(8) + + + { 1, 2, 3, 4, 5 } not contains element 8 + + + +
+
+ + + in, Contains(MoveOnlyTestElement{ 2 }) + + + { 1, 2, 3 } contains element 2 + + + + + in, !Contains(MoveOnlyTestElement{ 9 }) + + + { 1, 2, 3 } not contains element 9 + + + +
+
+ + + in, Contains(Catch::Matchers::WithinAbs(0.5, 0.5)) + + + { 1.0, 2.0, 3.0, 0.0 } contains element matching is within 0.5 of 0.5 + + + +
+ +
+ +
+ + + empty_array, IsEmpty() + + + { } is empty + + + + + non_empty_array, !IsEmpty() + + + { 0.0 } not is empty + + + + + empty_vec, IsEmpty() + + + { } is empty + + + + + non_empty_vec, !IsEmpty() + + + { 'a', 'b', 'c' } not is empty + + + + + inner_lists_are_empty, !IsEmpty() + + + { { } } not is empty + + + + + inner_lists_are_empty.front(), IsEmpty() + + + { } is empty + + + +
+
+ + + has_empty{}, !IsEmpty() + + + {?} not is empty + + + +
+
+ + + unrelated::ADL_empty{}, IsEmpty() + + + {?} is empty + + + +
+ +
+ + + a := 1 + + + b := 2 + + + c := 3 + + + a + b := 3 + + + a+b := 3 + + + c > b := true + + + a == 1 := true + + + + + + custom_index_op<int>{1, 2, 3}[0, 1, 2] := 0 + + + custom_index_op<int>{1, 2, 3}[(0, 1)] := 0 + + + custom_index_op<int>{1, 2, 3}[0] := 0 + + + (helper_1436<int, int>{12, -12}) := { 12, -12 } + + + (helper_1436<int, int>(-12, 12)) := { -12, 12 } + + + (1, 2) := 2 + + + (2, 3) := 3 + + + + + + ("comma, in string", "escaped, \", ") := "escaped, ", " + + + "single quote in string,'," := "single quote in string,'," + + + "some escapes, \\,\\\\" := "some escapes, \,\\" + + + "some, ), unmatched, } prenheses {[<" := "some, ), unmatched, } prenheses {[<" + + + '"' := '"' + + + '\'' := ''' + + + ',' := ',' + + + '}' := '}' + + + ')' := ')' + + + '(' := '(' + + + '{' := '{' + + + + +
+ + i := 2 + + + + true + + + true + + + +
+
+ + 3 + + + + true + + + true + + + +
+ +
+ +
+ + + eq( "", "" ) + + + true + + + + + !(eq( "", "a" )) + + + !false + + + +
+
+ + + eq( "a", "a" ) + + + true + + + + + eq( "a", "A" ) + + + true + + + + + eq( "A", "a" ) + + + true + + + + + eq( "A", "A" ) + + + true + + + + + !(eq( "a", "b" )) + + + !false + + + + + !(eq( "a", "B" )) + + + !false + + + +
+ +
+ +
+ + + lt( "", "a" ) + + + true + + + + + !(lt( "a", "a" )) + + + !false + + + + + !(lt( "", "" )) + + + !false + + + +
+
+ + + lt( "a", "b" ) + + + true + + + + + lt( "a", "B" ) + + + true + + + + + lt( "A", "b" ) + + + true + + + + + lt( "A", "B" ) + + + true + + + +
+ +
+ +
+ + + ::Catch::Detail::stringify('\t') == "'\\t'" + + + "'\t'" == "'\t'" + + + + + ::Catch::Detail::stringify('\n') == "'\\n'" + + + "'\n'" == "'\n'" + + + + + ::Catch::Detail::stringify('\r') == "'\\r'" + + + "'\r'" == "'\r'" + + + + + ::Catch::Detail::stringify('\f') == "'\\f'" + + + "'\f'" == "'\f'" + + + +
+
+ + + ::Catch::Detail::stringify( ' ' ) == "' '" + + + "' '" == "' '" + + + + + ::Catch::Detail::stringify( 'A' ) == "'A'" + + + "'A'" == "'A'" + + + + + ::Catch::Detail::stringify( 'z' ) == "'z'" + + + "'z'" == "'z'" + + + +
+
+ + + ::Catch::Detail::stringify( '\0' ) == "0" + + + "0" == "0" + + + + + ::Catch::Detail::stringify( static_cast<char>(2) ) == "2" + + + "2" == "2" + + + + + ::Catch::Detail::stringify( static_cast<char>(5) ) == "5" + + + "5" == "5" + + + +
+ +
+ + + + name.empty() + + + true + + + + + result + + + {?} + + + + + result.type() == Catch::Clara::Detail::ResultType::Ok + + + 0 == 0 + + + + + parsed.type() == Catch::Clara::ParseResultType::NoMatch + + + 1 == 1 + + + + + parsed.remainingTokens().count() == 2 + + + 2 == 2 + + + + + name.empty() + + + true + + + + + + + + name.empty() + + + true + + + + + name == "foo" + + + "foo" == "foo" + + + + + +
+ + + !(parse_result) + + + !{?} + + + +
+
+ + + parse_result + + + {?} + + + + + res == std::vector<std::string>{ "aaa", "bbb" } + + + { "aaa", "bbb" } == { "aaa", "bbb" } + + + +
+ +
+ +
+ + + streamWrapper.str().empty() + + + true + + + +
+
+ + + streamWrapper.str() == "1\nUsing code: 2\n2\nUsing code: 0\n3\n" + + + "1 +Using code: 2 +2 +Using code: 0 +3 +" +== +"1 +Using code: 2 +2 +Using code: 0 +3 +" + + + +
+
+ + + streamWrapper.str() == "Using code: 2\nA\nB\nUsing code: 0\nC\n" + + + "Using code: 2 +A +B +Using code: 0 +C +" +== +"Using code: 2 +A +B +Using code: 0 +C +" + + + +
+ +
+ + + + 1, ( MatcherA() && MatcherB() ) && MatcherC() + + + 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 ) + + + + + 1, MatcherA() && ( MatcherB() && MatcherC() ) + + + 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 ) + + + + + 1, ( MatcherA() && MatcherB() ) && ( MatcherC() && MatcherD() ) + + + 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 and equals: true ) + + + + + + + + 1, ( MatcherA() || MatcherB() ) || MatcherC() + + + 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 ) + + + + + 1, MatcherA() || ( MatcherB() || MatcherC() ) + + + 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 ) + + + + + 1, ( MatcherA() || MatcherB() ) || ( MatcherC() || MatcherD() ) + + + 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 or equals: true ) + + + + + + + + 0, !MatcherA() + + + 0 not equals: (int) 1 or (string) "1" + + + + + 1, !!MatcherA() + + + 1 equals: (int) 1 or (string) "1" + + + + + 0, !!!MatcherA() + + + 0 not equals: (int) 1 or (string) "1" + + + + + 1, !!!!MatcherA() + + + 1 equals: (int) 1 or (string) "1" + + + + + + + + + + + 1, MatcherA() || MatcherB() + + + 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 ) + + + + + 1, MatcherA() && MatcherB() + + + 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 ) + + + + + 1, MatcherA() || !MatcherB() + + + 1 ( equals: (int) 1 or (string) "1" or not equals: (long long) 1 ) + + + + + + + + vec, Predicate<std::vector<int>>( []( auto const& v ) { return std::all_of( v.begin(), v.end(), []( int elem ) { return elem % 2 == 1; } ); }, "All elements are odd" ) && !EqualsRange( a ) + + + { 1, 3, 5 } ( matches predicate: "All elements are odd" and not Equals: { 5, 3, 1 } ) + + + + + str, StartsWith( "foo" ) && EqualsRange( arr ) && EndsWith( "bar" ) + + + "foobar" ( starts with: "foo" and Equals: { 'f', 'o', 'o', 'b', 'a', 'r' } and ends with: "bar" ) + + + + + str, StartsWith( "foo" ) && !EqualsRange( bad_arr ) && EndsWith( "bar" ) + + + "foobar" ( starts with: "foo" and not Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } and ends with: "bar" ) + + + + + str, EqualsRange( arr ) && StartsWith( "foo" ) && EndsWith( "bar" ) + + + "foobar" ( Equals: { 'f', 'o', 'o', 'b', 'a', 'r' } and starts with: "foo" and ends with: "bar" ) + + + + + str, !EqualsRange( bad_arr ) && StartsWith( "foo" ) && EndsWith( "bar" ) + + + "foobar" ( not Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } and starts with: "foo" and ends with: "bar" ) + + + + + str, EqualsRange( bad_arr ) || ( StartsWith( "foo" ) && EndsWith( "bar" ) ) + + + "foobar" ( Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } or ( starts with: "foo" and ends with: "bar" ) ) + + + + + str, ( StartsWith( "foo" ) && EndsWith( "bar" ) ) || EqualsRange( bad_arr ) + + + "foobar" ( ( starts with: "foo" and ends with: "bar" ) or Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } ) + + + + + + + + container, EqualsRange( a ) || EqualsRange( b ) || EqualsRange( c ) + + + { 1, 2, 3 } ( Equals: { 1, 2, 3 } or Equals: { 0, 1, 2 } or Equals: { 4, 5, 6 } ) + + + + + + + + std::vector<constructor_throws>{constructor_throws{}, constructor_throws{}} + + + std::vector<constructor_throws>{constructor_throws{}, constructor_throws{}} + + + + + std::vector<constructor_throws>{constructor_throws{}, constructor_throws{}} + + + std::vector<constructor_throws>{constructor_throws{}, constructor_throws{}} + + + + + std::vector<int>{1, 2, 3} == std::vector<int>{1, 2, 3} + + + std::vector<int>{1, 2, 3} == std::vector<int>{1, 2, 3} + + + + + std::vector<int>{1, 2, 3} == std::vector<int>{1, 2, 3} + + + std::vector<int>{1, 2, 3} == std::vector<int>{1, 2, 3} + + + + + std::vector<int>{1, 2} == std::vector<int>{1, 2} + + + { 1, 2 } == { 1, 2 } + + + + + std::vector<int>{1, 2} == std::vector<int>{1, 2} + + + { 1, 2 } == { 1, 2 } + + + + + !(std::vector<int>{1, 2} == std::vector<int>{1, 2, 3}) + + + !({ 1, 2 } == { 1, 2, 3 }) + + + + + !(std::vector<int>{1, 2} == std::vector<int>{1, 2, 3}) + + + !({ 1, 2 } == { 1, 2, 3 }) + + + + + std::vector<int>{1, 2} == std::vector<int>{1, 2} + + + { 1, 2 } == { 1, 2 } + + + + + std::vector<int>{1, 2} == std::vector<int>{1, 2} + + + { 1, 2 } == { 1, 2 } + + + + + true + + + true + + + + + std::vector<int>{1, 2} == std::vector<int>{1, 2} + + + { 1, 2 } == { 1, 2 } + + + + + + + + a + + + 0x + + + + + a == &foo + + + 0x == 0x + + + + + + + + SimplePcg32{} == SimplePcg32{} + + + {?} == {?} + + + + + SimplePcg32{ 0 } != SimplePcg32{} + + + {?} != {?} + + + + + !(SimplePcg32{ 1 } == SimplePcg32{ 2 }) + + + !({?} == {?}) + + + + + !(SimplePcg32{ 1 } != SimplePcg32{ 1 }) + + + !({?} != {?}) + + + + + + + + td == Approx(10.0) + + + StrongDoubleTypedef(10) == Approx( 10.0 ) + + + + + Approx(10.0) == td + + + Approx( 10.0 ) == StrongDoubleTypedef(10) + + + + + td != Approx(11.0) + + + StrongDoubleTypedef(10) != Approx( 11.0 ) + + + + + Approx(11.0) != td + + + Approx( 11.0 ) != StrongDoubleTypedef(10) + + + + + td <= Approx(10.0) + + + StrongDoubleTypedef(10) <= Approx( 10.0 ) + + + + + td <= Approx(11.0) + + + StrongDoubleTypedef(10) <= Approx( 11.0 ) + + + + + Approx(10.0) <= td + + + Approx( 10.0 ) <= StrongDoubleTypedef(10) + + + + + Approx(9.0) <= td + + + Approx( 9.0 ) <= StrongDoubleTypedef(10) + + + + + td >= Approx(9.0) + + + StrongDoubleTypedef(10) >= Approx( 9.0 ) + + + + + td >= Approx(td) + + + StrongDoubleTypedef(10) >= Approx( 10.0 ) + + + + + Approx(td) >= td + + + Approx( 10.0 ) >= StrongDoubleTypedef(10) + + + + + Approx(11.0) >= td + + + Approx( 11.0 ) >= StrongDoubleTypedef(10) + + + + + + + + 54 == 6*9 + + + 54 == 54 + + + + + + + + ( -1 > 2u ) + + + true + + + + + -1 > 2u + + + -1 > 2 + + + + + ( 2u < -1 ) + + + true + + + + + 2u < -1 + + + 2 < -1 + + + + + ( minInt > 2u ) + + + true + + + + + minInt > 2u + + + -2147483648 > 2 + + + + + + + + i == 1 + + + 1 == 1 + + + + + ui == 2 + + + 2 == 2 + + + + + l == 3 + + + 3 == 3 + + + + + ul == 4 + + + 4 == 4 + + + + + c == 5 + + + 5 == 5 + + + + + uc == 6 + + + 6 == 6 + + + + + 1 == i + + + 1 == 1 + + + + + 2 == ui + + + 2 == 2 + + + + + 3 == l + + + 3 == 3 + + + + + 4 == ul + + + 4 == 4 + + + + + 5 == c + + + 5 == 5 + + + + + 6 == uc + + + 6 == 6 + + + + + (std::numeric_limits<uint32_t>::max)() > ul + + + 4294967295 (0x) > 4 + + + + + +
+ + + !(matcher.match( 1 )) + + + !false + + + + + first.matchCalled + + + true + + + + + !second.matchCalled + + + true + + + +
+
+ + + matcher.match( 1 ) + + + true + + + + + first.matchCalled + + + true + + + + + !second.matchCalled + + + true + + + +
+ +
+ +
+ + + !(matcher.match( 1 )) + + + !false + + + + + first.matchCalled + + + true + + + + + !second.matchCalled + + + true + + + +
+
+ + + matcher.match( 1 ) + + + true + + + + + first.matchCalled + + + true + + + + + !second.matchCalled + + + true + + + +
+ +
+ + + + testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) + + + "this string contains 'abc' as a substring" contains: "not there" (case insensitive) + + + + + testStringForMatching(), ContainsSubstring( "STRING" ) + + + "this string contains 'abc' as a substring" contains: "STRING" + + + + + +
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + call_count == 1 + + + 1 == 1 + + + + + make_data().size() == test_count + + + 6 == 6 + + + +
+ +
+ + + + Catch::makeStream( "-" )->isConsole() + + + true + + + + + + + + throwCustom() + + + throwCustom() + + + custom exception - not std + + + + + + + + throwCustom(), std::exception + + + throwCustom(), std::exception + + + custom exception - not std + + + + + + + custom std exception + + + + + + + 101.000001 != Approx(100).epsilon(0.01) + + + 101.00000099999999748 != Approx( 100.0 ) + + + + + std::pow(10, -5) != Approx(std::pow(10, -7)) + + + 0.00001 != Approx( 0.0000001 ) + + + + + + + + enumInfo->lookup(0) == "Value1" + + + Value1 == "Value1" + + + + + enumInfo->lookup(1) == "Value2" + + + Value2 == "Value2" + + + + + enumInfo->lookup(3) == "{** unexpected enum value **}" + + + {** unexpected enum value **} +== +"{** unexpected enum value **}" + + + + + + + This generator is empty + + + + + + + Catch::makeStream( "" )->isConsole() + + + true + + + + + + + + testStringForMatching(), EndsWith( "Substring" ) + + + "this string contains 'abc' as a substring" ends with: "Substring" + + + + + testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) + + + "this string contains 'abc' as a substring" ends with: "this" (case insensitive) + + + + + + + + stringify( EnumClass3::Value1 ) == "Value1" + + + "Value1" == "Value1" + + + + + stringify( EnumClass3::Value2 ) == "Value2" + + + "Value2" == "Value2" + + + + + stringify( EnumClass3::Value3 ) == "Value3" + + + "Value3" == "Value3" + + + + + stringify( EnumClass3::Value4 ) == "{** unexpected enum value **}" + + + "{** unexpected enum value **}" +== +"{** unexpected enum value **}" + + + + + stringify( ec3 ) == "Value2" + + + "Value2" == "Value2" + + + + + + + + stringify( Bikeshed::Colours::Red ) == "Red" + + + "Red" == "Red" + + + + + stringify( Bikeshed::Colours::Blue ) == "Blue" + + + "Blue" == "Blue" + + + + + + + + 101.01 != Approx(100).epsilon(0.01) + + + 101.01000000000000512 != Approx( 100.0 ) + + + + + + + + data.int_seven == 6 + + + 7 == 6 + + + + + data.int_seven == 8 + + + 7 == 8 + + + + + data.int_seven == 0 + + + 7 == 0 + + + + + data.float_nine_point_one == Approx( 9.11f ) + + + 9.100000381f +== +Approx( 9.10999965667724609 ) + + + + + data.float_nine_point_one == Approx( 9.0f ) + + + 9.100000381f == Approx( 9.0 ) + + + + + data.float_nine_point_one == Approx( 1 ) + + + 9.100000381f == Approx( 1.0 ) + + + + + data.float_nine_point_one == Approx( 0 ) + + + 9.100000381f == Approx( 0.0 ) + + + + + data.double_pi == Approx( 3.1415 ) + + + 3.14159265350000005 +== +Approx( 3.14150000000000018 ) + + + + + data.str_hello == "goodbye" + + + "hello" == "goodbye" + + + + + data.str_hello == "hell" + + + "hello" == "hell" + + + + + data.str_hello == "hello1" + + + "hello" == "hello1" + + + + + data.str_hello.size() == 6 + + + 5 == 6 + + + + + x == Approx( 1.301 ) + + + 1.30000000000000027 +== +Approx( 1.30099999999999993 ) + + + + + + + + data.int_seven == 7 + + + 7 == 7 + + + + + data.float_nine_point_one == Approx( 9.1f ) + + + 9.100000381f +== +Approx( 9.10000038146972656 ) + + + + + data.double_pi == Approx( 3.1415926535 ) + + + 3.14159265350000005 +== +Approx( 3.14159265350000005 ) + + + + + data.str_hello == "hello" + + + "hello" == "hello" + + + + + "hello" == data.str_hello + + + "hello" == "hello" + + + + + data.str_hello.size() == 5 + + + 5 == 5 + + + + + x == Approx( 1.3 ) + + + 1.30000000000000027 +== +Approx( 1.30000000000000004 ) + + + + + + + + testStringForMatching(), Equals( "this string contains 'abc' as a substring" ) + + + "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" + + + + + testStringForMatching(), Equals( "this string contains 'ABC' as a substring", Catch::CaseSensitive::No ) + + + "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" (case insensitive) + + + + + + + + testStringForMatching(), Equals( "this string contains 'ABC' as a substring" ) + + + "this string contains 'abc' as a substring" equals: "this string contains 'ABC' as a substring" + + + + + testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) + + + "this string contains 'abc' as a substring" equals: "something else" (case insensitive) + + + + + + + + ::Catch::Detail::stringify(WhatException{}) == "This exception has overridden what() method" + + + "This exception has overridden what() method" +== +"This exception has overridden what() method" + + + + + ::Catch::Detail::stringify(OperatorException{}) == "OperatorException" + + + "OperatorException" == "OperatorException" + + + + + ::Catch::Detail::stringify(StringMakerException{}) == "StringMakerException" + + + "StringMakerException" +== +"StringMakerException" + + + + + +
+ + + doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } + + + doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } + + + + + doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } + + + doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } + + + +
+
+ + + throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } + + + throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } + + + Unknown exception + + + + + throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } + + + throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } + + + Unknown exception + + + +
+
+ + + throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } + + + SpecialException::what special exception has value of 1 + + + + + throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } + + + SpecialException::what special exception has value of 1 + + + +
+ +
+ + + + throwsSpecialException( 1 ), SpecialException, ExceptionMatcher{ 1 } + + + SpecialException::what special exception has value of 1 + + + + + throwsSpecialException( 2 ), SpecialException, ExceptionMatcher{ 2 } + + + SpecialException::what special exception has value of 2 + + + + + + + + throwsDerivedException(), DerivedException, MessageMatches( StartsWith( "Derived" ) ) + + + DerivedException::what matches "starts with: "Derived"" + + + + + throwsDerivedException(), DerivedException, MessageMatches( EndsWith( "::what" ) ) + + + DerivedException::what matches "ends with: "::what"" + + + + + throwsDerivedException(), DerivedException, MessageMatches( !StartsWith( "::what" ) ) + + + DerivedException::what matches "not starts with: "::what"" + + + + + throwsSpecialException( 2 ), SpecialException, MessageMatches( StartsWith( "Special" ) ) + + + SpecialException::what matches "starts with: "Special"" + + + + + +
+ + + thisThrows(), "expected exception" + + + "expected exception" equals: "expected exception" + + + +
+
+ + + thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) + + + "expected exception" equals: "expected exception" (case insensitive) + + + +
+
+ + + thisThrows(), StartsWith( "expected" ) + + + "expected exception" starts with: "expected" + + + + + thisThrows(), EndsWith( "exception" ) + + + "expected exception" ends with: "exception" + + + + + thisThrows(), ContainsSubstring( "except" ) + + + "expected exception" contains: "except" + + + + + thisThrows(), ContainsSubstring( "exCept", Catch::CaseSensitive::No ) + + + "expected exception" contains: "except" (case insensitive) + + + +
+ +
+ + + + throwsDerivedException(), DerivedException, Message( "DerivedException::what" ) + + + DerivedException::what exception message matches "DerivedException::what" + + + + + throwsDerivedException(), DerivedException, !Message( "derivedexception::what" ) + + + DerivedException::what not exception message matches "derivedexception::what" + + + + + throwsSpecialException( 2 ), SpecialException, !Message( "DerivedException::what" ) + + + SpecialException::what not exception message matches "DerivedException::what" + + + + + throwsSpecialException( 2 ), SpecialException, Message( "SpecialException::what" ) + + + SpecialException::what exception message matches "SpecialException::what" + + + + + + + + thisThrows(), std::string + + + thisThrows(), std::string + + + expected exception + + + + + thisDoesntThrow(), std::domain_error + + + thisDoesntThrow(), std::domain_error + + + + + thisThrows() + + + thisThrows() + + + expected exception + + + + + + + This is a failure + + + + + + + + + + This is a failure + + + This message appears in the output + + + + + + + Factorial(0) == 1 + + + 1 == 1 + + + + + Factorial(1) == 1 + + + 1 == 1 + + + + + Factorial(2) == 2 + + + 2 == 2 + + + + + Factorial(3) == 6 + + + 6 == 6 + + + + + Factorial(10) == 3628800 + + + 3628800 (0x) == 3628800 (0x) + + + + + + + + filter( []( int ) { return false; }, value( 3 ) ), Catch::GeneratorException + + + filter( []( int ) { return false; }, value( 3 ) ), Catch::GeneratorException + + + + + +
+ + + 10., WithinRel( 11.1, 0.1 ) + + + 10.0 and 11.09999999999999964 are within 10% of each other + + + + + 10., !WithinRel( 11.2, 0.1 ) + + + 10.0 not and 11.19999999999999929 are within 10% of each other + + + + + 1., !WithinRel( 0., 0.99 ) + + + 1.0 not and 0.0 are within 99% of each other + + + + + -0., WithinRel( 0. ) + + + -0.0 and 0.0 are within 2.22045e-12% of each other + + +
+ + + v1, WithinRel( v2 ) + + + 0.0 and 0.0 are within 2.22045e-12% of each other + + + +
+ +
+
+ + + 1., WithinAbs( 1., 0 ) + + + 1.0 is within 0.0 of 1.0 + + + + + 0., WithinAbs( 1., 1 ) + + + 0.0 is within 1.0 of 1.0 + + + + + 0., !WithinAbs( 1., 0.99 ) + + + 0.0 not is within 0.98999999999999999 of 1.0 + + + + + 0., !WithinAbs( 1., 0.99 ) + + + 0.0 not is within 0.98999999999999999 of 1.0 + + + + + 11., !WithinAbs( 10., 0.5 ) + + + 11.0 not is within 0.5 of 10.0 + + + + + 10., !WithinAbs( 11., 0.5 ) + + + 10.0 not is within 0.5 of 11.0 + + + + + -10., WithinAbs( -10., 0.5 ) + + + -10.0 is within 0.5 of -10.0 + + + + + -10., WithinAbs( -9.6, 0.5 ) + + + -10.0 is within 0.5 of -9.59999999999999964 + + + +
+
+ + + 1., WithinULP( 1., 0 ) + + + 1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00]) + + + + + nextafter( 1., 2. ), WithinULP( 1., 1 ) + + + 1.00000000000000022 is within 1 ULPs of 1.0000000000000000e+00 ([9.9999999999999989e-01, 1.0000000000000002e+00]) + + + + + 0., WithinULP( nextafter( 0., 1. ), 1 ) + + + 0.0 is within 1 ULPs of 4.9406564584124654e-324 ([0.0000000000000000e+00, 9.8813129168249309e-324]) + + + + + 1., WithinULP( nextafter( 1., 0. ), 1 ) + + + 1.0 is within 1 ULPs of 9.9999999999999989e-01 ([9.9999999999999978e-01, 1.0000000000000000e+00]) + + + + + 1., !WithinULP( nextafter( 1., 2. ), 0 ) + + + 1.0 not is within 0 ULPs of 1.0000000000000002e+00 ([1.0000000000000002e+00, 1.0000000000000002e+00]) + + + + + 1., WithinULP( 1., 0 ) + + + 1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00]) + + + + + -0., WithinULP( 0., 0 ) + + + -0.0 is within 0 ULPs of 0.0000000000000000e+00 ([0.0000000000000000e+00, 0.0000000000000000e+00]) + + + +
+
+ + + 1., WithinAbs( 1., 0.5 ) || WithinULP( 2., 1 ) + + + 1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0000000000000000e+00 ([1.9999999999999998e+00, 2.0000000000000004e+00]) ) + + + + + 1., WithinAbs( 2., 0.5 ) || WithinULP( 1., 0 ) + + + 1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00]) ) + + + + + 0.0001, WithinAbs( 0., 0.001 ) || WithinRel( 0., 0.1 ) + + + 0.0001 ( is within 0.001 of 0.0 or and 0.0 are within 10% of each other ) + + + +
+
+ + + WithinAbs( 1., 0. ) + + + WithinAbs( 1., 0. ) + + + + + WithinAbs( 1., -1. ), std::domain_error + + + WithinAbs( 1., -1. ), std::domain_error + + + + + WithinULP( 1., 0 ) + + + WithinULP( 1., 0 ) + + + + + WithinRel( 1., 0. ) + + + WithinRel( 1., 0. ) + + + + + WithinRel( 1., -0.2 ), std::domain_error + + + WithinRel( 1., -0.2 ), std::domain_error + + + + + WithinRel( 1., 1. ), std::domain_error + + + WithinRel( 1., 1. ), std::domain_error + + + +
+
+ + + 1., !IsNaN() + + + 1.0 not is NaN + + + +
+ +
+ +
+ + + 10.f, WithinRel( 11.1f, 0.1f ) + + + 10.0f and 11.10000038146972656 are within 10% of each other + + + + + 10.f, !WithinRel( 11.2f, 0.1f ) + + + 10.0f not and 11.19999980926513672 are within 10% of each other + + + + + 1.f, !WithinRel( 0.f, 0.99f ) + + + 1.0f not and 0.0 are within 99% of each other + + + + + -0.f, WithinRel( 0.f ) + + + -0.0f and 0.0 are within 0.00119209% of each other + + +
+ + + v1, WithinRel( v2 ) + + + 0.0f and 0.0 are within 0.00119209% of each other + + + +
+ +
+
+ + + 1.f, WithinAbs( 1.f, 0 ) + + + 1.0f is within 0.0 of 1.0 + + + + + 0.f, WithinAbs( 1.f, 1 ) + + + 0.0f is within 1.0 of 1.0 + + + + + 0.f, !WithinAbs( 1.f, 0.99f ) + + + 0.0f not is within 0.99000000953674316 of 1.0 + + + + + 0.f, !WithinAbs( 1.f, 0.99f ) + + + 0.0f not is within 0.99000000953674316 of 1.0 + + + + + 0.f, WithinAbs( -0.f, 0 ) + + + 0.0f is within 0.0 of -0.0 + + + + + 11.f, !WithinAbs( 10.f, 0.5f ) + + + 11.0f not is within 0.5 of 10.0 + + + + + 10.f, !WithinAbs( 11.f, 0.5f ) + + + 10.0f not is within 0.5 of 11.0 + + + + + -10.f, WithinAbs( -10.f, 0.5f ) + + + -10.0f is within 0.5 of -10.0 + + + + + -10.f, WithinAbs( -9.6f, 0.5f ) + + + -10.0f is within 0.5 of -9.60000038146972656 + + + +
+
+ + + 1.f, WithinULP( 1.f, 0 ) + + + 1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) + + + + + -1.f, WithinULP( -1.f, 0 ) + + + -1.0f is within 0 ULPs of -1.00000000e+00f ([-1.00000000e+00, -1.00000000e+00]) + + + + + nextafter( 1.f, 2.f ), WithinULP( 1.f, 1 ) + + + 1.000000119f is within 1 ULPs of 1.00000000e+00f ([9.99999940e-01, 1.00000012e+00]) + + + + + 0.f, WithinULP( nextafter( 0.f, 1.f ), 1 ) + + + 0.0f is within 1 ULPs of 1.40129846e-45f ([0.00000000e+00, 2.80259693e-45]) + + + + + 1.f, WithinULP( nextafter( 1.f, 0.f ), 1 ) + + + 1.0f is within 1 ULPs of 9.99999940e-01f ([9.99999881e-01, 1.00000000e+00]) + + + + + 1.f, !WithinULP( nextafter( 1.f, 2.f ), 0 ) + + + 1.0f not is within 0 ULPs of 1.00000012e+00f ([1.00000012e+00, 1.00000012e+00]) + + + + + 1.f, WithinULP( 1.f, 0 ) + + + 1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) + + + + + -0.f, WithinULP( 0.f, 0 ) + + + -0.0f is within 0 ULPs of 0.00000000e+00f ([0.00000000e+00, 0.00000000e+00]) + + + +
+
+ + + 1.f, WithinAbs( 1.f, 0.5 ) || WithinULP( 1.f, 1 ) + + + 1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.00000000e+00f ([9.99999940e-01, 1.00000012e+00]) ) + + + + + 1.f, WithinAbs( 2.f, 0.5 ) || WithinULP( 1.f, 0 ) + + + 1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) ) + + + + + 0.0001f, WithinAbs( 0.f, 0.001f ) || WithinRel( 0.f, 0.1f ) + + + 0.0001f ( is within 0.00100000004749745 of 0.0 or and 0.0 are within 10% of each other ) + + + +
+
+ + + WithinAbs( 1.f, 0.f ) + + + WithinAbs( 1.f, 0.f ) + + + + + WithinAbs( 1.f, -1.f ), std::domain_error + + + WithinAbs( 1.f, -1.f ), std::domain_error + + + + + WithinULP( 1.f, 0 ) + + + WithinULP( 1.f, 0 ) + + + + + WithinULP( 1.f, static_cast<uint64_t>( -1 ) ), std::domain_error + + + WithinULP( 1.f, static_cast<uint64_t>( -1 ) ), std::domain_error + + + + + WithinRel( 1.f, 0.f ) + + + WithinRel( 1.f, 0.f ) + + + + + WithinRel( 1.f, -0.2f ), std::domain_error + + + WithinRel( 1.f, -0.2f ), std::domain_error + + + + + WithinRel( 1.f, 1.f ), std::domain_error + + + WithinRel( 1.f, 1.f ), std::domain_error + + + +
+
+ + + 1., !IsNaN() + + + 1.0 not is NaN + + + +
+ +
+ + + + i % 2 == 0 + + + 0 == 0 + + + + + i % 2 == 0 + + + 0 == 0 + + + + + i % 2 == 0 + + + 0 == 0 + + + + + i % 2 == 0 + + + 0 == 0 + + + + + +
+
+ + + i % 2 == 0 + + + 0 == 0 + + + +
+ +
+
+
+ + + i % 2 == 0 + + + 0 == 0 + + + +
+ +
+
+
+ + + i % 2 == 0 + + + 0 == 0 + + + +
+ +
+
+
+ + + filter([] (int) {return false; }, value(1)), Catch::GeneratorException + + + filter([] (int) {return false; }, value(1)), Catch::GeneratorException + + + +
+ +
+
+ + + i < 4 + + + 1 < 4 + + + +
+
+ + + i < 4 + + + 2 < 4 + + + +
+
+ + + i < 4 + + + 3 < 4 + + + +
+
+
+ + + i % 2 == 0 + + + 0 == 0 + + + +
+ +
+
+
+ + + i % 2 == 0 + + + 0 == 0 + + + +
+ +
+
+
+ + + i % 2 == 0 + + + 0 == 0 + + + +
+ +
+
+
+ + + i.size() == 1 + + + 1 == 1 + + + +
+ +
+
+
+ + + i.size() == 1 + + + 1 == 1 + + + +
+ +
+
+
+ + + i.size() == 1 + + + 1 == 1 + + + +
+ +
+
+
+ + + i.size() == 1 + + + 1 == 1 + + + +
+ +
+
+
+ + + i.size() == 1 + + + 1 == 1 + + + +
+ +
+
+
+ + + i.size() == 1 + + + 1 == 1 + + + +
+ +
+
+ + + j > 0 + + + 1 > 0 + + + +
+
+ + + j > 0 + + + 2 > 0 + + + +
+
+ + + j > 0 + + + 3 > 0 + + + +
+
+ + + j > 0 + + + 1 > 0 + + + +
+
+ + + j > 0 + + + 2 > 0 + + + +
+
+ + + j > 0 + + + 3 > 0 + + + +
+
+
+ + + chunk2.size() == 2 + + + 2 == 2 + + + + + chunk2.front() == chunk2.back() + + + 1 == 1 + + + +
+ +
+
+
+ + + chunk2.size() == 2 + + + 2 == 2 + + + + + chunk2.front() == chunk2.back() + + + 2 == 2 + + + +
+ +
+
+
+ + + chunk2.size() == 2 + + + 2 == 2 + + + + + chunk2.front() == chunk2.back() + + + 3 == 3 + + + +
+ +
+
+
+ + + chunk2.size() == 2 + + + 2 == 2 + + + + + chunk2.front() == chunk2.back() + + + 1 == 1 + + + + + chunk2.front() < 3 + + + 1 < 3 + + + +
+ +
+
+
+ + + chunk2.size() == 2 + + + 2 == 2 + + + + + chunk2.front() == chunk2.back() + + + 2 == 2 + + + + + chunk2.front() < 3 + + + 2 < 3 + + + +
+ +
+
+
+ + + chunk2.size() == 0 + + + 0 == 0 + + + +
+ +
+
+
+ + + chunk2.size() == 0 + + + 0 == 0 + + + +
+ +
+
+
+ + + chunk2.size() == 0 + + + 0 == 0 + + + +
+ +
+
+
+ + + chunk(2, value(1)), Catch::GeneratorException + + + chunk(2, value(1)), Catch::GeneratorException + + + +
+ +
+ +
+ +
+ + + j < i + + + -3 < 1 + + + +
+
+ + + j < i + + + -2 < 1 + + + +
+
+ + + j < i + + + -1 < 1 + + + +
+
+ + + 4u * i > str.size() + + + 4 > 1 + + + +
+
+ + + 4u * i > str.size() + + + 4 > 2 + + + +
+
+ + + 4u * i > str.size() + + + 4 > 3 + + + +
+
+ + + j < i + + + -3 < 2 + + + +
+
+ + + j < i + + + -2 < 2 + + + +
+
+ + + j < i + + + -1 < 2 + + + +
+
+ + + 4u * i > str.size() + + + 8 > 1 + + + +
+
+ + + 4u * i > str.size() + + + 8 > 2 + + + +
+
+ + + 4u * i > str.size() + + + 8 > 3 + + + +
+
+ + + j < i + + + -3 < 3 + + + +
+
+ + + j < i + + + -2 < 3 + + + +
+
+ + + j < i + + + -1 < 3 + + + +
+
+ + + 4u * i > str.size() + + + 12 > 1 + + + +
+
+ + + 4u * i > str.size() + + + 12 > 2 + + + +
+
+ + + 4u * i > str.size() + + + 12 > 3 + + + +
+ +
+ +
+ + + gen.get() == 123 + + + 123 == 123 + + + + + !(gen.next()) + + + !false + + + +
+
+ + + gen.get() == 1 + + + 1 == 1 + + + + + gen.next() + + + true + + + + + gen.get() == 3 + + + 3 == 3 + + + + + gen.next() + + + true + + + + + gen.get() == 5 + + + 5 == 5 + + + + + !(gen.next()) + + + !false + + + +
+
+ + + gen.get() == 1 + + + 1 == 1 + + + + + gen.next() + + + true + + + + + gen.get() == 5 + + + 5 == 5 + + + + + gen.next() + + + true + + + + + gen.get() == 2 + + + 2 == 2 + + + + + gen.next() + + + true + + + + + gen.get() == 4 + + + 4 == 4 + + + + + gen.next() + + + true + + + + + gen.get() == 0 + + + 0 == 0 + + + + + !(gen.next()) + + + !false + + + +
+
+ + + gen.get().size() == 2 + + + 2 == 2 + + + + + gen.get() == "aa" + + + "aa" == "aa" + + + + + gen.next() + + + true + + + + + gen.get() == "bb" + + + "bb" == "bb" + + + + + gen.next() + + + true + + + + + gen.get() == "cc" + + + "cc" == "cc" + + + + + !(gen.next()) + + + !false + + + +
+
+
+ + + gen.get() == 1 + + + 1 == 1 + + + + + gen.next() + + + true + + + + + gen.get() == 3 + + + 3 == 3 + + + + + !(gen.next()) + + + !false + + + +
+ +
+
+
+ + + gen.get() == 1 + + + 1 == 1 + + + + + gen.next() + + + true + + + + + gen.get() == 3 + + + 3 == 3 + + + + + !(gen.next()) + + + !false + + + +
+ +
+
+
+ + + filter([](int) { return false; }, value(1)), Catch::GeneratorException + + + filter([](int) { return false; }, value(1)), Catch::GeneratorException + + + + + filter([](int) { return false; }, values({ 1, 2, 3 })), Catch::GeneratorException + + + filter([](int) { return false; }, values({ 1, 2, 3 })), Catch::GeneratorException + + + +
+ +
+
+
+ + + gen.get() == 1 + + + 1 == 1 + + + + + gen.next() + + + true + + + + + gen.get() == 2 + + + 2 == 2 + + + + + !(gen.next()) + + + !false + + + +
+ +
+
+
+ + + gen.get() == 1 + + + 1 == 1 + + + + + !(gen.next()) + + + !false + + + +
+ +
+
+ + + gen.get() == 2.0 + + + 2.0 == 2.0 + + + + + gen.next() + + + true + + + + + gen.get() == 4.0 + + + 4.0 == 4.0 + + + + + gen.next() + + + true + + + + + gen.get() == 6.0 + + + 6.0 == 6.0 + + + + + !(gen.next()) + + + !false + + + +
+
+ + + gen.get() == 2.0 + + + 2.0 == 2.0 + + + + + gen.next() + + + true + + + + + gen.get() == 4.0 + + + 4.0 == 4.0 + + + + + gen.next() + + + true + + + + + gen.get() == 6.0 + + + 6.0 == 6.0 + + + + + !(gen.next()) + + + !false + + + +
+
+
+ + + gen.get() == 3 + + + 3 == 3 + + + + + !(gen.next()) + + + !false + + + +
+ +
+
+
+ + + gen.get() == 1 + + + 1 == 1 + + + + + gen.next() + + + true + + + + + gen.get() == 2 + + + 2 == 2 + + + + + gen.next() + + + true + + + + + gen.get() == 3 + + + 3 == 3 + + + + + gen.next() + + + true + + + + + gen.get() == 1 + + + 1 == 1 + + + + + gen.next() + + + true + + + + + gen.get() == 2 + + + 2 == 2 + + + + + gen.next() + + + true + + + + + gen.get() == 3 + + + 3 == 3 + + + + + !(gen.next()) + + + !false + + + +
+ +
+
+
+
+ + + gen.get() == -2 + + + -2 == -2 + + + + + gen.next() + + + true + + + + + gen.get() == -1 + + + -1 == -1 + + + + + gen.next() + + + true + + + + + gen.get() == 0 + + + 0 == 0 + + + + + gen.next() + + + true + + + + + gen.get() == 1 + + + 1 == 1 + + + + + !(gen.next()) + + + !false + + + +
+ +
+ +
+
+
+
+ + + gen.get() == 2 + + + 2 == 2 + + + + + gen.next() + + + true + + + + + gen.get() == 1 + + + 1 == 1 + + + + + gen.next() + + + true + + + + + gen.get() == 0 + + + 0 == 0 + + + + + gen.next() + + + true + + + + + gen.get() == -1 + + + -1 == -1 + + + + + !(gen.next()) + + + !false + + + +
+ +
+ +
+
+
+
+
+ + + gen.get() == -7 + + + -7 == -7 + + + + + gen.next() + + + true + + + + + gen.get() == -4 + + + -4 == -4 + + + + + gen.next() + + + true + + + + + gen.get() == -1 + + + -1 == -1 + + + + + gen.next() + + + true + + + + + gen.get() == 2 + + + 2 == 2 + + + + + !(gen.next()) + + + !false + + + +
+ +
+ +
+ +
+
+
+
+
+ + + gen.get() == -7 + + + -7 == -7 + + + + + gen.next() + + + true + + + + + gen.get() == -4 + + + -4 == -4 + + + + + gen.next() + + + true + + + + + gen.get() == -1 + + + -1 == -1 + + + + + gen.next() + + + true + + + + + gen.get() == 2 + + + 2 == 2 + + + + + !(gen.next()) + + + !false + + + +
+ +
+ +
+ +
+
+
+
+
+ + + gen.get() == -7 + + + -7 == -7 + + + + + gen.next() + + + true + + + + + gen.get() == -4 + + + -4 == -4 + + + + + gen.next() + + + true + + + + + gen.get() == -1 + + + -1 == -1 + + + + + gen.next() + + + true + + + + + gen.get() == 2 + + + 2 == 2 + + + + + gen.next() + + + true + + + + + gen.get() == 5 + + + 5 == 5 + + + + + !(gen.next()) + + + !false + + + +
+ +
+ +
+ +
+
+
+
+
+ + Current expected value is -1 + + + + gen.get() == Approx(expected) + + + -1.0 == Approx( -1.0 ) + + + + Current expected value is -1 + + + + gen.next() + + + true + + + + Current expected value is -0.9 + + + + gen.get() == Approx(expected) + + + -0.90000000000000002 +== +Approx( -0.90000000000000002 ) + + + + Current expected value is -0.9 + + + + gen.next() + + + true + + + + Current expected value is -0.8 + + + + gen.get() == Approx(expected) + + + -0.80000000000000004 +== +Approx( -0.80000000000000004 ) + + + + Current expected value is -0.8 + + + + gen.next() + + + true + + + + Current expected value is -0.7 + + + + gen.get() == Approx(expected) + + + -0.70000000000000007 +== +Approx( -0.70000000000000007 ) + + + + Current expected value is -0.7 + + + + gen.next() + + + true + + + + Current expected value is -0.6 + + + + gen.get() == Approx(expected) + + + -0.60000000000000009 +== +Approx( -0.60000000000000009 ) + + + + Current expected value is -0.6 + + + + gen.next() + + + true + + + + Current expected value is -0.5 + + + + gen.get() == Approx(expected) + + + -0.50000000000000011 +== +Approx( -0.50000000000000011 ) + + + + Current expected value is -0.5 + + + + gen.next() + + + true + + + + Current expected value is -0.4 + + + + gen.get() == Approx(expected) + + + -0.40000000000000013 +== +Approx( -0.40000000000000013 ) + + + + Current expected value is -0.4 + + + + gen.next() + + + true + + + + Current expected value is -0.3 + + + + gen.get() == Approx(expected) + + + -0.30000000000000016 +== +Approx( -0.30000000000000016 ) + + + + Current expected value is -0.3 + + + + gen.next() + + + true + + + + Current expected value is -0.2 + + + + gen.get() == Approx(expected) + + + -0.20000000000000015 +== +Approx( -0.20000000000000015 ) + + + + Current expected value is -0.2 + + + + gen.next() + + + true + + + + Current expected value is -0.1 + + + + gen.get() == Approx(expected) + + + -0.10000000000000014 +== +Approx( -0.10000000000000014 ) + + + + Current expected value is -0.1 + + + + gen.next() + + + true + + + + Current expected value is -1.38778e-16 + + + + gen.get() == Approx(expected) + + + -0.00000000000000014 +== +Approx( -0.00000000000000014 ) + + + + Current expected value is -1.38778e-16 + + + + gen.next() + + + true + + + + Current expected value is 0.1 + + + + gen.get() == Approx(expected) + + + 0.09999999999999987 +== +Approx( 0.09999999999999987 ) + + + + Current expected value is 0.1 + + + + gen.next() + + + true + + + + Current expected value is 0.2 + + + + gen.get() == Approx(expected) + + + 0.19999999999999987 +== +Approx( 0.19999999999999987 ) + + + + Current expected value is 0.2 + + + + gen.next() + + + true + + + + Current expected value is 0.3 + + + + gen.get() == Approx(expected) + + + 0.29999999999999988 +== +Approx( 0.29999999999999988 ) + + + + Current expected value is 0.3 + + + + gen.next() + + + true + + + + Current expected value is 0.4 + + + + gen.get() == Approx(expected) + + + 0.39999999999999991 +== +Approx( 0.39999999999999991 ) + + + + Current expected value is 0.4 + + + + gen.next() + + + true + + + + Current expected value is 0.5 + + + + gen.get() == Approx(expected) + + + 0.49999999999999989 +== +Approx( 0.49999999999999989 ) + + + + Current expected value is 0.5 + + + + gen.next() + + + true + + + + Current expected value is 0.6 + + + + gen.get() == Approx(expected) + + + 0.59999999999999987 +== +Approx( 0.59999999999999987 ) + + + + Current expected value is 0.6 + + + + gen.next() + + + true + + + + Current expected value is 0.7 + + + + gen.get() == Approx(expected) + + + 0.69999999999999984 +== +Approx( 0.69999999999999984 ) + + + + Current expected value is 0.7 + + + + gen.next() + + + true + + + + Current expected value is 0.8 + + + + gen.get() == Approx(expected) + + + 0.79999999999999982 +== +Approx( 0.79999999999999982 ) + + + + Current expected value is 0.8 + + + + gen.next() + + + true + + + + Current expected value is 0.9 + + + + gen.get() == Approx(expected) + + + 0.8999999999999998 +== +Approx( 0.8999999999999998 ) + + + + Current expected value is 0.9 + + + + gen.next() + + + true + + + + + gen.get() == Approx( rangeEnd ) + + + 0.99999999999999978 == Approx( 1.0 ) + + + + + !(gen.next()) + + + !false + + + +
+ +
+ +
+ +
+
+
+
+
+ + Current expected value is -1 + + + + gen.get() == Approx(expected) + + + -1.0 == Approx( -1.0 ) + + + + Current expected value is -1 + + + + gen.next() + + + true + + + + Current expected value is -0.7 + + + + gen.get() == Approx(expected) + + + -0.69999999999999996 +== +Approx( -0.69999999999999996 ) + + + + Current expected value is -0.7 + + + + gen.next() + + + true + + + + Current expected value is -0.4 + + + + gen.get() == Approx(expected) + + + -0.39999999999999997 +== +Approx( -0.39999999999999997 ) + + + + Current expected value is -0.4 + + + + gen.next() + + + true + + + + Current expected value is -0.1 + + + + gen.get() == Approx(expected) + + + -0.09999999999999998 +== +Approx( -0.09999999999999998 ) + + + + Current expected value is -0.1 + + + + gen.next() + + + true + + + + Current expected value is 0.2 + + + + gen.get() == Approx(expected) + + + 0.20000000000000001 +== +Approx( 0.20000000000000001 ) + + + + Current expected value is 0.2 + + + + gen.next() + + + true + + + + Current expected value is 0.5 + + + + gen.get() == Approx(expected) + + + 0.5 == Approx( 0.5 ) + + + + Current expected value is 0.5 + + + + gen.next() + + + true + + + + + !(gen.next()) + + + !false + + + +
+ +
+ +
+ +
+
+
+
+
+ + Current expected value is -1 + + + + gen.get() == Approx(expected) + + + -1.0 == Approx( -1.0 ) + + + + Current expected value is -1 + + + + gen.next() + + + true + + + + Current expected value is -0.7 + + + + gen.get() == Approx(expected) + + + -0.69999999999999996 +== +Approx( -0.69999999999999996 ) + + + + Current expected value is -0.7 + + + + gen.next() + + + true + + + + Current expected value is -0.4 + + + + gen.get() == Approx(expected) + + + -0.39999999999999997 +== +Approx( -0.39999999999999997 ) + + + + Current expected value is -0.4 + + + + gen.next() + + + true + + + + Current expected value is -0.1 + + + + gen.get() == Approx(expected) + + + -0.09999999999999998 +== +Approx( -0.09999999999999998 ) + + + + Current expected value is -0.1 + + + + gen.next() + + + true + + + + Current expected value is 0.2 + + + + gen.get() == Approx(expected) + + + 0.20000000000000001 +== +Approx( 0.20000000000000001 ) + + + + Current expected value is 0.2 + + + + gen.next() + + + true + + + + Current expected value is 0.5 + + + + gen.get() == Approx(expected) + + + 0.5 == Approx( 0.5 ) + + + + Current expected value is 0.5 + + + + gen.next() + + + true + + + + + !(gen.next()) + + + !false + + + +
+ +
+ +
+ +
+
+
+
+
+ + + gen.get() == 5 + + + 5 == 5 + + + + + gen.next() + + + true + + + + + gen.get() == 2 + + + 2 == 2 + + + + + gen.next() + + + true + + + + + gen.get() == -1 + + + -1 == -1 + + + + + gen.next() + + + true + + + + + gen.get() == -4 + + + -4 == -4 + + + + + !(gen.next()) + + + !false + + + +
+ +
+ +
+ +
+
+
+
+
+ + + gen.get() == 5 + + + 5 == 5 + + + + + gen.next() + + + true + + + + + gen.get() == 2 + + + 2 == 2 + + + + + gen.next() + + + true + + + + + gen.get() == -1 + + + -1 == -1 + + + + + gen.next() + + + true + + + + + gen.get() == -4 + + + -4 == -4 + + + + + !(gen.next()) + + + !false + + + +
+ +
+ +
+ +
+
+
+
+
+ + + gen.get() == 5 + + + 5 == 5 + + + + + gen.next() + + + true + + + + + gen.get() == 2 + + + 2 == 2 + + + + + gen.next() + + + true + + + + + gen.get() == -1 + + + -1 == -1 + + + + + gen.next() + + + true + + + + + gen.get() == -4 + + + -4 == -4 + + + + + gen.next() + + + true + + + + + gen.get() == -7 + + + -7 == -7 + + + + + !(gen.next()) + + + !false + + + +
+ +
+ +
+ +
+ +
+ + + + d >= Approx( 1.22 ) + + + 1.22999999999999998 +>= +Approx( 1.21999999999999997 ) + + + + + d >= Approx( 1.23 ) + + + 1.22999999999999998 +>= +Approx( 1.22999999999999998 ) + + + + + !(d >= Approx( 1.24 )) + + + !(1.22999999999999998 +>= +Approx( 1.23999999999999999 )) + + + + + d >= Approx( 1.24 ).epsilon(0.1) + + + 1.22999999999999998 +>= +Approx( 1.23999999999999999 ) + + + + + + + + h1( dummy ) != h2( dummy ) + + + 3422778688 (0x) +!= +130711275 (0x) + + + + + + + + h1( dummy ) == h2( dummy ) + + + 3422778688 (0x) +== +3422778688 (0x) + + + + + +
+ + + h( dummy1 ) != h( dummy2 ) + + + 2903002874 (0x) +!= +2668622104 (0x) + + + +
+
+ + + h( dummy1 ) != h( dummy2 ) + + + 2673152918 (0x) +!= +3916075712 (0x) + + + +
+
+ + + h( dummy1 ) != h( dummy2 ) + + + 2074929312 (0x) +!= +3429949824 (0x) + + + +
+ +
+ + + + h( dummy ) == h( dummy ) + + + 3422778688 (0x) +== +3422778688 (0x) + + + + + + + This info has multiple parts. + + + This unscoped info has multiple parts. + + + Show infos! + + + + + + this is a message + + + this is a warning + + + + + + this message should be logged + + + so should this + + + + a == 1 + + + 2 == 1 + + + + + + + this message may be logged later + + + + a == 2 + + + 2 == 2 + + + + this message may be logged later + + + this message should be logged + + + + a == 1 + + + 2 == 1 + + + + this message may be logged later + + + this message should be logged + + + and this, but later + + + + a == 0 + + + 2 == 0 + + + + this message may be logged later + + + this message should be logged + + + and this, but later + + + but not this + + + + a == 2 + + + 2 == 2 + + + + + + + current counter 0 + + + i := 0 + + + + i < 10 + + + 0 < 10 + + + + current counter 1 + + + i := 1 + + + + i < 10 + + + 1 < 10 + + + + current counter 2 + + + i := 2 + + + + i < 10 + + + 2 < 10 + + + + current counter 3 + + + i := 3 + + + + i < 10 + + + 3 < 10 + + + + current counter 4 + + + i := 4 + + + + i < 10 + + + 4 < 10 + + + + current counter 5 + + + i := 5 + + + + i < 10 + + + 5 < 10 + + + + current counter 6 + + + i := 6 + + + + i < 10 + + + 6 < 10 + + + + current counter 7 + + + i := 7 + + + + i < 10 + + + 7 < 10 + + + + current counter 8 + + + i := 8 + + + + i < 10 + + + 8 < 10 + + + + current counter 9 + + + i := 9 + + + + i < 10 + + + 9 < 10 + + + + current counter 10 + + + i := 10 + + + + i < 10 + + + 10 < 10 + + + + + + + + Dummy + + + Dummy + + + Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE + + + + + + + + data.int_seven != 7 + + + 7 != 7 + + + + + data.float_nine_point_one != Approx( 9.1f ) + + + 9.100000381f +!= +Approx( 9.10000038146972656 ) + + + + + data.double_pi != Approx( 3.1415926535 ) + + + 3.14159265350000005 +!= +Approx( 3.14159265350000005 ) + + + + + data.str_hello != "hello" + + + "hello" != "hello" + + + + + data.str_hello.size() != 5 + + + 5 != 5 + + + + + + + + data.int_seven != 6 + + + 7 != 6 + + + + + data.int_seven != 8 + + + 7 != 8 + + + + + data.float_nine_point_one != Approx( 9.11f ) + + + 9.100000381f +!= +Approx( 9.10999965667724609 ) + + + + + data.float_nine_point_one != Approx( 9.0f ) + + + 9.100000381f != Approx( 9.0 ) + + + + + data.float_nine_point_one != Approx( 1 ) + + + 9.100000381f != Approx( 1.0 ) + + + + + data.float_nine_point_one != Approx( 0 ) + + + 9.100000381f != Approx( 0.0 ) + + + + + data.double_pi != Approx( 3.1415 ) + + + 3.14159265350000005 +!= +Approx( 3.14150000000000018 ) + + + + + data.str_hello != "goodbye" + + + "hello" != "goodbye" + + + + + data.str_hello != "hell" + + + "hello" != "hell" + + + + + data.str_hello != "hello1" + + + "hello" != "hello1" + + + + + data.str_hello.size() != 6 + + + 5 != 6 + + + + + +
+ + + stream.str() == "" + + + "" == "" + + + +
+
+ + + stream.str() == "{\n}" + + + "{ +}" +== +"{ +}" + + + +
+
+ + + stream.str(), ContainsSubstring( "\"int\": 1," ) && ContainsSubstring( "\"double\": 1.5," ) && ContainsSubstring( "\"true\": true," ) && ContainsSubstring( "\"false\": false," ) && ContainsSubstring( "\"string\": \"this is a string\"," ) && ContainsSubstring( "\"array\": [\n 1,\n 2\n ]\n}" ) + + + "{ + "int": 1, + "double": 1.5, + "true": true, + "false": false, + "string": "this is a string", + "array": [ + 1, + 2 + ] +}" ( contains: ""int": 1," and contains: ""double": 1.5," and contains: ""true": true," and contains: ""false": false," and contains: ""string": "this is a string"," and contains: ""array": [ + 1, + 2 + ] +}" ) + + + +
+
+ + + stream.str(), ContainsSubstring( "\"empty_object\": {\n }," ) && ContainsSubstring( "\"fully_object\": {\n \"key\": 1\n }" ) + + + "{ + "empty_object": { + }, + "fully_object": { + "key": 1 + } +}" ( contains: ""empty_object": { + }," and contains: ""fully_object": { + "key": 1 + }" ) + + + +
+
+ + + stream.str() == "[\n]" + + + "[ +]" +== +"[ +]" + + + +
+
+ + + stream.str() == "[\n 1,\n 1.5,\n true,\n false,\n \"this is a string\",\n {\n \"object\": 42\n },\n [\n \"array\",\n 42.5\n ]\n]" + + + "[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] +]" +== +"[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] +]" + + + +
+
+ + + stream.str() == "{\n}" + + + "{ +}" +== +"{ +}" + + + +
+
+ + + stream.str() == "[\n]" + + + "[ +]" +== +"[ +]" + + + +
+
+ + + stream.str() == "\"custom\"" + + + ""custom"" == ""custom"" + + + +
+ +
+ +
+ + + sstream.str() == "\"\\\"\"" + + + ""\""" == ""\""" + + + +
+
+ + + sstream.str() == "\"\\\\\"" + + + ""\\"" == ""\\"" + + + +
+
+ + + sstream.str() == "\"/\"" + + + ""/"" == ""/"" + + + +
+
+ + + sstream.str() == "\"\\b\"" + + + ""\b"" == ""\b"" + + + +
+
+ + + sstream.str() == "\"\\f\"" + + + ""\f"" == ""\f"" + + + +
+
+ + + sstream.str() == "\"\\n\"" + + + ""\n"" == ""\n"" + + + +
+
+ + + sstream.str() == "\"\\r\"" + + + ""\r"" == ""\r"" + + + +
+
+ + + sstream.str() == "\"\\t\"" + + + ""\t"" == ""\t"" + + + +
+
+ + + sstream.str() == "\"\\\\/\\t\\r\\n\"" + + + ""\\/\t\r\n"" == ""\\/\t\r\n"" + + + +
+ +
+ + + + []() { return true; }() + + + true + + + + + + + + d <= Approx( 1.24 ) + + + 1.22999999999999998 +<= +Approx( 1.23999999999999999 ) + + + + + d <= Approx( 1.23 ) + + + 1.22999999999999998 +<= +Approx( 1.22999999999999998 ) + + + + + !(d <= Approx( 1.22 )) + + + !(1.22999999999999998 +<= +Approx( 1.21999999999999997 )) + + + + + d <= Approx( 1.22 ).epsilon(0.1) + + + 1.22999999999999998 +<= +Approx( 1.21999999999999997 ) + + + + + + + + + + + testStringForMatching(), ContainsSubstring( "string" ) && ContainsSubstring( "abc" ) && ContainsSubstring( "substring" ) && ContainsSubstring( "contains" ) + + + "this string contains 'abc' as a substring" ( contains: "string" and contains: "abc" and contains: "substring" and contains: "contains" ) + + + + + + + + testStringForMatching(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) + + + "this string contains 'abc' as a substring" ( contains: "string" or contains: "different" or contains: "random" ) + + + + + testStringForMatching2(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) + + + "some completely different text that contains one common word" ( contains: "string" or contains: "different" or contains: "random" ) + + + + + + + + testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "substring" ) + + + "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "substring" ) + + + + + + + + testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) + + + "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" ) + + + + + + + + testStringForMatching(), !ContainsSubstring( "different" ) + + + "this string contains 'abc' as a substring" not contains: "different" + + + + + + + + testStringForMatching(), !ContainsSubstring( "substring" ) + + + "this string contains 'abc' as a substring" not contains: "substring" + + + + + +
+
+ + +
+ +
+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+
+ + +
+ +
+
+ +
+ +
+ + + + thisThrows(), "expected exception" + + + "expected exception" equals: "expected exception" + + + + + thisThrows(), "should fail" + + + "expected exception" equals: "should fail" + + + + + + + + records == expected + + + { "Hello", "world", "Goodbye", "world" } +== +{ "Hello", "world", "Goodbye", "world" } + + + + + + + + multiReporter.getPreferences().shouldRedirectStdOut == false + + + false == false + + + + + multiReporter.getPreferences().shouldReportAllAssertions == false + + + false == false + + +
+ + + multiReporter.getPreferences().shouldRedirectStdOut == true + + + true == true + + + + + multiReporter.getPreferences().shouldReportAllAssertions == false + + + false == false + + + + + multiReporter.getPreferences().shouldRedirectStdOut == true + + + true == true + + + + + multiReporter.getPreferences().shouldReportAllAssertions == true + + + true == true + + + + + multiReporter.getPreferences().shouldRedirectStdOut == true + + + true == true + + + + + multiReporter.getPreferences().shouldReportAllAssertions == true + + + true == true + + + +
+ + + multiReporter.getPreferences().shouldRedirectStdOut == false + + + false == false + + + + + multiReporter.getPreferences().shouldReportAllAssertions == false + + + false == false + + +
+ + + multiReporter.getPreferences().shouldRedirectStdOut == true + + + true == true + + + + + multiReporter.getPreferences().shouldReportAllAssertions == false + + + false == false + + + + + multiReporter.getPreferences().shouldRedirectStdOut == true + + + true == true + + + + + multiReporter.getPreferences().shouldReportAllAssertions == true + + + true == true + + + + + multiReporter.getPreferences().shouldRedirectStdOut == true + + + true == true + + + + + multiReporter.getPreferences().shouldReportAllAssertions == true + + + true == true + + + +
+ +
+ + + + values > -6 + + + 3 > -6 + + + + + values > -6 + + + 4 > -6 + + + + + values > -6 + + + 5 > -6 + + + + + values > -6 + + + 6 > -6 + + + + + values > -6 + + + -5 > -6 + + + + + values > -6 + + + -4 > -6 + + + + + values > -6 + + + 90 > -6 + + + + + values > -6 + + + 91 > -6 + + + + + values > -6 + + + 92 > -6 + + + + + values > -6 + + + 93 > -6 + + + + + values > -6 + + + 94 > -6 + + + + + values > -6 + + + 95 > -6 + + + + + values > -6 + + + 96 > -6 + + + + + values > -6 + + + 97 > -6 + + + + + values > -6 + + + 98 > -6 + + + + + values > -6 + + + 99 > -6 + + + + + + + This one ran + + + + + + custom exception + + + + + + + True + + + {?} + + + + + !False + + + true + + + + + !(False) + + + !{?} + + + + + + + + + + + data.int_seven > 7 + + + 7 > 7 + + + + + data.int_seven < 7 + + + 7 < 7 + + + + + data.int_seven > 8 + + + 7 > 8 + + + + + data.int_seven < 6 + + + 7 < 6 + + + + + data.int_seven < 0 + + + 7 < 0 + + + + + data.int_seven < -1 + + + 7 < -1 + + + + + data.int_seven >= 8 + + + 7 >= 8 + + + + + data.int_seven <= 6 + + + 7 <= 6 + + + + + data.float_nine_point_one < 9 + + + 9.100000381f < 9 + + + + + data.float_nine_point_one > 10 + + + 9.100000381f > 10 + + + + + data.float_nine_point_one > 9.2 + + + 9.100000381f > 9.19999999999999929 + + + + + data.str_hello > "hello" + + + "hello" > "hello" + + + + + data.str_hello < "hello" + + + "hello" < "hello" + + + + + data.str_hello > "hellp" + + + "hello" > "hellp" + + + + + data.str_hello > "z" + + + "hello" > "z" + + + + + data.str_hello < "hellm" + + + "hello" < "hellm" + + + + + data.str_hello < "a" + + + "hello" < "a" + + + + + data.str_hello >= "z" + + + "hello" >= "z" + + + + + data.str_hello <= "a" + + + "hello" <= "a" + + + + + + + + data.int_seven < 8 + + + 7 < 8 + + + + + data.int_seven > 6 + + + 7 > 6 + + + + + data.int_seven > 0 + + + 7 > 0 + + + + + data.int_seven > -1 + + + 7 > -1 + + + + + data.int_seven >= 7 + + + 7 >= 7 + + + + + data.int_seven >= 6 + + + 7 >= 6 + + + + + data.int_seven <= 7 + + + 7 <= 7 + + + + + data.int_seven <= 8 + + + 7 <= 8 + + + + + data.float_nine_point_one > 9 + + + 9.100000381f > 9 + + + + + data.float_nine_point_one < 10 + + + 9.100000381f < 10 + + + + + data.float_nine_point_one < 9.2 + + + 9.100000381f < 9.19999999999999929 + + + + + data.str_hello <= "hello" + + + "hello" <= "hello" + + + + + data.str_hello >= "hello" + + + "hello" >= "hello" + + + + + data.str_hello < "hellp" + + + "hello" < "hellp" + + + + + data.str_hello < "zebra" + + + "hello" < "zebra" + + + + + data.str_hello > "hellm" + + + "hello" > "hellm" + + + + + data.str_hello > "a" + + + "hello" > "a" + + + + + +
+ + + rng() == 0x + + + 4242248763 (0x) +== +4242248763 (0x) + + + + + rng() == 0x + + + 1867888929 (0x) +== +1867888929 (0x) + + + + + rng() == 0x + + + 1276619030 (0x) +== +1276619030 (0x) + + + + + rng() == 0x + + + 1911218783 (0x) +== +1911218783 (0x) + + + + + rng() == 0x + + + 1827115164 (0x) +== +1827115164 (0x) + + + +
+
+ + + rng() == 0x + + + 1472234645 (0x) +== +1472234645 (0x) + + + + + rng() == 0x + + + 868832940 (0x) +== +868832940 (0x) + + + + + rng() == 0x + + + 570883446 (0x) +== +570883446 (0x) + + + + + rng() == 0x + + + 889299803 (0x) +== +889299803 (0x) + + + + + rng() == 0x + + + 4261393167 (0x) +== +4261393167 (0x) + + + + + rng() == 0x + + + 1472234645 (0x) +== +1472234645 (0x) + + + + + rng() == 0x + + + 868832940 (0x) +== +868832940 (0x) + + + + + rng() == 0x + + + 570883446 (0x) +== +570883446 (0x) + + + + + rng() == 0x + + + 889299803 (0x) +== +889299803 (0x) + + + + + rng() == 0x + + + 4261393167 (0x) +== +4261393167 (0x) + + + +
+ +
+ +
+ + Message from section one + + +
+
+ + Message from section two + + +
+ +
+ + + + ( EvilMatcher(), EvilMatcher() ), EvilCommaOperatorUsed + + + ( EvilMatcher(), EvilMatcher() ), EvilCommaOperatorUsed + + + + + &EvilMatcher(), EvilAddressOfOperatorUsed + + + &EvilMatcher(), EvilAddressOfOperatorUsed + + + + + EvilMatcher() || ( EvilMatcher() && !EvilMatcher() ) + + + EvilMatcher() || ( EvilMatcher() && !EvilMatcher() ) + + + + + ( EvilMatcher() && EvilMatcher() ) || !EvilMatcher() + + + ( EvilMatcher() && EvilMatcher() ) || !EvilMatcher() + + + + + +
+ + + parseUInt( "0" ) == Optional<unsigned int>{ 0 } + + + {?} == {?} + + + + + parseUInt( "100" ) == Optional<unsigned int>{ 100 } + + + {?} == {?} + + + + + parseUInt( "4294967295" ) == Optional<unsigned int>{ 4294967295 } + + + {?} == {?} + + + + + parseUInt( "0x", 16 ) == Optional<unsigned int>{ 255 } + + + {?} == {?} + + + +
+
+ + + !(parseUInt( "" )) + + + !{?} + + + + + !(parseUInt( "!!KJHF*#" )) + + + !{?} + + + + + !(parseUInt( "-1" )) + + + !{?} + + + + + !(parseUInt( "4294967296" )) + + + !{?} + + + + + !(parseUInt( "42949672964294967296429496729642949672964294967296" )) + + + !{?} + + + + + !(parseUInt( "2 4" )) + + + !{?} + + + + + !(parseUInt( "0x", 10 )) + + + !{?} + + + +
+ +
+ + + + spec.hasFilters() + + + true + + + + + spec.getInvalidSpecs().empty() + + + true + + + + + spec.matches( testCase ) + + + true + + + + + +
+ + + cli.parse({ "test", "--shard-count=8" }) + + + {?} + + + + + config.shardCount == 8 + + + 8 == 8 + + + +
+
+ + + !(result) + + + !{?} + + + + + result.errorMessage(), ContainsSubstring( "Could not parse '-1' as shard count" ) + + + "Could not parse '-1' as shard count" contains: "Could not parse '-1' as shard count" + + + +
+
+ + + !(result) + + + !{?} + + + + + result.errorMessage(), ContainsSubstring( "Shard count must be positive" ) + + + "Shard count must be positive" contains: "Shard count must be positive" + + + +
+
+ + + cli.parse({ "test", "--shard-index=2" }) + + + {?} + + + + + config.shardIndex == 2 + + + 2 == 2 + + + +
+
+ + + !(result) + + + !{?} + + + + + result.errorMessage(), ContainsSubstring( "Could not parse '-12' as shard index" ) + + + "Could not parse '-12' as shard index" contains: "Could not parse '-12' as shard index" + + + +
+
+ + + cli.parse({ "test", "--shard-index=0" }) + + + {?} + + + + + config.shardIndex == 0 + + + 0 == 0 + + + +
+ +
+ + + tagString := "[tag with spaces]" + + + + spec.hasFilters() + + + true + + + + tagString := "[tag with spaces]" + + + + spec.getInvalidSpecs().empty() + + + true + + + + tagString := "[tag with spaces]" + + + + spec.matches( testCase ) + + + true + + + + tagString := "[I said "good day" sir!]" + + + + spec.hasFilters() + + + true + + + + tagString := "[I said "good day" sir!]" + + + + spec.getInvalidSpecs().empty() + + + true + + + + tagString := "[I said "good day" sir!]" + + + + spec.matches( testCase ) + + + true + + + + + +
+ + + cli.parse( { "test", "-w", "NoAssertions" } ) + + + {?} + + + + + config.warnings == WarnAbout::NoAssertions + + + 1 == 1 + + + +
+
+ + + !(cli.parse( { "test", "-w", "NoTests" } )) + + + !{?} + + + +
+
+ + + cli.parse( { "test", "--warn", "NoAssertions", "--warn", "UnmatchedTestSpec" } ) + + + {?} + + + + + config.warnings == ( WarnAbout::NoAssertions | WarnAbout::UnmatchedTestSpec ) + + + 3 == 3 + + + +
+ +
+ + + + p == 0 + + + 0 == 0 + + + + + p == pNULL + + + 0 == 0 + + + + + p != 0 + + + 0x != 0 + + + + + cp != 0 + + + 0x != 0 + + + + + cpc != 0 + + + 0x != 0 + + + + + returnsNull() == 0 + + + {null string} == 0 + + + + + returnsConstNull() == 0 + + + {null string} == 0 + + + + + 0 != p + + + 0 != 0x + + + + + +
+ + + str1.size() == 3 + 5 + + + 8 == 8 + + + + + str2.size() == 3 + 10 + + + 13 == 13 + + + +
+
+ + + str1.size() == 2 + 5 + + + 7 == 7 + + + + + str2.size() == 2 + 15 + + + 17 == 17 + + + +
+ +
+ + + + "foo", Predicate<const char*>( []( const char* const& ) { return true; } ) + + + "foo" matches undescribed predicate + + + + + +
+ + + result + + + {?} + + + + + config.processName == "" + + + "" == "" + + + +
+
+ + + result + + + {?} + + + + + config.processName == "test" + + + "test" == "test" + + + + + config.shouldDebugBreak == false + + + false == false + + + + + config.abortAfter == -1 + + + -1 == -1 + + + + + config.noThrow == false + + + false == false + + + + + config.reporterSpecifications.empty() + + + true + + + + + !(cfg.hasTestFilters()) + + + !false + + + + + cfg.getReporterSpecs().size() == 1 + + + 1 == 1 + + + + + cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, {}, {}, {} } + + + {?} == {?} + + + + + cfg.getProcessedReporterSpecs().size() == 1 + + + 1 == 1 + + + + + cfg.getProcessedReporterSpecs()[0] == Catch::ProcessedReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} } + + + {?} == {?} + + + +
+
+
+ + + result + + + {?} + + + + + cfg.hasTestFilters() + + + true + + + + + cfg.testSpec().matches(*fakeTestCase("notIncluded")) == false + + + false == false + + + + + cfg.testSpec().matches(*fakeTestCase("test1")) + + + true + + + +
+ +
+
+
+ + + result + + + {?} + + + + + cfg.hasTestFilters() + + + true + + + + + cfg.testSpec().matches(*fakeTestCase("test1")) == false + + + false == false + + + + + cfg.testSpec().matches(*fakeTestCase("alwaysIncluded")) + + + true + + + +
+ +
+
+
+ + + result + + + {?} + + + + + cfg.hasTestFilters() + + + true + + + + + cfg.testSpec().matches(*fakeTestCase("test1")) == false + + + false == false + + + + + cfg.testSpec().matches(*fakeTestCase("alwaysIncluded")) + + + true + + + +
+ +
+
+
+ + result.errorMessage() := "" + + + + result + + + {?} + + + + result.errorMessage() := "" + + + + config.reporterSpecifications == vec_Specs{ { "console", {}, {}, {} } } + + + { {?} } == { {?} } + + + +
+ +
+
+
+ + result.errorMessage() := "" + + + + result + + + {?} + + + + result.errorMessage() := "" + + + + config.reporterSpecifications == vec_Specs{ { "xml", {}, {}, {} } } + + + { {?} } == { {?} } + + + +
+ +
+
+
+ + result.errorMessage() := "" + + + + result + + + {?} + + + + result.errorMessage() := "" + + + + config.reporterSpecifications == vec_Specs{ { "junit", {}, {}, {} } } + + + { {?} } == { {?} } + + + +
+ +
+
+
+ + + !result + + + true + + + + + result.errorMessage(), ContainsSubstring("Unrecognized reporter") + + + "Unrecognized reporter, 'unsupported'. Check available with --list-reporters" contains: "Unrecognized reporter" + + + +
+ +
+
+
+ + result.errorMessage() := "" + + + + result + + + {?} + + + + result.errorMessage() := "" + + + + config.reporterSpecifications == vec_Specs{ { "console", "out.txt"s, {}, {} } } + + + { {?} } == { {?} } + + + +
+ +
+
+
+ + result.errorMessage() := "" + + + + result + + + {?} + + + + result.errorMessage() := "" + + + + config.reporterSpecifications == vec_Specs{ { "console", "C:\\Temp\\out.txt"s, {}, {} } } + + + { {?} } == { {?} } + + + +
+ +
+
+
+
+ + + cli.parse({ "test", "-r", "xml::out=output.xml", "-r", "junit::out=output-junit.xml" }) + + + {?} + + + + + config.reporterSpecifications == vec_Specs{ { "xml", "output.xml"s, {}, {} }, { "junit", "output-junit.xml"s, {}, {} } } + + + { {?}, {?} } == { {?}, {?} } + + + +
+ +
+ +
+
+
+
+ + + cli.parse({ "test", "-r", "xml::out=output.xml", "-r", "console" }) + + + {?} + + + + + config.reporterSpecifications == vec_Specs{ { "xml", "output.xml"s, {}, {} }, { "console", {}, {}, {} } } + + + { {?}, {?} } == { {?}, {?} } + + + +
+ +
+ +
+
+
+
+ + + !result + + + true + + + + + result.errorMessage(), ContainsSubstring("Only one reporter may have unspecified output file.") + + + "Only one reporter may have unspecified output file." contains: "Only one reporter may have unspecified output file." + + + +
+ +
+ +
+
+
+ + + cli.parse({"test", "-b"}) + + + {?} + + + + + config.shouldDebugBreak == true + + + true == true + + + +
+ +
+
+
+ + + cli.parse({"test", "--break"}) + + + {?} + + + + + config.shouldDebugBreak + + + true + + + +
+ +
+
+
+ + + cli.parse({"test", "-a"}) + + + {?} + + + + + config.abortAfter == 1 + + + 1 == 1 + + + +
+ +
+
+
+ + + cli.parse({"test", "-x", "2"}) + + + {?} + + + + + config.abortAfter == 2 + + + 2 == 2 + + + +
+ +
+
+
+ + + !result + + + true + + + + + result.errorMessage(), ContainsSubstring("convert") && ContainsSubstring("oops") + + + "Unable to convert 'oops' to destination type" ( contains: "convert" and contains: "oops" ) + + + +
+ +
+
+
+
+ + + cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) + + + {?} + + + + + config.waitForKeypress == std::get<1>(input) + + + 0 == 0 + + + +
+ +
+ +
+
+
+
+ + + cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) + + + {?} + + + + + config.waitForKeypress == std::get<1>(input) + + + 1 == 1 + + + +
+ +
+ +
+
+
+
+ + + cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) + + + {?} + + + + + config.waitForKeypress == std::get<1>(input) + + + 2 == 2 + + + +
+ +
+ +
+
+
+
+ + + cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) + + + {?} + + + + + config.waitForKeypress == std::get<1>(input) + + + 3 == 3 + + + +
+ +
+ +
+
+
+
+ + + !result + + + true + + + + + result.errorMessage(), ContainsSubstring("never") && ContainsSubstring("both") + + + "keypress argument must be one of: never, start, exit or both. 'sometimes' not recognised" ( contains: "never" and contains: "both" ) + + + +
+ +
+ +
+
+
+ + + cli.parse({"test", "-e"}) + + + {?} + + + + + config.noThrow + + + true + + + +
+ +
+
+
+ + + cli.parse({"test", "--nothrow"}) + + + {?} + + + + + config.noThrow + + + true + + + +
+ +
+
+
+ + + cli.parse({"test", "-o", "filename.ext"}) + + + {?} + + + + + config.defaultOutputFilename == "filename.ext" + + + "filename.ext" == "filename.ext" + + + +
+ +
+
+
+ + + cli.parse({"test", "--out", "filename.ext"}) + + + {?} + + + + + config.defaultOutputFilename == "filename.ext" + + + "filename.ext" == "filename.ext" + + + +
+ +
+
+
+ + + cli.parse({"test", "-abe"}) + + + {?} + + + + + config.abortAfter == 1 + + + 1 == 1 + + + + + config.shouldDebugBreak + + + true + + + + + config.noThrow == true + + + true == true + + + +
+ +
+
+
+ + + cli.parse({"test"}) + + + {?} + + + + + config.defaultColourMode == ColourMode::PlatformDefault + + + 0 == 0 + + + +
+ +
+
+
+ + + cli.parse( { "test", "--colour-mode", "default" } ) + + + {?} + + + + + config.defaultColourMode == ColourMode::PlatformDefault + + + 0 == 0 + + + +
+ +
+
+
+ + + cli.parse({"test", "--colour-mode", "ansi"}) + + + {?} + + + + + config.defaultColourMode == ColourMode::ANSI + + + 1 == 1 + + + +
+ +
+
+
+ + + cli.parse({"test", "--colour-mode", "none"}) + + + {?} + + + + + config.defaultColourMode == ColourMode::None + + + 3 == 3 + + + +
+ +
+
+
+ + + !result + + + true + + + + + result.errorMessage(), ContainsSubstring( "colour mode must be one of" ) + + + "colour mode must be one of: default, ansi, win32, or none. 'wrong' is not recognised" contains: "colour mode must be one of" + + + +
+ +
+
+
+ + + cli.parse({ "test", "--benchmark-samples=200" }) + + + {?} + + + + + config.benchmarkSamples == 200 + + + 200 == 200 + + + +
+ +
+
+
+ + + cli.parse({ "test", "--benchmark-resamples=20000" }) + + + {?} + + + + + config.benchmarkResamples == 20000 + + + 20000 (0x) == 20000 (0x) + + + +
+ +
+
+
+ + + cli.parse({ "test", "--benchmark-confidence-interval=0.99" }) + + + {?} + + + + + config.benchmarkConfidenceInterval == Catch::Approx(0.99) + + + 0.98999999999999999 +== +Approx( 0.98999999999999999 ) + + + +
+ +
+
+
+ + + cli.parse({ "test", "--benchmark-no-analysis" }) + + + {?} + + + + + config.benchmarkNoAnalysis + + + true + + + +
+ +
+
+
+ + + cli.parse({ "test", "--benchmark-warmup-time=10" }) + + + {?} + + + + + config.benchmarkWarmupTime == 10 + + + 10 == 10 + + + +
+ +
+ +
+ + + + std::tuple_size<TestType>::value >= 1 + + + 3 >= 1 + + + + + + + + std::tuple_size<TestType>::value >= 1 + + + 2 >= 1 + + + + + + + + std::tuple_size<TestType>::value >= 1 + + + 1 >= 1 + + + + + + + + Catch::generateRandomSeed(method) + + + Catch::generateRandomSeed(method) + + + + + Catch::generateRandomSeed(method) + + + Catch::generateRandomSeed(method) + + + + + Catch::generateRandomSeed(method) + + + Catch::generateRandomSeed(method) + + + + + + + + Catch::generateRandomSeed(static_cast<Catch::GenerateFrom>(77)) + + + Catch::generateRandomSeed(static_cast<Catch::GenerateFrom>(77)) + + + + + + + + Catch::Detail::stringify(UsesSentinel{}) == "{ }" + + + "{ }" == "{ }" + + + + + + + + truthy(false) + + + Hey, its truthy! + + + + + + + + testStringForMatching(), Matches( "this STRING contains 'abc' as a substring" ) + + + "this string contains 'abc' as a substring" matches "this STRING contains 'abc' as a substring" case sensitively + + + + + testStringForMatching(), Matches( "contains 'abc' as a substring" ) + + + "this string contains 'abc' as a substring" matches "contains 'abc' as a substring" case sensitively + + + + + testStringForMatching(), Matches( "this string contains 'abc' as a" ) + + + "this string contains 'abc' as a substring" matches "this string contains 'abc' as a" case sensitively + + + + + + + + registry.registerReporter( "with::doublecolons", Catch::Detail::make_unique<TestReporterFactory>() ), "'::' is not allowed in reporter name: 'with::doublecolons'" + + + "'::' is not allowed in reporter name: 'with::doublecolons'" equals: "'::' is not allowed in reporter name: 'with::doublecolons'" + + + + + + + + actual, !UnorderedEquals( expected ) + + + { 'a', 'b' } not UnorderedEquals: { 'c', 'b' } + + + + + + + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: Automake + + + + listingString, ContainsSubstring("fakeTag"s) + + + "All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: Automake + + + + listingString, ContainsSubstring("fake reporter"s) + + + "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: Automake + + + + listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) + + + "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: compact + + + + listingString, ContainsSubstring("fakeTag"s) + + + "All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: compact + + + + listingString, ContainsSubstring("fake reporter"s) + + + "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: compact + + + + listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) + + + "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: console + + + + listingString, ContainsSubstring("fakeTag"s) + + + "All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: console + + + + listingString, ContainsSubstring("fake reporter"s) + + + "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: console + + + + listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) + + + "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: JSON + + + + listingString, ContainsSubstring("fakeTag"s) + + + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "" + }, + "listings": { + "tags": [ + { + "aliases": [ + "fakeTag" + ], + "count": 1 + } + ]" contains: "fakeTag" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: JSON + + + + listingString, ContainsSubstring("fake reporter"s) + + + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "" + }, + "listings": { + "reporters": [ + { + "name": "fake reporter", + "description": "fake description" + } + ]" contains: "fake reporter" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: JSON + + + + listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) + + + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "" + }, + "listings": { + "tests": [ + { + "name": "fake test name", + "class-name": "", + "tags": [ + "fakeTestTag" + ], + "source-location": { + "filename": "fake-file.cpp", + "line": 123456789 + } + } + ]" ( contains: "fake test name" and contains: "fakeTestTag" ) + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: JUnit + + + + listingString, ContainsSubstring("fakeTag"s) + + + "<?xml version="1.0" encoding="UTF-8"?> +All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: JUnit + + + + listingString, ContainsSubstring("fake reporter"s) + + + "<?xml version="1.0" encoding="UTF-8"?> +Available reporters: + fake reporter: fake description + +" contains: "fake reporter" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: JUnit + + + + listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) + + + "<?xml version="1.0" encoding="UTF-8"?> +All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: SonarQube + + + + listingString, ContainsSubstring("fakeTag"s) + + + "<?xml version="1.0" encoding="UTF-8"?> +All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: SonarQube + + + + listingString, ContainsSubstring("fake reporter"s) + + + "<?xml version="1.0" encoding="UTF-8"?> +Available reporters: + fake reporter: fake description + +" contains: "fake reporter" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: SonarQube + + + + listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) + + + "<?xml version="1.0" encoding="UTF-8"?> +All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: TAP + + + + listingString, ContainsSubstring("fakeTag"s) + + + "All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: TAP + + + + listingString, ContainsSubstring("fake reporter"s) + + + "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: TAP + + + + listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) + + + "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: TeamCity + + + + listingString, ContainsSubstring("fakeTag"s) + + + "All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: TeamCity + + + + listingString, ContainsSubstring("fake reporter"s) + + + "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: TeamCity + + + + listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) + + + "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: XML + + + + listingString, ContainsSubstring("fakeTag"s) + + + "<?xml version="1.0" encoding="UTF-8"?> +<TagsFromMatchingTests> + <Tag> + <Count>1</Count> + <Aliases> + <Alias>fakeTag</Alias> + </Aliases> + </Tag> +</TagsFromMatchingTests>" contains: "fakeTag" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: XML + + + + listingString, ContainsSubstring("fake reporter"s) + + + "<?xml version="1.0" encoding="UTF-8"?> +<AvailableReporters> + <Reporter> + <Name>fake reporter</Name> + <Description>fake description</Description> + </Reporter> +</AvailableReporters>" contains: "fake reporter" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: XML + + + + listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) + + + "<?xml version="1.0" encoding="UTF-8"?> +<MatchingTests> + <TestCase> + <Name>fake test name</Name> + <ClassName/> + <Tags>[fakeTestTag]</Tags> + <SourceInfo> + <File>fake-file.cpp</File> + <Line>123456789</Line> + </SourceInfo> + </TestCase> +</MatchingTests>" ( contains: "fake test name" and contains: "fakeTestTag" ) + + + +
+ +
+ + + + + + + + + + +
+ + + before == 0 + + + 0 == 0 + + +
+
+ + + after > before + + + 1 > 0 + + + +
+ +
+ +
+ +
+ +
+
+
+
+ + + itDoesThis() + + + true + + +
+ + + itDoesThat() + + + true + + + +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+ +
+ +
+ + + v.size() == 0 + + + 0 == 0 + + +
+
+ + + v.size() == 10 + + + 10 == 10 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + +
+
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ +
+ +
+ +
+ +
+
+ + + v.size() == 0 + + + 0 == 0 + + +
+
+ + + v.capacity() >= 10 + + + 10 >= 10 + + + + + v.size() == 0 + + + 0 == 0 + + + +
+ +
+ +
+ +
+ + + +A string sent directly to stdout + + +A string sent directly to stderr +A string sent to stderr via clog + + + + + + + d == Approx( 1.23 ) + + + 1.22999999999999998 +== +Approx( 1.22999999999999998 ) + + + + + d != Approx( 1.22 ) + + + 1.22999999999999998 +!= +Approx( 1.21999999999999997 ) + + + + + d != Approx( 1.24 ) + + + 1.22999999999999998 +!= +Approx( 1.23999999999999999 ) + + + + + d == 1.23_a + + + 1.22999999999999998 +== +Approx( 1.22999999999999998 ) + + + + + d != 1.22_a + + + 1.22999999999999998 +!= +Approx( 1.21999999999999997 ) + + + + + Approx( d ) == 1.23 + + + Approx( 1.22999999999999998 ) +== +1.22999999999999998 + + + + + Approx( d ) != 1.22 + + + Approx( 1.22999999999999998 ) +!= +1.21999999999999997 + + + + + Approx( d ) != 1.24 + + + Approx( 1.22999999999999998 ) +!= +1.23999999999999999 + + + + + +
+ +
+
+ +
+ + +Message from section one +Message from section two + + +
+ + + + testStringForMatching(), StartsWith( "This String" ) + + + "this string contains 'abc' as a substring" starts with: "This String" + + + + + testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) + + + "this string contains 'abc' as a substring" starts with: "string" (case insensitive) + + + + + +
+ + + Catch::Detail::stringify(singular) == "{ 1 }" + + + "{ 1 }" == "{ 1 }" + + + +
+
+ + + Catch::Detail::stringify(arr) == "{ 3, 2, 1 }" + + + "{ 3, 2, 1 }" == "{ 3, 2, 1 }" + + + +
+
+ + + Catch::Detail::stringify(arr) == R"({ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } })" + + + "{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }" +== +"{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }" + + + +
+ +
+ + + + testStringForMatching(), ContainsSubstring( "string" ) + + + "this string contains 'abc' as a substring" contains: "string" + + + + + testStringForMatching(), ContainsSubstring( "string", Catch::CaseSensitive::No ) + + + "this string contains 'abc' as a substring" contains: "string" (case insensitive) + + + + + testStringForMatching(), ContainsSubstring( "abc" ) + + + "this string contains 'abc' as a substring" contains: "abc" + + + + + testStringForMatching(), ContainsSubstring( "aBC", Catch::CaseSensitive::No ) + + + "this string contains 'abc' as a substring" contains: "abc" (case insensitive) + + + + + testStringForMatching(), StartsWith( "this" ) + + + "this string contains 'abc' as a substring" starts with: "this" + + + + + testStringForMatching(), StartsWith( "THIS", Catch::CaseSensitive::No ) + + + "this string contains 'abc' as a substring" starts with: "this" (case insensitive) + + + + + testStringForMatching(), EndsWith( "substring" ) + + + "this string contains 'abc' as a substring" ends with: "substring" + + + + + testStringForMatching(), EndsWith( " SuBsTrInG", Catch::CaseSensitive::No ) + + + "this string contains 'abc' as a substring" ends with: " substring" (case insensitive) + + + + + +
+ + + empty.empty() + + + true + + + + + empty.size() == 0 + + + 0 == 0 + + + + + std::strcmp( empty.data(), "" ) == 0 + + + 0 == 0 + + + +
+
+ + + s.empty() == false + + + false == false + + + + + s.size() == 5 + + + 5 == 5 + + + + + std::strcmp( rawChars, "hello" ) == 0 + + + 0 == 0 + + + + + s.data() == rawChars + + + "hello" == "hello" + + + +
+
+ + + original == "original" + + + original == "original" + + + + + original.data() + + + original.data() + + + +
+
+ + + original.begin() == copy.begin() + + + "original string" == "original string" + + + +
+
+ + + original.begin() == copy.begin() + + + "original string" == "original string" + + + +
+
+
+ + + ss.empty() == false + + + false == false + + + + + ss.size() == 5 + + + 5 == 5 + + + + + std::strncmp( ss.data(), "hello", 5 ) == 0 + + + 0 == 0 + + + + + ss == "hello" + + + hello == "hello" + + + +
+ +
+
+
+ + + ss.size() == 6 + + + 6 == 6 + + + + + std::strcmp( ss.data(), "world!" ) == 0 + + + 0 == 0 + + + +
+ +
+
+
+ + + s.data() == s2.data() + + + "hello world!" == "hello world!" + + + +
+ +
+
+
+ + + s.data() == ss.data() + + + "hello world!" == "hello world!" + + + +
+ +
+
+
+ + + s.substr(s.size() + 1, 123).empty() + + + true + + + +
+ +
+
+
+ + + std::strcmp(ss.data(), "world!") == 0 + + + 0 == 0 + + + +
+ +
+
+
+ + + s.substr(1'000'000, 1).empty() + + + true + + + +
+ +
+
+ + + reinterpret_cast<char*>(buffer1) != reinterpret_cast<char*>(buffer2) + + + "Hello" != "Hello" + + + + + left == right + + + Hello == Hello + + + + + left != left.substr(0, 3) + + + Hello != Hel + + + +
+
+
+ + + sr == "a standard string" + + + a standard string == "a standard string" + + + + + sr.size() == stdStr.size() + + + 17 == 17 + + + +
+ +
+
+
+ + + sr == "a standard string" + + + a standard string == "a standard string" + + + + + sr.size() == stdStr.size() + + + 17 == 17 + + + +
+ +
+
+
+ + + sr == "a standard string" + + + a standard string == "a standard string" + + + + + sr.size() == stdStr.size() + + + 17 == 17 + + + +
+ +
+
+
+ + + stdStr == "a stringref" + + + "a stringref" == "a stringref" + + + + + stdStr.size() == sr.size() + + + 11 == 11 + + + +
+ +
+
+
+ + + stdStr == "a stringref" + + + "a stringref" == "a stringref" + + + + + stdStr.size() == sr.size() + + + 11 == 11 + + + +
+ +
+
+ + + lhs == "some string += the stringref contents" + + + "some string += the stringref contents" +== +"some string += the stringref contents" + + + +
+
+ + + together == "abrakadabra" + + + "abrakadabra" == "abrakadabra" + + + +
+ +
+ +
+ +
+
+ +
+ +
+ + + + ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s + + + ""abc"" == ""abc"" + + + + + ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s + + + ""abc"" == ""abc"" + + + + + + + + ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s + + + ""abc"" == ""abc"" + + + + + ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s + + + ""abc"" == ""abc"" + + + + + + + + ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s + + + ""abc"" == ""abc"" + + + + + ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s + + + ""abc"" == ""abc"" + + + + + + + + minute == seconds + + + 1 m == 60 s + + + + + hour != seconds + + + 1 h != 60 s + + + + + micro != milli + + + 1 us != 1 ms + + + + + nano != micro + + + 1 ns != 1 us + + + + + + + + half_minute != femto_second + + + 1 [30/1]s != 1 fs + + + + + pico_second != atto_second + + + 1 ps != 1 as + + + + + + + + now != later + + + {iso8601-timestamp} +!= +{iso8601-timestamp} + + + + + + + + s1 == s2 + + + "if ($b == 10) { + $a = 20; +}" +== +"if ($b == 10) { + $a = 20; +} +" + + + + + +
+ + + what, ContainsSubstring( "[@zzz]" ) + + + "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "[@zzz]" + + + + + what, ContainsSubstring( "file" ) + + + "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "file" + + + + + what, ContainsSubstring( "2" ) + + + "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "2" + + + + + what, ContainsSubstring( "10" ) + + + "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "10" + + + +
+
+ + + registry.add( "[no ampersat]", "", Catch::SourceLineInfo( "file", 3 ) ) + + + registry.add( "[no ampersat]", "", Catch::SourceLineInfo( "file", 3 ) ) + + + + + registry.add( "[the @ is not at the start]", "", Catch::SourceLineInfo( "file", 3 ) ) + + + registry.add( "[the @ is not at the start]", "", Catch::SourceLineInfo( "file", 3 ) ) + + + + + registry.add( "@no square bracket at start]", "", Catch::SourceLineInfo( "file", 3 ) ) + + + registry.add( "@no square bracket at start]", "", Catch::SourceLineInfo( "file", 3 ) ) + + + + + registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) ) + + + registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) ) + + + +
+ +
+ + + + testCase.tags.size() == 2 + + + 2 == 2 + + + + + testCase.tags, VectorContains( Tag( "tag with spaces" ) ) && VectorContains( Tag( "I said \"good day\" sir!"_catch_sr ) ) + + + { {?}, {?} } ( Contains: {?} and Contains: {?} ) + + + + + + + + Template_Fixture<TestType>::m_a == 1 + + + 1 == 1 + + + + + + + + Template_Fixture<TestType>::m_a == 1 + + + 1 == 1 + + + + + + + + Template_Fixture<TestType>::m_a == 1 + + + 1.0 == 1 + + + + + + + + std::is_default_constructible<TestType>::value + + + true + + + + + + + + std::is_default_constructible<TestType>::value + + + true + + + + + + + + std::is_trivially_copyable<TestType>::value + + + true + + + + + + + + std::is_trivially_copyable<TestType>::value + + + true + + + + + + + + std::is_arithmetic<TestType>::value + + + true + + + + + + + + std::is_arithmetic<TestType>::value + + + true + + + + + + + + std::is_arithmetic<TestType>::value + + + true + + + + + + + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 10 + + + 10 == 10 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 0 + + + 0 == 0 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.capacity() == 0 + + + 0 == 0 + + + +
+ +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + + +
+ +
+ + + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 10 + + + 10 == 10 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 0 + + + 0 == 0 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.capacity() == 0 + + + 0 == 0 + + + +
+ +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + + +
+ +
+ + + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 10 + + + 10 == 10 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 0 + + + 0 == 0 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.capacity() == 0 + + + 0 == 0 + + + +
+ +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + + +
+ +
+ + + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 10 + + + 10 == 10 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 0 + + + 0 == 0 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.capacity() == 0 + + + 0 == 0 + + + +
+ +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + + +
+ +
+ + + + v.size() == V + + + 6 == 6 + + + + + v.capacity() >= V + + + 6 >= 6 + + +
+ + + v.size() == 2 * V + + + 12 == 12 + + + + + v.capacity() >= 2 * V + + + 12 >= 12 + + + +
+ + + v.size() == V + + + 6 == 6 + + + + + v.capacity() >= V + + + 6 >= 6 + + +
+ + + v.size() == 0 + + + 0 == 0 + + + + + v.capacity() >= V + + + 6 >= 6 + + +
+ + + v.capacity() == 0 + + + 0 == 0 + + + +
+ +
+ + + v.size() == V + + + 6 == 6 + + + + + v.capacity() >= V + + + 6 >= 6 + + +
+ + + v.size() == V + + + 6 == 6 + + + + + v.capacity() >= 2 * V + + + 12 >= 12 + + + +
+ + + v.size() == V + + + 6 == 6 + + + + + v.capacity() >= V + + + 6 >= 6 + + +
+ + + v.size() == V + + + 6 == 6 + + + + + v.capacity() >= V + + + 6 >= 6 + + + +
+ +
+ + + + v.size() == V + + + 4 == 4 + + + + + v.capacity() >= V + + + 4 >= 4 + + +
+ + + v.size() == 2 * V + + + 8 == 8 + + + + + v.capacity() >= 2 * V + + + 8 >= 8 + + + +
+ + + v.size() == V + + + 4 == 4 + + + + + v.capacity() >= V + + + 4 >= 4 + + +
+ + + v.size() == 0 + + + 0 == 0 + + + + + v.capacity() >= V + + + 4 >= 4 + + +
+ + + v.capacity() == 0 + + + 0 == 0 + + + +
+ +
+ + + v.size() == V + + + 4 == 4 + + + + + v.capacity() >= V + + + 4 >= 4 + + +
+ + + v.size() == V + + + 4 == 4 + + + + + v.capacity() >= 2 * V + + + 8 >= 8 + + + +
+ + + v.size() == V + + + 4 == 4 + + + + + v.capacity() >= V + + + 4 >= 4 + + +
+ + + v.size() == V + + + 4 == 4 + + + + + v.capacity() >= V + + + 4 >= 4 + + + +
+ +
+ + + + v.size() == V + + + 5 == 5 + + + + + v.capacity() >= V + + + 5 >= 5 + + +
+ + + v.size() == 2 * V + + + 10 == 10 + + + + + v.capacity() >= 2 * V + + + 10 >= 10 + + + +
+ + + v.size() == V + + + 5 == 5 + + + + + v.capacity() >= V + + + 5 >= 5 + + +
+ + + v.size() == 0 + + + 0 == 0 + + + + + v.capacity() >= V + + + 5 >= 5 + + +
+ + + v.capacity() == 0 + + + 0 == 0 + + + +
+ +
+ + + v.size() == V + + + 5 == 5 + + + + + v.capacity() >= V + + + 5 >= 5 + + +
+ + + v.size() == V + + + 5 == 5 + + + + + v.capacity() >= 2 * V + + + 10 >= 10 + + + +
+ + + v.size() == V + + + 5 == 5 + + + + + v.capacity() >= V + + + 5 >= 5 + + +
+ + + v.size() == V + + + 5 == 5 + + + + + v.capacity() >= V + + + 5 >= 5 + + + +
+ +
+ + + + v.size() == V + + + 15 == 15 + + + + + v.capacity() >= V + + + 15 >= 15 + + +
+ + + v.size() == 2 * V + + + 30 == 30 + + + + + v.capacity() >= 2 * V + + + 30 >= 30 + + + +
+ + + v.size() == V + + + 15 == 15 + + + + + v.capacity() >= V + + + 15 >= 15 + + +
+ + + v.size() == 0 + + + 0 == 0 + + + + + v.capacity() >= V + + + 15 >= 15 + + +
+ + + v.capacity() == 0 + + + 0 == 0 + + + +
+ +
+ + + v.size() == V + + + 15 == 15 + + + + + v.capacity() >= V + + + 15 >= 15 + + +
+ + + v.size() == V + + + 15 == 15 + + + + + v.capacity() >= 2 * V + + + 30 >= 30 + + + +
+ + + v.size() == V + + + 15 == 15 + + + + + v.capacity() >= V + + + 15 >= 15 + + +
+ + + v.size() == V + + + 15 == 15 + + + + + v.capacity() >= V + + + 15 >= 15 + + + +
+ +
+ + + + testCase.tags.size() == 1 + + + 1 == 1 + + + + + testCase.tags[0] == Tag( "tag1" ) + + + {?} == {?} + + + + + + + + + + + 0x == bit30and31 + + + 3221225472 (0x) == 3221225472 + + + + + + + + + + + true + + + true + + + + + false + + + false + + + + + true + + + true + + + + + false + + + false + + + + + + + + true + + + true + + + + + + + + + false + + + false + + + + + + + + + true + + + true + + + + + {Unknown expression after the reported line} + + + {Unknown expression after the reported line} + + + Uncaught exception should fail! + + + + + + + + false + + + false + + + + + {Unknown expression after the reported line} + + + {Unknown expression after the reported line} + + + Uncaught exception should fail! + + + + + + + + 1 == 2 + + + 1 == 2 + + + + + +
+ + + listingString, ContainsSubstring("[fakeTag]"s) + + + "All available tags: + 1 [fakeTag] +1 tag + +" contains: "[fakeTag]" + + + +
+
+ + + listingString, ContainsSubstring( "fake reporter"s ) && ContainsSubstring( "fake description"s ) + + + "Available reporters: + fake reporter: fake description + +" ( contains: "fake reporter" and contains: "fake description" ) + + + +
+
+ + + listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) + + + "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) + + + +
+
+ + + listingString, ContainsSubstring( "fakeListener"s ) && ContainsSubstring( "fake description"s ) + + + "Registered listeners: + fakeListener: fake description + +" ( contains: "fakeListener" and contains: "fake description" ) + + + +
+ +
+ + + + + + For some reason someone is throwing a string literal! + + + + + + + testCase.isOpen() + + + true + + + + + s1.isOpen() + + + true + + +
+ + + s1.isSuccessfullyCompleted() + + + true + + + + + testCase.isComplete() == false + + + false == false + + + + + ctx.completedCycle() + + + true + + + + + testCase.isSuccessfullyCompleted() + + + true + + + +
+ + + testCase.isOpen() + + + true + + + + + s1.isOpen() + + + true + + +
+ + + s1.isComplete() + + + true + + + + + s1.isSuccessfullyCompleted() == false + + + false == false + + + + + testCase.isComplete() == false + + + false == false + + + + + ctx.completedCycle() + + + true + + + + + testCase.isSuccessfullyCompleted() == false + + + false == false + + +
+ + + testCase2.isOpen() + + + true + + + + + s1b.isOpen() == false + + + false == false + + + + + ctx.completedCycle() + + + true + + + + + testCase.isComplete() + + + true + + + + + testCase.isSuccessfullyCompleted() + + + true + + + +
+ +
+ + + testCase.isOpen() + + + true + + + + + s1.isOpen() + + + true + + +
+ + + s1.isComplete() + + + true + + + + + s1.isSuccessfullyCompleted() == false + + + false == false + + + + + testCase.isComplete() == false + + + false == false + + + + + ctx.completedCycle() + + + true + + + + + testCase.isSuccessfullyCompleted() == false + + + false == false + + +
+ + + testCase2.isOpen() + + + true + + + + + s1b.isOpen() == false + + + false == false + + + + + s2.isOpen() + + + true + + + + + ctx.completedCycle() + + + true + + + + + testCase.isComplete() + + + true + + + + + testCase.isSuccessfullyCompleted() + + + true + + + +
+ +
+ + + testCase.isOpen() + + + true + + + + + s1.isOpen() + + + true + + +
+ + + s2.isOpen() == false + + + false == false + + + + + testCase.isComplete() == false + + + false == false + + +
+ + + testCase2.isOpen() + + + true + + + + + s1b.isOpen() == false + + + false == false + + + + + s2b.isOpen() + + + true + + + + + ctx.completedCycle() == false + + + false == false + + +
+ + + ctx.completedCycle() + + + true + + + + + s2b.isSuccessfullyCompleted() + + + true + + + + + testCase2.isComplete() == false + + + false == false + + + + + testCase2.isSuccessfullyCompleted() + + + true + + + +
+ +
+ +
+ + + testCase.isOpen() + + + true + + + + + s1.isOpen() + + + true + + +
+ + + s2.isOpen() == false + + + false == false + + + + + testCase.isComplete() == false + + + false == false + + +
+ + + testCase2.isOpen() + + + true + + + + + s1b.isOpen() == false + + + false == false + + + + + s2b.isOpen() + + + true + + + + + ctx.completedCycle() == false + + + false == false + + +
+ + + ctx.completedCycle() + + + true + + + + + s2b.isComplete() + + + true + + + + + s2b.isSuccessfullyCompleted() == false + + + false == false + + + + + testCase2.isSuccessfullyCompleted() == false + + + false == false + + + + + testCase3.isOpen() + + + true + + + + + s1c.isOpen() == false + + + false == false + + + + + s2c.isOpen() == false + + + false == false + + + + + testCase3.isSuccessfullyCompleted() + + + true + + + +
+ +
+ +
+ + + testCase.isOpen() + + + true + + + + + s1.isOpen() + + + true + + +
+ + + s2.isOpen() + + + true + + + + + s2.isComplete() + + + true + + + + + s1.isComplete() == false + + + false == false + + + + + s1.isComplete() + + + true + + + + + testCase.isComplete() == false + + + false == false + + + + + testCase.isComplete() + + + true + + + +
+ +
+ + + + trim(std::string(no_whitespace)) == no_whitespace + + + "There is no extra whitespace here" +== +"There is no extra whitespace here" + + + + + trim(std::string(leading_whitespace)) == no_whitespace + + + "There is no extra whitespace here" +== +"There is no extra whitespace here" + + + + + trim(std::string(trailing_whitespace)) == no_whitespace + + + "There is no extra whitespace here" +== +"There is no extra whitespace here" + + + + + trim(std::string(whitespace_at_both_ends)) == no_whitespace + + + "There is no extra whitespace here" +== +"There is no extra whitespace here" + + + + + trim(StringRef(no_whitespace)) == StringRef(no_whitespace) + + + There is no extra whitespace here +== +There is no extra whitespace here + + + + + trim(StringRef(leading_whitespace)) == StringRef(no_whitespace) + + + There is no extra whitespace here +== +There is no extra whitespace here + + + + + trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace) + + + There is no extra whitespace here +== +There is no extra whitespace here + + + + + trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace) + + + There is no extra whitespace here +== +There is no extra whitespace here + + + + + +
+
+ + + array_int_a, RangeEquals( c_array ) + + + { 1, 2, 3 } elements are { 1, 2, 3 } + + + + + array_int_a, UnorderedRangeEquals( c_array ) + + + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + + + +
+ +
+
+
+ + + array_int_3, !RangeEquals( array_int_4 ) + + + { 1, 2, 3 } not elements are { 1, 2, 3, 4 } + + + + + array_int_3, !UnorderedRangeEquals( array_int_4 ) + + + { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } + + + +
+ +
+
+
+ + + array_int_a, RangeEquals( vector_char_a ) + + + { 1, 2, 3 } elements are { 1, 2, 3 } + + + + + array_int_a, UnorderedRangeEquals( vector_char_a ) + + + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + + + +
+ +
+
+
+ + + array_int_a, RangeEquals( list_char_a ) + + + { 1, 2, 3 } elements are { 1, 2, 3 } + + + + + array_int_a, UnorderedRangeEquals( list_char_a ) + + + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + + + +
+ +
+
+
+ + + vector_int_a, RangeEquals( vector_char_a ) + + + { 1, 2, 3 } elements are { 1, 2, 3 } + + + + + vector_int_a, UnorderedRangeEquals( vector_char_a ) + + + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + + + +
+ +
+
+
+ + + vector_int_a, !RangeEquals( vector_char_b ) + + + { 1, 2, 3 } not elements are { 1, 2, 2 } + + + + + vector_int_a, !UnorderedRangeEquals( vector_char_b ) + + + { 1, 2, 3 } not unordered elements are { 1, 2, 2 } + + + +
+ +
+
+ + + a, !RangeEquals( b ) + + + { 1, 2, 3 } not elements are { 3, 2, 1 } + + + + + a, UnorderedRangeEquals( b ) + + + { 1, 2, 3 } unordered elements are { 3, 2, 1 } + + + +
+
+
+ + + vector_a, RangeEquals( array_a_plus_1, close_enough ) + + + { 1, 2, 3 } elements are { 2, 3, 4 } + + + + + vector_a, UnorderedRangeEquals( array_a_plus_1, close_enough ) + + + { 1, 2, 3 } unordered elements are { 2, 3, 4 } + + + +
+ +
+ +
+ + + 3.14000000000000012 + + + + +
+ + + bptr->i == 3 + + + 3 == 3 + + + +
+
+ + + bptr->i == 3 + + + 3 == 3 + + + +
+ +
+ +
+ + + data, AllMatch(SizeIs(5)) + + + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } all match has size == 5 + + + + + data, !AllMatch(Contains(0) && Contains(1)) + + + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not all match ( contains element 0 and contains element 1 ) + + + +
+
+ + + needs_adl, AllMatch( Predicate<int>( []( int elem ) { return elem < 6; } ) ) + + + { 1, 2, 3, 4, 5 } all match matches undescribed predicate + + + +
+
+
+ + + mocked, allMatch + + + { 1, 2, 3, 4, 5 } all match matches undescribed predicate + + + + + mocked.m_derefed[0] + + + true + + + + + mocked.m_derefed[1] + + + true + + + + + mocked.m_derefed[2] + + + true + + + + + mocked.m_derefed[3] + + + true + + + + + mocked.m_derefed[4] + + + true + + + +
+ +
+
+
+ + + mocked, !allMatch + + + { 1, 2, 3, 4, 5 } not all match matches undescribed predicate + + + + + mocked.m_derefed[0] + + + true + + + + + mocked.m_derefed[1] + + + true + + + + + mocked.m_derefed[2] + + + true + + + + + !(mocked.m_derefed[3]) + + + !false + + + + + !(mocked.m_derefed[4]) + + + !false + + + +
+ +
+ +
+ +
+
+ + + data, AllTrue() + + + { true, true, true, true, true } contains only true + + + +
+ +
+
+
+ + + data, AllTrue() + + + { } contains only true + + + +
+ +
+
+
+ + + data, !AllTrue() + + + { true, true, false, true, true } not contains only true + + + +
+ +
+
+
+ + + data, !AllTrue() + + + { false, false, false, false, false } not contains only true + + + +
+ +
+
+
+ + + data, AllTrue() + + + { true, true, true, true, true } contains only true + + + +
+ +
+
+
+ + + data, !AllTrue() + + + { true, true, false, true, true } not contains only true + + + +
+ +
+
+
+ + + data, !AllTrue() + + + { false, false, false, false, false } not contains only true + + + +
+ +
+
+
+ + + mocked, AllTrue() + + + { true, true, true, true, true } contains only true + + + + + mocked.m_derefed[0] + + + true + + + + + mocked.m_derefed[1] + + + true + + + + + mocked.m_derefed[2] + + + true + + + + + mocked.m_derefed[3] + + + true + + + + + mocked.m_derefed[4] + + + true + + + +
+ +
+
+
+ + + mocked, !AllTrue() + + + { true, true, false, true, true } not contains only true + + + + + mocked.m_derefed[0] + + + true + + + + + mocked.m_derefed[1] + + + true + + + + + mocked.m_derefed[2] + + + true + + + + + !(mocked.m_derefed[3]) + + + !false + + + + + !(mocked.m_derefed[4]) + + + !false + + + +
+ +
+ +
+ +
+ + + data, AnyMatch(SizeIs(5)) + + + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } any match has size == 5 + + + + + data, !AnyMatch(Contains(0) && Contains(10)) + + + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not any match ( contains element 0 and contains element 10 ) + + + +
+
+ + + needs_adl, AnyMatch( Predicate<int>( []( int elem ) { return elem < 3; } ) ) + + + { 1, 2, 3, 4, 5 } any match matches undescribed predicate + + + +
+
+
+ + + mocked, !anyMatch + + + { 1, 2, 3, 4, 5 } not any match matches undescribed predicate + + + + + mocked.m_derefed[0] + + + true + + + + + mocked.m_derefed[1] + + + true + + + + + mocked.m_derefed[2] + + + true + + + + + mocked.m_derefed[3] + + + true + + + + + mocked.m_derefed[4] + + + true + + + +
+ +
+
+
+ + + mocked, anyMatch + + + { 1, 2, 3, 4, 5 } any match matches undescribed predicate + + + + + mocked.m_derefed[0] + + + true + + + + + !(mocked.m_derefed[1]) + + + !false + + + + + !(mocked.m_derefed[2]) + + + !false + + + + + !(mocked.m_derefed[3]) + + + !false + + + + + !(mocked.m_derefed[4]) + + + !false + + + +
+ +
+ +
+ +
+
+ + + data, AnyTrue() + + + { true, true, true, true, true } contains at least one true + + + +
+ +
+
+
+ + + data, !AnyTrue() + + + { } not contains at least one true + + + +
+ +
+
+
+ + + data, AnyTrue() + + + { false, false, true, false, false } contains at least one true + + + +
+ +
+
+
+ + + data, !AnyTrue() + + + { false, false, false, false, false } not contains at least one true + + + +
+ +
+
+
+ + + data, AnyTrue() + + + { true, true, true, true, true } contains at least one true + + + +
+ +
+
+
+ + + data, AnyTrue() + + + { false, false, true, false, false } contains at least one true + + + +
+ +
+
+
+ + + data, !AnyTrue() + + + { false, false, false, false, false } not contains at least one true + + + +
+ +
+
+
+ + + mocked, AnyTrue() + + + { false, false, false, false, true } contains at least one true + + + + + mocked.m_derefed[0] + + + true + + + + + mocked.m_derefed[1] + + + true + + + + + mocked.m_derefed[2] + + + true + + + + + mocked.m_derefed[3] + + + true + + + + + mocked.m_derefed[4] + + + true + + + +
+ +
+
+
+ + + mocked, AnyTrue() + + + { false, false, true, true, true } contains at least one true + + + + + mocked.m_derefed[0] + + + true + + + + + mocked.m_derefed[1] + + + true + + + + + mocked.m_derefed[2] + + + true + + + + + !(mocked.m_derefed[3]) + + + !false + + + + + !(mocked.m_derefed[4]) + + + !false + + + +
+ +
+ +
+ +
+ + + data, NoneMatch(SizeIs(6)) + + + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } none match has size == 6 + + + + + data, !NoneMatch(Contains(0) && Contains(1)) + + + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not none match ( contains element 0 and contains element 1 ) + + + +
+
+ + + needs_adl, NoneMatch( Predicate<int>( []( int elem ) { return elem > 6; } ) ) + + + { 1, 2, 3, 4, 5 } none match matches undescribed predicate + + + +
+
+
+ + + mocked, noneMatch + + + { 1, 2, 3, 4, 5 } none match matches undescribed predicate + + + + + mocked.m_derefed[0] + + + true + + + + + mocked.m_derefed[1] + + + true + + + + + mocked.m_derefed[2] + + + true + + + + + mocked.m_derefed[3] + + + true + + + + + mocked.m_derefed[4] + + + true + + + +
+ +
+
+
+ + + mocked, !noneMatch + + + { 1, 2, 3, 4, 5 } not none match matches undescribed predicate + + + + + mocked.m_derefed[0] + + + true + + + + + !(mocked.m_derefed[1]) + + + !false + + + + + !(mocked.m_derefed[2]) + + + !false + + + + + !(mocked.m_derefed[3]) + + + !false + + + + + !(mocked.m_derefed[4]) + + + !false + + + +
+ +
+ +
+ +
+
+ + + data, !NoneTrue() + + + { true, true, true, true, true } not contains no true + + + +
+ +
+
+
+ + + data, NoneTrue() + + + { } contains no true + + + +
+ +
+
+
+ + + data, !NoneTrue() + + + { false, false, true, false, false } not contains no true + + + +
+ +
+
+
+ + + data, NoneTrue() + + + { false, false, false, false, false } contains no true + + + +
+ +
+
+
+ + + data, !NoneTrue() + + + { true, true, true, true, true } not contains no true + + + +
+ +
+
+
+ + + data, !NoneTrue() + + + { false, false, true, false, false } not contains no true + + + +
+ +
+
+
+ + + data, NoneTrue() + + + { false, false, false, false, false } contains no true + + + +
+ +
+
+
+ + + mocked, NoneTrue() + + + { false, false, false, false, false } contains no true + + + + + mocked.m_derefed[0] + + + true + + + + + mocked.m_derefed[1] + + + true + + + + + mocked.m_derefed[2] + + + true + + + + + mocked.m_derefed[3] + + + true + + + + + mocked.m_derefed[4] + + + true + + + +
+ +
+
+
+ + + mocked, !NoneTrue() + + + { false, false, true, true, true } not contains no true + + + + + mocked.m_derefed[0] + + + true + + + + + mocked.m_derefed[1] + + + true + + + + + mocked.m_derefed[2] + + + true + + + + + !(mocked.m_derefed[3]) + + + !false + + + + + !(mocked.m_derefed[4]) + + + !false + + + +
+ +
+ +
+ +
+
+ + + empty_vector, RangeEquals( empty_vector ) + + + { } elements are { } + + + +
+ +
+
+
+ + + empty_vector, !RangeEquals( non_empty_vector ) + + + { } not elements are { 1 } + + + + + non_empty_vector, !RangeEquals( empty_vector ) + + + { 1 } not elements are { } + + + +
+ +
+
+
+ + + non_empty_array, RangeEquals( non_empty_array ) + + + { 1 } elements are { 1 } + + + +
+ +
+
+
+ + + array_a, RangeEquals( array_a ) + + + { 1, 2, 3 } elements are { 1, 2, 3 } + + + +
+ +
+
+
+ + + array_a, !RangeEquals( array_b ) + + + { 1, 2, 3 } not elements are { 2, 2, 3 } + + + + + array_a, !RangeEquals( array_c ) + + + { 1, 2, 3 } not elements are { 1, 2, 2 } + + + +
+ +
+
+
+ + + vector_a, !RangeEquals( vector_b ) + + + { 1, 2, 3 } not elements are { 1, 2, 3, 4 } + + + +
+ +
+
+
+ + + vector_a, RangeEquals( vector_a_plus_1, close_enough ) + + + { 1, 2, 3 } elements are { 2, 3, 4 } + + + +
+ +
+
+
+ + + vector_a, !RangeEquals( vector_b, close_enough ) + + + { 1, 2, 3 } not elements are { 3, 3, 4 } + + + +
+ +
+
+ + + needs_adl1, RangeEquals( needs_adl2 ) + + + { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 } + + + + + needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } ) + + + { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 } + + + +
+
+ + + array_a, RangeEquals( { 1, 2, 3 } ) + + + { 1, 2, 3 } elements are { 1, 2, 3 } + + + + + array_a, RangeEquals( { 2, 4, 6 }, []( int l, int r ) { return l * 2 == r; } ) + + + { 1, 2, 3 } elements are { 2, 4, 6 } + + + +
+
+
+ + + mocked1, !RangeEquals( arr ) + + + { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 } + + + + + mocked1.m_derefed[0] + + + true + + + + + mocked1.m_derefed[1] + + + true + + + + + mocked1.m_derefed[2] + + + true + + + + + !(mocked1.m_derefed[3]) + + + !false + + + +
+ +
+
+
+ + + mocked1, RangeEquals( arr ) + + + { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 } + + + + + mocked1.m_derefed[0] + + + true + + + + + mocked1.m_derefed[1] + + + true + + + + + mocked1.m_derefed[2] + + + true + + + + + mocked1.m_derefed[3] + + + true + + + +
+ +
+ +
+ +
+
+ + + empty_vector, UnorderedRangeEquals( empty_vector ) + + + { } unordered elements are { } + + + +
+ +
+
+
+ + + empty_vector, !UnorderedRangeEquals( non_empty_vector ) + + + { } not unordered elements are { 1 } + + + + + non_empty_vector, !UnorderedRangeEquals( empty_vector ) + + + { 1 } not unordered elements are { } + + + +
+ +
+
+
+ + + non_empty_array, UnorderedRangeEquals( non_empty_array ) + + + { 1 } unordered elements are { 1 } + + + +
+ +
+
+
+ + + array_a, UnorderedRangeEquals( array_a ) + + + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + + + +
+ +
+
+
+ + + array_a, !UnorderedRangeEquals( array_b ) + + + { 1, 2, 3 } not unordered elements are { 2, 2, 3 } + + + +
+ +
+
+
+ + + vector_a, !UnorderedRangeEquals( vector_b ) + + + { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } + + + +
+ +
+
+
+ + + vector_a, UnorderedRangeEquals( vector_a_plus_1, close_enough ) + + + { 1, 10, 20 } unordered elements are { 11, 21, 2 } + + + +
+ +
+
+
+ + + vector_a, !UnorderedRangeEquals( vector_b, close_enough ) + + + { 1, 10, 21 } not unordered elements are { 11, 21, 3 } + + + +
+ +
+
+ + + needs_adl1, UnorderedRangeEquals( needs_adl2 ) + + + { 1, 2, 3, 4, 5 } unordered elements are { 1, 2, 3, 4, 5 } + + + +
+
+ + + array_a, UnorderedRangeEquals( { 10, 20, 1 } ) + + + { 1, 10, 20 } unordered elements are { 10, 20, 1 } + + + + + array_a, UnorderedRangeEquals( { 11, 21, 2 }, []( int l, int r ) { return std::abs( l - r ) <= 1; } ) + + + { 1, 10, 20 } unordered elements are { 11, 21, 2 } + + + +
+ +
+ +
+ + + empty_vec, SizeIs(0) + + + { } has size == 0 + + + + + empty_vec, !SizeIs(2) + + + { } not has size == 2 + + + + + empty_vec, SizeIs(Lt(2)) + + + { } size matches is less than 2 + + + + + arr, SizeIs(2) + + + { 0, 0 } has size == 2 + + + + + arr, SizeIs( Lt(3)) + + + { 0, 0 } size matches is less than 3 + + + + + arr, !SizeIs(!Lt(3)) + + + { 0, 0 } not size matches not is less than 3 + + + + + map, SizeIs(3) + + + { {?}, {?}, {?} } has size == 3 + + + +
+
+ + + unrelated::ADL_size{}, SizeIs(12) + + + {?} has size == 12 + + + +
+
+ + + has_size{}, SizeIs(13) + + + {?} has size == 13 + + + +
+ +
+ + + + d == approx( 1.23 ) + + + 1.22999999999999998 +== +Approx( 1.22999999999999998 ) + + + + + d == approx( 1.22 ) + + + 1.22999999999999998 +== +Approx( 1.21999999999999997 ) + + + + + d == approx( 1.24 ) + + + 1.22999999999999998 +== +Approx( 1.23999999999999999 ) + + + + + d != approx( 1.25 ) + + + 1.22999999999999998 != Approx( 1.25 ) + + + + + approx( d ) == 1.23 + + + Approx( 1.22999999999999998 ) +== +1.22999999999999998 + + + + + approx( d ) == 1.22 + + + Approx( 1.22999999999999998 ) +== +1.21999999999999997 + + + + + approx( d ) == 1.24 + + + Approx( 1.22999999999999998 ) +== +1.23999999999999999 + + + + + approx( d ) != 1.25 + + + Approx( 1.22999999999999998 ) != 1.25 + + + + + +
+ +
+ +
+ +
+ + + empty, Approx( empty ) + + + { } is approx: { } + + + +
+
+
+ + + v1, Approx( v1 ) + + + { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } + + + + + v1, Approx<double>( { 1., 2., 3. } ) + + + { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } + + + +
+ +
+
+
+ + + v1, !Approx( temp ) + + + { 1.0, 2.0, 3.0 } not is approx: { 1.0, 2.0, 3.0, 4.0 } + + + +
+ +
+
+
+ + + v1, !Approx( v2 ) + + + { 1.0, 2.0, 3.0 } not is approx: { 1.5, 2.5, 3.5 } + + + + + v1, Approx( v2 ).margin( 0.5 ) + + + { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } + + + + + v1, Approx( v2 ).epsilon( 0.5 ) + + + { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } + + + + + v1, Approx( v2 ).epsilon( 0.1 ).scale( 500 ) + + + { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } + + + +
+ +
+ +
+ +
+ + + empty, Approx( t1 ) + + + { } is approx: { 1.0, 2.0 } + + + +
+
+ + + v1, Approx( v2 ) + + + { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 } + + + +
+ +
+ +
+ + + v, VectorContains( 1 ) + + + { 1, 2, 3 } Contains: 1 + + + + + v, VectorContains( 2 ) + + + { 1, 2, 3 } Contains: 2 + + + + + v5, ( VectorContains<int, CustomAllocator<int>>( 2 ) ) + + + { 1, 2, 3 } Contains: 2 + + + +
+
+ + + v, Contains( v2 ) + + + { 1, 2, 3 } Contains: { 1, 2 } + + + + + v, Contains<int>( { 1, 2 } ) + + + { 1, 2, 3 } Contains: { 1, 2 } + + + + + v5, ( Contains<int, std::allocator<int>, CustomAllocator<int>>( v2 ) ) + + + { 1, 2, 3 } Contains: { 1, 2 } + + + + + v, Contains( v2 ) + + + { 1, 2, 3 } Contains: { 1, 2, 3 } + + + + + v, Contains( empty ) + + + { 1, 2, 3 } Contains: { } + + + + + empty, Contains( empty ) + + + { } Contains: { } + + + + + v5, ( Contains<int, std::allocator<int>, CustomAllocator<int>>( v2 ) ) + + + { 1, 2, 3 } Contains: { 1, 2, 3 } + + + + + v5, Contains( v6 ) + + + { 1, 2, 3 } Contains: { 1, 2 } + + + +
+
+ + + v, VectorContains( 1 ) && VectorContains( 2 ) + + + { 1, 2, 3 } ( Contains: 1 and Contains: 2 ) + + + +
+
+ + + v, Equals( v ) + + + { 1, 2, 3 } Equals: { 1, 2, 3 } + + + + + empty, Equals( empty ) + + + { } Equals: { } + + + + + v, Equals<int>( { 1, 2, 3 } ) + + + { 1, 2, 3 } Equals: { 1, 2, 3 } + + + + + v, Equals( v2 ) + + + { 1, 2, 3 } Equals: { 1, 2, 3 } + + + + + v5, ( Equals<int, std::allocator<int>, CustomAllocator<int>>( v2 ) ) + + + { 1, 2, 3 } Equals: { 1, 2, 3 } + + + + + v5, Equals( v6 ) + + + { 1, 2, 3 } Equals: { 1, 2, 3 } + + + +
+
+ + + v, UnorderedEquals( v ) + + + { 1, 2, 3 } UnorderedEquals: { 1, 2, 3 } + + + + + v, UnorderedEquals<int>( { 3, 2, 1 } ) + + + { 1, 2, 3 } UnorderedEquals: { 3, 2, 1 } + + + + + empty, UnorderedEquals( empty ) + + + { } UnorderedEquals: { } + + + + + permuted, UnorderedEquals( v ) + + + { 1, 3, 2 } UnorderedEquals: { 1, 2, 3 } + + + + + permuted, UnorderedEquals( v ) + + + { 2, 3, 1 } UnorderedEquals: { 1, 2, 3 } + + + + + v5, ( UnorderedEquals<int, std::allocator<int>, CustomAllocator<int>>( permuted ) ) + + + { 1, 2, 3 } UnorderedEquals: { 2, 3, 1 } + + + + + v5_permuted, UnorderedEquals( v5 ) + + + { 1, 3, 2 } UnorderedEquals: { 1, 2, 3 } + + + +
+ +
+ +
+ + + v, VectorContains( -1 ) + + + { 1, 2, 3 } Contains: -1 + + + + + empty, VectorContains( 1 ) + + + { } Contains: 1 + + + +
+
+ + + empty, Contains( v ) + + + { } Contains: { 1, 2, 3 } + + + + + v, Contains( v2 ) + + + { 1, 2, 3 } Contains: { 1, 2, 4 } + + + +
+
+ + + v, Equals( v2 ) + + + { 1, 2, 3 } Equals: { 1, 2 } + + + + + v2, Equals( v ) + + + { 1, 2 } Equals: { 1, 2, 3 } + + + + + empty, Equals( v ) + + + { } Equals: { 1, 2, 3 } + + + + + v, Equals( empty ) + + + { 1, 2, 3 } Equals: { } + + + +
+
+ + + v, UnorderedEquals( empty ) + + + { 1, 2, 3 } UnorderedEquals: { } + + + + + empty, UnorderedEquals( v ) + + + { } UnorderedEquals: { 1, 2, 3 } + + + + + permuted, UnorderedEquals( v ) + + + { 1, 3 } UnorderedEquals: { 1, 2, 3 } + + + + + permuted, UnorderedEquals( v ) + + + { 3, 1 } UnorderedEquals: { 1, 2, 3 } + + + +
+ +
+ + + + thisThrows(), std::domain_error + + + thisThrows(), std::domain_error + + + + + thisDoesntThrow() + + + thisDoesntThrow() + + + + + thisThrows() + + + thisThrows() + + + + + + + unexpected exception + + + + + + + thisThrows() == 0 + + + thisThrows() == 0 + + + expected exception + + + + + + + + thisThrows() == 0 + + + thisThrows() == 0 + + + expected exception + + + + + + + + thisThrows() == 0 + + + thisThrows() == 0 + + + expected exception + + + + + +
+ + unexpected exception + + +
+ +
+ + + + + + + + + + + + + + + + +
+ + + encode( "normal string" ) == "normal string" + + + "normal string" == "normal string" + + + +
+
+ + + encode( "" ) == "" + + + "" == "" + + + +
+
+ + + encode( "smith & jones" ) == "smith &amp; jones" + + + "smith &amp; jones" == "smith &amp; jones" + + + +
+
+ + + encode( "smith < jones" ) == "smith &lt; jones" + + + "smith &lt; jones" == "smith &lt; jones" + + + +
+
+ + + encode( "smith > jones" ) == "smith > jones" + + + "smith > jones" == "smith > jones" + + + + + encode( "smith ]]> jones" ) == "smith ]]&gt; jones" + + + "smith ]]&gt; jones" +== +"smith ]]&gt; jones" + + + +
+
+ + + encode( stringWithQuotes ) == stringWithQuotes + + + "don't "quote" me on that" +== +"don't "quote" me on that" + + + + + encode( stringWithQuotes, Catch::XmlEncode::ForAttributes ) == "don't &quot;quote&quot; me on that" + + + "don't &quot;quote&quot; me on that" +== +"don't &quot;quote&quot; me on that" + + + +
+
+ + + encode( "[\x01]" ) == "[\\x01]" + + + "[\x01]" == "[\x01]" + + + +
+
+ + + encode( "[\x7F]" ) == "[\\x7F]" + + + "[\x7F]" == "[\x7F]" + + + +
+ +
+ + + + stream.str(), ContainsSubstring(R"(attr1="true")") && ContainsSubstring(R"(attr2="false")") + + + "<?xml version="1.0" encoding="UTF-8"?> +<Element1 attr1="true" attr2="false"/> +" ( contains: "attr1="true"" and contains: "attr2="false"" ) + + + + + + + + + + + + analysis.mean.point.count() == 23 + + + 23.0 == 23 + + + + + analysis.mean.lower_bound.count() == 23 + + + 23.0 == 23 + + + + + analysis.mean.upper_bound.count() == 23 + + + 23.0 == 23 + + + + + analysis.standard_deviation.point.count() == 0 + + + 0.0 == 0 + + + + + analysis.standard_deviation.lower_bound.count() == 0 + + + 0.0 == 0 + + + + + analysis.standard_deviation.upper_bound.count() == 0 + + + 0.0 == 0 + + + + + analysis.outliers.total() == 0 + + + 0 == 0 + + + + + analysis.outliers.low_mild == 0 + + + 0 == 0 + + + + + analysis.outliers.low_severe == 0 + + + 0 == 0 + + + + + analysis.outliers.high_mild == 0 + + + 0 == 0 + + + + + analysis.outliers.high_severe == 0 + + + 0 == 0 + + + + + analysis.outliers.samples_seen == 0 + + + 0 == 0 + + + + + analysis.outlier_variance == 0 + + + 0.0 == 0 + + + + + + + + Catch::Detail::stringify( empty ) == "{ }" + + + "{ }" == "{ }" + + + + + Catch::Detail::stringify( oneValue ) == "{ 42 }" + + + "{ 42 }" == "{ 42 }" + + + + + Catch::Detail::stringify( twoValues ) == "{ 42, 250 }" + + + "{ 42, 250 }" == "{ 42, 250 }" + + + + + +
+ + + model.started == 1 + + + 1 == 1 + + + + + model.finished == 0 + + + 0 == 0 + + + + + model.started == 1 + + + 1 == 1 + + + + + model.finished == 1 + + + 1 == 1 + + + + + called == 1 + + + 1 == 1 + + + +
+
+ + + model.started == 0 + + + 0 == 0 + + + + + model.finished == 0 + + + 0 == 0 + + + + + model.started == 0 + + + 0 == 0 + + + + + model.finished == 0 + + + 0 == 0 + + + + + called == 1 + + + 1 == 1 + + + +
+ +
+ + + + obj.prop != 0 + + + 0x != 0 + + + + + + + + flag + + + true + + + + + testCheckedElse( true ) + + + true + + + + + + + + flag + + + false + + + + + testCheckedElse( false ) + + + false + + + + + + + + flag + + + true + + + + + testCheckedIf( true ) + + + true + + + + + + + + flag + + + false + + + + + testCheckedIf( false ) + + + false + + + + + +
+ + + o.samples_seen == static_cast<int>(x.size()) + + + 6 == 6 + + + + + o.low_severe == los + + + 0 == 0 + + + + + o.low_mild == lom + + + 0 == 0 + + + + + o.high_mild == him + + + 0 == 0 + + + + + o.high_severe == his + + + 0 == 0 + + + + + o.total() == los + lom + him + his + + + 0 == 0 + + + +
+
+ + + o.samples_seen == static_cast<int>(x.size()) + + + 6 == 6 + + + + + o.low_severe == los + + + 1 == 1 + + + + + o.low_mild == lom + + + 0 == 0 + + + + + o.high_mild == him + + + 0 == 0 + + + + + o.high_severe == his + + + 0 == 0 + + + + + o.total() == los + lom + him + his + + + 1 == 1 + + + +
+
+ + + o.samples_seen == static_cast<int>(x.size()) + + + 6 == 6 + + + + + o.low_severe == los + + + 0 == 0 + + + + + o.low_mild == lom + + + 1 == 1 + + + + + o.high_mild == him + + + 0 == 0 + + + + + o.high_severe == his + + + 0 == 0 + + + + + o.total() == los + lom + him + his + + + 1 == 1 + + + +
+
+ + + o.samples_seen == static_cast<int>(x.size()) + + + 6 == 6 + + + + + o.low_severe == los + + + 0 == 0 + + + + + o.low_mild == lom + + + 0 == 0 + + + + + o.high_mild == him + + + 1 == 1 + + + + + o.high_severe == his + + + 0 == 0 + + + + + o.total() == los + lom + him + his + + + 1 == 1 + + + +
+
+ + + o.samples_seen == static_cast<int>(x.size()) + + + 6 == 6 + + + + + o.low_severe == los + + + 0 == 0 + + + + + o.low_mild == lom + + + 0 == 0 + + + + + o.high_mild == him + + + 0 == 0 + + + + + o.high_severe == his + + + 1 == 1 + + + + + o.total() == los + lom + him + his + + + 1 == 1 + + + +
+
+ + + o.samples_seen == static_cast<int>(x.size()) + + + 6 == 6 + + + + + o.low_severe == los + + + 1 == 1 + + + + + o.low_mild == lom + + + 0 == 0 + + + + + o.high_mild == him + + + 1 == 1 + + + + + o.high_severe == his + + + 0 == 0 + + + + + o.total() == los + lom + him + his + + + 2 == 2 + + + +
+ +
+ + + + unsigned_char_var == 1 + + + 1 == 1 + + + + + unsigned_short_var == 1 + + + 1 == 1 + + + + + unsigned_int_var == 1 + + + 1 == 1 + + + + + unsigned_long_var == 1 + + + 1 == 1 + + + + + + + + long_var == unsigned_char_var + + + 1 == 1 + + + + + long_var == unsigned_short_var + + + 1 == 1 + + + + + long_var == unsigned_int_var + + + 1 == 1 + + + + + long_var == unsigned_long_var + + + 1 == 1 + + + + + + + + convertToBits( 0.f ) == 0 + + + 0 == 0 + + + + + convertToBits( -0.f ) == ( 1ULL << 31 ) + + + 2147483648 (0x) +== +2147483648 (0x) + + + + + convertToBits( 0. ) == 0 + + + 0 == 0 + + + + + convertToBits( -0. ) == ( 1ULL << 63 ) + + + 9223372036854775808 (0x) +== +9223372036854775808 (0x) + + + + + convertToBits( std::numeric_limits<float>::denorm_min() ) == 1 + + + 1 == 1 + + + + + convertToBits( std::numeric_limits<double>::denorm_min() ) == 1 + + + 1 == 1 + + + + + + + skipping because answer = 41 + + + skipping because answer = 43 + + + + + + + Catch::TestCaseInfo("", { "test with an empty tag", "[]" }, dummySourceLineInfo) + + + Catch::TestCaseInfo("", { "test with an empty tag", "[]" }, dummySourceLineInfo) + + + + + + + + erfc_inv(1.103560) == Approx(-0.09203687623843015) + + + -0.09203687623843014 +== +Approx( -0.09203687623843015 ) + + + + + erfc_inv(1.067400) == Approx(-0.05980291115763361) + + + -0.05980291115763361 +== +Approx( -0.05980291115763361 ) + + + + + erfc_inv(0.050000) == Approx(1.38590382434967796) + + + 1.38590382434967774 +== +Approx( 1.38590382434967796 ) + + + + + + + + res.mean.count() == rate + + + 2000.0 == 2000 (0x) + + + + + res.outliers.total() == 0 + + + 0 == 0 + + + + + +
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+ + + + 3 == 4 + + + 3 == 4 + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+ + + + +loose text artifact + + + + + + + + Previous info should not be seen + + + + + + previous unscoped info SHOULD not be seen + + + + + + + + + + + + + l == std::numeric_limits<long long>::max() + + + 9223372036854775807 (0x) +== +9223372036854775807 (0x) + + + + + +
+ + + b > a + + + 0 > 1 + + + +
+
+ + + b > a + + + 1 > 1 + + + +
+
+ + + b > a + + + 2 > 1 + + + +
+
+ + + b > a + + + 3 > 1 + + + +
+
+ + + b > a + + + 4 > 1 + + + +
+
+ + + b > a + + + 5 > 1 + + + +
+
+ + + b > a + + + 6 > 1 + + + +
+
+ + + b > a + + + 7 > 1 + + + +
+
+ + + b > a + + + 8 > 1 + + + +
+
+ + + b > a + + + 9 > 1 + + + +
+ +
+ + + Testing if fib[0] (1) is even + + + + ( fib[i] % 2 ) == 0 + + + 1 == 0 + + + + Testing if fib[1] (1) is even + + + + ( fib[i] % 2 ) == 0 + + + 1 == 0 + + + + Testing if fib[2] (2) is even + + + + ( fib[i] % 2 ) == 0 + + + 0 == 0 + + + + Testing if fib[3] (3) is even + + + + ( fib[i] % 2 ) == 0 + + + 1 == 0 + + + + Testing if fib[4] (5) is even + + + + ( fib[i] % 2 ) == 0 + + + 1 == 0 + + + + Testing if fib[5] (8) is even + + + + ( fib[i] % 2 ) == 0 + + + 0 == 0 + + + + Testing if fib[6] (13) is even + + + + ( fib[i] % 2 ) == 0 + + + 1 == 0 + + + + Testing if fib[7] (21) is even + + + + ( fib[i] % 2 ) == 0 + + + 1 == 0 + + + + + + + + Catch::makeStream( "%debug" ) + + + Catch::makeStream( "%debug" ) + + + + + +
+ + + !(lval.has_moved) + + + !false + + + +
+
+ + + rval.has_moved + + + true + + + +
+
+ + + *ptr == std::tuple<int, double, int>{1, 2., 3} + + + {?} == {?} + + + +
+ +
+ + + + m == 19. + + + 19.0 == 19.0 + + + + + + + + x == 17 + + + 17 == 17 + + + + + x == 23 + + + 23 == 23 + + + + + r.elapsed.count() == 42 + + + 42 == 42 + + + + + r.result == 23 + + + 23 == 23 + + + + + r.iterations == 1 + + + 1 == 1 + + + + + s.elapsed.count() == 69 + + + 69 == 69 + + + + + s.result == 17 + + + 17 == 17 + + + + + s.iterations == 1 + + + 1 == 1 + + + + + + + info + + + unscoped info + + + and warn may mix + + + info + + + unscoped info + + + they are not cleared after warnings + + + + +
+
+ + + a == b + + + 1 == 2 + + + +
+ +
+
+
+ + + a != b + + + 1 != 2 + + + +
+ +
+
+
+ + + a < b + + + 1 < 2 + + + +
+ +
+ +
+ +
+ + + a != b + + + 1 != 2 + + + + + b != a + + + 2 != 1 + + +
+ + + a != b + + + 1 != 2 + + + +
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ + +
+ +
+
+ +
+ + +a! +b1! +! + + +
+ + + + s == "7" + + + "7" == "7" + + + + + + + + ti == typeid(int) + + + {?} == {?} + + + + + + + + normal_quantile(0.551780) == Approx(0.13015979861484198) + + + 0.13015979861484195 +== +Approx( 0.13015979861484198 ) + + + + + normal_quantile(0.533700) == Approx(0.08457408802851875) + + + 0.08457408802851875 +== +Approx( 0.08457408802851875 ) + + + + + normal_quantile(0.025000) == Approx(-1.95996398454005449) + + + -1.95996398454005405 +== +Approx( -1.95996398454005449 ) + + + + + + + + + + this MAY be seen only for the FIRST assertion IF info is printed for passing assertions + + + + true + + + true + + + + this MAY be seen only for the SECOND assertion IF info is printed for passing assertions + + + + true + + + true + + + + this SHOULD be seen + + + + false + + + false + + + + + + + + makeString( false ) != static_cast<char*>(0) + + + "valid string" != {null string} + + + + + makeString( true ) == static_cast<char*>(0) + + + {null string} == {null string} + + + + + + + + ptr.get() == 0 + + + 0 == 0 + + + + + + + + ::Catch::Detail::stringify( pair ) == "{ { 42, \"Arthur\" }, { \"Ford\", 24 } }" + + + "{ { 42, "Arthur" }, { "Ford", 24 } }" +== +"{ { 42, "Arthur" }, { "Ford", 24 } }" + + + + + +
+ + + parseEnums( "" ), Equals( std::vector<Catch::StringRef>{} ) + + + { } Equals: { } + + + +
+
+ + + parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector<Catch::StringRef>{"Value1"} ) + + + { Value1 } Equals: { Value1 } + + + + + parseEnums( "Value1" ), Equals( std::vector<Catch::StringRef>{"Value1"} ) + + + { Value1 } Equals: { Value1 } + + + + + parseEnums( "EnumName::Value1" ), Equals(std::vector<Catch::StringRef>{"Value1"} ) + + + { Value1 } Equals: { Value1 } + + + +
+
+ + + parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2"} ) + + + { Value1, Value2 } Equals: { Value1, Value2 } + + + + + parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) + + + { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 } + + + + + parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) + + + { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 } + + + +
+ +
+ + + + p == 0 + + + 0 == 0 + + + + + + + this MAY be seen IF info is printed for passing assertions + + + + true + + + true + + + + + + + this SHOULD be seen + + + this SHOULD also be seen + + + + false + + + false + + + + + + + this SHOULD be seen only ONCE + + + + false + + + false + + + + + true + + + true + + + + this MAY also be seen only ONCE IF info is printed for passing assertions + + + + true + + + true + + + + + true + + + true + + + + + +
+ + + a != b + + + 1 != 2 + + + + + b != a + + + 2 != 1 + + + +
+
+ + + a != b + + + 1 != 2 + + + +
+ +
+ +
+ + + Catch::replaceInPlace(letters, "b", "z") + + + true + + + + + letters == "azcdefcg" + + + "azcdefcg" == "azcdefcg" + + + +
+
+ + + Catch::replaceInPlace(letters, "c", "z") + + + true + + + + + letters == "abzdefzg" + + + "abzdefzg" == "abzdefzg" + + + +
+
+ + + Catch::replaceInPlace(letters, "a", "z") + + + true + + + + + letters == "zbcdefcg" + + + "zbcdefcg" == "zbcdefcg" + + + +
+
+ + + Catch::replaceInPlace(letters, "g", "z") + + + true + + + + + letters == "abcdefcz" + + + "abcdefcz" == "abcdefcz" + + + +
+
+ + + Catch::replaceInPlace(letters, letters, "replaced") + + + true + + + + + letters == "replaced" + + + "replaced" == "replaced" + + + +
+
+ + + !(Catch::replaceInPlace(letters, "x", "z")) + + + !false + + + + + letters == letters + + + "abcdefcg" == "abcdefcg" + + + +
+
+
+ + + Catch::replaceInPlace(letters, "c", "cc") + + + true + + + + + letters == "abccdefccg" + + + "abccdefccg" == "abccdefccg" + + + +
+ +
+
+
+ + + Catch::replaceInPlace(s, "--", "-") + + + true + + + + + s == "--" + + + "--" == "--" + + + +
+ +
+
+ + + Catch::replaceInPlace(s, "'", "|'") + + + true + + + + + s == "didn|'t" + + + "didn|'t" == "didn|'t" + + + +
+ +
+ + + + Catch::makeStream( "%somestream" ) + + + Catch::makeStream( "%somestream" ) + + + + + + + + res.size() == count + + + 10 == 10 + + + + + res[i] == rate + + + 1000.0 == 1000 (0x) + + + + + res[i] == rate + + + 1000.0 == 1000 (0x) + + + + + res[i] == rate + + + 1000.0 == 1000 (0x) + + + + + res[i] == rate + + + 1000.0 == 1000 (0x) + + + + + res[i] == rate + + + 1000.0 == 1000 (0x) + + + + + res[i] == rate + + + 1000.0 == 1000 (0x) + + + + + res[i] == rate + + + 1000.0 == 1000 (0x) + + + + + res[i] == rate + + + 1000.0 == 1000 (0x) + + + + + res[i] == rate + + + 1000.0 == 1000 (0x) + + + + + + + + meter.runs() >= old_runs + + + 1 >= 1 + + + + + meter.runs() >= old_runs + + + 2 >= 1 + + + + + meter.runs() >= old_runs + + + 4 >= 2 + + + + + meter.runs() >= old_runs + + + 8 >= 4 + + + + + meter.runs() >= old_runs + + + 16 >= 8 + + + + + meter.runs() >= old_runs + + + 32 >= 16 + + + + + meter.runs() >= old_runs + + + 64 >= 32 + + + + + meter.runs() >= old_runs + + + 128 >= 64 + + + + + Timing.elapsed >= time + + + 128 ns >= 100 ns + + + + + Timing.result == Timing.iterations + 17 + + + 145 == 145 + + + + + Timing.iterations >= time.count() + + + 128 >= 100 + + + + + + + + x >= old_x + + + 1 >= 1 + + + + + x >= old_x + + + 2 >= 1 + + + + + x >= old_x + + + 4 >= 2 + + + + + x >= old_x + + + 8 >= 4 + + + + + x >= old_x + + + 16 >= 8 + + + + + x >= old_x + + + 32 >= 16 + + + + + x >= old_x + + + 64 >= 32 + + + + + x >= old_x + + + 128 >= 64 + + + + + Timing.elapsed >= time + + + 128 ns >= 100 ns + + + + + Timing.result == Timing.iterations + 17 + + + 145 == 145 + + + + + Timing.iterations >= time.count() + + + 128 >= 100 + + + + + + + + +
+ +
+
+ + +
+
+ +
+ +
+ + + 3 + + + + false + + + false + + + + + + + hi + + + i := 7 + + + + false + + + false + + + + + + + + testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "."_catch_sr ) ) + + + { {?}, {?} } ( Contains: {?} and Contains: {?} ) + + + + + + + skipping because answer = 43 + + + + + + + splitStringRef("", ','), Equals(std::vector<StringRef>()) + + + { } Equals: { } + + + + + splitStringRef("abc", ','), Equals(std::vector<StringRef>{"abc"}) + + + { abc } Equals: { abc } + + + + + splitStringRef("abc,def", ','), Equals(std::vector<StringRef>{"abc", "def"}) + + + { abc, def } Equals: { abc, def } + + + + + + + Count 1 to 3... + + + 1 + + + 2 + + + 3 + + + + false + + + false + + + + Count 4 to 6... + + + 4 + + + 5 + + + 6 + + + + false + + + false + + + + + + + + !(startsWith("", 'c')) + + + !false + + + + + startsWith(std::string("abc"), 'a') + + + true + + + + + startsWith("def"_catch_sr, 'd') + + + true + + + + + +
+ + + Catch::Detail::stringify( emptyMap ) == "{ }" + + + "{ }" == "{ }" + + + +
+
+ + + Catch::Detail::stringify( map ) == "{ { \"one\", 1 } }" + + + "{ { "one", 1 } }" == "{ { "one", 1 } }" + + + +
+
+ + + Catch::Detail::stringify( map ) == "{ { \"abc\", 1 }, { \"def\", 2 }, { \"ghi\", 3 } }" + + + "{ { "abc", 1 }, { "def", 2 }, { "ghi", 3 } }" +== +"{ { "abc", 1 }, { "def", 2 }, { "ghi", 3 } }" + + + +
+ +
+ + + + ::Catch::Detail::stringify(value) == "{ 34, \"xyzzy\" }" + + + "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" + + + + + + + + ::Catch::Detail::stringify( value ) == "{ 34, \"xyzzy\" }" + + + "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" + + + + + +
+ + + Catch::Detail::stringify( emptySet ) == "{ }" + + + "{ }" == "{ }" + + + +
+
+ + + Catch::Detail::stringify( set ) == "{ \"one\" }" + + + "{ "one" }" == "{ "one" }" + + + +
+
+ + + Catch::Detail::stringify( set ) == "{ \"abc\", \"def\", \"ghi\" }" + + + "{ "abc", "def", "ghi" }" +== +"{ "abc", "def", "ghi" }" + + + +
+ +
+ + + + ::Catch::Detail::stringify( pr ) == "{ { \"green\", 55 } }" + + + "{ { "green", 55 } }" +== +"{ { "green", 55 } }" + + + + + + + + Catch::makeStream( "%stderr" )->isConsole() + + + true + + + + + Catch::makeStream( "%stdout" )->isConsole() + + + true + + + + + + + + ::Catch::Detail::stringify(streamable_range{}) == "op<<(streamable_range)" + + + "op<<(streamable_range)" +== +"op<<(streamable_range)" + + + + + ::Catch::Detail::stringify(stringmaker_range{}) == "stringmaker(streamable_range)" + + + "stringmaker(streamable_range)" +== +"stringmaker(streamable_range)" + + + + + ::Catch::Detail::stringify(just_range{}) == "{ 1, 2, 3, 4 }" + + + "{ 1, 2, 3, 4 }" == "{ 1, 2, 3, 4 }" + + + + + ::Catch::Detail::stringify(disabled_range{}) == "{?}" + + + "{?}" == "{?}" + + + + + + + + ::Catch::Detail::stringify( item ) == "StringMaker<has_maker>" + + + "StringMaker<has_maker>" +== +"StringMaker<has_maker>" + + + + + + + + ::Catch::Detail::stringify( item ) == "StringMaker<has_maker_and_operator>" + + + "StringMaker<has_maker_and_operator>" +== +"StringMaker<has_maker_and_operator>" + + + + + + + + ::Catch::Detail::stringify(item) == "{?}" + + + "{?}" == "{?}" + + + + + + + + ::Catch::Detail::stringify( item ) == "operator<<( has_operator )" + + + "operator<<( has_operator )" +== +"operator<<( has_operator )" + + + + + + + + ::Catch::Detail::stringify( item ) == "operator<<( has_template_operator )" + + + "operator<<( has_template_operator )" +== +"operator<<( has_template_operator )" + + + + + + + + ::Catch::Detail::stringify( v ) == "{ StringMaker<has_maker> }" + + + "{ StringMaker<has_maker> }" +== +"{ StringMaker<has_maker> }" + + + + + + + + ::Catch::Detail::stringify( v ) == "{ StringMaker<has_maker_and_operator> }" + + + "{ StringMaker<has_maker_and_operator> }" +== +"{ StringMaker<has_maker_and_operator> }" + + + + + + + + ::Catch::Detail::stringify( v ) == "{ operator<<( has_operator ) }" + + + "{ operator<<( has_operator ) }" +== +"{ operator<<( has_operator ) }" + + + + + + + + data.str.size() == data.len + + + 3 == 3 + + + + + data.str.size() == data.len + + + 3 == 3 + + + + + data.str.size() == data.len + + + 5 == 5 + + + + + data.str.size() == data.len + + + 4 == 4 + + + + + + + + strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) + + + 5 == 5 + + + + + strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) + + + 6 == 6 + + + + + strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) + + + 5 == 5 + + + + + strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) + + + 6 == 6 + + + + + + + + testcase.tags.size() == 1 + + + 1 == 1 + + + + + testcase.tags[0].original == "magic.tag"_catch_sr + + + magic.tag == magic.tag + + + + + + + + + + + Why would you throw a std::string? + + + + + + + result == "\"wide load\"" + + + ""wide load"" == ""wide load"" + + + + + + + + result == "\"wide load\"" + + + ""wide load"" == ""wide load"" + + + + + + + + result == "\"wide load\"" + + + ""wide load"" == ""wide load"" + + + + + + + + result == "\"wide load\"" + + + ""wide load"" == ""wide load"" + + + + + + + + ::Catch::Detail::stringify(e0) == "E2/V0" + + + "E2/V0" == "E2/V0" + + + + + ::Catch::Detail::stringify(e1) == "E2/V1" + + + "E2/V1" == "E2/V1" + + + + + ::Catch::Detail::stringify(e3) == "Unknown enum value 10" + + + "Unknown enum value 10" +== +"Unknown enum value 10" + + + + + + + + ::Catch::Detail::stringify(e0) == "0" + + + "0" == "0" + + + + + ::Catch::Detail::stringify(e1) == "1" + + + "1" == "1" + + + + + + + + ::Catch::Detail::stringify(e0) == "E2{0}" + + + "E2{0}" == "E2{0}" + + + + + ::Catch::Detail::stringify(e1) == "E2{1}" + + + "E2{1}" == "E2{1}" + + + + + + + + ::Catch::Detail::stringify(e0) == "0" + + + "0" == "0" + + + + + ::Catch::Detail::stringify(e1) == "1" + + + "1" == "1" + + + + + + + + "{ }" == ::Catch::Detail::stringify(type{}) + + + "{ }" == "{ }" + + + + + "{ }" == ::Catch::Detail::stringify(value) + + + "{ }" == "{ }" + + + + + + + + "1.5f" == ::Catch::Detail::stringify(float(1.5)) + + + "1.5f" == "1.5f" + + + + + "{ 1.5f, 0 }" == ::Catch::Detail::stringify(type{1.5f,0}) + + + "{ 1.5f, 0 }" == "{ 1.5f, 0 }" + + + + + + + + "{ 0 }" == ::Catch::Detail::stringify(type{0}) + + + "{ 0 }" == "{ 0 }" + + + + + + + + "{ \"hello\", \"world\" }" == ::Catch::Detail::stringify(type{"hello","world"}) + + + "{ "hello", "world" }" +== +"{ "hello", "world" }" + + + + + + + + "{ { 42 }, { }, 1.5f }" == ::Catch::Detail::stringify(value) + + + "{ { 42 }, { }, 1.5f }" +== +"{ { 42 }, { }, 1.5f }" + + + + + + + + e.point == 23 + + + 23.0 == 23 + + + + + e.upper_bound == 23 + + + 23.0 == 23 + + + + + e.lower_bound == 23 + + + 23.0 == 23 + + + + + e.confidence_interval == 0.95 + + + 0.94999999999999996 == 0.94999999999999996 + + + + + + + + dist.a() == -10 + + + -10 == -10 + + + + + dist.b() == 10 + + + 10 == 10 + + + + + +
+ + + !(ptr) + + + !{?} + + + + + ptr.get() == 0 + + + 0 == 0 + + + +
+
+ + + ptr + + + {?} + + + + + *ptr == 0 + + + 0 == 0 + + + + + ptr.get() == naked_ptr + + + 0x == 0x + + +
+ + + !(ptr) + + + !{?} + + + + + ptr.get() == 0 + + + 0 == 0 + + + +
+ +
+
+ + + ptr + + + {?} + + + + + *ptr == 0 + + + 0 == 0 + + + + + ptr.get() == naked_ptr + + + 0x == 0x + + +
+ + + ptr + + + {?} + + + + + ptr.get() != 0 + + + 0x != 0 + + + + + *ptr == 2 + + + 2 == 2 + + + +
+ +
+
+ + + !(ptr) + + + !{?} + + + + + ptr.get() == 0 + + + 0 == 0 + + + +
+
+ + + !(ptr1) + + + !{?} + + + + + ptr2 + + + {?} + + + + + *ptr2 == 1 + + + 1 == 1 + + + +
+
+ + + !(ptr2) + + + !{?} + + + + + ptr1 + + + {?} + + + + + *ptr1 == 2 + + + 2 == 2 + + + +
+
+ + + *ptr1 == 2 + + + 2 == 2 + + + + + *ptr2 == 1 + + + 1 == 1 + + + +
+ +
+ + + + ::Catch::Detail::stringify(v) == "{ }" + + + "{ }" == "{ }" + + + + + ::Catch::Detail::stringify(v) == "{ { \"hello\" }, { \"world\" } }" + + + "{ { "hello" }, { "world" } }" +== +"{ { "hello" }, { "world" } }" + + + + + + + + ::Catch::Detail::stringify(bools) == "{ }" + + + "{ }" == "{ }" + + + + + ::Catch::Detail::stringify(bools) == "{ true }" + + + "{ true }" == "{ true }" + + + + + ::Catch::Detail::stringify(bools) == "{ true, false }" + + + "{ true, false }" == "{ true, false }" + + + + + + + + ::Catch::Detail::stringify(vv) == "{ }" + + + "{ }" == "{ }" + + + + + ::Catch::Detail::stringify(vv) == "{ 42 }" + + + "{ 42 }" == "{ 42 }" + + + + + ::Catch::Detail::stringify(vv) == "{ 42, 250 }" + + + "{ 42, 250 }" == "{ 42, 250 }" + + + + + + + + ::Catch::Detail::stringify(vv) == "{ }" + + + "{ }" == "{ }" + + + + + ::Catch::Detail::stringify(vv) == "{ 42 }" + + + "{ 42 }" == "{ 42 }" + + + + + ::Catch::Detail::stringify(vv) == "{ 42, 250 }" + + + "{ 42, 250 }" == "{ 42, 250 }" + + + + + + + + ::Catch::Detail::stringify(vv) == "{ }" + + + "{ }" == "{ }" + + + + + ::Catch::Detail::stringify(vv) == "{ \"hello\" }" + + + "{ "hello" }" == "{ "hello" }" + + + + + ::Catch::Detail::stringify(vv) == "{ \"hello\", \"world\" }" + + + "{ "hello", "world" }" +== +"{ "hello", "world" }" + + + + + + + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 10 + + + 10 == 10 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 0 + + + 0 == 0 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.capacity() == 0 + + + 0 == 0 + + + +
+ +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + + +
+ +
+ + + + (iterations * rate) > Catch::Benchmark::Detail::warmup_time.count() + + + 160000000 (0x) > 100 + + + + + (end - start) > Catch::Benchmark::Detail::warmup_time + + + 310016000 ns > 100 ms + + + + + + + + q1 == 14.5 + + + 14.5 == 14.5 + + + + + med == 18. + + + 18.0 == 18.0 + + + + + q3 == 23. + + + 23.0 == 23.0 + + + + + +
+ +
+
+ +
+ +
+ + +
diff --git a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt new file mode 100644 index 0000000..7f3b498 --- /dev/null +++ b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt @@ -0,0 +1,21975 @@ + + + + + + + + + y.v == 0 + + + 0 == 0 + + + + + 0 == y.v + + + 0 == 0 + + + + + + + + t1 == t2 + + + {?} == {?} + + + + + t1 != t2 + + + {?} != {?} + + + + + t1 < t2 + + + {?} < {?} + + + + + t1 > t2 + + + {?} > {?} + + + + + t1 <= t2 + + + {?} <= {?} + + + + + t1 >= t2 + + + {?} >= {?} + + + + + + + + + + uarr := "123" + + + sarr := "456" + + + + std::memcmp(uarr, "123", sizeof(uarr)) == 0 + + + 0 == 0 + + + + uarr := "123" + + + sarr := "456" + + + + std::memcmp(sarr, "456", sizeof(sarr)) == 0 + + + 0 == 0 + + + + + + + + +
+ +
+ +
+ + + + h1 == h2 + + + [1403 helper] == [1403 helper] + + + + + + + +This info message starts with a linebreak + + + +This warning message starts with a linebreak + + + + + + 1514 + + + +This would not be caught previously + + +Nor would this + + + + + + + std::is_same<TypeList<int>, TypeList<int>>::value + + + true + + + + + + + + spec.matches(*fakeTestCase("spec . char")) + + + true + + + + + spec.matches(*fakeTestCase("spec , char")) + + + true + + + + + !(spec.matches(*fakeTestCase(R"(spec \, char)"))) + + + !false + + + + + +
+ + + spec.matches(*fakeTestCase(R"(spec {a} char)")) + + + true + + + + + spec.matches(*fakeTestCase(R"(spec [a] char)")) + + + true + + + + + !(spec.matches(*fakeTestCase("differs but has similar tag", "[a]"))) + + + !false + + + +
+
+ + + spec.matches(*fakeTestCase(R"(spec \ char)")) + + + true + + + +
+ +
+ + + + counter < 7 + + + 3 < 7 + + + + + counter < 7 + + + 6 < 7 + + + + + + + + i != j + + + 1 != 3 + + + + + i != j + + + 1 != 4 + + + + + i != j + + + 2 != 3 + + + + + i != j + + + 2 != 4 + + + + + +
+ +
+
+ + + m + + + 1 + + + +
+
+ + + m + + + 2 + + + +
+
+ + + m + + + 3 + + + +
+ +
+ +
+ + + 1 + + + 1 + + + +
+ + + m + + + 2 + + + + + m + + + 3 + + + +
+ + + + m + + + 1 + + + + + m + + + 2 + + + + + m + + + 3 + + + + + +
+ +
+ + i := 1 + + + j := 3 + + + k := 5 + +
+ +
+ + i := 1 + + + j := 3 + + + k := 6 + +
+ +
+ + i := 1 + + + j := 4 + + + k := 5 + + + i := 1 + + + j := 4 + + + k := 6 + +
+ +
+ + i := 2 + + + j := 3 + + + k := 5 + +
+ +
+ + i := 2 + + + j := 3 + + + k := 6 + +
+ +
+ + i := 2 + + + j := 4 + + + k := 5 + + + i := 2 + + + j := 4 + + + k := 6 + + +
+ + + + m + + + 1 + + + + + n + + + 1 + + + + + m + + + 1 + + + + + n + + + 2 + + + + + m + + + 1 + + + + + n + + + 3 + + + + + m + + + 2 + + + + + n + + + 1 + + + + + m + + + 2 + + + + + n + + + 2 + + + + + m + + + 2 + + + + + n + + + 3 + + + + + m + + + 3 + + + + + n + + + 1 + + + + + m + + + 3 + + + + + n + + + 2 + + + + + m + + + 3 + + + + + n + + + 3 + + + + + + + + + + + + + + + + + smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) + + + 0.0 is within 2 ULPs of -4.9406564584124654e-324 ([-1.4821969375237396e-323, 4.9406564584124654e-324]) + + + + + smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) + + + 0.0 not is within 1 ULPs of -4.9406564584124654e-324 ([-9.8813129168249309e-324, -0.0000000000000000e+00]) + + + + + + + + smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) + + + 0.0f is within 2 ULPs of -1.40129846e-45f ([-4.20389539e-45, 1.40129846e-45]) + + + + + smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) + + + 0.0f not is within 1 ULPs of -1.40129846e-45f ([-2.80259693e-45, -0.00000000e+00]) + + + + + + + failure to init + + + + +
+ + answer := 42 + + + expected exception + + +
+
+ + answer := 42 + + + + thisThrows() + + + thisThrows() + + + expected exception + + + +
+
+ + answer := 42 + + + + thisThrows() + + + thisThrows() + + + +
+ +
+ + + + 42 == f + + + 42 == {?} + + + + + + + + a == t + + + 3 == 3 + + + + + a == t + + + 3 == 3 + + + + + throws_int(true) + + + throws_int(true) + + + + + throws_int(true), int + + + throws_int(true), int + + + + + throws_int(false) + + + throws_int(false) + + + + + "aaa", Catch::Matchers::EndsWith("aaa") + + + "aaa" ends with: "aaa" + + + + + templated_tests<int>(3) + + + true + + + + + + + + f() == 0 + + + 1 == 0 + + + + + errno_after == 1 + + + 1 == 1 + + + + + + + dummy := 0 + + + + x == 4 + + + {?} == 4 + + + + + +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+ + + + false != false + + + false != false + + + + + true != true + + + true != true + + + + + !true + + + false + + + + + !(true) + + + !true + + + + + !trueValue + + + false + + + + + !(trueValue) + + + !true + + + + + !(1 == 1) + + + false + + + + + !(1 == 1) + + + !(1 == 1) + + + + + + + + false == false + + + false == false + + + + + true == true + + + true == true + + + + + !false + + + true + + + + + !(false) + + + !false + + + + + !falseValue + + + true + + + + + !(falseValue) + + + !false + + + + + !(1 == 2) + + + true + + + + + !(1 == 2) + + + !(1 == 2) + + + + + +
+ + + is_true<true>::value == true + + + true == true + + + + + true == is_true<true>::value + + + true == true + + + +
+
+ + + is_true<false>::value == false + + + false == false + + + + + false == is_true<false>::value + + + false == false + + + +
+
+ + + !is_true<false>::value + + + true + + + +
+
+ + + !!is_true<true>::value + + + true + + + +
+
+ + + is_true<true>::value + + + true + + + + + !(is_true<false>::value) + + + !false + + + +
+ +
+ + + + x < y + + + 1 < 4 + + + + + y < z + + + 4 < 7 + + + + + x < z + + + 1 < 7 + + + + + x < y + + + 1 < 4 + + + + + y < z + + + 4 < 8 + + + + + x < z + + + 1 < 8 + + + + + x < y + + + 1 < 4 + + + + + y < z + + + 4 < 9 + + + + + x < z + + + 1 < 9 + + + + + x < y + + + 1 < 5 + + + + + y < z + + + 5 < 7 + + + + + x < z + + + 1 < 7 + + + + + x < y + + + 1 < 5 + + + + + y < z + + + 5 < 8 + + + + + x < z + + + 1 < 8 + + + + + x < y + + + 1 < 5 + + + + + y < z + + + 5 < 9 + + + + + x < z + + + 1 < 9 + + + + + x < y + + + 1 < 6 + + + + + y < z + + + 6 < 7 + + + + + x < z + + + 1 < 7 + + + + + x < y + + + 1 < 6 + + + + + y < z + + + 6 < 8 + + + + + x < z + + + 1 < 8 + + + + + x < y + + + 1 < 6 + + + + + y < z + + + 6 < 9 + + + + + x < z + + + 1 < 9 + + + + + x < y + + + 2 < 4 + + + + + y < z + + + 4 < 7 + + + + + x < z + + + 2 < 7 + + + + + x < y + + + 2 < 4 + + + + + y < z + + + 4 < 8 + + + + + x < z + + + 2 < 8 + + + + + x < y + + + 2 < 4 + + + + + y < z + + + 4 < 9 + + + + + x < z + + + 2 < 9 + + + + + x < y + + + 2 < 5 + + + + + y < z + + + 5 < 7 + + + + + x < z + + + 2 < 7 + + + + + x < y + + + 2 < 5 + + + + + y < z + + + 5 < 8 + + + + + x < z + + + 2 < 8 + + + + + x < y + + + 2 < 5 + + + + + y < z + + + 5 < 9 + + + + + x < z + + + 2 < 9 + + + + + x < y + + + 2 < 6 + + + + + y < z + + + 6 < 7 + + + + + x < z + + + 2 < 7 + + + + + x < y + + + 2 < 6 + + + + + y < z + + + 6 < 8 + + + + + x < z + + + 2 < 8 + + + + + x < y + + + 2 < 6 + + + + + y < z + + + 6 < 9 + + + + + x < z + + + 2 < 9 + + + + + x < y + + + 3 < 4 + + + + + y < z + + + 4 < 7 + + + + + x < z + + + 3 < 7 + + + + + x < y + + + 3 < 4 + + + + + y < z + + + 4 < 8 + + + + + x < z + + + 3 < 8 + + + + + x < y + + + 3 < 4 + + + + + y < z + + + 4 < 9 + + + + + x < z + + + 3 < 9 + + + + + x < y + + + 3 < 5 + + + + + y < z + + + 5 < 7 + + + + + x < z + + + 3 < 7 + + + + + x < y + + + 3 < 5 + + + + + y < z + + + 5 < 8 + + + + + x < z + + + 3 < 8 + + + + + x < y + + + 3 < 5 + + + + + y < z + + + 5 < 9 + + + + + x < z + + + 3 < 9 + + + + + x < y + + + 3 < 6 + + + + + y < z + + + 6 < 7 + + + + + x < z + + + 3 < 7 + + + + + x < y + + + 3 < 6 + + + + + y < z + + + 6 < 8 + + + + + x < z + + + 3 < 8 + + + + + x < y + + + 3 < 6 + + + + + y < z + + + 6 < 9 + + + + + x < z + + + 3 < 9 + + + + + + + + s == "world" + + + "hello" == "world" + + + + + + + + s == "hello" + + + "hello" == "hello" + + + + + + + + Template_Fixture_2<TestType>::m_a.size() == 1 + + + 0 == 1 + + + + + + + + Template_Fixture_2<TestType>::m_a.size() == 1 + + + 0 == 1 + + + + + + + + Template_Fixture_2<TestType>::m_a.size() == 1 + + + 0 == 1 + + + + + + + + Template_Fixture_2<TestType>::m_a.size() == 1 + + + 0 == 1 + + + + + + + + Template_Fixture_2<TestType>::m_a.size() == 0 + + + 0 == 0 + + + + + + + + Template_Fixture_2<TestType>::m_a.size() == 0 + + + 0 == 0 + + + + + + + + Template_Fixture_2<TestType>::m_a.size() == 0 + + + 0 == 0 + + + + + + + + Template_Fixture_2<TestType>::m_a.size() == 0 + + + 0 == 0 + + + + + + + + Template_Fixture_2<TestType>{}.m_a.size() < 2 + + + 6 < 2 + + + + + + + + Template_Fixture_2<TestType>{}.m_a.size() < 2 + + + 2 < 2 + + + + + + + + Template_Fixture_2<TestType>{}.m_a.size() < 2 + + + 6 < 2 + + + + + + + + Template_Fixture_2<TestType>{}.m_a.size() < 2 + + + 2 < 2 + + + + + + + + Template_Fixture_2<TestType>{}.m_a.size() >= 2 + + + 6 >= 2 + + + + + + + + Template_Fixture_2<TestType>{}.m_a.size() >= 2 + + + 2 >= 2 + + + + + + + + Template_Fixture_2<TestType>{}.m_a.size() >= 2 + + + 6 >= 2 + + + + + + + + Template_Fixture_2<TestType>{}.m_a.size() >= 2 + + + 2 >= 2 + + + + + + + + Template_Fixture<TestType>::m_a == 2 + + + 1.0 == 2 + + + + + + + + Template_Fixture<TestType>::m_a == 2 + + + 1.0f == 2 + + + + + + + + Template_Fixture<TestType>::m_a == 2 + + + 1 == 2 + + + + + + + + Template_Fixture<TestType>::m_a == 1 + + + 1.0 == 1 + + + + + + + + Template_Fixture<TestType>::m_a == 1 + + + 1.0f == 1 + + + + + + + + Template_Fixture<TestType>::m_a == 1 + + + 1 == 1 + + + + + + + + Nttp_Fixture<V>::value == 0 + + + 1 == 0 + + + + + + + + Nttp_Fixture<V>::value == 0 + + + 3 == 0 + + + + + + + + Nttp_Fixture<V>::value == 0 + + + 6 == 0 + + + + + + + + Nttp_Fixture<V>::value > 0 + + + 1 > 0 + + + + + + + + Nttp_Fixture<V>::value > 0 + + + 3 > 0 + + + + + + + + Nttp_Fixture<V>::value > 0 + + + 6 > 0 + + + + + + + + m_a == 2 + + + 1 == 2 + + + + + + + + m_a == 1 + + + 1 == 1 + + + + + +
+ + + m_a++ == 0 + + + 0 == 0 + + + +
+
+ + + m_a == 0 + + + 1 == 0 + + + +
+ +
+ +
+ + + m_a++ == 0 + + + 0 == 0 + + + +
+
+ + + m_a == 1 + + + 1 == 1 + + + +
+ +
+ + + + x.size() == 0 + + + 0 == 0 + + + + + + + + x.size() == 0 + + + 0 == 0 + + + + + + + + x.size() == 0 + + + 0 == 0 + + + + + + + + x.size() == 0 + + + 0 == 0 + + + + + + + + x.size() > 0 + + + 42 > 0 + + + + + + + + x.size() > 0 + + + 9 > 0 + + + + + + + + x.size() > 0 + + + 42 > 0 + + + + + + + + x.size() > 0 + + + 9 > 0 + + + + + + + + d == 1.23_a + + + 1.22999999999999998 +== +Approx( 1.22999999999999998 ) + + + + + d != 1.22_a + + + 1.22999999999999998 +!= +Approx( 1.21999999999999997 ) + + + + + -d == -1.23_a + + + -1.22999999999999998 +== +Approx( -1.22999999999999998 ) + + + + + d == 1.2_a .epsilon(.1) + + + 1.22999999999999998 +== +Approx( 1.19999999999999996 ) + + + + + d != 1.2_a .epsilon(.001) + + + 1.22999999999999998 +!= +Approx( 1.19999999999999996 ) + + + + + d == 1_a .epsilon(.3) + + + 1.22999999999999998 == Approx( 1.0 ) + + + + + +
+
+ +
+ +
+ + to infinity and beyond + + +
+ + + + &o1 == &o2 + + + 0x == 0x + + + + + o1 == o2 + + + {?} == {?} + + + + + + + + 104.0 != Approx(100.0) + + + 104.0 != Approx( 100.0 ) + + + + + 104.0 == Approx(100.0).margin(5) + + + 104.0 == Approx( 100.0 ) + + + + + 104.0 == Approx(100.0).margin(4) + + + 104.0 == Approx( 100.0 ) + + + + + 104.0 != Approx(100.0).margin(3) + + + 104.0 != Approx( 100.0 ) + + + + + 100.3 != Approx(100.0) + + + 100.29999999999999716 != Approx( 100.0 ) + + + + + 100.3 == Approx(100.0).margin(0.5) + + + 100.29999999999999716 == Approx( 100.0 ) + + + + + + + + + + + i++ == 7 + + + 7 == 7 + + + + + i++ == 8 + + + 8 == 8 + + + + + + + + 1 == 1 + + + 1 == 1 + + + + + {Unknown expression after the reported line} + + + {Unknown expression after the reported line} + + + unexpected exception + + + + + + + + + + + Approx(0).margin(0) + + + Approx(0).margin(0) + + + + + Approx(0).margin(1234656) + + + Approx(0).margin(1234656) + + + + + Approx(0).margin(-2), std::domain_error + + + Approx(0).margin(-2), std::domain_error + + + + + Approx(0).epsilon(0) + + + Approx(0).epsilon(0) + + + + + Approx(0).epsilon(1) + + + Approx(0).epsilon(1) + + + + + Approx(0).epsilon(-0.001), std::domain_error + + + Approx(0).epsilon(-0.001), std::domain_error + + + + + Approx(0).epsilon(1.0001), std::domain_error + + + Approx(0).epsilon(1.0001), std::domain_error + + + + + + + + 0.25f == Approx(0.0f).margin(0.25f) + + + 0.25f == Approx( 0.0 ) + + + + + 0.0f == Approx(0.25f).margin(0.25f) + + + 0.0f == Approx( 0.25 ) + + + + + 0.5f == Approx(0.25f).margin(0.25f) + + + 0.5f == Approx( 0.25 ) + + + + + 245.0f == Approx(245.25f).margin(0.25f) + + + 245.0f == Approx( 245.25 ) + + + + + 245.5f == Approx(245.25f).margin(0.25f) + + + 245.5f == Approx( 245.25 ) + + + + + + + + divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) + + + 3.14285714285714279 +== +Approx( 3.14100000000000001 ) + + + + + divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) + + + 3.14285714285714279 +!= +Approx( 3.14100000000000001 ) + + + + + + + + d != Approx( 1.231 ) + + + 1.22999999999999998 +!= +Approx( 1.23100000000000009 ) + + + + + d == Approx( 1.231 ).epsilon( 0.1 ) + + + 1.22999999999999998 +== +Approx( 1.23100000000000009 ) + + + + + + + + 1.23f == Approx( 1.23f ) + + + 1.230000019f +== +Approx( 1.23000001907348633 ) + + + + + 0.0f == Approx( 0.0f ) + + + 0.0f == Approx( 0.0 ) + + + + + + + + 1 == Approx( 1 ) + + + 1 == Approx( 1.0 ) + + + + + 0 == Approx( 0 ) + + + 0 == Approx( 0.0 ) + + + + + + + + 1.0f == Approx( 1 ) + + + 1.0f == Approx( 1.0 ) + + + + + 0 == Approx( dZero) + + + 0 == Approx( 0.0 ) + + + + + 0 == Approx( dSmall ).margin( 0.001 ) + + + 0 == Approx( 0.00001 ) + + + + + 1.234f == Approx( dMedium ) + + + 1.233999968f +== +Approx( 1.23399999999999999 ) + + + + + dMedium == Approx( 1.234f ) + + + 1.23399999999999999 +== +Approx( 1.23399996757507324 ) + + + + + +
+ + + 1, Predicate<int>( alwaysTrue, "always true" ) + + + 1 matches predicate: "always true" + + + + + 1, !Predicate<int>( alwaysFalse, "always false" ) + + + 1 not matches predicate: "always false" + + + +
+
+ + + "Hello olleH", Predicate<std::string>( []( std::string const& str ) -> bool { return str.front() == str.back(); }, "First and last character should be equal" ) + + + "Hello olleH" matches predicate: "First and last character should be equal" + + + + + "This wouldn't pass", !Predicate<std::string>( []( std::string const& str ) -> bool { return str.front() == str.back(); } ) + + + "This wouldn't pass" not matches undescribed predicate + + + +
+ +
+ + + + lhs | rhs + + + Val: 1 | Val: 2 + + + + + !(lhs & rhs) + + + !(Val: 1 & Val: 2) + + + + + HasBitOperators{ 1 } & HasBitOperators{ 1 } + + + Val: 1 & Val: 1 + + + + + lhs ^ rhs + + + Val: 1 ^ Val: 2 + + + + + !(lhs ^ lhs) + + + !(Val: 1 ^ Val: 1) + + + + + + + + true + + + true + + +
+ + + true + + + true + + +
+ + + true + + + true + + + +
+ +
+ + + true + + + true + + +
+ + + true + + + true + + +
+ + + true + + + true + + + +
+ +
+ +
+ +
+ + + a, Contains(1) + + + { 1, 2, 3 } contains element 1 + + + + + b, Contains(1) + + + { 0, 1, 2 } contains element 1 + + + + + c, !Contains(1) + + + { 4, 5, 6 } not contains element 1 + + + +
+
+ + + a, Contains(0, close_enough) + + + { 1, 2, 3 } contains element 0 + + + + + b, Contains(0, close_enough) + + + { 0, 1, 2 } contains element 0 + + + + + c, !Contains(0, close_enough) + + + { 4, 5, 6 } not contains element 0 + + + +
+
+ + + a, Contains(4, [](auto&& lhs, size_t sz) { return lhs.size() == sz; }) + + + { "abc", "abcd", "abcde" } contains element 4 + + + +
+
+ + + in, Contains(1) + + + { 1, 2, 3, 4, 5 } contains element 1 + + + + + in, !Contains(8) + + + { 1, 2, 3, 4, 5 } not contains element 8 + + + +
+
+ + + in, Contains(MoveOnlyTestElement{ 2 }) + + + { 1, 2, 3 } contains element 2 + + + + + in, !Contains(MoveOnlyTestElement{ 9 }) + + + { 1, 2, 3 } not contains element 9 + + + +
+
+ + + in, Contains(Catch::Matchers::WithinAbs(0.5, 0.5)) + + + { 1.0, 2.0, 3.0, 0.0 } contains element matching is within 0.5 of 0.5 + + + +
+ +
+ +
+ + + empty_array, IsEmpty() + + + { } is empty + + + + + non_empty_array, !IsEmpty() + + + { 0.0 } not is empty + + + + + empty_vec, IsEmpty() + + + { } is empty + + + + + non_empty_vec, !IsEmpty() + + + { 'a', 'b', 'c' } not is empty + + + + + inner_lists_are_empty, !IsEmpty() + + + { { } } not is empty + + + + + inner_lists_are_empty.front(), IsEmpty() + + + { } is empty + + + +
+
+ + + has_empty{}, !IsEmpty() + + + {?} not is empty + + + +
+
+ + + unrelated::ADL_empty{}, IsEmpty() + + + {?} is empty + + + +
+ +
+ + + a := 1 + + + b := 2 + + + c := 3 + + + a + b := 3 + + + a+b := 3 + + + c > b := true + + + a == 1 := true + + + + + + custom_index_op<int>{1, 2, 3}[0, 1, 2] := 0 + + + custom_index_op<int>{1, 2, 3}[(0, 1)] := 0 + + + custom_index_op<int>{1, 2, 3}[0] := 0 + + + (helper_1436<int, int>{12, -12}) := { 12, -12 } + + + (helper_1436<int, int>(-12, 12)) := { -12, 12 } + + + (1, 2) := 2 + + + (2, 3) := 3 + + + + + + ("comma, in string", "escaped, \", ") := "escaped, ", " + + + "single quote in string,'," := "single quote in string,'," + + + "some escapes, \\,\\\\" := "some escapes, \,\\" + + + "some, ), unmatched, } prenheses {[<" := "some, ), unmatched, } prenheses {[<" + + + '"' := '"' + + + '\'' := ''' + + + ',' := ',' + + + '}' := '}' + + + ')' := ')' + + + '(' := '(' + + + '{' := '{' + + + + +
+ + i := 2 + + + + true + + + true + + + +
+
+ + 3 + + + + true + + + true + + + +
+ +
+ +
+ + + eq( "", "" ) + + + true + + + + + !(eq( "", "a" )) + + + !false + + + +
+
+ + + eq( "a", "a" ) + + + true + + + + + eq( "a", "A" ) + + + true + + + + + eq( "A", "a" ) + + + true + + + + + eq( "A", "A" ) + + + true + + + + + !(eq( "a", "b" )) + + + !false + + + + + !(eq( "a", "B" )) + + + !false + + + +
+ +
+ +
+ + + lt( "", "a" ) + + + true + + + + + !(lt( "a", "a" )) + + + !false + + + + + !(lt( "", "" )) + + + !false + + + +
+
+ + + lt( "a", "b" ) + + + true + + + + + lt( "a", "B" ) + + + true + + + + + lt( "A", "b" ) + + + true + + + + + lt( "A", "B" ) + + + true + + + +
+ +
+ +
+ + + ::Catch::Detail::stringify('\t') == "'\\t'" + + + "'\t'" == "'\t'" + + + + + ::Catch::Detail::stringify('\n') == "'\\n'" + + + "'\n'" == "'\n'" + + + + + ::Catch::Detail::stringify('\r') == "'\\r'" + + + "'\r'" == "'\r'" + + + + + ::Catch::Detail::stringify('\f') == "'\\f'" + + + "'\f'" == "'\f'" + + + +
+
+ + + ::Catch::Detail::stringify( ' ' ) == "' '" + + + "' '" == "' '" + + + + + ::Catch::Detail::stringify( 'A' ) == "'A'" + + + "'A'" == "'A'" + + + + + ::Catch::Detail::stringify( 'z' ) == "'z'" + + + "'z'" == "'z'" + + + +
+
+ + + ::Catch::Detail::stringify( '\0' ) == "0" + + + "0" == "0" + + + + + ::Catch::Detail::stringify( static_cast<char>(2) ) == "2" + + + "2" == "2" + + + + + ::Catch::Detail::stringify( static_cast<char>(5) ) == "5" + + + "5" == "5" + + + +
+ +
+ + + + name.empty() + + + true + + + + + result + + + {?} + + + + + result.type() == Catch::Clara::Detail::ResultType::Ok + + + 0 == 0 + + + + + parsed.type() == Catch::Clara::ParseResultType::NoMatch + + + 1 == 1 + + + + + parsed.remainingTokens().count() == 2 + + + 2 == 2 + + + + + name.empty() + + + true + + + + + + + + name.empty() + + + true + + + + + name == "foo" + + + "foo" == "foo" + + + + + +
+ + + !(parse_result) + + + !{?} + + + +
+
+ + + parse_result + + + {?} + + + + + res == std::vector<std::string>{ "aaa", "bbb" } + + + { "aaa", "bbb" } == { "aaa", "bbb" } + + + +
+ +
+ +
+ + + streamWrapper.str().empty() + + + true + + + +
+
+ + + streamWrapper.str() == "1\nUsing code: 2\n2\nUsing code: 0\n3\n" + + + "1 +Using code: 2 +2 +Using code: 0 +3 +" +== +"1 +Using code: 2 +2 +Using code: 0 +3 +" + + + +
+
+ + + streamWrapper.str() == "Using code: 2\nA\nB\nUsing code: 0\nC\n" + + + "Using code: 2 +A +B +Using code: 0 +C +" +== +"Using code: 2 +A +B +Using code: 0 +C +" + + + +
+ +
+ + + + 1, ( MatcherA() && MatcherB() ) && MatcherC() + + + 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 ) + + + + + 1, MatcherA() && ( MatcherB() && MatcherC() ) + + + 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 ) + + + + + 1, ( MatcherA() && MatcherB() ) && ( MatcherC() && MatcherD() ) + + + 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 and equals: true ) + + + + + + + + 1, ( MatcherA() || MatcherB() ) || MatcherC() + + + 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 ) + + + + + 1, MatcherA() || ( MatcherB() || MatcherC() ) + + + 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 ) + + + + + 1, ( MatcherA() || MatcherB() ) || ( MatcherC() || MatcherD() ) + + + 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 or equals: true ) + + + + + + + + 0, !MatcherA() + + + 0 not equals: (int) 1 or (string) "1" + + + + + 1, !!MatcherA() + + + 1 equals: (int) 1 or (string) "1" + + + + + 0, !!!MatcherA() + + + 0 not equals: (int) 1 or (string) "1" + + + + + 1, !!!!MatcherA() + + + 1 equals: (int) 1 or (string) "1" + + + + + + + + + + + 1, MatcherA() || MatcherB() + + + 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 ) + + + + + 1, MatcherA() && MatcherB() + + + 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 ) + + + + + 1, MatcherA() || !MatcherB() + + + 1 ( equals: (int) 1 or (string) "1" or not equals: (long long) 1 ) + + + + + + + + vec, Predicate<std::vector<int>>( []( auto const& v ) { return std::all_of( v.begin(), v.end(), []( int elem ) { return elem % 2 == 1; } ); }, "All elements are odd" ) && !EqualsRange( a ) + + + { 1, 3, 5 } ( matches predicate: "All elements are odd" and not Equals: { 5, 3, 1 } ) + + + + + str, StartsWith( "foo" ) && EqualsRange( arr ) && EndsWith( "bar" ) + + + "foobar" ( starts with: "foo" and Equals: { 'f', 'o', 'o', 'b', 'a', 'r' } and ends with: "bar" ) + + + + + str, StartsWith( "foo" ) && !EqualsRange( bad_arr ) && EndsWith( "bar" ) + + + "foobar" ( starts with: "foo" and not Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } and ends with: "bar" ) + + + + + str, EqualsRange( arr ) && StartsWith( "foo" ) && EndsWith( "bar" ) + + + "foobar" ( Equals: { 'f', 'o', 'o', 'b', 'a', 'r' } and starts with: "foo" and ends with: "bar" ) + + + + + str, !EqualsRange( bad_arr ) && StartsWith( "foo" ) && EndsWith( "bar" ) + + + "foobar" ( not Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } and starts with: "foo" and ends with: "bar" ) + + + + + str, EqualsRange( bad_arr ) || ( StartsWith( "foo" ) && EndsWith( "bar" ) ) + + + "foobar" ( Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } or ( starts with: "foo" and ends with: "bar" ) ) + + + + + str, ( StartsWith( "foo" ) && EndsWith( "bar" ) ) || EqualsRange( bad_arr ) + + + "foobar" ( ( starts with: "foo" and ends with: "bar" ) or Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } ) + + + + + + + + container, EqualsRange( a ) || EqualsRange( b ) || EqualsRange( c ) + + + { 1, 2, 3 } ( Equals: { 1, 2, 3 } or Equals: { 0, 1, 2 } or Equals: { 4, 5, 6 } ) + + + + + + + + std::vector<constructor_throws>{constructor_throws{}, constructor_throws{}} + + + std::vector<constructor_throws>{constructor_throws{}, constructor_throws{}} + + + + + std::vector<constructor_throws>{constructor_throws{}, constructor_throws{}} + + + std::vector<constructor_throws>{constructor_throws{}, constructor_throws{}} + + + + + std::vector<int>{1, 2, 3} == std::vector<int>{1, 2, 3} + + + std::vector<int>{1, 2, 3} == std::vector<int>{1, 2, 3} + + + + + std::vector<int>{1, 2, 3} == std::vector<int>{1, 2, 3} + + + std::vector<int>{1, 2, 3} == std::vector<int>{1, 2, 3} + + + + + std::vector<int>{1, 2} == std::vector<int>{1, 2} + + + { 1, 2 } == { 1, 2 } + + + + + std::vector<int>{1, 2} == std::vector<int>{1, 2} + + + { 1, 2 } == { 1, 2 } + + + + + !(std::vector<int>{1, 2} == std::vector<int>{1, 2, 3}) + + + !({ 1, 2 } == { 1, 2, 3 }) + + + + + !(std::vector<int>{1, 2} == std::vector<int>{1, 2, 3}) + + + !({ 1, 2 } == { 1, 2, 3 }) + + + + + std::vector<int>{1, 2} == std::vector<int>{1, 2} + + + { 1, 2 } == { 1, 2 } + + + + + std::vector<int>{1, 2} == std::vector<int>{1, 2} + + + { 1, 2 } == { 1, 2 } + + + + + true + + + true + + + + + std::vector<int>{1, 2} == std::vector<int>{1, 2} + + + { 1, 2 } == { 1, 2 } + + + + + + + + a + + + 0x + + + + + a == &foo + + + 0x == 0x + + + + + + + + SimplePcg32{} == SimplePcg32{} + + + {?} == {?} + + + + + SimplePcg32{ 0 } != SimplePcg32{} + + + {?} != {?} + + + + + !(SimplePcg32{ 1 } == SimplePcg32{ 2 }) + + + !({?} == {?}) + + + + + !(SimplePcg32{ 1 } != SimplePcg32{ 1 }) + + + !({?} != {?}) + + + + + + + + td == Approx(10.0) + + + StrongDoubleTypedef(10) == Approx( 10.0 ) + + + + + Approx(10.0) == td + + + Approx( 10.0 ) == StrongDoubleTypedef(10) + + + + + td != Approx(11.0) + + + StrongDoubleTypedef(10) != Approx( 11.0 ) + + + + + Approx(11.0) != td + + + Approx( 11.0 ) != StrongDoubleTypedef(10) + + + + + td <= Approx(10.0) + + + StrongDoubleTypedef(10) <= Approx( 10.0 ) + + + + + td <= Approx(11.0) + + + StrongDoubleTypedef(10) <= Approx( 11.0 ) + + + + + Approx(10.0) <= td + + + Approx( 10.0 ) <= StrongDoubleTypedef(10) + + + + + Approx(9.0) <= td + + + Approx( 9.0 ) <= StrongDoubleTypedef(10) + + + + + td >= Approx(9.0) + + + StrongDoubleTypedef(10) >= Approx( 9.0 ) + + + + + td >= Approx(td) + + + StrongDoubleTypedef(10) >= Approx( 10.0 ) + + + + + Approx(td) >= td + + + Approx( 10.0 ) >= StrongDoubleTypedef(10) + + + + + Approx(11.0) >= td + + + Approx( 11.0 ) >= StrongDoubleTypedef(10) + + + + + + + + 54 == 6*9 + + + 54 == 54 + + + + + + + + ( -1 > 2u ) + + + true + + + + + -1 > 2u + + + -1 > 2 + + + + + ( 2u < -1 ) + + + true + + + + + 2u < -1 + + + 2 < -1 + + + + + ( minInt > 2u ) + + + true + + + + + minInt > 2u + + + -2147483648 > 2 + + + + + + + + i == 1 + + + 1 == 1 + + + + + ui == 2 + + + 2 == 2 + + + + + l == 3 + + + 3 == 3 + + + + + ul == 4 + + + 4 == 4 + + + + + c == 5 + + + 5 == 5 + + + + + uc == 6 + + + 6 == 6 + + + + + 1 == i + + + 1 == 1 + + + + + 2 == ui + + + 2 == 2 + + + + + 3 == l + + + 3 == 3 + + + + + 4 == ul + + + 4 == 4 + + + + + 5 == c + + + 5 == 5 + + + + + 6 == uc + + + 6 == 6 + + + + + (std::numeric_limits<uint32_t>::max)() > ul + + + 4294967295 (0x) > 4 + + + + + +
+ + + !(matcher.match( 1 )) + + + !false + + + + + first.matchCalled + + + true + + + + + !second.matchCalled + + + true + + + +
+
+ + + matcher.match( 1 ) + + + true + + + + + first.matchCalled + + + true + + + + + !second.matchCalled + + + true + + + +
+ +
+ +
+ + + !(matcher.match( 1 )) + + + !false + + + + + first.matchCalled + + + true + + + + + !second.matchCalled + + + true + + + +
+
+ + + matcher.match( 1 ) + + + true + + + + + first.matchCalled + + + true + + + + + !second.matchCalled + + + true + + + +
+ +
+ + + + testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) + + + "this string contains 'abc' as a substring" contains: "not there" (case insensitive) + + + + + testStringForMatching(), ContainsSubstring( "STRING" ) + + + "this string contains 'abc' as a substring" contains: "STRING" + + + + + +
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + elem % 2 == 1 + + + 1 == 1 + + + +
+
+ + + call_count == 1 + + + 1 == 1 + + + + + make_data().size() == test_count + + + 6 == 6 + + + +
+ +
+ + + + Catch::makeStream( "-" )->isConsole() + + + true + + + + + + + + throwCustom() + + + throwCustom() + + + custom exception - not std + + + + + + + + throwCustom(), std::exception + + + throwCustom(), std::exception + + + custom exception - not std + + + + + + + custom std exception + + + + + + + 101.000001 != Approx(100).epsilon(0.01) + + + 101.00000099999999748 != Approx( 100.0 ) + + + + + std::pow(10, -5) != Approx(std::pow(10, -7)) + + + 0.00001 != Approx( 0.0000001 ) + + + + + + + + enumInfo->lookup(0) == "Value1" + + + Value1 == "Value1" + + + + + enumInfo->lookup(1) == "Value2" + + + Value2 == "Value2" + + + + + enumInfo->lookup(3) == "{** unexpected enum value **}" + + + {** unexpected enum value **} +== +"{** unexpected enum value **}" + + + + + + + This generator is empty + + + + + + + Catch::makeStream( "" )->isConsole() + + + true + + + + + + + + testStringForMatching(), EndsWith( "Substring" ) + + + "this string contains 'abc' as a substring" ends with: "Substring" + + + + + testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) + + + "this string contains 'abc' as a substring" ends with: "this" (case insensitive) + + + + + + + + stringify( EnumClass3::Value1 ) == "Value1" + + + "Value1" == "Value1" + + + + + stringify( EnumClass3::Value2 ) == "Value2" + + + "Value2" == "Value2" + + + + + stringify( EnumClass3::Value3 ) == "Value3" + + + "Value3" == "Value3" + + + + + stringify( EnumClass3::Value4 ) == "{** unexpected enum value **}" + + + "{** unexpected enum value **}" +== +"{** unexpected enum value **}" + + + + + stringify( ec3 ) == "Value2" + + + "Value2" == "Value2" + + + + + + + + stringify( Bikeshed::Colours::Red ) == "Red" + + + "Red" == "Red" + + + + + stringify( Bikeshed::Colours::Blue ) == "Blue" + + + "Blue" == "Blue" + + + + + + + + 101.01 != Approx(100).epsilon(0.01) + + + 101.01000000000000512 != Approx( 100.0 ) + + + + + + + + data.int_seven == 6 + + + 7 == 6 + + + + + data.int_seven == 8 + + + 7 == 8 + + + + + data.int_seven == 0 + + + 7 == 0 + + + + + data.float_nine_point_one == Approx( 9.11f ) + + + 9.100000381f +== +Approx( 9.10999965667724609 ) + + + + + data.float_nine_point_one == Approx( 9.0f ) + + + 9.100000381f == Approx( 9.0 ) + + + + + data.float_nine_point_one == Approx( 1 ) + + + 9.100000381f == Approx( 1.0 ) + + + + + data.float_nine_point_one == Approx( 0 ) + + + 9.100000381f == Approx( 0.0 ) + + + + + data.double_pi == Approx( 3.1415 ) + + + 3.14159265350000005 +== +Approx( 3.14150000000000018 ) + + + + + data.str_hello == "goodbye" + + + "hello" == "goodbye" + + + + + data.str_hello == "hell" + + + "hello" == "hell" + + + + + data.str_hello == "hello1" + + + "hello" == "hello1" + + + + + data.str_hello.size() == 6 + + + 5 == 6 + + + + + x == Approx( 1.301 ) + + + 1.30000000000000027 +== +Approx( 1.30099999999999993 ) + + + + + + + + data.int_seven == 7 + + + 7 == 7 + + + + + data.float_nine_point_one == Approx( 9.1f ) + + + 9.100000381f +== +Approx( 9.10000038146972656 ) + + + + + data.double_pi == Approx( 3.1415926535 ) + + + 3.14159265350000005 +== +Approx( 3.14159265350000005 ) + + + + + data.str_hello == "hello" + + + "hello" == "hello" + + + + + "hello" == data.str_hello + + + "hello" == "hello" + + + + + data.str_hello.size() == 5 + + + 5 == 5 + + + + + x == Approx( 1.3 ) + + + 1.30000000000000027 +== +Approx( 1.30000000000000004 ) + + + + + + + + testStringForMatching(), Equals( "this string contains 'abc' as a substring" ) + + + "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" + + + + + testStringForMatching(), Equals( "this string contains 'ABC' as a substring", Catch::CaseSensitive::No ) + + + "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" (case insensitive) + + + + + + + + testStringForMatching(), Equals( "this string contains 'ABC' as a substring" ) + + + "this string contains 'abc' as a substring" equals: "this string contains 'ABC' as a substring" + + + + + testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) + + + "this string contains 'abc' as a substring" equals: "something else" (case insensitive) + + + + + + + + ::Catch::Detail::stringify(WhatException{}) == "This exception has overridden what() method" + + + "This exception has overridden what() method" +== +"This exception has overridden what() method" + + + + + ::Catch::Detail::stringify(OperatorException{}) == "OperatorException" + + + "OperatorException" == "OperatorException" + + + + + ::Catch::Detail::stringify(StringMakerException{}) == "StringMakerException" + + + "StringMakerException" +== +"StringMakerException" + + + + + +
+ + + doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } + + + doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } + + + + + doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } + + + doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } + + + +
+
+ + + throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } + + + throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } + + + Unknown exception + + + + + throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } + + + throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } + + + Unknown exception + + + +
+
+ + + throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } + + + SpecialException::what special exception has value of 1 + + + + + throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } + + + SpecialException::what special exception has value of 1 + + + +
+ +
+ + + + throwsSpecialException( 1 ), SpecialException, ExceptionMatcher{ 1 } + + + SpecialException::what special exception has value of 1 + + + + + throwsSpecialException( 2 ), SpecialException, ExceptionMatcher{ 2 } + + + SpecialException::what special exception has value of 2 + + + + + + + + throwsDerivedException(), DerivedException, MessageMatches( StartsWith( "Derived" ) ) + + + DerivedException::what matches "starts with: "Derived"" + + + + + throwsDerivedException(), DerivedException, MessageMatches( EndsWith( "::what" ) ) + + + DerivedException::what matches "ends with: "::what"" + + + + + throwsDerivedException(), DerivedException, MessageMatches( !StartsWith( "::what" ) ) + + + DerivedException::what matches "not starts with: "::what"" + + + + + throwsSpecialException( 2 ), SpecialException, MessageMatches( StartsWith( "Special" ) ) + + + SpecialException::what matches "starts with: "Special"" + + + + + +
+ + + thisThrows(), "expected exception" + + + "expected exception" equals: "expected exception" + + + +
+
+ + + thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) + + + "expected exception" equals: "expected exception" (case insensitive) + + + +
+
+ + + thisThrows(), StartsWith( "expected" ) + + + "expected exception" starts with: "expected" + + + + + thisThrows(), EndsWith( "exception" ) + + + "expected exception" ends with: "exception" + + + + + thisThrows(), ContainsSubstring( "except" ) + + + "expected exception" contains: "except" + + + + + thisThrows(), ContainsSubstring( "exCept", Catch::CaseSensitive::No ) + + + "expected exception" contains: "except" (case insensitive) + + + +
+ +
+ + + + throwsDerivedException(), DerivedException, Message( "DerivedException::what" ) + + + DerivedException::what exception message matches "DerivedException::what" + + + + + throwsDerivedException(), DerivedException, !Message( "derivedexception::what" ) + + + DerivedException::what not exception message matches "derivedexception::what" + + + + + throwsSpecialException( 2 ), SpecialException, !Message( "DerivedException::what" ) + + + SpecialException::what not exception message matches "DerivedException::what" + + + + + throwsSpecialException( 2 ), SpecialException, Message( "SpecialException::what" ) + + + SpecialException::what exception message matches "SpecialException::what" + + + + + + + + thisThrows(), std::string + + + thisThrows(), std::string + + + expected exception + + + + + thisDoesntThrow(), std::domain_error + + + thisDoesntThrow(), std::domain_error + + + + + thisThrows() + + + thisThrows() + + + expected exception + + + + + + + This is a failure + + + + + + + + + + This is a failure + + + This message appears in the output + + + + + + + Factorial(0) == 1 + + + 1 == 1 + + + + + Factorial(1) == 1 + + + 1 == 1 + + + + + Factorial(2) == 2 + + + 2 == 2 + + + + + Factorial(3) == 6 + + + 6 == 6 + + + + + Factorial(10) == 3628800 + + + 3628800 (0x) == 3628800 (0x) + + + + + + + + filter( []( int ) { return false; }, value( 3 ) ), Catch::GeneratorException + + + filter( []( int ) { return false; }, value( 3 ) ), Catch::GeneratorException + + + + + +
+ + + 10., WithinRel( 11.1, 0.1 ) + + + 10.0 and 11.09999999999999964 are within 10% of each other + + + + + 10., !WithinRel( 11.2, 0.1 ) + + + 10.0 not and 11.19999999999999929 are within 10% of each other + + + + + 1., !WithinRel( 0., 0.99 ) + + + 1.0 not and 0.0 are within 99% of each other + + + + + -0., WithinRel( 0. ) + + + -0.0 and 0.0 are within 2.22045e-12% of each other + + +
+ + + v1, WithinRel( v2 ) + + + 0.0 and 0.0 are within 2.22045e-12% of each other + + + +
+ +
+
+ + + 1., WithinAbs( 1., 0 ) + + + 1.0 is within 0.0 of 1.0 + + + + + 0., WithinAbs( 1., 1 ) + + + 0.0 is within 1.0 of 1.0 + + + + + 0., !WithinAbs( 1., 0.99 ) + + + 0.0 not is within 0.98999999999999999 of 1.0 + + + + + 0., !WithinAbs( 1., 0.99 ) + + + 0.0 not is within 0.98999999999999999 of 1.0 + + + + + 11., !WithinAbs( 10., 0.5 ) + + + 11.0 not is within 0.5 of 10.0 + + + + + 10., !WithinAbs( 11., 0.5 ) + + + 10.0 not is within 0.5 of 11.0 + + + + + -10., WithinAbs( -10., 0.5 ) + + + -10.0 is within 0.5 of -10.0 + + + + + -10., WithinAbs( -9.6, 0.5 ) + + + -10.0 is within 0.5 of -9.59999999999999964 + + + +
+
+ + + 1., WithinULP( 1., 0 ) + + + 1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00]) + + + + + nextafter( 1., 2. ), WithinULP( 1., 1 ) + + + 1.00000000000000022 is within 1 ULPs of 1.0000000000000000e+00 ([9.9999999999999989e-01, 1.0000000000000002e+00]) + + + + + 0., WithinULP( nextafter( 0., 1. ), 1 ) + + + 0.0 is within 1 ULPs of 4.9406564584124654e-324 ([0.0000000000000000e+00, 9.8813129168249309e-324]) + + + + + 1., WithinULP( nextafter( 1., 0. ), 1 ) + + + 1.0 is within 1 ULPs of 9.9999999999999989e-01 ([9.9999999999999978e-01, 1.0000000000000000e+00]) + + + + + 1., !WithinULP( nextafter( 1., 2. ), 0 ) + + + 1.0 not is within 0 ULPs of 1.0000000000000002e+00 ([1.0000000000000002e+00, 1.0000000000000002e+00]) + + + + + 1., WithinULP( 1., 0 ) + + + 1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00]) + + + + + -0., WithinULP( 0., 0 ) + + + -0.0 is within 0 ULPs of 0.0000000000000000e+00 ([0.0000000000000000e+00, 0.0000000000000000e+00]) + + + +
+
+ + + 1., WithinAbs( 1., 0.5 ) || WithinULP( 2., 1 ) + + + 1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0000000000000000e+00 ([1.9999999999999998e+00, 2.0000000000000004e+00]) ) + + + + + 1., WithinAbs( 2., 0.5 ) || WithinULP( 1., 0 ) + + + 1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00]) ) + + + + + 0.0001, WithinAbs( 0., 0.001 ) || WithinRel( 0., 0.1 ) + + + 0.0001 ( is within 0.001 of 0.0 or and 0.0 are within 10% of each other ) + + + +
+
+ + + WithinAbs( 1., 0. ) + + + WithinAbs( 1., 0. ) + + + + + WithinAbs( 1., -1. ), std::domain_error + + + WithinAbs( 1., -1. ), std::domain_error + + + + + WithinULP( 1., 0 ) + + + WithinULP( 1., 0 ) + + + + + WithinRel( 1., 0. ) + + + WithinRel( 1., 0. ) + + + + + WithinRel( 1., -0.2 ), std::domain_error + + + WithinRel( 1., -0.2 ), std::domain_error + + + + + WithinRel( 1., 1. ), std::domain_error + + + WithinRel( 1., 1. ), std::domain_error + + + +
+
+ + + 1., !IsNaN() + + + 1.0 not is NaN + + + +
+ +
+ +
+ + + 10.f, WithinRel( 11.1f, 0.1f ) + + + 10.0f and 11.10000038146972656 are within 10% of each other + + + + + 10.f, !WithinRel( 11.2f, 0.1f ) + + + 10.0f not and 11.19999980926513672 are within 10% of each other + + + + + 1.f, !WithinRel( 0.f, 0.99f ) + + + 1.0f not and 0.0 are within 99% of each other + + + + + -0.f, WithinRel( 0.f ) + + + -0.0f and 0.0 are within 0.00119209% of each other + + +
+ + + v1, WithinRel( v2 ) + + + 0.0f and 0.0 are within 0.00119209% of each other + + + +
+ +
+
+ + + 1.f, WithinAbs( 1.f, 0 ) + + + 1.0f is within 0.0 of 1.0 + + + + + 0.f, WithinAbs( 1.f, 1 ) + + + 0.0f is within 1.0 of 1.0 + + + + + 0.f, !WithinAbs( 1.f, 0.99f ) + + + 0.0f not is within 0.99000000953674316 of 1.0 + + + + + 0.f, !WithinAbs( 1.f, 0.99f ) + + + 0.0f not is within 0.99000000953674316 of 1.0 + + + + + 0.f, WithinAbs( -0.f, 0 ) + + + 0.0f is within 0.0 of -0.0 + + + + + 11.f, !WithinAbs( 10.f, 0.5f ) + + + 11.0f not is within 0.5 of 10.0 + + + + + 10.f, !WithinAbs( 11.f, 0.5f ) + + + 10.0f not is within 0.5 of 11.0 + + + + + -10.f, WithinAbs( -10.f, 0.5f ) + + + -10.0f is within 0.5 of -10.0 + + + + + -10.f, WithinAbs( -9.6f, 0.5f ) + + + -10.0f is within 0.5 of -9.60000038146972656 + + + +
+
+ + + 1.f, WithinULP( 1.f, 0 ) + + + 1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) + + + + + -1.f, WithinULP( -1.f, 0 ) + + + -1.0f is within 0 ULPs of -1.00000000e+00f ([-1.00000000e+00, -1.00000000e+00]) + + + + + nextafter( 1.f, 2.f ), WithinULP( 1.f, 1 ) + + + 1.000000119f is within 1 ULPs of 1.00000000e+00f ([9.99999940e-01, 1.00000012e+00]) + + + + + 0.f, WithinULP( nextafter( 0.f, 1.f ), 1 ) + + + 0.0f is within 1 ULPs of 1.40129846e-45f ([0.00000000e+00, 2.80259693e-45]) + + + + + 1.f, WithinULP( nextafter( 1.f, 0.f ), 1 ) + + + 1.0f is within 1 ULPs of 9.99999940e-01f ([9.99999881e-01, 1.00000000e+00]) + + + + + 1.f, !WithinULP( nextafter( 1.f, 2.f ), 0 ) + + + 1.0f not is within 0 ULPs of 1.00000012e+00f ([1.00000012e+00, 1.00000012e+00]) + + + + + 1.f, WithinULP( 1.f, 0 ) + + + 1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) + + + + + -0.f, WithinULP( 0.f, 0 ) + + + -0.0f is within 0 ULPs of 0.00000000e+00f ([0.00000000e+00, 0.00000000e+00]) + + + +
+
+ + + 1.f, WithinAbs( 1.f, 0.5 ) || WithinULP( 1.f, 1 ) + + + 1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.00000000e+00f ([9.99999940e-01, 1.00000012e+00]) ) + + + + + 1.f, WithinAbs( 2.f, 0.5 ) || WithinULP( 1.f, 0 ) + + + 1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) ) + + + + + 0.0001f, WithinAbs( 0.f, 0.001f ) || WithinRel( 0.f, 0.1f ) + + + 0.0001f ( is within 0.00100000004749745 of 0.0 or and 0.0 are within 10% of each other ) + + + +
+
+ + + WithinAbs( 1.f, 0.f ) + + + WithinAbs( 1.f, 0.f ) + + + + + WithinAbs( 1.f, -1.f ), std::domain_error + + + WithinAbs( 1.f, -1.f ), std::domain_error + + + + + WithinULP( 1.f, 0 ) + + + WithinULP( 1.f, 0 ) + + + + + WithinULP( 1.f, static_cast<uint64_t>( -1 ) ), std::domain_error + + + WithinULP( 1.f, static_cast<uint64_t>( -1 ) ), std::domain_error + + + + + WithinRel( 1.f, 0.f ) + + + WithinRel( 1.f, 0.f ) + + + + + WithinRel( 1.f, -0.2f ), std::domain_error + + + WithinRel( 1.f, -0.2f ), std::domain_error + + + + + WithinRel( 1.f, 1.f ), std::domain_error + + + WithinRel( 1.f, 1.f ), std::domain_error + + + +
+
+ + + 1., !IsNaN() + + + 1.0 not is NaN + + + +
+ +
+ + + + i % 2 == 0 + + + 0 == 0 + + + + + i % 2 == 0 + + + 0 == 0 + + + + + i % 2 == 0 + + + 0 == 0 + + + + + i % 2 == 0 + + + 0 == 0 + + + + + +
+
+ + + i % 2 == 0 + + + 0 == 0 + + + +
+ +
+
+
+ + + i % 2 == 0 + + + 0 == 0 + + + +
+ +
+
+
+ + + i % 2 == 0 + + + 0 == 0 + + + +
+ +
+
+
+ + + filter([] (int) {return false; }, value(1)), Catch::GeneratorException + + + filter([] (int) {return false; }, value(1)), Catch::GeneratorException + + + +
+ +
+
+ + + i < 4 + + + 1 < 4 + + + +
+
+ + + i < 4 + + + 2 < 4 + + + +
+
+ + + i < 4 + + + 3 < 4 + + + +
+
+
+ + + i % 2 == 0 + + + 0 == 0 + + + +
+ +
+
+
+ + + i % 2 == 0 + + + 0 == 0 + + + +
+ +
+
+
+ + + i % 2 == 0 + + + 0 == 0 + + + +
+ +
+
+
+ + + i.size() == 1 + + + 1 == 1 + + + +
+ +
+
+
+ + + i.size() == 1 + + + 1 == 1 + + + +
+ +
+
+
+ + + i.size() == 1 + + + 1 == 1 + + + +
+ +
+
+
+ + + i.size() == 1 + + + 1 == 1 + + + +
+ +
+
+
+ + + i.size() == 1 + + + 1 == 1 + + + +
+ +
+
+
+ + + i.size() == 1 + + + 1 == 1 + + + +
+ +
+
+ + + j > 0 + + + 1 > 0 + + + +
+
+ + + j > 0 + + + 2 > 0 + + + +
+
+ + + j > 0 + + + 3 > 0 + + + +
+
+ + + j > 0 + + + 1 > 0 + + + +
+
+ + + j > 0 + + + 2 > 0 + + + +
+
+ + + j > 0 + + + 3 > 0 + + + +
+
+
+ + + chunk2.size() == 2 + + + 2 == 2 + + + + + chunk2.front() == chunk2.back() + + + 1 == 1 + + + +
+ +
+
+
+ + + chunk2.size() == 2 + + + 2 == 2 + + + + + chunk2.front() == chunk2.back() + + + 2 == 2 + + + +
+ +
+
+
+ + + chunk2.size() == 2 + + + 2 == 2 + + + + + chunk2.front() == chunk2.back() + + + 3 == 3 + + + +
+ +
+
+
+ + + chunk2.size() == 2 + + + 2 == 2 + + + + + chunk2.front() == chunk2.back() + + + 1 == 1 + + + + + chunk2.front() < 3 + + + 1 < 3 + + + +
+ +
+
+
+ + + chunk2.size() == 2 + + + 2 == 2 + + + + + chunk2.front() == chunk2.back() + + + 2 == 2 + + + + + chunk2.front() < 3 + + + 2 < 3 + + + +
+ +
+
+
+ + + chunk2.size() == 0 + + + 0 == 0 + + + +
+ +
+
+
+ + + chunk2.size() == 0 + + + 0 == 0 + + + +
+ +
+
+
+ + + chunk2.size() == 0 + + + 0 == 0 + + + +
+ +
+
+
+ + + chunk(2, value(1)), Catch::GeneratorException + + + chunk(2, value(1)), Catch::GeneratorException + + + +
+ +
+ +
+ +
+ + + j < i + + + -3 < 1 + + + +
+
+ + + j < i + + + -2 < 1 + + + +
+
+ + + j < i + + + -1 < 1 + + + +
+
+ + + 4u * i > str.size() + + + 4 > 1 + + + +
+
+ + + 4u * i > str.size() + + + 4 > 2 + + + +
+
+ + + 4u * i > str.size() + + + 4 > 3 + + + +
+
+ + + j < i + + + -3 < 2 + + + +
+
+ + + j < i + + + -2 < 2 + + + +
+
+ + + j < i + + + -1 < 2 + + + +
+
+ + + 4u * i > str.size() + + + 8 > 1 + + + +
+
+ + + 4u * i > str.size() + + + 8 > 2 + + + +
+
+ + + 4u * i > str.size() + + + 8 > 3 + + + +
+
+ + + j < i + + + -3 < 3 + + + +
+
+ + + j < i + + + -2 < 3 + + + +
+
+ + + j < i + + + -1 < 3 + + + +
+
+ + + 4u * i > str.size() + + + 12 > 1 + + + +
+
+ + + 4u * i > str.size() + + + 12 > 2 + + + +
+
+ + + 4u * i > str.size() + + + 12 > 3 + + + +
+ +
+ +
+ + + gen.get() == 123 + + + 123 == 123 + + + + + !(gen.next()) + + + !false + + + +
+
+ + + gen.get() == 1 + + + 1 == 1 + + + + + gen.next() + + + true + + + + + gen.get() == 3 + + + 3 == 3 + + + + + gen.next() + + + true + + + + + gen.get() == 5 + + + 5 == 5 + + + + + !(gen.next()) + + + !false + + + +
+
+ + + gen.get() == 1 + + + 1 == 1 + + + + + gen.next() + + + true + + + + + gen.get() == 5 + + + 5 == 5 + + + + + gen.next() + + + true + + + + + gen.get() == 2 + + + 2 == 2 + + + + + gen.next() + + + true + + + + + gen.get() == 4 + + + 4 == 4 + + + + + gen.next() + + + true + + + + + gen.get() == 0 + + + 0 == 0 + + + + + !(gen.next()) + + + !false + + + +
+
+ + + gen.get().size() == 2 + + + 2 == 2 + + + + + gen.get() == "aa" + + + "aa" == "aa" + + + + + gen.next() + + + true + + + + + gen.get() == "bb" + + + "bb" == "bb" + + + + + gen.next() + + + true + + + + + gen.get() == "cc" + + + "cc" == "cc" + + + + + !(gen.next()) + + + !false + + + +
+
+
+ + + gen.get() == 1 + + + 1 == 1 + + + + + gen.next() + + + true + + + + + gen.get() == 3 + + + 3 == 3 + + + + + !(gen.next()) + + + !false + + + +
+ +
+
+
+ + + gen.get() == 1 + + + 1 == 1 + + + + + gen.next() + + + true + + + + + gen.get() == 3 + + + 3 == 3 + + + + + !(gen.next()) + + + !false + + + +
+ +
+
+
+ + + filter([](int) { return false; }, value(1)), Catch::GeneratorException + + + filter([](int) { return false; }, value(1)), Catch::GeneratorException + + + + + filter([](int) { return false; }, values({ 1, 2, 3 })), Catch::GeneratorException + + + filter([](int) { return false; }, values({ 1, 2, 3 })), Catch::GeneratorException + + + +
+ +
+
+
+ + + gen.get() == 1 + + + 1 == 1 + + + + + gen.next() + + + true + + + + + gen.get() == 2 + + + 2 == 2 + + + + + !(gen.next()) + + + !false + + + +
+ +
+
+
+ + + gen.get() == 1 + + + 1 == 1 + + + + + !(gen.next()) + + + !false + + + +
+ +
+
+ + + gen.get() == 2.0 + + + 2.0 == 2.0 + + + + + gen.next() + + + true + + + + + gen.get() == 4.0 + + + 4.0 == 4.0 + + + + + gen.next() + + + true + + + + + gen.get() == 6.0 + + + 6.0 == 6.0 + + + + + !(gen.next()) + + + !false + + + +
+
+ + + gen.get() == 2.0 + + + 2.0 == 2.0 + + + + + gen.next() + + + true + + + + + gen.get() == 4.0 + + + 4.0 == 4.0 + + + + + gen.next() + + + true + + + + + gen.get() == 6.0 + + + 6.0 == 6.0 + + + + + !(gen.next()) + + + !false + + + +
+
+
+ + + gen.get() == 3 + + + 3 == 3 + + + + + !(gen.next()) + + + !false + + + +
+ +
+
+
+ + + gen.get() == 1 + + + 1 == 1 + + + + + gen.next() + + + true + + + + + gen.get() == 2 + + + 2 == 2 + + + + + gen.next() + + + true + + + + + gen.get() == 3 + + + 3 == 3 + + + + + gen.next() + + + true + + + + + gen.get() == 1 + + + 1 == 1 + + + + + gen.next() + + + true + + + + + gen.get() == 2 + + + 2 == 2 + + + + + gen.next() + + + true + + + + + gen.get() == 3 + + + 3 == 3 + + + + + !(gen.next()) + + + !false + + + +
+ +
+
+
+
+ + + gen.get() == -2 + + + -2 == -2 + + + + + gen.next() + + + true + + + + + gen.get() == -1 + + + -1 == -1 + + + + + gen.next() + + + true + + + + + gen.get() == 0 + + + 0 == 0 + + + + + gen.next() + + + true + + + + + gen.get() == 1 + + + 1 == 1 + + + + + !(gen.next()) + + + !false + + + +
+ +
+ +
+
+
+
+ + + gen.get() == 2 + + + 2 == 2 + + + + + gen.next() + + + true + + + + + gen.get() == 1 + + + 1 == 1 + + + + + gen.next() + + + true + + + + + gen.get() == 0 + + + 0 == 0 + + + + + gen.next() + + + true + + + + + gen.get() == -1 + + + -1 == -1 + + + + + !(gen.next()) + + + !false + + + +
+ +
+ +
+
+
+
+
+ + + gen.get() == -7 + + + -7 == -7 + + + + + gen.next() + + + true + + + + + gen.get() == -4 + + + -4 == -4 + + + + + gen.next() + + + true + + + + + gen.get() == -1 + + + -1 == -1 + + + + + gen.next() + + + true + + + + + gen.get() == 2 + + + 2 == 2 + + + + + !(gen.next()) + + + !false + + + +
+ +
+ +
+ +
+
+
+
+
+ + + gen.get() == -7 + + + -7 == -7 + + + + + gen.next() + + + true + + + + + gen.get() == -4 + + + -4 == -4 + + + + + gen.next() + + + true + + + + + gen.get() == -1 + + + -1 == -1 + + + + + gen.next() + + + true + + + + + gen.get() == 2 + + + 2 == 2 + + + + + !(gen.next()) + + + !false + + + +
+ +
+ +
+ +
+
+
+
+
+ + + gen.get() == -7 + + + -7 == -7 + + + + + gen.next() + + + true + + + + + gen.get() == -4 + + + -4 == -4 + + + + + gen.next() + + + true + + + + + gen.get() == -1 + + + -1 == -1 + + + + + gen.next() + + + true + + + + + gen.get() == 2 + + + 2 == 2 + + + + + gen.next() + + + true + + + + + gen.get() == 5 + + + 5 == 5 + + + + + !(gen.next()) + + + !false + + + +
+ +
+ +
+ +
+
+
+
+
+ + Current expected value is -1 + + + + gen.get() == Approx(expected) + + + -1.0 == Approx( -1.0 ) + + + + Current expected value is -1 + + + + gen.next() + + + true + + + + Current expected value is -0.9 + + + + gen.get() == Approx(expected) + + + -0.90000000000000002 +== +Approx( -0.90000000000000002 ) + + + + Current expected value is -0.9 + + + + gen.next() + + + true + + + + Current expected value is -0.8 + + + + gen.get() == Approx(expected) + + + -0.80000000000000004 +== +Approx( -0.80000000000000004 ) + + + + Current expected value is -0.8 + + + + gen.next() + + + true + + + + Current expected value is -0.7 + + + + gen.get() == Approx(expected) + + + -0.70000000000000007 +== +Approx( -0.70000000000000007 ) + + + + Current expected value is -0.7 + + + + gen.next() + + + true + + + + Current expected value is -0.6 + + + + gen.get() == Approx(expected) + + + -0.60000000000000009 +== +Approx( -0.60000000000000009 ) + + + + Current expected value is -0.6 + + + + gen.next() + + + true + + + + Current expected value is -0.5 + + + + gen.get() == Approx(expected) + + + -0.50000000000000011 +== +Approx( -0.50000000000000011 ) + + + + Current expected value is -0.5 + + + + gen.next() + + + true + + + + Current expected value is -0.4 + + + + gen.get() == Approx(expected) + + + -0.40000000000000013 +== +Approx( -0.40000000000000013 ) + + + + Current expected value is -0.4 + + + + gen.next() + + + true + + + + Current expected value is -0.3 + + + + gen.get() == Approx(expected) + + + -0.30000000000000016 +== +Approx( -0.30000000000000016 ) + + + + Current expected value is -0.3 + + + + gen.next() + + + true + + + + Current expected value is -0.2 + + + + gen.get() == Approx(expected) + + + -0.20000000000000015 +== +Approx( -0.20000000000000015 ) + + + + Current expected value is -0.2 + + + + gen.next() + + + true + + + + Current expected value is -0.1 + + + + gen.get() == Approx(expected) + + + -0.10000000000000014 +== +Approx( -0.10000000000000014 ) + + + + Current expected value is -0.1 + + + + gen.next() + + + true + + + + Current expected value is -1.38778e-16 + + + + gen.get() == Approx(expected) + + + -0.00000000000000014 +== +Approx( -0.00000000000000014 ) + + + + Current expected value is -1.38778e-16 + + + + gen.next() + + + true + + + + Current expected value is 0.1 + + + + gen.get() == Approx(expected) + + + 0.09999999999999987 +== +Approx( 0.09999999999999987 ) + + + + Current expected value is 0.1 + + + + gen.next() + + + true + + + + Current expected value is 0.2 + + + + gen.get() == Approx(expected) + + + 0.19999999999999987 +== +Approx( 0.19999999999999987 ) + + + + Current expected value is 0.2 + + + + gen.next() + + + true + + + + Current expected value is 0.3 + + + + gen.get() == Approx(expected) + + + 0.29999999999999988 +== +Approx( 0.29999999999999988 ) + + + + Current expected value is 0.3 + + + + gen.next() + + + true + + + + Current expected value is 0.4 + + + + gen.get() == Approx(expected) + + + 0.39999999999999991 +== +Approx( 0.39999999999999991 ) + + + + Current expected value is 0.4 + + + + gen.next() + + + true + + + + Current expected value is 0.5 + + + + gen.get() == Approx(expected) + + + 0.49999999999999989 +== +Approx( 0.49999999999999989 ) + + + + Current expected value is 0.5 + + + + gen.next() + + + true + + + + Current expected value is 0.6 + + + + gen.get() == Approx(expected) + + + 0.59999999999999987 +== +Approx( 0.59999999999999987 ) + + + + Current expected value is 0.6 + + + + gen.next() + + + true + + + + Current expected value is 0.7 + + + + gen.get() == Approx(expected) + + + 0.69999999999999984 +== +Approx( 0.69999999999999984 ) + + + + Current expected value is 0.7 + + + + gen.next() + + + true + + + + Current expected value is 0.8 + + + + gen.get() == Approx(expected) + + + 0.79999999999999982 +== +Approx( 0.79999999999999982 ) + + + + Current expected value is 0.8 + + + + gen.next() + + + true + + + + Current expected value is 0.9 + + + + gen.get() == Approx(expected) + + + 0.8999999999999998 +== +Approx( 0.8999999999999998 ) + + + + Current expected value is 0.9 + + + + gen.next() + + + true + + + + + gen.get() == Approx( rangeEnd ) + + + 0.99999999999999978 == Approx( 1.0 ) + + + + + !(gen.next()) + + + !false + + + +
+ +
+ +
+ +
+
+
+
+
+ + Current expected value is -1 + + + + gen.get() == Approx(expected) + + + -1.0 == Approx( -1.0 ) + + + + Current expected value is -1 + + + + gen.next() + + + true + + + + Current expected value is -0.7 + + + + gen.get() == Approx(expected) + + + -0.69999999999999996 +== +Approx( -0.69999999999999996 ) + + + + Current expected value is -0.7 + + + + gen.next() + + + true + + + + Current expected value is -0.4 + + + + gen.get() == Approx(expected) + + + -0.39999999999999997 +== +Approx( -0.39999999999999997 ) + + + + Current expected value is -0.4 + + + + gen.next() + + + true + + + + Current expected value is -0.1 + + + + gen.get() == Approx(expected) + + + -0.09999999999999998 +== +Approx( -0.09999999999999998 ) + + + + Current expected value is -0.1 + + + + gen.next() + + + true + + + + Current expected value is 0.2 + + + + gen.get() == Approx(expected) + + + 0.20000000000000001 +== +Approx( 0.20000000000000001 ) + + + + Current expected value is 0.2 + + + + gen.next() + + + true + + + + Current expected value is 0.5 + + + + gen.get() == Approx(expected) + + + 0.5 == Approx( 0.5 ) + + + + Current expected value is 0.5 + + + + gen.next() + + + true + + + + + !(gen.next()) + + + !false + + + +
+ +
+ +
+ +
+
+
+
+
+ + Current expected value is -1 + + + + gen.get() == Approx(expected) + + + -1.0 == Approx( -1.0 ) + + + + Current expected value is -1 + + + + gen.next() + + + true + + + + Current expected value is -0.7 + + + + gen.get() == Approx(expected) + + + -0.69999999999999996 +== +Approx( -0.69999999999999996 ) + + + + Current expected value is -0.7 + + + + gen.next() + + + true + + + + Current expected value is -0.4 + + + + gen.get() == Approx(expected) + + + -0.39999999999999997 +== +Approx( -0.39999999999999997 ) + + + + Current expected value is -0.4 + + + + gen.next() + + + true + + + + Current expected value is -0.1 + + + + gen.get() == Approx(expected) + + + -0.09999999999999998 +== +Approx( -0.09999999999999998 ) + + + + Current expected value is -0.1 + + + + gen.next() + + + true + + + + Current expected value is 0.2 + + + + gen.get() == Approx(expected) + + + 0.20000000000000001 +== +Approx( 0.20000000000000001 ) + + + + Current expected value is 0.2 + + + + gen.next() + + + true + + + + Current expected value is 0.5 + + + + gen.get() == Approx(expected) + + + 0.5 == Approx( 0.5 ) + + + + Current expected value is 0.5 + + + + gen.next() + + + true + + + + + !(gen.next()) + + + !false + + + +
+ +
+ +
+ +
+
+
+
+
+ + + gen.get() == 5 + + + 5 == 5 + + + + + gen.next() + + + true + + + + + gen.get() == 2 + + + 2 == 2 + + + + + gen.next() + + + true + + + + + gen.get() == -1 + + + -1 == -1 + + + + + gen.next() + + + true + + + + + gen.get() == -4 + + + -4 == -4 + + + + + !(gen.next()) + + + !false + + + +
+ +
+ +
+ +
+
+
+
+
+ + + gen.get() == 5 + + + 5 == 5 + + + + + gen.next() + + + true + + + + + gen.get() == 2 + + + 2 == 2 + + + + + gen.next() + + + true + + + + + gen.get() == -1 + + + -1 == -1 + + + + + gen.next() + + + true + + + + + gen.get() == -4 + + + -4 == -4 + + + + + !(gen.next()) + + + !false + + + +
+ +
+ +
+ +
+
+
+
+
+ + + gen.get() == 5 + + + 5 == 5 + + + + + gen.next() + + + true + + + + + gen.get() == 2 + + + 2 == 2 + + + + + gen.next() + + + true + + + + + gen.get() == -1 + + + -1 == -1 + + + + + gen.next() + + + true + + + + + gen.get() == -4 + + + -4 == -4 + + + + + gen.next() + + + true + + + + + gen.get() == -7 + + + -7 == -7 + + + + + !(gen.next()) + + + !false + + + +
+ +
+ +
+ +
+ +
+ + + + d >= Approx( 1.22 ) + + + 1.22999999999999998 +>= +Approx( 1.21999999999999997 ) + + + + + d >= Approx( 1.23 ) + + + 1.22999999999999998 +>= +Approx( 1.22999999999999998 ) + + + + + !(d >= Approx( 1.24 )) + + + !(1.22999999999999998 +>= +Approx( 1.23999999999999999 )) + + + + + d >= Approx( 1.24 ).epsilon(0.1) + + + 1.22999999999999998 +>= +Approx( 1.23999999999999999 ) + + + + + + + + h1( dummy ) != h2( dummy ) + + + 3422778688 (0x) +!= +130711275 (0x) + + + + + + + + h1( dummy ) == h2( dummy ) + + + 3422778688 (0x) +== +3422778688 (0x) + + + + + +
+ + + h( dummy1 ) != h( dummy2 ) + + + 2903002874 (0x) +!= +2668622104 (0x) + + + +
+
+ + + h( dummy1 ) != h( dummy2 ) + + + 2673152918 (0x) +!= +3916075712 (0x) + + + +
+
+ + + h( dummy1 ) != h( dummy2 ) + + + 2074929312 (0x) +!= +3429949824 (0x) + + + +
+ +
+ + + + h( dummy ) == h( dummy ) + + + 3422778688 (0x) +== +3422778688 (0x) + + + + + + + This info has multiple parts. + + + This unscoped info has multiple parts. + + + Show infos! + + + + + + this is a message + + + this is a warning + + + + + + this message should be logged + + + so should this + + + + a == 1 + + + 2 == 1 + + + + + + + this message may be logged later + + + + a == 2 + + + 2 == 2 + + + + this message may be logged later + + + this message should be logged + + + + a == 1 + + + 2 == 1 + + + + this message may be logged later + + + this message should be logged + + + and this, but later + + + + a == 0 + + + 2 == 0 + + + + this message may be logged later + + + this message should be logged + + + and this, but later + + + but not this + + + + a == 2 + + + 2 == 2 + + + + + + + current counter 0 + + + i := 0 + + + + i < 10 + + + 0 < 10 + + + + current counter 1 + + + i := 1 + + + + i < 10 + + + 1 < 10 + + + + current counter 2 + + + i := 2 + + + + i < 10 + + + 2 < 10 + + + + current counter 3 + + + i := 3 + + + + i < 10 + + + 3 < 10 + + + + current counter 4 + + + i := 4 + + + + i < 10 + + + 4 < 10 + + + + current counter 5 + + + i := 5 + + + + i < 10 + + + 5 < 10 + + + + current counter 6 + + + i := 6 + + + + i < 10 + + + 6 < 10 + + + + current counter 7 + + + i := 7 + + + + i < 10 + + + 7 < 10 + + + + current counter 8 + + + i := 8 + + + + i < 10 + + + 8 < 10 + + + + current counter 9 + + + i := 9 + + + + i < 10 + + + 9 < 10 + + + + current counter 10 + + + i := 10 + + + + i < 10 + + + 10 < 10 + + + + + + + + Dummy + + + Dummy + + + Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE + + + + + + + + data.int_seven != 7 + + + 7 != 7 + + + + + data.float_nine_point_one != Approx( 9.1f ) + + + 9.100000381f +!= +Approx( 9.10000038146972656 ) + + + + + data.double_pi != Approx( 3.1415926535 ) + + + 3.14159265350000005 +!= +Approx( 3.14159265350000005 ) + + + + + data.str_hello != "hello" + + + "hello" != "hello" + + + + + data.str_hello.size() != 5 + + + 5 != 5 + + + + + + + + data.int_seven != 6 + + + 7 != 6 + + + + + data.int_seven != 8 + + + 7 != 8 + + + + + data.float_nine_point_one != Approx( 9.11f ) + + + 9.100000381f +!= +Approx( 9.10999965667724609 ) + + + + + data.float_nine_point_one != Approx( 9.0f ) + + + 9.100000381f != Approx( 9.0 ) + + + + + data.float_nine_point_one != Approx( 1 ) + + + 9.100000381f != Approx( 1.0 ) + + + + + data.float_nine_point_one != Approx( 0 ) + + + 9.100000381f != Approx( 0.0 ) + + + + + data.double_pi != Approx( 3.1415 ) + + + 3.14159265350000005 +!= +Approx( 3.14150000000000018 ) + + + + + data.str_hello != "goodbye" + + + "hello" != "goodbye" + + + + + data.str_hello != "hell" + + + "hello" != "hell" + + + + + data.str_hello != "hello1" + + + "hello" != "hello1" + + + + + data.str_hello.size() != 6 + + + 5 != 6 + + + + + +
+ + + stream.str() == "" + + + "" == "" + + + +
+
+ + + stream.str() == "{\n}" + + + "{ +}" +== +"{ +}" + + + +
+
+ + + stream.str(), ContainsSubstring( "\"int\": 1," ) && ContainsSubstring( "\"double\": 1.5," ) && ContainsSubstring( "\"true\": true," ) && ContainsSubstring( "\"false\": false," ) && ContainsSubstring( "\"string\": \"this is a string\"," ) && ContainsSubstring( "\"array\": [\n 1,\n 2\n ]\n}" ) + + + "{ + "int": 1, + "double": 1.5, + "true": true, + "false": false, + "string": "this is a string", + "array": [ + 1, + 2 + ] +}" ( contains: ""int": 1," and contains: ""double": 1.5," and contains: ""true": true," and contains: ""false": false," and contains: ""string": "this is a string"," and contains: ""array": [ + 1, + 2 + ] +}" ) + + + +
+
+ + + stream.str(), ContainsSubstring( "\"empty_object\": {\n }," ) && ContainsSubstring( "\"fully_object\": {\n \"key\": 1\n }" ) + + + "{ + "empty_object": { + }, + "fully_object": { + "key": 1 + } +}" ( contains: ""empty_object": { + }," and contains: ""fully_object": { + "key": 1 + }" ) + + + +
+
+ + + stream.str() == "[\n]" + + + "[ +]" +== +"[ +]" + + + +
+
+ + + stream.str() == "[\n 1,\n 1.5,\n true,\n false,\n \"this is a string\",\n {\n \"object\": 42\n },\n [\n \"array\",\n 42.5\n ]\n]" + + + "[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] +]" +== +"[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] +]" + + + +
+
+ + + stream.str() == "{\n}" + + + "{ +}" +== +"{ +}" + + + +
+
+ + + stream.str() == "[\n]" + + + "[ +]" +== +"[ +]" + + + +
+
+ + + stream.str() == "\"custom\"" + + + ""custom"" == ""custom"" + + + +
+ +
+ +
+ + + sstream.str() == "\"\\\"\"" + + + ""\""" == ""\""" + + + +
+
+ + + sstream.str() == "\"\\\\\"" + + + ""\\"" == ""\\"" + + + +
+
+ + + sstream.str() == "\"/\"" + + + ""/"" == ""/"" + + + +
+
+ + + sstream.str() == "\"\\b\"" + + + ""\b"" == ""\b"" + + + +
+
+ + + sstream.str() == "\"\\f\"" + + + ""\f"" == ""\f"" + + + +
+
+ + + sstream.str() == "\"\\n\"" + + + ""\n"" == ""\n"" + + + +
+
+ + + sstream.str() == "\"\\r\"" + + + ""\r"" == ""\r"" + + + +
+
+ + + sstream.str() == "\"\\t\"" + + + ""\t"" == ""\t"" + + + +
+
+ + + sstream.str() == "\"\\\\/\\t\\r\\n\"" + + + ""\\/\t\r\n"" == ""\\/\t\r\n"" + + + +
+ +
+ + + + []() { return true; }() + + + true + + + + + + + + d <= Approx( 1.24 ) + + + 1.22999999999999998 +<= +Approx( 1.23999999999999999 ) + + + + + d <= Approx( 1.23 ) + + + 1.22999999999999998 +<= +Approx( 1.22999999999999998 ) + + + + + !(d <= Approx( 1.22 )) + + + !(1.22999999999999998 +<= +Approx( 1.21999999999999997 )) + + + + + d <= Approx( 1.22 ).epsilon(0.1) + + + 1.22999999999999998 +<= +Approx( 1.21999999999999997 ) + + + + + + + + + + + testStringForMatching(), ContainsSubstring( "string" ) && ContainsSubstring( "abc" ) && ContainsSubstring( "substring" ) && ContainsSubstring( "contains" ) + + + "this string contains 'abc' as a substring" ( contains: "string" and contains: "abc" and contains: "substring" and contains: "contains" ) + + + + + + + + testStringForMatching(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) + + + "this string contains 'abc' as a substring" ( contains: "string" or contains: "different" or contains: "random" ) + + + + + testStringForMatching2(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) + + + "some completely different text that contains one common word" ( contains: "string" or contains: "different" or contains: "random" ) + + + + + + + + testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "substring" ) + + + "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "substring" ) + + + + + + + + testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) + + + "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" ) + + + + + + + + testStringForMatching(), !ContainsSubstring( "different" ) + + + "this string contains 'abc' as a substring" not contains: "different" + + + + + + + + testStringForMatching(), !ContainsSubstring( "substring" ) + + + "this string contains 'abc' as a substring" not contains: "substring" + + + + + +
+
+ + +
+ +
+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+
+ + +
+ +
+
+ +
+ +
+ + + + thisThrows(), "expected exception" + + + "expected exception" equals: "expected exception" + + + + + thisThrows(), "should fail" + + + "expected exception" equals: "should fail" + + + + + + + + records == expected + + + { "Hello", "world", "Goodbye", "world" } +== +{ "Hello", "world", "Goodbye", "world" } + + + + + + + + multiReporter.getPreferences().shouldRedirectStdOut == false + + + false == false + + + + + multiReporter.getPreferences().shouldReportAllAssertions == false + + + false == false + + +
+ + + multiReporter.getPreferences().shouldRedirectStdOut == true + + + true == true + + + + + multiReporter.getPreferences().shouldReportAllAssertions == false + + + false == false + + + + + multiReporter.getPreferences().shouldRedirectStdOut == true + + + true == true + + + + + multiReporter.getPreferences().shouldReportAllAssertions == true + + + true == true + + + + + multiReporter.getPreferences().shouldRedirectStdOut == true + + + true == true + + + + + multiReporter.getPreferences().shouldReportAllAssertions == true + + + true == true + + + +
+ + + multiReporter.getPreferences().shouldRedirectStdOut == false + + + false == false + + + + + multiReporter.getPreferences().shouldReportAllAssertions == false + + + false == false + + +
+ + + multiReporter.getPreferences().shouldRedirectStdOut == true + + + true == true + + + + + multiReporter.getPreferences().shouldReportAllAssertions == false + + + false == false + + + + + multiReporter.getPreferences().shouldRedirectStdOut == true + + + true == true + + + + + multiReporter.getPreferences().shouldReportAllAssertions == true + + + true == true + + + + + multiReporter.getPreferences().shouldRedirectStdOut == true + + + true == true + + + + + multiReporter.getPreferences().shouldReportAllAssertions == true + + + true == true + + + +
+ +
+ + + + values > -6 + + + 3 > -6 + + + + + values > -6 + + + 4 > -6 + + + + + values > -6 + + + 5 > -6 + + + + + values > -6 + + + 6 > -6 + + + + + values > -6 + + + -5 > -6 + + + + + values > -6 + + + -4 > -6 + + + + + values > -6 + + + 90 > -6 + + + + + values > -6 + + + 91 > -6 + + + + + values > -6 + + + 92 > -6 + + + + + values > -6 + + + 93 > -6 + + + + + values > -6 + + + 94 > -6 + + + + + values > -6 + + + 95 > -6 + + + + + values > -6 + + + 96 > -6 + + + + + values > -6 + + + 97 > -6 + + + + + values > -6 + + + 98 > -6 + + + + + values > -6 + + + 99 > -6 + + + + + + + This one ran + + + + + + custom exception + + + + + + + True + + + {?} + + + + + !False + + + true + + + + + !(False) + + + !{?} + + + + + + + + + + + data.int_seven > 7 + + + 7 > 7 + + + + + data.int_seven < 7 + + + 7 < 7 + + + + + data.int_seven > 8 + + + 7 > 8 + + + + + data.int_seven < 6 + + + 7 < 6 + + + + + data.int_seven < 0 + + + 7 < 0 + + + + + data.int_seven < -1 + + + 7 < -1 + + + + + data.int_seven >= 8 + + + 7 >= 8 + + + + + data.int_seven <= 6 + + + 7 <= 6 + + + + + data.float_nine_point_one < 9 + + + 9.100000381f < 9 + + + + + data.float_nine_point_one > 10 + + + 9.100000381f > 10 + + + + + data.float_nine_point_one > 9.2 + + + 9.100000381f > 9.19999999999999929 + + + + + data.str_hello > "hello" + + + "hello" > "hello" + + + + + data.str_hello < "hello" + + + "hello" < "hello" + + + + + data.str_hello > "hellp" + + + "hello" > "hellp" + + + + + data.str_hello > "z" + + + "hello" > "z" + + + + + data.str_hello < "hellm" + + + "hello" < "hellm" + + + + + data.str_hello < "a" + + + "hello" < "a" + + + + + data.str_hello >= "z" + + + "hello" >= "z" + + + + + data.str_hello <= "a" + + + "hello" <= "a" + + + + + + + + data.int_seven < 8 + + + 7 < 8 + + + + + data.int_seven > 6 + + + 7 > 6 + + + + + data.int_seven > 0 + + + 7 > 0 + + + + + data.int_seven > -1 + + + 7 > -1 + + + + + data.int_seven >= 7 + + + 7 >= 7 + + + + + data.int_seven >= 6 + + + 7 >= 6 + + + + + data.int_seven <= 7 + + + 7 <= 7 + + + + + data.int_seven <= 8 + + + 7 <= 8 + + + + + data.float_nine_point_one > 9 + + + 9.100000381f > 9 + + + + + data.float_nine_point_one < 10 + + + 9.100000381f < 10 + + + + + data.float_nine_point_one < 9.2 + + + 9.100000381f < 9.19999999999999929 + + + + + data.str_hello <= "hello" + + + "hello" <= "hello" + + + + + data.str_hello >= "hello" + + + "hello" >= "hello" + + + + + data.str_hello < "hellp" + + + "hello" < "hellp" + + + + + data.str_hello < "zebra" + + + "hello" < "zebra" + + + + + data.str_hello > "hellm" + + + "hello" > "hellm" + + + + + data.str_hello > "a" + + + "hello" > "a" + + + + + +
+ + + rng() == 0x + + + 4242248763 (0x) +== +4242248763 (0x) + + + + + rng() == 0x + + + 1867888929 (0x) +== +1867888929 (0x) + + + + + rng() == 0x + + + 1276619030 (0x) +== +1276619030 (0x) + + + + + rng() == 0x + + + 1911218783 (0x) +== +1911218783 (0x) + + + + + rng() == 0x + + + 1827115164 (0x) +== +1827115164 (0x) + + + +
+
+ + + rng() == 0x + + + 1472234645 (0x) +== +1472234645 (0x) + + + + + rng() == 0x + + + 868832940 (0x) +== +868832940 (0x) + + + + + rng() == 0x + + + 570883446 (0x) +== +570883446 (0x) + + + + + rng() == 0x + + + 889299803 (0x) +== +889299803 (0x) + + + + + rng() == 0x + + + 4261393167 (0x) +== +4261393167 (0x) + + + + + rng() == 0x + + + 1472234645 (0x) +== +1472234645 (0x) + + + + + rng() == 0x + + + 868832940 (0x) +== +868832940 (0x) + + + + + rng() == 0x + + + 570883446 (0x) +== +570883446 (0x) + + + + + rng() == 0x + + + 889299803 (0x) +== +889299803 (0x) + + + + + rng() == 0x + + + 4261393167 (0x) +== +4261393167 (0x) + + + +
+ +
+ +
+ + Message from section one + + +
+
+ + Message from section two + + +
+ +
+ + + + ( EvilMatcher(), EvilMatcher() ), EvilCommaOperatorUsed + + + ( EvilMatcher(), EvilMatcher() ), EvilCommaOperatorUsed + + + + + &EvilMatcher(), EvilAddressOfOperatorUsed + + + &EvilMatcher(), EvilAddressOfOperatorUsed + + + + + EvilMatcher() || ( EvilMatcher() && !EvilMatcher() ) + + + EvilMatcher() || ( EvilMatcher() && !EvilMatcher() ) + + + + + ( EvilMatcher() && EvilMatcher() ) || !EvilMatcher() + + + ( EvilMatcher() && EvilMatcher() ) || !EvilMatcher() + + + + + +
+ + + parseUInt( "0" ) == Optional<unsigned int>{ 0 } + + + {?} == {?} + + + + + parseUInt( "100" ) == Optional<unsigned int>{ 100 } + + + {?} == {?} + + + + + parseUInt( "4294967295" ) == Optional<unsigned int>{ 4294967295 } + + + {?} == {?} + + + + + parseUInt( "0x", 16 ) == Optional<unsigned int>{ 255 } + + + {?} == {?} + + + +
+
+ + + !(parseUInt( "" )) + + + !{?} + + + + + !(parseUInt( "!!KJHF*#" )) + + + !{?} + + + + + !(parseUInt( "-1" )) + + + !{?} + + + + + !(parseUInt( "4294967296" )) + + + !{?} + + + + + !(parseUInt( "42949672964294967296429496729642949672964294967296" )) + + + !{?} + + + + + !(parseUInt( "2 4" )) + + + !{?} + + + + + !(parseUInt( "0x", 10 )) + + + !{?} + + + +
+ +
+ + + + spec.hasFilters() + + + true + + + + + spec.getInvalidSpecs().empty() + + + true + + + + + spec.matches( testCase ) + + + true + + + + + +
+ + + cli.parse({ "test", "--shard-count=8" }) + + + {?} + + + + + config.shardCount == 8 + + + 8 == 8 + + + +
+
+ + + !(result) + + + !{?} + + + + + result.errorMessage(), ContainsSubstring( "Could not parse '-1' as shard count" ) + + + "Could not parse '-1' as shard count" contains: "Could not parse '-1' as shard count" + + + +
+
+ + + !(result) + + + !{?} + + + + + result.errorMessage(), ContainsSubstring( "Shard count must be positive" ) + + + "Shard count must be positive" contains: "Shard count must be positive" + + + +
+
+ + + cli.parse({ "test", "--shard-index=2" }) + + + {?} + + + + + config.shardIndex == 2 + + + 2 == 2 + + + +
+
+ + + !(result) + + + !{?} + + + + + result.errorMessage(), ContainsSubstring( "Could not parse '-12' as shard index" ) + + + "Could not parse '-12' as shard index" contains: "Could not parse '-12' as shard index" + + + +
+
+ + + cli.parse({ "test", "--shard-index=0" }) + + + {?} + + + + + config.shardIndex == 0 + + + 0 == 0 + + + +
+ +
+ + + tagString := "[tag with spaces]" + + + + spec.hasFilters() + + + true + + + + tagString := "[tag with spaces]" + + + + spec.getInvalidSpecs().empty() + + + true + + + + tagString := "[tag with spaces]" + + + + spec.matches( testCase ) + + + true + + + + tagString := "[I said "good day" sir!]" + + + + spec.hasFilters() + + + true + + + + tagString := "[I said "good day" sir!]" + + + + spec.getInvalidSpecs().empty() + + + true + + + + tagString := "[I said "good day" sir!]" + + + + spec.matches( testCase ) + + + true + + + + + +
+ + + cli.parse( { "test", "-w", "NoAssertions" } ) + + + {?} + + + + + config.warnings == WarnAbout::NoAssertions + + + 1 == 1 + + + +
+
+ + + !(cli.parse( { "test", "-w", "NoTests" } )) + + + !{?} + + + +
+
+ + + cli.parse( { "test", "--warn", "NoAssertions", "--warn", "UnmatchedTestSpec" } ) + + + {?} + + + + + config.warnings == ( WarnAbout::NoAssertions | WarnAbout::UnmatchedTestSpec ) + + + 3 == 3 + + + +
+ +
+ + + + p == 0 + + + 0 == 0 + + + + + p == pNULL + + + 0 == 0 + + + + + p != 0 + + + 0x != 0 + + + + + cp != 0 + + + 0x != 0 + + + + + cpc != 0 + + + 0x != 0 + + + + + returnsNull() == 0 + + + {null string} == 0 + + + + + returnsConstNull() == 0 + + + {null string} == 0 + + + + + 0 != p + + + 0 != 0x + + + + + +
+ + + str1.size() == 3 + 5 + + + 8 == 8 + + + + + str2.size() == 3 + 10 + + + 13 == 13 + + + +
+
+ + + str1.size() == 2 + 5 + + + 7 == 7 + + + + + str2.size() == 2 + 15 + + + 17 == 17 + + + +
+ +
+ + + + "foo", Predicate<const char*>( []( const char* const& ) { return true; } ) + + + "foo" matches undescribed predicate + + + + + +
+ + + result + + + {?} + + + + + config.processName == "" + + + "" == "" + + + +
+
+ + + result + + + {?} + + + + + config.processName == "test" + + + "test" == "test" + + + + + config.shouldDebugBreak == false + + + false == false + + + + + config.abortAfter == -1 + + + -1 == -1 + + + + + config.noThrow == false + + + false == false + + + + + config.reporterSpecifications.empty() + + + true + + + + + !(cfg.hasTestFilters()) + + + !false + + + + + cfg.getReporterSpecs().size() == 1 + + + 1 == 1 + + + + + cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, {}, {}, {} } + + + {?} == {?} + + + + + cfg.getProcessedReporterSpecs().size() == 1 + + + 1 == 1 + + + + + cfg.getProcessedReporterSpecs()[0] == Catch::ProcessedReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} } + + + {?} == {?} + + + +
+
+
+ + + result + + + {?} + + + + + cfg.hasTestFilters() + + + true + + + + + cfg.testSpec().matches(*fakeTestCase("notIncluded")) == false + + + false == false + + + + + cfg.testSpec().matches(*fakeTestCase("test1")) + + + true + + + +
+ +
+
+
+ + + result + + + {?} + + + + + cfg.hasTestFilters() + + + true + + + + + cfg.testSpec().matches(*fakeTestCase("test1")) == false + + + false == false + + + + + cfg.testSpec().matches(*fakeTestCase("alwaysIncluded")) + + + true + + + +
+ +
+
+
+ + + result + + + {?} + + + + + cfg.hasTestFilters() + + + true + + + + + cfg.testSpec().matches(*fakeTestCase("test1")) == false + + + false == false + + + + + cfg.testSpec().matches(*fakeTestCase("alwaysIncluded")) + + + true + + + +
+ +
+
+
+ + result.errorMessage() := "" + + + + result + + + {?} + + + + result.errorMessage() := "" + + + + config.reporterSpecifications == vec_Specs{ { "console", {}, {}, {} } } + + + { {?} } == { {?} } + + + +
+ +
+
+
+ + result.errorMessage() := "" + + + + result + + + {?} + + + + result.errorMessage() := "" + + + + config.reporterSpecifications == vec_Specs{ { "xml", {}, {}, {} } } + + + { {?} } == { {?} } + + + +
+ +
+
+
+ + result.errorMessage() := "" + + + + result + + + {?} + + + + result.errorMessage() := "" + + + + config.reporterSpecifications == vec_Specs{ { "junit", {}, {}, {} } } + + + { {?} } == { {?} } + + + +
+ +
+
+
+ + + !result + + + true + + + + + result.errorMessage(), ContainsSubstring("Unrecognized reporter") + + + "Unrecognized reporter, 'unsupported'. Check available with --list-reporters" contains: "Unrecognized reporter" + + + +
+ +
+
+
+ + result.errorMessage() := "" + + + + result + + + {?} + + + + result.errorMessage() := "" + + + + config.reporterSpecifications == vec_Specs{ { "console", "out.txt"s, {}, {} } } + + + { {?} } == { {?} } + + + +
+ +
+
+
+ + result.errorMessage() := "" + + + + result + + + {?} + + + + result.errorMessage() := "" + + + + config.reporterSpecifications == vec_Specs{ { "console", "C:\\Temp\\out.txt"s, {}, {} } } + + + { {?} } == { {?} } + + + +
+ +
+
+
+
+ + + cli.parse({ "test", "-r", "xml::out=output.xml", "-r", "junit::out=output-junit.xml" }) + + + {?} + + + + + config.reporterSpecifications == vec_Specs{ { "xml", "output.xml"s, {}, {} }, { "junit", "output-junit.xml"s, {}, {} } } + + + { {?}, {?} } == { {?}, {?} } + + + +
+ +
+ +
+
+
+
+ + + cli.parse({ "test", "-r", "xml::out=output.xml", "-r", "console" }) + + + {?} + + + + + config.reporterSpecifications == vec_Specs{ { "xml", "output.xml"s, {}, {} }, { "console", {}, {}, {} } } + + + { {?}, {?} } == { {?}, {?} } + + + +
+ +
+ +
+
+
+
+ + + !result + + + true + + + + + result.errorMessage(), ContainsSubstring("Only one reporter may have unspecified output file.") + + + "Only one reporter may have unspecified output file." contains: "Only one reporter may have unspecified output file." + + + +
+ +
+ +
+
+
+ + + cli.parse({"test", "-b"}) + + + {?} + + + + + config.shouldDebugBreak == true + + + true == true + + + +
+ +
+
+
+ + + cli.parse({"test", "--break"}) + + + {?} + + + + + config.shouldDebugBreak + + + true + + + +
+ +
+
+
+ + + cli.parse({"test", "-a"}) + + + {?} + + + + + config.abortAfter == 1 + + + 1 == 1 + + + +
+ +
+
+
+ + + cli.parse({"test", "-x", "2"}) + + + {?} + + + + + config.abortAfter == 2 + + + 2 == 2 + + + +
+ +
+
+
+ + + !result + + + true + + + + + result.errorMessage(), ContainsSubstring("convert") && ContainsSubstring("oops") + + + "Unable to convert 'oops' to destination type" ( contains: "convert" and contains: "oops" ) + + + +
+ +
+
+
+
+ + + cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) + + + {?} + + + + + config.waitForKeypress == std::get<1>(input) + + + 0 == 0 + + + +
+ +
+ +
+
+
+
+ + + cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) + + + {?} + + + + + config.waitForKeypress == std::get<1>(input) + + + 1 == 1 + + + +
+ +
+ +
+
+
+
+ + + cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) + + + {?} + + + + + config.waitForKeypress == std::get<1>(input) + + + 2 == 2 + + + +
+ +
+ +
+
+
+
+ + + cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) + + + {?} + + + + + config.waitForKeypress == std::get<1>(input) + + + 3 == 3 + + + +
+ +
+ +
+
+
+
+ + + !result + + + true + + + + + result.errorMessage(), ContainsSubstring("never") && ContainsSubstring("both") + + + "keypress argument must be one of: never, start, exit or both. 'sometimes' not recognised" ( contains: "never" and contains: "both" ) + + + +
+ +
+ +
+
+
+ + + cli.parse({"test", "-e"}) + + + {?} + + + + + config.noThrow + + + true + + + +
+ +
+
+
+ + + cli.parse({"test", "--nothrow"}) + + + {?} + + + + + config.noThrow + + + true + + + +
+ +
+
+
+ + + cli.parse({"test", "-o", "filename.ext"}) + + + {?} + + + + + config.defaultOutputFilename == "filename.ext" + + + "filename.ext" == "filename.ext" + + + +
+ +
+
+
+ + + cli.parse({"test", "--out", "filename.ext"}) + + + {?} + + + + + config.defaultOutputFilename == "filename.ext" + + + "filename.ext" == "filename.ext" + + + +
+ +
+
+
+ + + cli.parse({"test", "-abe"}) + + + {?} + + + + + config.abortAfter == 1 + + + 1 == 1 + + + + + config.shouldDebugBreak + + + true + + + + + config.noThrow == true + + + true == true + + + +
+ +
+
+
+ + + cli.parse({"test"}) + + + {?} + + + + + config.defaultColourMode == ColourMode::PlatformDefault + + + 0 == 0 + + + +
+ +
+
+
+ + + cli.parse( { "test", "--colour-mode", "default" } ) + + + {?} + + + + + config.defaultColourMode == ColourMode::PlatformDefault + + + 0 == 0 + + + +
+ +
+
+
+ + + cli.parse({"test", "--colour-mode", "ansi"}) + + + {?} + + + + + config.defaultColourMode == ColourMode::ANSI + + + 1 == 1 + + + +
+ +
+
+
+ + + cli.parse({"test", "--colour-mode", "none"}) + + + {?} + + + + + config.defaultColourMode == ColourMode::None + + + 3 == 3 + + + +
+ +
+
+
+ + + !result + + + true + + + + + result.errorMessage(), ContainsSubstring( "colour mode must be one of" ) + + + "colour mode must be one of: default, ansi, win32, or none. 'wrong' is not recognised" contains: "colour mode must be one of" + + + +
+ +
+
+
+ + + cli.parse({ "test", "--benchmark-samples=200" }) + + + {?} + + + + + config.benchmarkSamples == 200 + + + 200 == 200 + + + +
+ +
+
+
+ + + cli.parse({ "test", "--benchmark-resamples=20000" }) + + + {?} + + + + + config.benchmarkResamples == 20000 + + + 20000 (0x) == 20000 (0x) + + + +
+ +
+
+
+ + + cli.parse({ "test", "--benchmark-confidence-interval=0.99" }) + + + {?} + + + + + config.benchmarkConfidenceInterval == Catch::Approx(0.99) + + + 0.98999999999999999 +== +Approx( 0.98999999999999999 ) + + + +
+ +
+
+
+ + + cli.parse({ "test", "--benchmark-no-analysis" }) + + + {?} + + + + + config.benchmarkNoAnalysis + + + true + + + +
+ +
+
+
+ + + cli.parse({ "test", "--benchmark-warmup-time=10" }) + + + {?} + + + + + config.benchmarkWarmupTime == 10 + + + 10 == 10 + + + +
+ +
+ +
+ + + + std::tuple_size<TestType>::value >= 1 + + + 3 >= 1 + + + + + + + + std::tuple_size<TestType>::value >= 1 + + + 2 >= 1 + + + + + + + + std::tuple_size<TestType>::value >= 1 + + + 1 >= 1 + + + + + + + + Catch::generateRandomSeed(method) + + + Catch::generateRandomSeed(method) + + + + + Catch::generateRandomSeed(method) + + + Catch::generateRandomSeed(method) + + + + + Catch::generateRandomSeed(method) + + + Catch::generateRandomSeed(method) + + + + + + + + Catch::generateRandomSeed(static_cast<Catch::GenerateFrom>(77)) + + + Catch::generateRandomSeed(static_cast<Catch::GenerateFrom>(77)) + + + + + + + + Catch::Detail::stringify(UsesSentinel{}) == "{ }" + + + "{ }" == "{ }" + + + + + + + + truthy(false) + + + Hey, its truthy! + + + + + + + + testStringForMatching(), Matches( "this STRING contains 'abc' as a substring" ) + + + "this string contains 'abc' as a substring" matches "this STRING contains 'abc' as a substring" case sensitively + + + + + testStringForMatching(), Matches( "contains 'abc' as a substring" ) + + + "this string contains 'abc' as a substring" matches "contains 'abc' as a substring" case sensitively + + + + + testStringForMatching(), Matches( "this string contains 'abc' as a" ) + + + "this string contains 'abc' as a substring" matches "this string contains 'abc' as a" case sensitively + + + + + + + + registry.registerReporter( "with::doublecolons", Catch::Detail::make_unique<TestReporterFactory>() ), "'::' is not allowed in reporter name: 'with::doublecolons'" + + + "'::' is not allowed in reporter name: 'with::doublecolons'" equals: "'::' is not allowed in reporter name: 'with::doublecolons'" + + + + + + + + actual, !UnorderedEquals( expected ) + + + { 'a', 'b' } not UnorderedEquals: { 'c', 'b' } + + + + + + + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: Automake + + + + listingString, ContainsSubstring("fakeTag"s) + + + "All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: Automake + + + + listingString, ContainsSubstring("fake reporter"s) + + + "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: Automake + + + + listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) + + + "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: compact + + + + listingString, ContainsSubstring("fakeTag"s) + + + "All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: compact + + + + listingString, ContainsSubstring("fake reporter"s) + + + "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: compact + + + + listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) + + + "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: console + + + + listingString, ContainsSubstring("fakeTag"s) + + + "All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: console + + + + listingString, ContainsSubstring("fake reporter"s) + + + "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: console + + + + listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) + + + "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: JSON + + + + listingString, ContainsSubstring("fakeTag"s) + + + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "" + }, + "listings": { + "tags": [ + { + "aliases": [ + "fakeTag" + ], + "count": 1 + } + ]" contains: "fakeTag" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: JSON + + + + listingString, ContainsSubstring("fake reporter"s) + + + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "" + }, + "listings": { + "reporters": [ + { + "name": "fake reporter", + "description": "fake description" + } + ]" contains: "fake reporter" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: JSON + + + + listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) + + + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "" + }, + "listings": { + "tests": [ + { + "name": "fake test name", + "class-name": "", + "tags": [ + "fakeTestTag" + ], + "source-location": { + "filename": "fake-file.cpp", + "line": 123456789 + } + } + ]" ( contains: "fake test name" and contains: "fakeTestTag" ) + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: JUnit + + + + listingString, ContainsSubstring("fakeTag"s) + + + "<?xml version="1.0" encoding="UTF-8"?> +All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: JUnit + + + + listingString, ContainsSubstring("fake reporter"s) + + + "<?xml version="1.0" encoding="UTF-8"?> +Available reporters: + fake reporter: fake description + +" contains: "fake reporter" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: JUnit + + + + listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) + + + "<?xml version="1.0" encoding="UTF-8"?> +All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: SonarQube + + + + listingString, ContainsSubstring("fakeTag"s) + + + "<?xml version="1.0" encoding="UTF-8"?> +All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: SonarQube + + + + listingString, ContainsSubstring("fake reporter"s) + + + "<?xml version="1.0" encoding="UTF-8"?> +Available reporters: + fake reporter: fake description + +" contains: "fake reporter" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: SonarQube + + + + listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) + + + "<?xml version="1.0" encoding="UTF-8"?> +All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: TAP + + + + listingString, ContainsSubstring("fakeTag"s) + + + "All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: TAP + + + + listingString, ContainsSubstring("fake reporter"s) + + + "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: TAP + + + + listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) + + + "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: TeamCity + + + + listingString, ContainsSubstring("fakeTag"s) + + + "All available tags: + 1 [fakeTag] +1 tag + +" contains: "fakeTag" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: TeamCity + + + + listingString, ContainsSubstring("fake reporter"s) + + + "Available reporters: + fake reporter: fake description + +" contains: "fake reporter" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: TeamCity + + + + listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) + + + "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: XML + + + + listingString, ContainsSubstring("fakeTag"s) + + + "<?xml version="1.0" encoding="UTF-8"?> +<TagsFromMatchingTests> + <Tag> + <Count>1</Count> + <Aliases> + <Alias>fakeTag</Alias> + </Aliases> + </Tag> +</TagsFromMatchingTests>" contains: "fakeTag" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: XML + + + + listingString, ContainsSubstring("fake reporter"s) + + + "<?xml version="1.0" encoding="UTF-8"?> +<AvailableReporters> + <Reporter> + <Name>fake reporter</Name> + <Description>fake description</Description> + </Reporter> +</AvailableReporters>" contains: "fake reporter" + + + +
+ + + !(factories.empty()) + + + !false + + +
+ + Tested reporter: XML + + + + listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) + + + "<?xml version="1.0" encoding="UTF-8"?> +<MatchingTests> + <TestCase> + <Name>fake test name</Name> + <ClassName/> + <Tags>[fakeTestTag]</Tags> + <SourceInfo> + <File>fake-file.cpp</File> + <Line>123456789</Line> + </SourceInfo> + </TestCase> +</MatchingTests>" ( contains: "fake test name" and contains: "fakeTestTag" ) + + + +
+ +
+ + + + + + + + + + +
+ + + before == 0 + + + 0 == 0 + + +
+
+ + + after > before + + + 1 > 0 + + + +
+ +
+ +
+ +
+ +
+
+
+
+ + + itDoesThis() + + + true + + +
+ + + itDoesThat() + + + true + + + +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+ +
+ +
+ + + v.size() == 0 + + + 0 == 0 + + +
+
+ + + v.size() == 10 + + + 10 == 10 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + +
+
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ +
+ +
+ +
+ +
+
+ + + v.size() == 0 + + + 0 == 0 + + +
+
+ + + v.capacity() >= 10 + + + 10 >= 10 + + + + + v.size() == 0 + + + 0 == 0 + + + +
+ +
+ +
+ +
+ + + +A string sent directly to stdout + + +A string sent directly to stderr +A string sent to stderr via clog + + + + + + + d == Approx( 1.23 ) + + + 1.22999999999999998 +== +Approx( 1.22999999999999998 ) + + + + + d != Approx( 1.22 ) + + + 1.22999999999999998 +!= +Approx( 1.21999999999999997 ) + + + + + d != Approx( 1.24 ) + + + 1.22999999999999998 +!= +Approx( 1.23999999999999999 ) + + + + + d == 1.23_a + + + 1.22999999999999998 +== +Approx( 1.22999999999999998 ) + + + + + d != 1.22_a + + + 1.22999999999999998 +!= +Approx( 1.21999999999999997 ) + + + + + Approx( d ) == 1.23 + + + Approx( 1.22999999999999998 ) +== +1.22999999999999998 + + + + + Approx( d ) != 1.22 + + + Approx( 1.22999999999999998 ) +!= +1.21999999999999997 + + + + + Approx( d ) != 1.24 + + + Approx( 1.22999999999999998 ) +!= +1.23999999999999999 + + + + + +
+ +
+
+ +
+ + +Message from section one +Message from section two + + +
+ + + + testStringForMatching(), StartsWith( "This String" ) + + + "this string contains 'abc' as a substring" starts with: "This String" + + + + + testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) + + + "this string contains 'abc' as a substring" starts with: "string" (case insensitive) + + + + + +
+ + + Catch::Detail::stringify(singular) == "{ 1 }" + + + "{ 1 }" == "{ 1 }" + + + +
+
+ + + Catch::Detail::stringify(arr) == "{ 3, 2, 1 }" + + + "{ 3, 2, 1 }" == "{ 3, 2, 1 }" + + + +
+
+ + + Catch::Detail::stringify(arr) == R"({ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } })" + + + "{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }" +== +"{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }" + + + +
+ +
+ + + + testStringForMatching(), ContainsSubstring( "string" ) + + + "this string contains 'abc' as a substring" contains: "string" + + + + + testStringForMatching(), ContainsSubstring( "string", Catch::CaseSensitive::No ) + + + "this string contains 'abc' as a substring" contains: "string" (case insensitive) + + + + + testStringForMatching(), ContainsSubstring( "abc" ) + + + "this string contains 'abc' as a substring" contains: "abc" + + + + + testStringForMatching(), ContainsSubstring( "aBC", Catch::CaseSensitive::No ) + + + "this string contains 'abc' as a substring" contains: "abc" (case insensitive) + + + + + testStringForMatching(), StartsWith( "this" ) + + + "this string contains 'abc' as a substring" starts with: "this" + + + + + testStringForMatching(), StartsWith( "THIS", Catch::CaseSensitive::No ) + + + "this string contains 'abc' as a substring" starts with: "this" (case insensitive) + + + + + testStringForMatching(), EndsWith( "substring" ) + + + "this string contains 'abc' as a substring" ends with: "substring" + + + + + testStringForMatching(), EndsWith( " SuBsTrInG", Catch::CaseSensitive::No ) + + + "this string contains 'abc' as a substring" ends with: " substring" (case insensitive) + + + + + +
+ + + empty.empty() + + + true + + + + + empty.size() == 0 + + + 0 == 0 + + + + + std::strcmp( empty.data(), "" ) == 0 + + + 0 == 0 + + + +
+
+ + + s.empty() == false + + + false == false + + + + + s.size() == 5 + + + 5 == 5 + + + + + std::strcmp( rawChars, "hello" ) == 0 + + + 0 == 0 + + + + + s.data() == rawChars + + + "hello" == "hello" + + + +
+
+ + + original == "original" + + + original == "original" + + + + + original.data() + + + original.data() + + + +
+
+ + + original.begin() == copy.begin() + + + "original string" == "original string" + + + +
+
+ + + original.begin() == copy.begin() + + + "original string" == "original string" + + + +
+
+
+ + + ss.empty() == false + + + false == false + + + + + ss.size() == 5 + + + 5 == 5 + + + + + std::strncmp( ss.data(), "hello", 5 ) == 0 + + + 0 == 0 + + + + + ss == "hello" + + + hello == "hello" + + + +
+ +
+
+
+ + + ss.size() == 6 + + + 6 == 6 + + + + + std::strcmp( ss.data(), "world!" ) == 0 + + + 0 == 0 + + + +
+ +
+
+
+ + + s.data() == s2.data() + + + "hello world!" == "hello world!" + + + +
+ +
+
+
+ + + s.data() == ss.data() + + + "hello world!" == "hello world!" + + + +
+ +
+
+
+ + + s.substr(s.size() + 1, 123).empty() + + + true + + + +
+ +
+
+
+ + + std::strcmp(ss.data(), "world!") == 0 + + + 0 == 0 + + + +
+ +
+
+
+ + + s.substr(1'000'000, 1).empty() + + + true + + + +
+ +
+
+ + + reinterpret_cast<char*>(buffer1) != reinterpret_cast<char*>(buffer2) + + + "Hello" != "Hello" + + + + + left == right + + + Hello == Hello + + + + + left != left.substr(0, 3) + + + Hello != Hel + + + +
+
+
+ + + sr == "a standard string" + + + a standard string == "a standard string" + + + + + sr.size() == stdStr.size() + + + 17 == 17 + + + +
+ +
+
+
+ + + sr == "a standard string" + + + a standard string == "a standard string" + + + + + sr.size() == stdStr.size() + + + 17 == 17 + + + +
+ +
+
+
+ + + sr == "a standard string" + + + a standard string == "a standard string" + + + + + sr.size() == stdStr.size() + + + 17 == 17 + + + +
+ +
+
+
+ + + stdStr == "a stringref" + + + "a stringref" == "a stringref" + + + + + stdStr.size() == sr.size() + + + 11 == 11 + + + +
+ +
+
+
+ + + stdStr == "a stringref" + + + "a stringref" == "a stringref" + + + + + stdStr.size() == sr.size() + + + 11 == 11 + + + +
+ +
+
+ + + lhs == "some string += the stringref contents" + + + "some string += the stringref contents" +== +"some string += the stringref contents" + + + +
+
+ + + together == "abrakadabra" + + + "abrakadabra" == "abrakadabra" + + + +
+ +
+ +
+ +
+
+ +
+ +
+ + + + ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s + + + ""abc"" == ""abc"" + + + + + ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s + + + ""abc"" == ""abc"" + + + + + + + + ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s + + + ""abc"" == ""abc"" + + + + + ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s + + + ""abc"" == ""abc"" + + + + + + + + ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s + + + ""abc"" == ""abc"" + + + + + ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s + + + ""abc"" == ""abc"" + + + + + + + + minute == seconds + + + 1 m == 60 s + + + + + hour != seconds + + + 1 h != 60 s + + + + + micro != milli + + + 1 us != 1 ms + + + + + nano != micro + + + 1 ns != 1 us + + + + + + + + half_minute != femto_second + + + 1 [30/1]s != 1 fs + + + + + pico_second != atto_second + + + 1 ps != 1 as + + + + + + + + now != later + + + {iso8601-timestamp} +!= +{iso8601-timestamp} + + + + + + + + s1 == s2 + + + "if ($b == 10) { + $a = 20; +}" +== +"if ($b == 10) { + $a = 20; +} +" + + + + + +
+ + + what, ContainsSubstring( "[@zzz]" ) + + + "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "[@zzz]" + + + + + what, ContainsSubstring( "file" ) + + + "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "file" + + + + + what, ContainsSubstring( "2" ) + + + "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "2" + + + + + what, ContainsSubstring( "10" ) + + + "error: tag alias, '[@zzz]' already registered. + First seen at: file:2 + Redefined at: file:10" contains: "10" + + + +
+
+ + + registry.add( "[no ampersat]", "", Catch::SourceLineInfo( "file", 3 ) ) + + + registry.add( "[no ampersat]", "", Catch::SourceLineInfo( "file", 3 ) ) + + + + + registry.add( "[the @ is not at the start]", "", Catch::SourceLineInfo( "file", 3 ) ) + + + registry.add( "[the @ is not at the start]", "", Catch::SourceLineInfo( "file", 3 ) ) + + + + + registry.add( "@no square bracket at start]", "", Catch::SourceLineInfo( "file", 3 ) ) + + + registry.add( "@no square bracket at start]", "", Catch::SourceLineInfo( "file", 3 ) ) + + + + + registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) ) + + + registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) ) + + + +
+ +
+ + + + testCase.tags.size() == 2 + + + 2 == 2 + + + + + testCase.tags, VectorContains( Tag( "tag with spaces" ) ) && VectorContains( Tag( "I said \"good day\" sir!"_catch_sr ) ) + + + { {?}, {?} } ( Contains: {?} and Contains: {?} ) + + + + + + + + Template_Fixture<TestType>::m_a == 1 + + + 1 == 1 + + + + + + + + Template_Fixture<TestType>::m_a == 1 + + + 1 == 1 + + + + + + + + Template_Fixture<TestType>::m_a == 1 + + + 1.0 == 1 + + + + + + + + std::is_default_constructible<TestType>::value + + + true + + + + + + + + std::is_default_constructible<TestType>::value + + + true + + + + + + + + std::is_trivially_copyable<TestType>::value + + + true + + + + + + + + std::is_trivially_copyable<TestType>::value + + + true + + + + + + + + std::is_arithmetic<TestType>::value + + + true + + + + + + + + std::is_arithmetic<TestType>::value + + + true + + + + + + + + std::is_arithmetic<TestType>::value + + + true + + + + + + + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 10 + + + 10 == 10 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 0 + + + 0 == 0 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.capacity() == 0 + + + 0 == 0 + + + +
+ +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + + +
+ +
+ + + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 10 + + + 10 == 10 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 0 + + + 0 == 0 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.capacity() == 0 + + + 0 == 0 + + + +
+ +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + + +
+ +
+ + + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 10 + + + 10 == 10 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 0 + + + 0 == 0 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.capacity() == 0 + + + 0 == 0 + + + +
+ +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + + +
+ +
+ + + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 10 + + + 10 == 10 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 0 + + + 0 == 0 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.capacity() == 0 + + + 0 == 0 + + + +
+ +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + + +
+ +
+ + + + v.size() == V + + + 6 == 6 + + + + + v.capacity() >= V + + + 6 >= 6 + + +
+ + + v.size() == 2 * V + + + 12 == 12 + + + + + v.capacity() >= 2 * V + + + 12 >= 12 + + + +
+ + + v.size() == V + + + 6 == 6 + + + + + v.capacity() >= V + + + 6 >= 6 + + +
+ + + v.size() == 0 + + + 0 == 0 + + + + + v.capacity() >= V + + + 6 >= 6 + + +
+ + + v.capacity() == 0 + + + 0 == 0 + + + +
+ +
+ + + v.size() == V + + + 6 == 6 + + + + + v.capacity() >= V + + + 6 >= 6 + + +
+ + + v.size() == V + + + 6 == 6 + + + + + v.capacity() >= 2 * V + + + 12 >= 12 + + + +
+ + + v.size() == V + + + 6 == 6 + + + + + v.capacity() >= V + + + 6 >= 6 + + +
+ + + v.size() == V + + + 6 == 6 + + + + + v.capacity() >= V + + + 6 >= 6 + + + +
+ +
+ + + + v.size() == V + + + 4 == 4 + + + + + v.capacity() >= V + + + 4 >= 4 + + +
+ + + v.size() == 2 * V + + + 8 == 8 + + + + + v.capacity() >= 2 * V + + + 8 >= 8 + + + +
+ + + v.size() == V + + + 4 == 4 + + + + + v.capacity() >= V + + + 4 >= 4 + + +
+ + + v.size() == 0 + + + 0 == 0 + + + + + v.capacity() >= V + + + 4 >= 4 + + +
+ + + v.capacity() == 0 + + + 0 == 0 + + + +
+ +
+ + + v.size() == V + + + 4 == 4 + + + + + v.capacity() >= V + + + 4 >= 4 + + +
+ + + v.size() == V + + + 4 == 4 + + + + + v.capacity() >= 2 * V + + + 8 >= 8 + + + +
+ + + v.size() == V + + + 4 == 4 + + + + + v.capacity() >= V + + + 4 >= 4 + + +
+ + + v.size() == V + + + 4 == 4 + + + + + v.capacity() >= V + + + 4 >= 4 + + + +
+ +
+ + + + v.size() == V + + + 5 == 5 + + + + + v.capacity() >= V + + + 5 >= 5 + + +
+ + + v.size() == 2 * V + + + 10 == 10 + + + + + v.capacity() >= 2 * V + + + 10 >= 10 + + + +
+ + + v.size() == V + + + 5 == 5 + + + + + v.capacity() >= V + + + 5 >= 5 + + +
+ + + v.size() == 0 + + + 0 == 0 + + + + + v.capacity() >= V + + + 5 >= 5 + + +
+ + + v.capacity() == 0 + + + 0 == 0 + + + +
+ +
+ + + v.size() == V + + + 5 == 5 + + + + + v.capacity() >= V + + + 5 >= 5 + + +
+ + + v.size() == V + + + 5 == 5 + + + + + v.capacity() >= 2 * V + + + 10 >= 10 + + + +
+ + + v.size() == V + + + 5 == 5 + + + + + v.capacity() >= V + + + 5 >= 5 + + +
+ + + v.size() == V + + + 5 == 5 + + + + + v.capacity() >= V + + + 5 >= 5 + + + +
+ +
+ + + + v.size() == V + + + 15 == 15 + + + + + v.capacity() >= V + + + 15 >= 15 + + +
+ + + v.size() == 2 * V + + + 30 == 30 + + + + + v.capacity() >= 2 * V + + + 30 >= 30 + + + +
+ + + v.size() == V + + + 15 == 15 + + + + + v.capacity() >= V + + + 15 >= 15 + + +
+ + + v.size() == 0 + + + 0 == 0 + + + + + v.capacity() >= V + + + 15 >= 15 + + +
+ + + v.capacity() == 0 + + + 0 == 0 + + + +
+ +
+ + + v.size() == V + + + 15 == 15 + + + + + v.capacity() >= V + + + 15 >= 15 + + +
+ + + v.size() == V + + + 15 == 15 + + + + + v.capacity() >= 2 * V + + + 30 >= 30 + + + +
+ + + v.size() == V + + + 15 == 15 + + + + + v.capacity() >= V + + + 15 >= 15 + + +
+ + + v.size() == V + + + 15 == 15 + + + + + v.capacity() >= V + + + 15 >= 15 + + + +
+ +
+ + + + testCase.tags.size() == 1 + + + 1 == 1 + + + + + testCase.tags[0] == Tag( "tag1" ) + + + {?} == {?} + + + + + + + + + + + 0x == bit30and31 + + + 3221225472 (0x) == 3221225472 + + + + + + + + + + + true + + + true + + + + + false + + + false + + + + + true + + + true + + + + + false + + + false + + + + + + + + true + + + true + + + + + + + + + false + + + false + + + + + + + + + true + + + true + + + + + {Unknown expression after the reported line} + + + {Unknown expression after the reported line} + + + Uncaught exception should fail! + + + + + + + + false + + + false + + + + + {Unknown expression after the reported line} + + + {Unknown expression after the reported line} + + + Uncaught exception should fail! + + + + + + + + 1 == 2 + + + 1 == 2 + + + + + +
+ + + listingString, ContainsSubstring("[fakeTag]"s) + + + "All available tags: + 1 [fakeTag] +1 tag + +" contains: "[fakeTag]" + + + +
+
+ + + listingString, ContainsSubstring( "fake reporter"s ) && ContainsSubstring( "fake description"s ) + + + "Available reporters: + fake reporter: fake description + +" ( contains: "fake reporter" and contains: "fake description" ) + + + +
+
+ + + listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) + + + "All available test cases: + fake test name + [fakeTestTag] +1 test case + +" ( contains: "fake test name" and contains: "fakeTestTag" ) + + + +
+
+ + + listingString, ContainsSubstring( "fakeListener"s ) && ContainsSubstring( "fake description"s ) + + + "Registered listeners: + fakeListener: fake description + +" ( contains: "fakeListener" and contains: "fake description" ) + + + +
+ +
+ + + + + + For some reason someone is throwing a string literal! + + + + + + + testCase.isOpen() + + + true + + + + + s1.isOpen() + + + true + + +
+ + + s1.isSuccessfullyCompleted() + + + true + + + + + testCase.isComplete() == false + + + false == false + + + + + ctx.completedCycle() + + + true + + + + + testCase.isSuccessfullyCompleted() + + + true + + + +
+ + + testCase.isOpen() + + + true + + + + + s1.isOpen() + + + true + + +
+ + + s1.isComplete() + + + true + + + + + s1.isSuccessfullyCompleted() == false + + + false == false + + + + + testCase.isComplete() == false + + + false == false + + + + + ctx.completedCycle() + + + true + + + + + testCase.isSuccessfullyCompleted() == false + + + false == false + + +
+ + + testCase2.isOpen() + + + true + + + + + s1b.isOpen() == false + + + false == false + + + + + ctx.completedCycle() + + + true + + + + + testCase.isComplete() + + + true + + + + + testCase.isSuccessfullyCompleted() + + + true + + + +
+ +
+ + + testCase.isOpen() + + + true + + + + + s1.isOpen() + + + true + + +
+ + + s1.isComplete() + + + true + + + + + s1.isSuccessfullyCompleted() == false + + + false == false + + + + + testCase.isComplete() == false + + + false == false + + + + + ctx.completedCycle() + + + true + + + + + testCase.isSuccessfullyCompleted() == false + + + false == false + + +
+ + + testCase2.isOpen() + + + true + + + + + s1b.isOpen() == false + + + false == false + + + + + s2.isOpen() + + + true + + + + + ctx.completedCycle() + + + true + + + + + testCase.isComplete() + + + true + + + + + testCase.isSuccessfullyCompleted() + + + true + + + +
+ +
+ + + testCase.isOpen() + + + true + + + + + s1.isOpen() + + + true + + +
+ + + s2.isOpen() == false + + + false == false + + + + + testCase.isComplete() == false + + + false == false + + +
+ + + testCase2.isOpen() + + + true + + + + + s1b.isOpen() == false + + + false == false + + + + + s2b.isOpen() + + + true + + + + + ctx.completedCycle() == false + + + false == false + + +
+ + + ctx.completedCycle() + + + true + + + + + s2b.isSuccessfullyCompleted() + + + true + + + + + testCase2.isComplete() == false + + + false == false + + + + + testCase2.isSuccessfullyCompleted() + + + true + + + +
+ +
+ +
+ + + testCase.isOpen() + + + true + + + + + s1.isOpen() + + + true + + +
+ + + s2.isOpen() == false + + + false == false + + + + + testCase.isComplete() == false + + + false == false + + +
+ + + testCase2.isOpen() + + + true + + + + + s1b.isOpen() == false + + + false == false + + + + + s2b.isOpen() + + + true + + + + + ctx.completedCycle() == false + + + false == false + + +
+ + + ctx.completedCycle() + + + true + + + + + s2b.isComplete() + + + true + + + + + s2b.isSuccessfullyCompleted() == false + + + false == false + + + + + testCase2.isSuccessfullyCompleted() == false + + + false == false + + + + + testCase3.isOpen() + + + true + + + + + s1c.isOpen() == false + + + false == false + + + + + s2c.isOpen() == false + + + false == false + + + + + testCase3.isSuccessfullyCompleted() + + + true + + + +
+ +
+ +
+ + + testCase.isOpen() + + + true + + + + + s1.isOpen() + + + true + + +
+ + + s2.isOpen() + + + true + + + + + s2.isComplete() + + + true + + + + + s1.isComplete() == false + + + false == false + + + + + s1.isComplete() + + + true + + + + + testCase.isComplete() == false + + + false == false + + + + + testCase.isComplete() + + + true + + + +
+ +
+ + + + trim(std::string(no_whitespace)) == no_whitespace + + + "There is no extra whitespace here" +== +"There is no extra whitespace here" + + + + + trim(std::string(leading_whitespace)) == no_whitespace + + + "There is no extra whitespace here" +== +"There is no extra whitespace here" + + + + + trim(std::string(trailing_whitespace)) == no_whitespace + + + "There is no extra whitespace here" +== +"There is no extra whitespace here" + + + + + trim(std::string(whitespace_at_both_ends)) == no_whitespace + + + "There is no extra whitespace here" +== +"There is no extra whitespace here" + + + + + trim(StringRef(no_whitespace)) == StringRef(no_whitespace) + + + There is no extra whitespace here +== +There is no extra whitespace here + + + + + trim(StringRef(leading_whitespace)) == StringRef(no_whitespace) + + + There is no extra whitespace here +== +There is no extra whitespace here + + + + + trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace) + + + There is no extra whitespace here +== +There is no extra whitespace here + + + + + trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace) + + + There is no extra whitespace here +== +There is no extra whitespace here + + + + + +
+
+ + + array_int_a, RangeEquals( c_array ) + + + { 1, 2, 3 } elements are { 1, 2, 3 } + + + + + array_int_a, UnorderedRangeEquals( c_array ) + + + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + + + +
+ +
+
+
+ + + array_int_3, !RangeEquals( array_int_4 ) + + + { 1, 2, 3 } not elements are { 1, 2, 3, 4 } + + + + + array_int_3, !UnorderedRangeEquals( array_int_4 ) + + + { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } + + + +
+ +
+
+
+ + + array_int_a, RangeEquals( vector_char_a ) + + + { 1, 2, 3 } elements are { 1, 2, 3 } + + + + + array_int_a, UnorderedRangeEquals( vector_char_a ) + + + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + + + +
+ +
+
+
+ + + array_int_a, RangeEquals( list_char_a ) + + + { 1, 2, 3 } elements are { 1, 2, 3 } + + + + + array_int_a, UnorderedRangeEquals( list_char_a ) + + + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + + + +
+ +
+
+
+ + + vector_int_a, RangeEquals( vector_char_a ) + + + { 1, 2, 3 } elements are { 1, 2, 3 } + + + + + vector_int_a, UnorderedRangeEquals( vector_char_a ) + + + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + + + +
+ +
+
+
+ + + vector_int_a, !RangeEquals( vector_char_b ) + + + { 1, 2, 3 } not elements are { 1, 2, 2 } + + + + + vector_int_a, !UnorderedRangeEquals( vector_char_b ) + + + { 1, 2, 3 } not unordered elements are { 1, 2, 2 } + + + +
+ +
+
+ + + a, !RangeEquals( b ) + + + { 1, 2, 3 } not elements are { 3, 2, 1 } + + + + + a, UnorderedRangeEquals( b ) + + + { 1, 2, 3 } unordered elements are { 3, 2, 1 } + + + +
+
+
+ + + vector_a, RangeEquals( array_a_plus_1, close_enough ) + + + { 1, 2, 3 } elements are { 2, 3, 4 } + + + + + vector_a, UnorderedRangeEquals( array_a_plus_1, close_enough ) + + + { 1, 2, 3 } unordered elements are { 2, 3, 4 } + + + +
+ +
+ +
+ + + 3.14000000000000012 + + + + +
+ + + bptr->i == 3 + + + 3 == 3 + + + +
+
+ + + bptr->i == 3 + + + 3 == 3 + + + +
+ +
+ +
+ + + data, AllMatch(SizeIs(5)) + + + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } all match has size == 5 + + + + + data, !AllMatch(Contains(0) && Contains(1)) + + + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not all match ( contains element 0 and contains element 1 ) + + + +
+
+ + + needs_adl, AllMatch( Predicate<int>( []( int elem ) { return elem < 6; } ) ) + + + { 1, 2, 3, 4, 5 } all match matches undescribed predicate + + + +
+
+
+ + + mocked, allMatch + + + { 1, 2, 3, 4, 5 } all match matches undescribed predicate + + + + + mocked.m_derefed[0] + + + true + + + + + mocked.m_derefed[1] + + + true + + + + + mocked.m_derefed[2] + + + true + + + + + mocked.m_derefed[3] + + + true + + + + + mocked.m_derefed[4] + + + true + + + +
+ +
+
+
+ + + mocked, !allMatch + + + { 1, 2, 3, 4, 5 } not all match matches undescribed predicate + + + + + mocked.m_derefed[0] + + + true + + + + + mocked.m_derefed[1] + + + true + + + + + mocked.m_derefed[2] + + + true + + + + + !(mocked.m_derefed[3]) + + + !false + + + + + !(mocked.m_derefed[4]) + + + !false + + + +
+ +
+ +
+ +
+
+ + + data, AllTrue() + + + { true, true, true, true, true } contains only true + + + +
+ +
+
+
+ + + data, AllTrue() + + + { } contains only true + + + +
+ +
+
+
+ + + data, !AllTrue() + + + { true, true, false, true, true } not contains only true + + + +
+ +
+
+
+ + + data, !AllTrue() + + + { false, false, false, false, false } not contains only true + + + +
+ +
+
+
+ + + data, AllTrue() + + + { true, true, true, true, true } contains only true + + + +
+ +
+
+
+ + + data, !AllTrue() + + + { true, true, false, true, true } not contains only true + + + +
+ +
+
+
+ + + data, !AllTrue() + + + { false, false, false, false, false } not contains only true + + + +
+ +
+
+
+ + + mocked, AllTrue() + + + { true, true, true, true, true } contains only true + + + + + mocked.m_derefed[0] + + + true + + + + + mocked.m_derefed[1] + + + true + + + + + mocked.m_derefed[2] + + + true + + + + + mocked.m_derefed[3] + + + true + + + + + mocked.m_derefed[4] + + + true + + + +
+ +
+
+
+ + + mocked, !AllTrue() + + + { true, true, false, true, true } not contains only true + + + + + mocked.m_derefed[0] + + + true + + + + + mocked.m_derefed[1] + + + true + + + + + mocked.m_derefed[2] + + + true + + + + + !(mocked.m_derefed[3]) + + + !false + + + + + !(mocked.m_derefed[4]) + + + !false + + + +
+ +
+ +
+ +
+ + + data, AnyMatch(SizeIs(5)) + + + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } any match has size == 5 + + + + + data, !AnyMatch(Contains(0) && Contains(10)) + + + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not any match ( contains element 0 and contains element 10 ) + + + +
+
+ + + needs_adl, AnyMatch( Predicate<int>( []( int elem ) { return elem < 3; } ) ) + + + { 1, 2, 3, 4, 5 } any match matches undescribed predicate + + + +
+
+
+ + + mocked, !anyMatch + + + { 1, 2, 3, 4, 5 } not any match matches undescribed predicate + + + + + mocked.m_derefed[0] + + + true + + + + + mocked.m_derefed[1] + + + true + + + + + mocked.m_derefed[2] + + + true + + + + + mocked.m_derefed[3] + + + true + + + + + mocked.m_derefed[4] + + + true + + + +
+ +
+
+
+ + + mocked, anyMatch + + + { 1, 2, 3, 4, 5 } any match matches undescribed predicate + + + + + mocked.m_derefed[0] + + + true + + + + + !(mocked.m_derefed[1]) + + + !false + + + + + !(mocked.m_derefed[2]) + + + !false + + + + + !(mocked.m_derefed[3]) + + + !false + + + + + !(mocked.m_derefed[4]) + + + !false + + + +
+ +
+ +
+ +
+
+ + + data, AnyTrue() + + + { true, true, true, true, true } contains at least one true + + + +
+ +
+
+
+ + + data, !AnyTrue() + + + { } not contains at least one true + + + +
+ +
+
+
+ + + data, AnyTrue() + + + { false, false, true, false, false } contains at least one true + + + +
+ +
+
+
+ + + data, !AnyTrue() + + + { false, false, false, false, false } not contains at least one true + + + +
+ +
+
+
+ + + data, AnyTrue() + + + { true, true, true, true, true } contains at least one true + + + +
+ +
+
+
+ + + data, AnyTrue() + + + { false, false, true, false, false } contains at least one true + + + +
+ +
+
+
+ + + data, !AnyTrue() + + + { false, false, false, false, false } not contains at least one true + + + +
+ +
+
+
+ + + mocked, AnyTrue() + + + { false, false, false, false, true } contains at least one true + + + + + mocked.m_derefed[0] + + + true + + + + + mocked.m_derefed[1] + + + true + + + + + mocked.m_derefed[2] + + + true + + + + + mocked.m_derefed[3] + + + true + + + + + mocked.m_derefed[4] + + + true + + + +
+ +
+
+
+ + + mocked, AnyTrue() + + + { false, false, true, true, true } contains at least one true + + + + + mocked.m_derefed[0] + + + true + + + + + mocked.m_derefed[1] + + + true + + + + + mocked.m_derefed[2] + + + true + + + + + !(mocked.m_derefed[3]) + + + !false + + + + + !(mocked.m_derefed[4]) + + + !false + + + +
+ +
+ +
+ +
+ + + data, NoneMatch(SizeIs(6)) + + + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } none match has size == 6 + + + + + data, !NoneMatch(Contains(0) && Contains(1)) + + + { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not none match ( contains element 0 and contains element 1 ) + + + +
+
+ + + needs_adl, NoneMatch( Predicate<int>( []( int elem ) { return elem > 6; } ) ) + + + { 1, 2, 3, 4, 5 } none match matches undescribed predicate + + + +
+
+
+ + + mocked, noneMatch + + + { 1, 2, 3, 4, 5 } none match matches undescribed predicate + + + + + mocked.m_derefed[0] + + + true + + + + + mocked.m_derefed[1] + + + true + + + + + mocked.m_derefed[2] + + + true + + + + + mocked.m_derefed[3] + + + true + + + + + mocked.m_derefed[4] + + + true + + + +
+ +
+
+
+ + + mocked, !noneMatch + + + { 1, 2, 3, 4, 5 } not none match matches undescribed predicate + + + + + mocked.m_derefed[0] + + + true + + + + + !(mocked.m_derefed[1]) + + + !false + + + + + !(mocked.m_derefed[2]) + + + !false + + + + + !(mocked.m_derefed[3]) + + + !false + + + + + !(mocked.m_derefed[4]) + + + !false + + + +
+ +
+ +
+ +
+
+ + + data, !NoneTrue() + + + { true, true, true, true, true } not contains no true + + + +
+ +
+
+
+ + + data, NoneTrue() + + + { } contains no true + + + +
+ +
+
+
+ + + data, !NoneTrue() + + + { false, false, true, false, false } not contains no true + + + +
+ +
+
+
+ + + data, NoneTrue() + + + { false, false, false, false, false } contains no true + + + +
+ +
+
+
+ + + data, !NoneTrue() + + + { true, true, true, true, true } not contains no true + + + +
+ +
+
+
+ + + data, !NoneTrue() + + + { false, false, true, false, false } not contains no true + + + +
+ +
+
+
+ + + data, NoneTrue() + + + { false, false, false, false, false } contains no true + + + +
+ +
+
+
+ + + mocked, NoneTrue() + + + { false, false, false, false, false } contains no true + + + + + mocked.m_derefed[0] + + + true + + + + + mocked.m_derefed[1] + + + true + + + + + mocked.m_derefed[2] + + + true + + + + + mocked.m_derefed[3] + + + true + + + + + mocked.m_derefed[4] + + + true + + + +
+ +
+
+
+ + + mocked, !NoneTrue() + + + { false, false, true, true, true } not contains no true + + + + + mocked.m_derefed[0] + + + true + + + + + mocked.m_derefed[1] + + + true + + + + + mocked.m_derefed[2] + + + true + + + + + !(mocked.m_derefed[3]) + + + !false + + + + + !(mocked.m_derefed[4]) + + + !false + + + +
+ +
+ +
+ +
+
+ + + empty_vector, RangeEquals( empty_vector ) + + + { } elements are { } + + + +
+ +
+
+
+ + + empty_vector, !RangeEquals( non_empty_vector ) + + + { } not elements are { 1 } + + + + + non_empty_vector, !RangeEquals( empty_vector ) + + + { 1 } not elements are { } + + + +
+ +
+
+
+ + + non_empty_array, RangeEquals( non_empty_array ) + + + { 1 } elements are { 1 } + + + +
+ +
+
+
+ + + array_a, RangeEquals( array_a ) + + + { 1, 2, 3 } elements are { 1, 2, 3 } + + + +
+ +
+
+
+ + + array_a, !RangeEquals( array_b ) + + + { 1, 2, 3 } not elements are { 2, 2, 3 } + + + + + array_a, !RangeEquals( array_c ) + + + { 1, 2, 3 } not elements are { 1, 2, 2 } + + + +
+ +
+
+
+ + + vector_a, !RangeEquals( vector_b ) + + + { 1, 2, 3 } not elements are { 1, 2, 3, 4 } + + + +
+ +
+
+
+ + + vector_a, RangeEquals( vector_a_plus_1, close_enough ) + + + { 1, 2, 3 } elements are { 2, 3, 4 } + + + +
+ +
+
+
+ + + vector_a, !RangeEquals( vector_b, close_enough ) + + + { 1, 2, 3 } not elements are { 3, 3, 4 } + + + +
+ +
+
+ + + needs_adl1, RangeEquals( needs_adl2 ) + + + { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 } + + + + + needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } ) + + + { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 } + + + +
+
+ + + array_a, RangeEquals( { 1, 2, 3 } ) + + + { 1, 2, 3 } elements are { 1, 2, 3 } + + + + + array_a, RangeEquals( { 2, 4, 6 }, []( int l, int r ) { return l * 2 == r; } ) + + + { 1, 2, 3 } elements are { 2, 4, 6 } + + + +
+
+
+ + + mocked1, !RangeEquals( arr ) + + + { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 } + + + + + mocked1.m_derefed[0] + + + true + + + + + mocked1.m_derefed[1] + + + true + + + + + mocked1.m_derefed[2] + + + true + + + + + !(mocked1.m_derefed[3]) + + + !false + + + +
+ +
+
+
+ + + mocked1, RangeEquals( arr ) + + + { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 } + + + + + mocked1.m_derefed[0] + + + true + + + + + mocked1.m_derefed[1] + + + true + + + + + mocked1.m_derefed[2] + + + true + + + + + mocked1.m_derefed[3] + + + true + + + +
+ +
+ +
+ +
+
+ + + empty_vector, UnorderedRangeEquals( empty_vector ) + + + { } unordered elements are { } + + + +
+ +
+
+
+ + + empty_vector, !UnorderedRangeEquals( non_empty_vector ) + + + { } not unordered elements are { 1 } + + + + + non_empty_vector, !UnorderedRangeEquals( empty_vector ) + + + { 1 } not unordered elements are { } + + + +
+ +
+
+
+ + + non_empty_array, UnorderedRangeEquals( non_empty_array ) + + + { 1 } unordered elements are { 1 } + + + +
+ +
+
+
+ + + array_a, UnorderedRangeEquals( array_a ) + + + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + + + +
+ +
+
+
+ + + array_a, !UnorderedRangeEquals( array_b ) + + + { 1, 2, 3 } not unordered elements are { 2, 2, 3 } + + + +
+ +
+
+
+ + + vector_a, !UnorderedRangeEquals( vector_b ) + + + { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } + + + +
+ +
+
+
+ + + vector_a, UnorderedRangeEquals( vector_a_plus_1, close_enough ) + + + { 1, 10, 20 } unordered elements are { 11, 21, 2 } + + + +
+ +
+
+
+ + + vector_a, !UnorderedRangeEquals( vector_b, close_enough ) + + + { 1, 10, 21 } not unordered elements are { 11, 21, 3 } + + + +
+ +
+
+ + + needs_adl1, UnorderedRangeEquals( needs_adl2 ) + + + { 1, 2, 3, 4, 5 } unordered elements are { 1, 2, 3, 4, 5 } + + + +
+
+ + + array_a, UnorderedRangeEquals( { 10, 20, 1 } ) + + + { 1, 10, 20 } unordered elements are { 10, 20, 1 } + + + + + array_a, UnorderedRangeEquals( { 11, 21, 2 }, []( int l, int r ) { return std::abs( l - r ) <= 1; } ) + + + { 1, 10, 20 } unordered elements are { 11, 21, 2 } + + + +
+ +
+ +
+ + + empty_vec, SizeIs(0) + + + { } has size == 0 + + + + + empty_vec, !SizeIs(2) + + + { } not has size == 2 + + + + + empty_vec, SizeIs(Lt(2)) + + + { } size matches is less than 2 + + + + + arr, SizeIs(2) + + + { 0, 0 } has size == 2 + + + + + arr, SizeIs( Lt(3)) + + + { 0, 0 } size matches is less than 3 + + + + + arr, !SizeIs(!Lt(3)) + + + { 0, 0 } not size matches not is less than 3 + + + + + map, SizeIs(3) + + + { {?}, {?}, {?} } has size == 3 + + + +
+
+ + + unrelated::ADL_size{}, SizeIs(12) + + + {?} has size == 12 + + + +
+
+ + + has_size{}, SizeIs(13) + + + {?} has size == 13 + + + +
+ +
+ + + + d == approx( 1.23 ) + + + 1.22999999999999998 +== +Approx( 1.22999999999999998 ) + + + + + d == approx( 1.22 ) + + + 1.22999999999999998 +== +Approx( 1.21999999999999997 ) + + + + + d == approx( 1.24 ) + + + 1.22999999999999998 +== +Approx( 1.23999999999999999 ) + + + + + d != approx( 1.25 ) + + + 1.22999999999999998 != Approx( 1.25 ) + + + + + approx( d ) == 1.23 + + + Approx( 1.22999999999999998 ) +== +1.22999999999999998 + + + + + approx( d ) == 1.22 + + + Approx( 1.22999999999999998 ) +== +1.21999999999999997 + + + + + approx( d ) == 1.24 + + + Approx( 1.22999999999999998 ) +== +1.23999999999999999 + + + + + approx( d ) != 1.25 + + + Approx( 1.22999999999999998 ) != 1.25 + + + + + +
+ +
+ +
+ +
+ + + empty, Approx( empty ) + + + { } is approx: { } + + + +
+
+
+ + + v1, Approx( v1 ) + + + { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } + + + + + v1, Approx<double>( { 1., 2., 3. } ) + + + { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } + + + +
+ +
+
+
+ + + v1, !Approx( temp ) + + + { 1.0, 2.0, 3.0 } not is approx: { 1.0, 2.0, 3.0, 4.0 } + + + +
+ +
+
+
+ + + v1, !Approx( v2 ) + + + { 1.0, 2.0, 3.0 } not is approx: { 1.5, 2.5, 3.5 } + + + + + v1, Approx( v2 ).margin( 0.5 ) + + + { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } + + + + + v1, Approx( v2 ).epsilon( 0.5 ) + + + { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } + + + + + v1, Approx( v2 ).epsilon( 0.1 ).scale( 500 ) + + + { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } + + + +
+ +
+ +
+ +
+ + + empty, Approx( t1 ) + + + { } is approx: { 1.0, 2.0 } + + + +
+
+ + + v1, Approx( v2 ) + + + { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 } + + + +
+ +
+ +
+ + + v, VectorContains( 1 ) + + + { 1, 2, 3 } Contains: 1 + + + + + v, VectorContains( 2 ) + + + { 1, 2, 3 } Contains: 2 + + + + + v5, ( VectorContains<int, CustomAllocator<int>>( 2 ) ) + + + { 1, 2, 3 } Contains: 2 + + + +
+
+ + + v, Contains( v2 ) + + + { 1, 2, 3 } Contains: { 1, 2 } + + + + + v, Contains<int>( { 1, 2 } ) + + + { 1, 2, 3 } Contains: { 1, 2 } + + + + + v5, ( Contains<int, std::allocator<int>, CustomAllocator<int>>( v2 ) ) + + + { 1, 2, 3 } Contains: { 1, 2 } + + + + + v, Contains( v2 ) + + + { 1, 2, 3 } Contains: { 1, 2, 3 } + + + + + v, Contains( empty ) + + + { 1, 2, 3 } Contains: { } + + + + + empty, Contains( empty ) + + + { } Contains: { } + + + + + v5, ( Contains<int, std::allocator<int>, CustomAllocator<int>>( v2 ) ) + + + { 1, 2, 3 } Contains: { 1, 2, 3 } + + + + + v5, Contains( v6 ) + + + { 1, 2, 3 } Contains: { 1, 2 } + + + +
+
+ + + v, VectorContains( 1 ) && VectorContains( 2 ) + + + { 1, 2, 3 } ( Contains: 1 and Contains: 2 ) + + + +
+
+ + + v, Equals( v ) + + + { 1, 2, 3 } Equals: { 1, 2, 3 } + + + + + empty, Equals( empty ) + + + { } Equals: { } + + + + + v, Equals<int>( { 1, 2, 3 } ) + + + { 1, 2, 3 } Equals: { 1, 2, 3 } + + + + + v, Equals( v2 ) + + + { 1, 2, 3 } Equals: { 1, 2, 3 } + + + + + v5, ( Equals<int, std::allocator<int>, CustomAllocator<int>>( v2 ) ) + + + { 1, 2, 3 } Equals: { 1, 2, 3 } + + + + + v5, Equals( v6 ) + + + { 1, 2, 3 } Equals: { 1, 2, 3 } + + + +
+
+ + + v, UnorderedEquals( v ) + + + { 1, 2, 3 } UnorderedEquals: { 1, 2, 3 } + + + + + v, UnorderedEquals<int>( { 3, 2, 1 } ) + + + { 1, 2, 3 } UnorderedEquals: { 3, 2, 1 } + + + + + empty, UnorderedEquals( empty ) + + + { } UnorderedEquals: { } + + + + + permuted, UnorderedEquals( v ) + + + { 1, 3, 2 } UnorderedEquals: { 1, 2, 3 } + + + + + permuted, UnorderedEquals( v ) + + + { 2, 3, 1 } UnorderedEquals: { 1, 2, 3 } + + + + + v5, ( UnorderedEquals<int, std::allocator<int>, CustomAllocator<int>>( permuted ) ) + + + { 1, 2, 3 } UnorderedEquals: { 2, 3, 1 } + + + + + v5_permuted, UnorderedEquals( v5 ) + + + { 1, 3, 2 } UnorderedEquals: { 1, 2, 3 } + + + +
+ +
+ +
+ + + v, VectorContains( -1 ) + + + { 1, 2, 3 } Contains: -1 + + + + + empty, VectorContains( 1 ) + + + { } Contains: 1 + + + +
+
+ + + empty, Contains( v ) + + + { } Contains: { 1, 2, 3 } + + + + + v, Contains( v2 ) + + + { 1, 2, 3 } Contains: { 1, 2, 4 } + + + +
+
+ + + v, Equals( v2 ) + + + { 1, 2, 3 } Equals: { 1, 2 } + + + + + v2, Equals( v ) + + + { 1, 2 } Equals: { 1, 2, 3 } + + + + + empty, Equals( v ) + + + { } Equals: { 1, 2, 3 } + + + + + v, Equals( empty ) + + + { 1, 2, 3 } Equals: { } + + + +
+
+ + + v, UnorderedEquals( empty ) + + + { 1, 2, 3 } UnorderedEquals: { } + + + + + empty, UnorderedEquals( v ) + + + { } UnorderedEquals: { 1, 2, 3 } + + + + + permuted, UnorderedEquals( v ) + + + { 1, 3 } UnorderedEquals: { 1, 2, 3 } + + + + + permuted, UnorderedEquals( v ) + + + { 3, 1 } UnorderedEquals: { 1, 2, 3 } + + + +
+ +
+ + + + thisThrows(), std::domain_error + + + thisThrows(), std::domain_error + + + + + thisDoesntThrow() + + + thisDoesntThrow() + + + + + thisThrows() + + + thisThrows() + + + + + + + unexpected exception + + + + + + + thisThrows() == 0 + + + thisThrows() == 0 + + + expected exception + + + + + + + + thisThrows() == 0 + + + thisThrows() == 0 + + + expected exception + + + + + + + + thisThrows() == 0 + + + thisThrows() == 0 + + + expected exception + + + + + +
+ + unexpected exception + + +
+ +
+ + + + + + + + + + + + + + + + +
+ + + encode( "normal string" ) == "normal string" + + + "normal string" == "normal string" + + + +
+
+ + + encode( "" ) == "" + + + "" == "" + + + +
+
+ + + encode( "smith & jones" ) == "smith &amp; jones" + + + "smith &amp; jones" == "smith &amp; jones" + + + +
+
+ + + encode( "smith < jones" ) == "smith &lt; jones" + + + "smith &lt; jones" == "smith &lt; jones" + + + +
+
+ + + encode( "smith > jones" ) == "smith > jones" + + + "smith > jones" == "smith > jones" + + + + + encode( "smith ]]> jones" ) == "smith ]]&gt; jones" + + + "smith ]]&gt; jones" +== +"smith ]]&gt; jones" + + + +
+
+ + + encode( stringWithQuotes ) == stringWithQuotes + + + "don't "quote" me on that" +== +"don't "quote" me on that" + + + + + encode( stringWithQuotes, Catch::XmlEncode::ForAttributes ) == "don't &quot;quote&quot; me on that" + + + "don't &quot;quote&quot; me on that" +== +"don't &quot;quote&quot; me on that" + + + +
+
+ + + encode( "[\x01]" ) == "[\\x01]" + + + "[\x01]" == "[\x01]" + + + +
+
+ + + encode( "[\x7F]" ) == "[\\x7F]" + + + "[\x7F]" == "[\x7F]" + + + +
+ +
+ + + + stream.str(), ContainsSubstring(R"(attr1="true")") && ContainsSubstring(R"(attr2="false")") + + + "<?xml version="1.0" encoding="UTF-8"?> +<Element1 attr1="true" attr2="false"/> +" ( contains: "attr1="true"" and contains: "attr2="false"" ) + + + + + + + + + + + + analysis.mean.point.count() == 23 + + + 23.0 == 23 + + + + + analysis.mean.lower_bound.count() == 23 + + + 23.0 == 23 + + + + + analysis.mean.upper_bound.count() == 23 + + + 23.0 == 23 + + + + + analysis.standard_deviation.point.count() == 0 + + + 0.0 == 0 + + + + + analysis.standard_deviation.lower_bound.count() == 0 + + + 0.0 == 0 + + + + + analysis.standard_deviation.upper_bound.count() == 0 + + + 0.0 == 0 + + + + + analysis.outliers.total() == 0 + + + 0 == 0 + + + + + analysis.outliers.low_mild == 0 + + + 0 == 0 + + + + + analysis.outliers.low_severe == 0 + + + 0 == 0 + + + + + analysis.outliers.high_mild == 0 + + + 0 == 0 + + + + + analysis.outliers.high_severe == 0 + + + 0 == 0 + + + + + analysis.outliers.samples_seen == 0 + + + 0 == 0 + + + + + analysis.outlier_variance == 0 + + + 0.0 == 0 + + + + + + + + Catch::Detail::stringify( empty ) == "{ }" + + + "{ }" == "{ }" + + + + + Catch::Detail::stringify( oneValue ) == "{ 42 }" + + + "{ 42 }" == "{ 42 }" + + + + + Catch::Detail::stringify( twoValues ) == "{ 42, 250 }" + + + "{ 42, 250 }" == "{ 42, 250 }" + + + + + +
+ + + model.started == 1 + + + 1 == 1 + + + + + model.finished == 0 + + + 0 == 0 + + + + + model.started == 1 + + + 1 == 1 + + + + + model.finished == 1 + + + 1 == 1 + + + + + called == 1 + + + 1 == 1 + + + +
+
+ + + model.started == 0 + + + 0 == 0 + + + + + model.finished == 0 + + + 0 == 0 + + + + + model.started == 0 + + + 0 == 0 + + + + + model.finished == 0 + + + 0 == 0 + + + + + called == 1 + + + 1 == 1 + + + +
+ +
+ + + + obj.prop != 0 + + + 0x != 0 + + + + + + + + flag + + + true + + + + + testCheckedElse( true ) + + + true + + + + + + + + flag + + + false + + + + + testCheckedElse( false ) + + + false + + + + + + + + flag + + + true + + + + + testCheckedIf( true ) + + + true + + + + + + + + flag + + + false + + + + + testCheckedIf( false ) + + + false + + + + + +
+ + + o.samples_seen == static_cast<int>(x.size()) + + + 6 == 6 + + + + + o.low_severe == los + + + 0 == 0 + + + + + o.low_mild == lom + + + 0 == 0 + + + + + o.high_mild == him + + + 0 == 0 + + + + + o.high_severe == his + + + 0 == 0 + + + + + o.total() == los + lom + him + his + + + 0 == 0 + + + +
+
+ + + o.samples_seen == static_cast<int>(x.size()) + + + 6 == 6 + + + + + o.low_severe == los + + + 1 == 1 + + + + + o.low_mild == lom + + + 0 == 0 + + + + + o.high_mild == him + + + 0 == 0 + + + + + o.high_severe == his + + + 0 == 0 + + + + + o.total() == los + lom + him + his + + + 1 == 1 + + + +
+
+ + + o.samples_seen == static_cast<int>(x.size()) + + + 6 == 6 + + + + + o.low_severe == los + + + 0 == 0 + + + + + o.low_mild == lom + + + 1 == 1 + + + + + o.high_mild == him + + + 0 == 0 + + + + + o.high_severe == his + + + 0 == 0 + + + + + o.total() == los + lom + him + his + + + 1 == 1 + + + +
+
+ + + o.samples_seen == static_cast<int>(x.size()) + + + 6 == 6 + + + + + o.low_severe == los + + + 0 == 0 + + + + + o.low_mild == lom + + + 0 == 0 + + + + + o.high_mild == him + + + 1 == 1 + + + + + o.high_severe == his + + + 0 == 0 + + + + + o.total() == los + lom + him + his + + + 1 == 1 + + + +
+
+ + + o.samples_seen == static_cast<int>(x.size()) + + + 6 == 6 + + + + + o.low_severe == los + + + 0 == 0 + + + + + o.low_mild == lom + + + 0 == 0 + + + + + o.high_mild == him + + + 0 == 0 + + + + + o.high_severe == his + + + 1 == 1 + + + + + o.total() == los + lom + him + his + + + 1 == 1 + + + +
+
+ + + o.samples_seen == static_cast<int>(x.size()) + + + 6 == 6 + + + + + o.low_severe == los + + + 1 == 1 + + + + + o.low_mild == lom + + + 0 == 0 + + + + + o.high_mild == him + + + 1 == 1 + + + + + o.high_severe == his + + + 0 == 0 + + + + + o.total() == los + lom + him + his + + + 2 == 2 + + + +
+ +
+ + + + unsigned_char_var == 1 + + + 1 == 1 + + + + + unsigned_short_var == 1 + + + 1 == 1 + + + + + unsigned_int_var == 1 + + + 1 == 1 + + + + + unsigned_long_var == 1 + + + 1 == 1 + + + + + + + + long_var == unsigned_char_var + + + 1 == 1 + + + + + long_var == unsigned_short_var + + + 1 == 1 + + + + + long_var == unsigned_int_var + + + 1 == 1 + + + + + long_var == unsigned_long_var + + + 1 == 1 + + + + + + + + convertToBits( 0.f ) == 0 + + + 0 == 0 + + + + + convertToBits( -0.f ) == ( 1ULL << 31 ) + + + 2147483648 (0x) +== +2147483648 (0x) + + + + + convertToBits( 0. ) == 0 + + + 0 == 0 + + + + + convertToBits( -0. ) == ( 1ULL << 63 ) + + + 9223372036854775808 (0x) +== +9223372036854775808 (0x) + + + + + convertToBits( std::numeric_limits<float>::denorm_min() ) == 1 + + + 1 == 1 + + + + + convertToBits( std::numeric_limits<double>::denorm_min() ) == 1 + + + 1 == 1 + + + + + + + skipping because answer = 41 + + + skipping because answer = 43 + + + + + + + Catch::TestCaseInfo("", { "test with an empty tag", "[]" }, dummySourceLineInfo) + + + Catch::TestCaseInfo("", { "test with an empty tag", "[]" }, dummySourceLineInfo) + + + + + + + + erfc_inv(1.103560) == Approx(-0.09203687623843015) + + + -0.09203687623843014 +== +Approx( -0.09203687623843015 ) + + + + + erfc_inv(1.067400) == Approx(-0.05980291115763361) + + + -0.05980291115763361 +== +Approx( -0.05980291115763361 ) + + + + + erfc_inv(0.050000) == Approx(1.38590382434967796) + + + 1.38590382434967774 +== +Approx( 1.38590382434967796 ) + + + + + + + + res.mean.count() == rate + + + 2000.0 == 2000 (0x) + + + + + res.outliers.total() == 0 + + + 0 == 0 + + + + + +
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+ + + + 3 == 4 + + + 3 == 4 + + + + + + + + + + + + + +
+ + +
+
+ + +
+ +
+ + + + + + + + + + + + Previous info should not be seen + + + + + + previous unscoped info SHOULD not be seen + + + + + + + + + + + + + l == std::numeric_limits<long long>::max() + + + 9223372036854775807 (0x) +== +9223372036854775807 (0x) + + + + + +
+ + + b > a + + + 0 > 1 + + + +
+
+ + + b > a + + + 1 > 1 + + + +
+
+ + + b > a + + + 2 > 1 + + + +
+
+ + + b > a + + + 3 > 1 + + + +
+
+ + + b > a + + + 4 > 1 + + + +
+
+ + + b > a + + + 5 > 1 + + + +
+
+ + + b > a + + + 6 > 1 + + + +
+
+ + + b > a + + + 7 > 1 + + + +
+
+ + + b > a + + + 8 > 1 + + + +
+
+ + + b > a + + + 9 > 1 + + + +
+ +
+ + + Testing if fib[0] (1) is even + + + + ( fib[i] % 2 ) == 0 + + + 1 == 0 + + + + Testing if fib[1] (1) is even + + + + ( fib[i] % 2 ) == 0 + + + 1 == 0 + + + + Testing if fib[2] (2) is even + + + + ( fib[i] % 2 ) == 0 + + + 0 == 0 + + + + Testing if fib[3] (3) is even + + + + ( fib[i] % 2 ) == 0 + + + 1 == 0 + + + + Testing if fib[4] (5) is even + + + + ( fib[i] % 2 ) == 0 + + + 1 == 0 + + + + Testing if fib[5] (8) is even + + + + ( fib[i] % 2 ) == 0 + + + 0 == 0 + + + + Testing if fib[6] (13) is even + + + + ( fib[i] % 2 ) == 0 + + + 1 == 0 + + + + Testing if fib[7] (21) is even + + + + ( fib[i] % 2 ) == 0 + + + 1 == 0 + + + + + + + + Catch::makeStream( "%debug" ) + + + Catch::makeStream( "%debug" ) + + + + + +
+ + + !(lval.has_moved) + + + !false + + + +
+
+ + + rval.has_moved + + + true + + + +
+
+ + + *ptr == std::tuple<int, double, int>{1, 2., 3} + + + {?} == {?} + + + +
+ +
+ + + + m == 19. + + + 19.0 == 19.0 + + + + + + + + x == 17 + + + 17 == 17 + + + + + x == 23 + + + 23 == 23 + + + + + r.elapsed.count() == 42 + + + 42 == 42 + + + + + r.result == 23 + + + 23 == 23 + + + + + r.iterations == 1 + + + 1 == 1 + + + + + s.elapsed.count() == 69 + + + 69 == 69 + + + + + s.result == 17 + + + 17 == 17 + + + + + s.iterations == 1 + + + 1 == 1 + + + + + + + info + + + unscoped info + + + and warn may mix + + + info + + + unscoped info + + + they are not cleared after warnings + + + + +
+
+ + + a == b + + + 1 == 2 + + + +
+ +
+
+
+ + + a != b + + + 1 != 2 + + + +
+ +
+
+
+ + + a < b + + + 1 < 2 + + + +
+ +
+ +
+ +
+ + + a != b + + + 1 != 2 + + + + + b != a + + + 2 != 1 + + +
+ + + a != b + + + 1 != 2 + + + +
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ + +
+ +
+
+ +
+ + +a! +b1! +! + + +
+ + + + s == "7" + + + "7" == "7" + + + + + + + + ti == typeid(int) + + + {?} == {?} + + + + + + + + normal_quantile(0.551780) == Approx(0.13015979861484198) + + + 0.13015979861484195 +== +Approx( 0.13015979861484198 ) + + + + + normal_quantile(0.533700) == Approx(0.08457408802851875) + + + 0.08457408802851875 +== +Approx( 0.08457408802851875 ) + + + + + normal_quantile(0.025000) == Approx(-1.95996398454005449) + + + -1.95996398454005405 +== +Approx( -1.95996398454005449 ) + + + + + + + + + + this MAY be seen only for the FIRST assertion IF info is printed for passing assertions + + + + true + + + true + + + + this MAY be seen only for the SECOND assertion IF info is printed for passing assertions + + + + true + + + true + + + + this SHOULD be seen + + + + false + + + false + + + + + + + + makeString( false ) != static_cast<char*>(0) + + + "valid string" != {null string} + + + + + makeString( true ) == static_cast<char*>(0) + + + {null string} == {null string} + + + + + + + + ptr.get() == 0 + + + 0 == 0 + + + + + + + + ::Catch::Detail::stringify( pair ) == "{ { 42, \"Arthur\" }, { \"Ford\", 24 } }" + + + "{ { 42, "Arthur" }, { "Ford", 24 } }" +== +"{ { 42, "Arthur" }, { "Ford", 24 } }" + + + + + +
+ + + parseEnums( "" ), Equals( std::vector<Catch::StringRef>{} ) + + + { } Equals: { } + + + +
+
+ + + parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector<Catch::StringRef>{"Value1"} ) + + + { Value1 } Equals: { Value1 } + + + + + parseEnums( "Value1" ), Equals( std::vector<Catch::StringRef>{"Value1"} ) + + + { Value1 } Equals: { Value1 } + + + + + parseEnums( "EnumName::Value1" ), Equals(std::vector<Catch::StringRef>{"Value1"} ) + + + { Value1 } Equals: { Value1 } + + + +
+
+ + + parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2"} ) + + + { Value1, Value2 } Equals: { Value1, Value2 } + + + + + parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) + + + { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 } + + + + + parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) + + + { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 } + + + +
+ +
+ + + + p == 0 + + + 0 == 0 + + + + + + + this MAY be seen IF info is printed for passing assertions + + + + true + + + true + + + + + + + this SHOULD be seen + + + this SHOULD also be seen + + + + false + + + false + + + + + + + this SHOULD be seen only ONCE + + + + false + + + false + + + + + true + + + true + + + + this MAY also be seen only ONCE IF info is printed for passing assertions + + + + true + + + true + + + + + true + + + true + + + + + +
+ + + a != b + + + 1 != 2 + + + + + b != a + + + 2 != 1 + + + +
+
+ + + a != b + + + 1 != 2 + + + +
+ +
+ +
+ + + Catch::replaceInPlace(letters, "b", "z") + + + true + + + + + letters == "azcdefcg" + + + "azcdefcg" == "azcdefcg" + + + +
+
+ + + Catch::replaceInPlace(letters, "c", "z") + + + true + + + + + letters == "abzdefzg" + + + "abzdefzg" == "abzdefzg" + + + +
+
+ + + Catch::replaceInPlace(letters, "a", "z") + + + true + + + + + letters == "zbcdefcg" + + + "zbcdefcg" == "zbcdefcg" + + + +
+
+ + + Catch::replaceInPlace(letters, "g", "z") + + + true + + + + + letters == "abcdefcz" + + + "abcdefcz" == "abcdefcz" + + + +
+
+ + + Catch::replaceInPlace(letters, letters, "replaced") + + + true + + + + + letters == "replaced" + + + "replaced" == "replaced" + + + +
+
+ + + !(Catch::replaceInPlace(letters, "x", "z")) + + + !false + + + + + letters == letters + + + "abcdefcg" == "abcdefcg" + + + +
+
+
+ + + Catch::replaceInPlace(letters, "c", "cc") + + + true + + + + + letters == "abccdefccg" + + + "abccdefccg" == "abccdefccg" + + + +
+ +
+
+
+ + + Catch::replaceInPlace(s, "--", "-") + + + true + + + + + s == "--" + + + "--" == "--" + + + +
+ +
+
+ + + Catch::replaceInPlace(s, "'", "|'") + + + true + + + + + s == "didn|'t" + + + "didn|'t" == "didn|'t" + + + +
+ +
+ + + + Catch::makeStream( "%somestream" ) + + + Catch::makeStream( "%somestream" ) + + + + + + + + res.size() == count + + + 10 == 10 + + + + + res[i] == rate + + + 1000.0 == 1000 (0x) + + + + + res[i] == rate + + + 1000.0 == 1000 (0x) + + + + + res[i] == rate + + + 1000.0 == 1000 (0x) + + + + + res[i] == rate + + + 1000.0 == 1000 (0x) + + + + + res[i] == rate + + + 1000.0 == 1000 (0x) + + + + + res[i] == rate + + + 1000.0 == 1000 (0x) + + + + + res[i] == rate + + + 1000.0 == 1000 (0x) + + + + + res[i] == rate + + + 1000.0 == 1000 (0x) + + + + + res[i] == rate + + + 1000.0 == 1000 (0x) + + + + + + + + meter.runs() >= old_runs + + + 1 >= 1 + + + + + meter.runs() >= old_runs + + + 2 >= 1 + + + + + meter.runs() >= old_runs + + + 4 >= 2 + + + + + meter.runs() >= old_runs + + + 8 >= 4 + + + + + meter.runs() >= old_runs + + + 16 >= 8 + + + + + meter.runs() >= old_runs + + + 32 >= 16 + + + + + meter.runs() >= old_runs + + + 64 >= 32 + + + + + meter.runs() >= old_runs + + + 128 >= 64 + + + + + Timing.elapsed >= time + + + 128 ns >= 100 ns + + + + + Timing.result == Timing.iterations + 17 + + + 145 == 145 + + + + + Timing.iterations >= time.count() + + + 128 >= 100 + + + + + + + + x >= old_x + + + 1 >= 1 + + + + + x >= old_x + + + 2 >= 1 + + + + + x >= old_x + + + 4 >= 2 + + + + + x >= old_x + + + 8 >= 4 + + + + + x >= old_x + + + 16 >= 8 + + + + + x >= old_x + + + 32 >= 16 + + + + + x >= old_x + + + 64 >= 32 + + + + + x >= old_x + + + 128 >= 64 + + + + + Timing.elapsed >= time + + + 128 ns >= 100 ns + + + + + Timing.result == Timing.iterations + 17 + + + 145 == 145 + + + + + Timing.iterations >= time.count() + + + 128 >= 100 + + + + + + + + +
+ +
+
+ + +
+
+ +
+ +
+ + + 3 + + + + false + + + false + + + + + + + hi + + + i := 7 + + + + false + + + false + + + + + + + + testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "."_catch_sr ) ) + + + { {?}, {?} } ( Contains: {?} and Contains: {?} ) + + + + + + + skipping because answer = 43 + + + + + + + splitStringRef("", ','), Equals(std::vector<StringRef>()) + + + { } Equals: { } + + + + + splitStringRef("abc", ','), Equals(std::vector<StringRef>{"abc"}) + + + { abc } Equals: { abc } + + + + + splitStringRef("abc,def", ','), Equals(std::vector<StringRef>{"abc", "def"}) + + + { abc, def } Equals: { abc, def } + + + + + + + Count 1 to 3... + + + 1 + + + 2 + + + 3 + + + + false + + + false + + + + Count 4 to 6... + + + 4 + + + 5 + + + 6 + + + + false + + + false + + + + + + + + !(startsWith("", 'c')) + + + !false + + + + + startsWith(std::string("abc"), 'a') + + + true + + + + + startsWith("def"_catch_sr, 'd') + + + true + + + + + +
+ + + Catch::Detail::stringify( emptyMap ) == "{ }" + + + "{ }" == "{ }" + + + +
+
+ + + Catch::Detail::stringify( map ) == "{ { \"one\", 1 } }" + + + "{ { "one", 1 } }" == "{ { "one", 1 } }" + + + +
+
+ + + Catch::Detail::stringify( map ) == "{ { \"abc\", 1 }, { \"def\", 2 }, { \"ghi\", 3 } }" + + + "{ { "abc", 1 }, { "def", 2 }, { "ghi", 3 } }" +== +"{ { "abc", 1 }, { "def", 2 }, { "ghi", 3 } }" + + + +
+ +
+ + + + ::Catch::Detail::stringify(value) == "{ 34, \"xyzzy\" }" + + + "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" + + + + + + + + ::Catch::Detail::stringify( value ) == "{ 34, \"xyzzy\" }" + + + "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" + + + + + +
+ + + Catch::Detail::stringify( emptySet ) == "{ }" + + + "{ }" == "{ }" + + + +
+
+ + + Catch::Detail::stringify( set ) == "{ \"one\" }" + + + "{ "one" }" == "{ "one" }" + + + +
+
+ + + Catch::Detail::stringify( set ) == "{ \"abc\", \"def\", \"ghi\" }" + + + "{ "abc", "def", "ghi" }" +== +"{ "abc", "def", "ghi" }" + + + +
+ +
+ + + + ::Catch::Detail::stringify( pr ) == "{ { \"green\", 55 } }" + + + "{ { "green", 55 } }" +== +"{ { "green", 55 } }" + + + + + + + + Catch::makeStream( "%stderr" )->isConsole() + + + true + + + + + Catch::makeStream( "%stdout" )->isConsole() + + + true + + + + + + + + ::Catch::Detail::stringify(streamable_range{}) == "op<<(streamable_range)" + + + "op<<(streamable_range)" +== +"op<<(streamable_range)" + + + + + ::Catch::Detail::stringify(stringmaker_range{}) == "stringmaker(streamable_range)" + + + "stringmaker(streamable_range)" +== +"stringmaker(streamable_range)" + + + + + ::Catch::Detail::stringify(just_range{}) == "{ 1, 2, 3, 4 }" + + + "{ 1, 2, 3, 4 }" == "{ 1, 2, 3, 4 }" + + + + + ::Catch::Detail::stringify(disabled_range{}) == "{?}" + + + "{?}" == "{?}" + + + + + + + + ::Catch::Detail::stringify( item ) == "StringMaker<has_maker>" + + + "StringMaker<has_maker>" +== +"StringMaker<has_maker>" + + + + + + + + ::Catch::Detail::stringify( item ) == "StringMaker<has_maker_and_operator>" + + + "StringMaker<has_maker_and_operator>" +== +"StringMaker<has_maker_and_operator>" + + + + + + + + ::Catch::Detail::stringify(item) == "{?}" + + + "{?}" == "{?}" + + + + + + + + ::Catch::Detail::stringify( item ) == "operator<<( has_operator )" + + + "operator<<( has_operator )" +== +"operator<<( has_operator )" + + + + + + + + ::Catch::Detail::stringify( item ) == "operator<<( has_template_operator )" + + + "operator<<( has_template_operator )" +== +"operator<<( has_template_operator )" + + + + + + + + ::Catch::Detail::stringify( v ) == "{ StringMaker<has_maker> }" + + + "{ StringMaker<has_maker> }" +== +"{ StringMaker<has_maker> }" + + + + + + + + ::Catch::Detail::stringify( v ) == "{ StringMaker<has_maker_and_operator> }" + + + "{ StringMaker<has_maker_and_operator> }" +== +"{ StringMaker<has_maker_and_operator> }" + + + + + + + + ::Catch::Detail::stringify( v ) == "{ operator<<( has_operator ) }" + + + "{ operator<<( has_operator ) }" +== +"{ operator<<( has_operator ) }" + + + + + + + + data.str.size() == data.len + + + 3 == 3 + + + + + data.str.size() == data.len + + + 3 == 3 + + + + + data.str.size() == data.len + + + 5 == 5 + + + + + data.str.size() == data.len + + + 4 == 4 + + + + + + + + strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) + + + 5 == 5 + + + + + strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) + + + 6 == 6 + + + + + strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) + + + 5 == 5 + + + + + strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) + + + 6 == 6 + + + + + + + + testcase.tags.size() == 1 + + + 1 == 1 + + + + + testcase.tags[0].original == "magic.tag"_catch_sr + + + magic.tag == magic.tag + + + + + + + + + + + Why would you throw a std::string? + + + + + + + result == "\"wide load\"" + + + ""wide load"" == ""wide load"" + + + + + + + + result == "\"wide load\"" + + + ""wide load"" == ""wide load"" + + + + + + + + result == "\"wide load\"" + + + ""wide load"" == ""wide load"" + + + + + + + + result == "\"wide load\"" + + + ""wide load"" == ""wide load"" + + + + + + + + ::Catch::Detail::stringify(e0) == "E2/V0" + + + "E2/V0" == "E2/V0" + + + + + ::Catch::Detail::stringify(e1) == "E2/V1" + + + "E2/V1" == "E2/V1" + + + + + ::Catch::Detail::stringify(e3) == "Unknown enum value 10" + + + "Unknown enum value 10" +== +"Unknown enum value 10" + + + + + + + + ::Catch::Detail::stringify(e0) == "0" + + + "0" == "0" + + + + + ::Catch::Detail::stringify(e1) == "1" + + + "1" == "1" + + + + + + + + ::Catch::Detail::stringify(e0) == "E2{0}" + + + "E2{0}" == "E2{0}" + + + + + ::Catch::Detail::stringify(e1) == "E2{1}" + + + "E2{1}" == "E2{1}" + + + + + + + + ::Catch::Detail::stringify(e0) == "0" + + + "0" == "0" + + + + + ::Catch::Detail::stringify(e1) == "1" + + + "1" == "1" + + + + + + + + "{ }" == ::Catch::Detail::stringify(type{}) + + + "{ }" == "{ }" + + + + + "{ }" == ::Catch::Detail::stringify(value) + + + "{ }" == "{ }" + + + + + + + + "1.5f" == ::Catch::Detail::stringify(float(1.5)) + + + "1.5f" == "1.5f" + + + + + "{ 1.5f, 0 }" == ::Catch::Detail::stringify(type{1.5f,0}) + + + "{ 1.5f, 0 }" == "{ 1.5f, 0 }" + + + + + + + + "{ 0 }" == ::Catch::Detail::stringify(type{0}) + + + "{ 0 }" == "{ 0 }" + + + + + + + + "{ \"hello\", \"world\" }" == ::Catch::Detail::stringify(type{"hello","world"}) + + + "{ "hello", "world" }" +== +"{ "hello", "world" }" + + + + + + + + "{ { 42 }, { }, 1.5f }" == ::Catch::Detail::stringify(value) + + + "{ { 42 }, { }, 1.5f }" +== +"{ { 42 }, { }, 1.5f }" + + + + + + + + e.point == 23 + + + 23.0 == 23 + + + + + e.upper_bound == 23 + + + 23.0 == 23 + + + + + e.lower_bound == 23 + + + 23.0 == 23 + + + + + e.confidence_interval == 0.95 + + + 0.94999999999999996 == 0.94999999999999996 + + + + + + + + dist.a() == -10 + + + -10 == -10 + + + + + dist.b() == 10 + + + 10 == 10 + + + + + +
+ + + !(ptr) + + + !{?} + + + + + ptr.get() == 0 + + + 0 == 0 + + + +
+
+ + + ptr + + + {?} + + + + + *ptr == 0 + + + 0 == 0 + + + + + ptr.get() == naked_ptr + + + 0x == 0x + + +
+ + + !(ptr) + + + !{?} + + + + + ptr.get() == 0 + + + 0 == 0 + + + +
+ +
+
+ + + ptr + + + {?} + + + + + *ptr == 0 + + + 0 == 0 + + + + + ptr.get() == naked_ptr + + + 0x == 0x + + +
+ + + ptr + + + {?} + + + + + ptr.get() != 0 + + + 0x != 0 + + + + + *ptr == 2 + + + 2 == 2 + + + +
+ +
+
+ + + !(ptr) + + + !{?} + + + + + ptr.get() == 0 + + + 0 == 0 + + + +
+
+ + + !(ptr1) + + + !{?} + + + + + ptr2 + + + {?} + + + + + *ptr2 == 1 + + + 1 == 1 + + + +
+
+ + + !(ptr2) + + + !{?} + + + + + ptr1 + + + {?} + + + + + *ptr1 == 2 + + + 2 == 2 + + + +
+
+ + + *ptr1 == 2 + + + 2 == 2 + + + + + *ptr2 == 1 + + + 1 == 1 + + + +
+ +
+ + + + ::Catch::Detail::stringify(v) == "{ }" + + + "{ }" == "{ }" + + + + + ::Catch::Detail::stringify(v) == "{ { \"hello\" }, { \"world\" } }" + + + "{ { "hello" }, { "world" } }" +== +"{ { "hello" }, { "world" } }" + + + + + + + + ::Catch::Detail::stringify(bools) == "{ }" + + + "{ }" == "{ }" + + + + + ::Catch::Detail::stringify(bools) == "{ true }" + + + "{ true }" == "{ true }" + + + + + ::Catch::Detail::stringify(bools) == "{ true, false }" + + + "{ true, false }" == "{ true, false }" + + + + + + + + ::Catch::Detail::stringify(vv) == "{ }" + + + "{ }" == "{ }" + + + + + ::Catch::Detail::stringify(vv) == "{ 42 }" + + + "{ 42 }" == "{ 42 }" + + + + + ::Catch::Detail::stringify(vv) == "{ 42, 250 }" + + + "{ 42, 250 }" == "{ 42, 250 }" + + + + + + + + ::Catch::Detail::stringify(vv) == "{ }" + + + "{ }" == "{ }" + + + + + ::Catch::Detail::stringify(vv) == "{ 42 }" + + + "{ 42 }" == "{ 42 }" + + + + + ::Catch::Detail::stringify(vv) == "{ 42, 250 }" + + + "{ 42, 250 }" == "{ 42, 250 }" + + + + + + + + ::Catch::Detail::stringify(vv) == "{ }" + + + "{ }" == "{ }" + + + + + ::Catch::Detail::stringify(vv) == "{ \"hello\" }" + + + "{ "hello" }" == "{ "hello" }" + + + + + ::Catch::Detail::stringify(vv) == "{ \"hello\", \"world\" }" + + + "{ "hello", "world" }" +== +"{ "hello", "world" }" + + + + + + + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 10 + + + 10 == 10 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 0 + + + 0 == 0 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.capacity() == 0 + + + 0 == 0 + + + +
+ +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + + +
+ +
+ + + + (iterations * rate) > Catch::Benchmark::Detail::warmup_time.count() + + + 160000000 (0x) > 100 + + + + + (end - start) > Catch::Benchmark::Detail::warmup_time + + + 310016000 ns > 100 ms + + + + + + + + q1 == 14.5 + + + 14.5 == 14.5 + + + + + med == 18. + + + 18.0 == 18.0 + + + + + q3 == 23. + + + 23.0 == 23.0 + + + + + +
+ +
+
+ +
+ +
+ + +
diff --git a/tests/SelfTest/IntrospectiveTests/Algorithms.tests.cpp b/tests/SelfTest/IntrospectiveTests/Algorithms.tests.cpp new file mode 100644 index 0000000..fa17cf8 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/Algorithms.tests.cpp @@ -0,0 +1,94 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include + +#include + +#include + +namespace { + template + static bool is_permutation(Range1 const& r1, Range2 const& r2) { + using std::begin; using std::end; + return Catch::Detail::is_permutation( + begin( r1 ), end( r1 ), begin( r2 ), end( r2 ), std::equal_to<>{} ); + } +} + +TEST_CASE("is_permutation", "[algorithms][approvals]") { + SECTION( "Handle empty ranges" ) { + std::array empty; + std::array non_empty{ { 2, 3 } }; + REQUIRE( is_permutation( empty, empty ) ); + REQUIRE_FALSE( is_permutation( empty, non_empty ) ); + REQUIRE_FALSE( is_permutation( non_empty, empty ) ); + } + SECTION( "Different length ranges" ) { + std::array arr1{ { 1, 3, 5, 7, 8, 9 } }; + // arr2 is prefix of arr1 + std::array arr2{ { 1, 3, 5, 7 } }; + // arr3 shares prefix with arr1 and arr2, but is not a permutation + std::array arr3{ { 1, 3, 5, 9, 8 } }; + REQUIRE_FALSE( is_permutation( arr1, arr2 ) ); + REQUIRE_FALSE( is_permutation( arr1, arr3 ) ); + REQUIRE_FALSE( is_permutation( arr2, arr3 ) ); + } + SECTION( "Same length ranges" ) { + SECTION( "Shared elements, but different counts" ) { + const std::array + arr1{ { 1, 1, 1, 1, 2, 2 } }, + arr2{ { 1, 1, 2, 2, 2, 2 } }; + REQUIRE_FALSE( is_permutation( arr1, arr2 ) ); + } + SECTION( "Identical ranges" ) { + const std::array + arr1{ { 1, 1, 1, 1, 2, 2 } }, + arr2{ { 1, 1, 2, 2, 2, 2 } }; + REQUIRE( is_permutation( arr1, arr1 ) ); + REQUIRE( is_permutation( arr2, arr2 ) ); + } + SECTION( "Completely distinct elements" ) { + // Completely distinct elements + const std::array + arr1{ { 1, 2, 3, 4 } }, + arr2{ { 10, 20, 30, 40 } }; + REQUIRE_FALSE( is_permutation( arr1, arr2 ) ); + } + SECTION( "Reverse ranges" ) { + const std::array + arr1{ { 1, 2, 3, 4, 5 } }, + arr2{ { 5, 4, 3, 2, 1 } }; + REQUIRE( is_permutation( arr1, arr2 ) ); + } + SECTION( "Shared prefix & permuted elements" ) { + const std::array + arr1{ { 1, 1, 2, 3, 4 } }, + arr2{ { 1, 1, 4, 2, 3 } }; + REQUIRE( is_permutation( arr1, arr2 ) ); + } + SECTION( "Permutations with element count > 1" ) { + const std::array + arr1{ { 2, 2, 3, 3, 3, 1, 1 } }, + arr2{ { 3, 2, 1, 3, 2, 1, 3 } }; + REQUIRE( is_permutation( arr1, arr2 ) ); + } + } +} + +TEST_CASE("is_permutation supports iterator + sentinel pairs", + "[algorithms][is-permutation][approvals]") { + const has_different_begin_end_types + range_1{ 1, 2, 3, 4 }, + range_2{ 4, 3, 2, 1 }; + REQUIRE( is_permutation( range_1, range_2 ) ); + + const has_different_begin_end_types range_3{ 3, 3, 2, 1 }; + REQUIRE_FALSE( is_permutation( range_1, range_3 ) ); +} diff --git a/tests/SelfTest/IntrospectiveTests/AssertionHandler.tests.cpp b/tests/SelfTest/IntrospectiveTests/AssertionHandler.tests.cpp new file mode 100644 index 0000000..ab09607 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/AssertionHandler.tests.cpp @@ -0,0 +1,17 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include + +TEST_CASE( "Incomplete AssertionHandler", "[assertion-handler][!shouldfail]" ) { + Catch::AssertionHandler catchAssertionHandler( + "REQUIRE"_catch_sr, + CATCH_INTERNAL_LINEINFO, + "Dummy", + Catch::ResultDisposition::Normal ); +} diff --git a/tests/SelfTest/IntrospectiveTests/Clara.tests.cpp b/tests/SelfTest/IntrospectiveTests/Clara.tests.cpp new file mode 100644 index 0000000..53023b5 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/Clara.tests.cpp @@ -0,0 +1,88 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include + + +#include + +TEST_CASE("is_unary_function", "[clara][compilation]") { + auto unary1 = [](int) {}; + auto unary2 = [](std::string const&) {}; + auto const unary3 = [](std::string const&) {}; + auto unary4 = [](int) { return 42; }; + void unary5(char); + double unary6(long); + + double binary1(long, int); + auto binary2 = [](int, char) {}; + auto nullary1 = []() {}; + auto nullary2 = []() {return 42;}; + + STATIC_REQUIRE(Catch::Clara::Detail::is_unary_function::value); + STATIC_REQUIRE(Catch::Clara::Detail::is_unary_function::value); + STATIC_REQUIRE(Catch::Clara::Detail::is_unary_function::value); + STATIC_REQUIRE(Catch::Clara::Detail::is_unary_function::value); + STATIC_REQUIRE(Catch::Clara::Detail::is_unary_function::value); + STATIC_REQUIRE(Catch::Clara::Detail::is_unary_function::value); + + STATIC_REQUIRE_FALSE(Catch::Clara::Detail::is_unary_function::value); + STATIC_REQUIRE_FALSE(Catch::Clara::Detail::is_unary_function::value); + STATIC_REQUIRE_FALSE(Catch::Clara::Detail::is_unary_function::value); + STATIC_REQUIRE_FALSE(Catch::Clara::Detail::is_unary_function::value); + STATIC_REQUIRE_FALSE(Catch::Clara::Detail::is_unary_function::value); + STATIC_REQUIRE_FALSE(Catch::Clara::Detail::is_unary_function::value); +} + + +TEST_CASE("Clara::Arg supports single-arg parse the way Opt does", "[clara][arg][compilation]") { + std::string name; + auto p = Catch::Clara::Arg(name, "just one arg"); + + CHECK(name.empty()); + + p.parse( Catch::Clara::Args{ "UnitTest", "foo" } ); + REQUIRE(name == "foo"); +} + +TEST_CASE("Clara::Arg does not crash on incomplete input", "[clara][arg][compilation]") { + std::string name; + auto p = Catch::Clara::Arg(name, "-"); + + CHECK(name.empty()); + + auto result = p.parse( Catch::Clara::Args{ "UnitTest", "-" } ); + CHECK( result ); + CHECK( result.type() == Catch::Clara::Detail::ResultType::Ok ); + const auto& parsed = result.value(); + CHECK( parsed.type() == Catch::Clara::ParseResultType::NoMatch ); + CHECK( parsed.remainingTokens().count() == 2 ); + CHECK( name.empty() ); +} + +TEST_CASE("Clara::Opt supports accept-many lambdas", "[clara][opt]") { + using namespace Catch::Clara; + std::vector res; + const auto push_to_res = [&](std::string const& s) { + res.push_back(s); + return ParserResult::ok( ParseResultType::Matched ); + }; + + SECTION("Parsing fails on multiple options without accept_many") { + auto p = Parser() | Opt(push_to_res, "value")["-o"]; + auto parse_result = p.parse( Args{ "UnitTest", "-o", "aaa", "-o", "bbb" } ); + CHECK_FALSE(parse_result); + } + SECTION("Parsing succeeds on multiple options with accept_many") { + auto p = Parser() | Opt(accept_many, push_to_res, "value")["-o"]; + auto parse_result = p.parse( Args{ "UnitTest", "-o", "aaa", "-o", "bbb" } ); + CHECK(parse_result); + CHECK(res == std::vector{ "aaa", "bbb" }); + } +} diff --git a/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp b/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp new file mode 100644 index 0000000..404bad2 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp @@ -0,0 +1,467 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace { + auto fakeTestCase(const char* name, const char* desc = "") { return Catch::makeTestCaseInfo("", { name, desc }, CATCH_INTERNAL_LINEINFO); } +} + +TEST_CASE( "Process can be configured on command line", "[config][command-line]" ) { + + using namespace Catch::Matchers; + + Catch::ConfigData config; + auto cli = Catch::makeCommandLineParser(config); + + SECTION("empty args don't cause a crash") { + auto result = cli.parse({""}); + CHECK(result); + CHECK(config.processName == ""); + } + + SECTION("default - no arguments") { + auto result = cli.parse({"test"}); + CHECK(result); + CHECK(config.processName == "test"); + CHECK(config.shouldDebugBreak == false); + CHECK(config.abortAfter == -1); + CHECK(config.noThrow == false); + CHECK( config.reporterSpecifications.empty() ); + + Catch::Config cfg(config); + CHECK_FALSE(cfg.hasTestFilters()); + + // The Config is responsible for mixing in the default reporter + auto expectedReporter = +#if defined( CATCH_CONFIG_DEFAULT_REPORTER ) + CATCH_CONFIG_DEFAULT_REPORTER +#else + "console" +#endif + ; + + CHECK( cfg.getReporterSpecs().size() == 1 ); + CHECK( cfg.getReporterSpecs()[0] == + Catch::ReporterSpec{ expectedReporter, {}, {}, {} } ); + CHECK( cfg.getProcessedReporterSpecs().size() == 1 ); + CHECK( cfg.getProcessedReporterSpecs()[0] == + Catch::ProcessedReporterSpec{ expectedReporter, + std::string{}, + Catch::ColourMode::PlatformDefault, + {} } ); + } + + SECTION("test lists") { + SECTION("Specify one test case using") { + auto result = cli.parse({"test", "test1"}); + CHECK(result); + + Catch::Config cfg(config); + REQUIRE(cfg.hasTestFilters()); + REQUIRE(cfg.testSpec().matches(*fakeTestCase("notIncluded")) == false); + REQUIRE(cfg.testSpec().matches(*fakeTestCase("test1"))); + } + SECTION("Specify one test case exclusion using exclude:") { + auto result = cli.parse({"test", "exclude:test1"}); + CHECK(result); + + Catch::Config cfg(config); + REQUIRE(cfg.hasTestFilters()); + REQUIRE(cfg.testSpec().matches(*fakeTestCase("test1")) == false); + REQUIRE(cfg.testSpec().matches(*fakeTestCase("alwaysIncluded"))); + } + + SECTION("Specify one test case exclusion using ~") { + auto result = cli.parse({"test", "~test1"}); + CHECK(result); + + Catch::Config cfg(config); + REQUIRE(cfg.hasTestFilters()); + REQUIRE(cfg.testSpec().matches(*fakeTestCase("test1")) == false); + REQUIRE(cfg.testSpec().matches(*fakeTestCase("alwaysIncluded"))); + } + + } + + SECTION("reporter") { + using vec_Specs = std::vector; + using namespace std::string_literals; + SECTION("-r/console") { + auto result = cli.parse({"test", "-r", "console"}); + CAPTURE(result.errorMessage()); + CHECK(result); + + REQUIRE( config.reporterSpecifications == + vec_Specs{ { "console", {}, {}, {} } } ); + } + SECTION("-r/xml") { + auto result = cli.parse({"test", "-r", "xml"}); + CAPTURE(result.errorMessage()); + CHECK(result); + + REQUIRE( config.reporterSpecifications == + vec_Specs{ { "xml", {}, {}, {} } } ); + } + SECTION("--reporter/junit") { + auto result = cli.parse({"test", "--reporter", "junit"}); + CAPTURE(result.errorMessage()); + CHECK(result); + + REQUIRE( config.reporterSpecifications == + vec_Specs{ { "junit", {}, {}, {} } } ); + } + SECTION("must match one of the available ones") { + auto result = cli.parse({"test", "--reporter", "unsupported"}); + CHECK(!result); + + REQUIRE_THAT(result.errorMessage(), ContainsSubstring("Unrecognized reporter")); + } + SECTION("With output file") { + auto result = cli.parse({ "test", "-r", "console::out=out.txt" }); + CAPTURE(result.errorMessage()); + CHECK(result); + REQUIRE( config.reporterSpecifications == + vec_Specs{ { "console", "out.txt"s, {}, {} } } ); + } + SECTION("With Windows-like absolute path as output file") { + auto result = cli.parse({ "test", "-r", "console::out=C:\\Temp\\out.txt" }); + CAPTURE(result.errorMessage()); + CHECK(result); + REQUIRE( config.reporterSpecifications == + vec_Specs{ { "console", "C:\\Temp\\out.txt"s, {}, {} } } ); + } + SECTION("Multiple reporters") { + SECTION("All with output files") { + CHECK(cli.parse({ "test", "-r", "xml::out=output.xml", "-r", "junit::out=output-junit.xml" })); + REQUIRE( config.reporterSpecifications == + vec_Specs{ { "xml", "output.xml"s, {}, {} }, + { "junit", "output-junit.xml"s, {}, {} } } ); + } + SECTION("Mixed output files and default output") { + CHECK(cli.parse({ "test", "-r", "xml::out=output.xml", "-r", "console" })); + REQUIRE( config.reporterSpecifications == + vec_Specs{ { "xml", "output.xml"s, {}, {} }, + { "console", {}, {}, {} } } ); + } + SECTION("cannot have multiple reporters with default output") { + auto result = cli.parse({ "test", "-r", "console", "-r", "xml::out=output.xml", "-r", "junit" }); + CHECK(!result); + REQUIRE_THAT(result.errorMessage(), ContainsSubstring("Only one reporter may have unspecified output file.")); + } + } + } + + SECTION("debugger") { + SECTION("-b") { + CHECK(cli.parse({"test", "-b"})); + + REQUIRE(config.shouldDebugBreak == true); + } + SECTION("--break") { + CHECK(cli.parse({"test", "--break"})); + + REQUIRE(config.shouldDebugBreak); + } + } + + + SECTION("abort") { + SECTION("-a aborts after first failure") { + CHECK(cli.parse({"test", "-a"})); + + REQUIRE(config.abortAfter == 1); + } + SECTION("-x 2 aborts after two failures") { + CHECK(cli.parse({"test", "-x", "2"})); + + REQUIRE(config.abortAfter == 2); + } + SECTION("-x must be numeric") { + auto result = cli.parse({"test", "-x", "oops"}); + CHECK(!result); + REQUIRE_THAT(result.errorMessage(), ContainsSubstring("convert") && ContainsSubstring("oops")); + } + + SECTION("wait-for-keypress") { + SECTION("Accepted options") { + using tuple_type = std::tuple; + auto input = GENERATE(table({ + tuple_type{"never", Catch::WaitForKeypress::Never}, + tuple_type{"start", Catch::WaitForKeypress::BeforeStart}, + tuple_type{"exit", Catch::WaitForKeypress::BeforeExit}, + tuple_type{"both", Catch::WaitForKeypress::BeforeStartAndExit}, + })); + CHECK(cli.parse({"test", "--wait-for-keypress", std::get<0>(input)})); + + REQUIRE(config.waitForKeypress == std::get<1>(input)); + } + + SECTION("invalid options are reported") { + auto result = cli.parse({"test", "--wait-for-keypress", "sometimes"}); + CHECK(!result); + +#ifndef CATCH_CONFIG_DISABLE_MATCHERS + REQUIRE_THAT(result.errorMessage(), ContainsSubstring("never") && ContainsSubstring("both")); +#endif + } + } + } + + SECTION("nothrow") { + SECTION("-e") { + CHECK(cli.parse({"test", "-e"})); + + REQUIRE(config.noThrow); + } + SECTION("--nothrow") { + CHECK(cli.parse({"test", "--nothrow"})); + + REQUIRE(config.noThrow); + } + } + + SECTION("output filename") { + SECTION("-o filename") { + CHECK(cli.parse({"test", "-o", "filename.ext"})); + + REQUIRE(config.defaultOutputFilename == "filename.ext"); + } + SECTION("--out") { + CHECK(cli.parse({"test", "--out", "filename.ext"})); + + REQUIRE(config.defaultOutputFilename == "filename.ext"); + } + } + + SECTION("combinations") { + SECTION("Single character flags can be combined") { + CHECK(cli.parse({"test", "-abe"})); + + CHECK(config.abortAfter == 1); + CHECK(config.shouldDebugBreak); + CHECK(config.noThrow == true); + } + } + + + SECTION( "use-colour") { + + using Catch::ColourMode; + + SECTION( "without option" ) { + CHECK(cli.parse({"test"})); + + REQUIRE( config.defaultColourMode == ColourMode::PlatformDefault ); + } + + SECTION( "auto" ) { + CHECK( cli.parse( { "test", "--colour-mode", "default" } ) ); + + REQUIRE( config.defaultColourMode == ColourMode::PlatformDefault ); + } + + SECTION( "yes" ) { + CHECK(cli.parse({"test", "--colour-mode", "ansi"})); + + REQUIRE( config.defaultColourMode == ColourMode::ANSI ); + } + + SECTION( "no" ) { + CHECK(cli.parse({"test", "--colour-mode", "none"})); + + REQUIRE( config.defaultColourMode == ColourMode::None ); + } + + SECTION( "error" ) { + auto result = cli.parse({"test", "--colour-mode", "wrong"}); + CHECK( !result ); + CHECK_THAT( result.errorMessage(), ContainsSubstring( "colour mode must be one of" ) ); + } + } + + SECTION("Benchmark options") { + SECTION("samples") { + CHECK(cli.parse({ "test", "--benchmark-samples=200" })); + + REQUIRE(config.benchmarkSamples == 200); + } + + SECTION("resamples") { + CHECK(cli.parse({ "test", "--benchmark-resamples=20000" })); + + REQUIRE(config.benchmarkResamples == 20000); + } + + SECTION("confidence-interval") { + CHECK(cli.parse({ "test", "--benchmark-confidence-interval=0.99" })); + + REQUIRE(config.benchmarkConfidenceInterval == Catch::Approx(0.99)); + } + + SECTION("no-analysis") { + CHECK(cli.parse({ "test", "--benchmark-no-analysis" })); + + REQUIRE(config.benchmarkNoAnalysis); + } + + SECTION("warmup-time") { + CHECK(cli.parse({ "test", "--benchmark-warmup-time=10" })); + + REQUIRE(config.benchmarkWarmupTime == 10); + } + } +} + +TEST_CASE("Parsing sharding-related cli flags", "[sharding]") { + using namespace Catch::Matchers; + + Catch::ConfigData config; + auto cli = Catch::makeCommandLineParser(config); + + SECTION("shard-count") { + CHECK(cli.parse({ "test", "--shard-count=8" })); + + REQUIRE(config.shardCount == 8); + } + + SECTION("Negative shard count reports error") { + auto result = cli.parse({ "test", "--shard-count=-1" }); + + CHECK_FALSE(result); + REQUIRE_THAT( + result.errorMessage(), + ContainsSubstring( "Could not parse '-1' as shard count" ) ); + } + + SECTION("Zero shard count reports error") { + auto result = cli.parse({ "test", "--shard-count=0" }); + + CHECK_FALSE(result); + REQUIRE_THAT( + result.errorMessage(), + ContainsSubstring( "Shard count must be positive" ) ); + } + + SECTION("shard-index") { + CHECK(cli.parse({ "test", "--shard-index=2" })); + + REQUIRE(config.shardIndex == 2); + } + + SECTION("Negative shard index reports error") { + auto result = cli.parse({ "test", "--shard-index=-12" }); + + CHECK_FALSE(result); + REQUIRE_THAT( + result.errorMessage(), + ContainsSubstring( "Could not parse '-12' as shard index" ) ); + } + + SECTION("Shard index 0 is accepted") { + CHECK(cli.parse({ "test", "--shard-index=0" })); + + REQUIRE(config.shardIndex == 0); + } +} + +TEST_CASE( "Parsing warnings", "[cli][warnings]" ) { + using Catch::WarnAbout; + + Catch::ConfigData config; + auto cli = Catch::makeCommandLineParser( config ); + + SECTION( "NoAssertions" ) { + REQUIRE(cli.parse( { "test", "-w", "NoAssertions" } )); + REQUIRE( config.warnings == WarnAbout::NoAssertions ); + } + SECTION( "NoTests is no longer supported" ) { + REQUIRE_FALSE(cli.parse( { "test", "-w", "NoTests" } )); + } + SECTION( "Combining multiple warnings" ) { + REQUIRE( cli.parse( { "test", + "--warn", "NoAssertions", + "--warn", "UnmatchedTestSpec" } ) ); + + REQUIRE( config.warnings == ( WarnAbout::NoAssertions | WarnAbout::UnmatchedTestSpec ) ); + } +} + +TEST_CASE("Test with special, characters \"in name", "[cli][regression]") { + // This test case succeeds if we can invoke it from the CLI + SUCCEED(); +} + +TEST_CASE("Various suspicious reporter specs are rejected", + "[cli][reporter-spec][approvals]") { + Catch::ConfigData config; + auto cli = Catch::makeCommandLineParser( config ); + + auto spec = GENERATE( as{}, + "", + "::console", + "console::", + "console::some-file::", + "::console::some-file::" ); + CAPTURE( spec ); + + auto result = cli.parse( { "test", "--reporter", spec } ); + REQUIRE_FALSE( result ); +} + +TEST_CASE("Win32 colour implementation is compile-time optional", + "[approvals][cli][colours]") { + Catch::ConfigData config; + auto cli = Catch::makeCommandLineParser( config ); + + auto result = cli.parse( { "test", "--colour-mode", "win32" } ); + +#if defined( CATCH_CONFIG_COLOUR_WIN32 ) + REQUIRE( result ); +#else + REQUIRE_FALSE( result ); +#endif +} + +TEST_CASE( "Parse rng seed in different formats", "[approvals][cli][rng-seed]" ) { + Catch::ConfigData config; + auto cli = Catch::makeCommandLineParser( config ); + + SECTION("well formed cases") { + char const* seed_string; + uint32_t seed_value; + // GCC-5 workaround + using gen_type = std::tuple; + std::tie( seed_string, seed_value ) = GENERATE( table({ + gen_type{ "0xBEEF", 0xBEEF }, + gen_type{ "12345678", 12345678 } + } ) ); + CAPTURE( seed_string ); + + auto result = cli.parse( { "tests", "--rng-seed", seed_string } ); + + REQUIRE( result ); + REQUIRE( config.rngSeed == seed_value ); + } + SECTION( "Error cases" ) { + auto seed_string = + GENERATE( "0xSEED", "999999999999", "08888", "BEEF", "123 456" ); + CAPTURE( seed_string ); + REQUIRE_FALSE( cli.parse( { "tests", "--rng-seed", seed_string } ) ); + } +} diff --git a/tests/SelfTest/IntrospectiveTests/CmdLineHelpers.tests.cpp b/tests/SelfTest/IntrospectiveTests/CmdLineHelpers.tests.cpp new file mode 100644 index 0000000..4df8ecf --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/CmdLineHelpers.tests.cpp @@ -0,0 +1,111 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include +#include + +TEST_CASE("Reporter spec splitting", "[reporter-spec][cli][approvals]") { + using Catch::Detail::splitReporterSpec; + using Catch::Matchers::Equals; + using namespace std::string_literals; + + SECTION("Various edge cases") { + REQUIRE_THAT( splitReporterSpec( "" ), + Equals( std::vector{ ""s } ) ); + REQUIRE_THAT( splitReporterSpec( "::" ), + Equals( std::vector{ "", "" } ) ); + REQUIRE_THAT( splitReporterSpec( "::rep" ), + Equals( std::vector{ "", "rep" } ) ); + REQUIRE_THAT( splitReporterSpec( "rep::" ), + Equals( std::vector{ "rep", "" } ) ); + + } + + SECTION("Validish specs") { + REQUIRE_THAT( splitReporterSpec( "newReporter" ), + Equals( std::vector{ "newReporter"s } ) ); + REQUIRE_THAT( + splitReporterSpec( "foo-reporter::key1=value1::key2=value with " + "space::key with space=some-value" ), + Equals( + std::vector{ "foo-reporter"s, + "key1=value1"s, + "key2=value with space"s, + "key with space=some-value"s } ) ); + REQUIRE_THAT( + splitReporterSpec( "spaced reporter name::key:key=value:value" ), + Equals( std::vector{ "spaced reporter name"s, + "key:key=value:value"s } ) ); + } +} + +TEST_CASE( "Parsing colour mode", "[cli][colour][approvals]" ) { + using Catch::Detail::stringToColourMode; + using Catch::ColourMode; + SECTION("Valid strings") { + REQUIRE( stringToColourMode( "none" ) == ColourMode::None ); + REQUIRE( stringToColourMode( "ansi" ) == ColourMode::ANSI ); + REQUIRE( stringToColourMode( "win32" ) == ColourMode::Win32 ); + REQUIRE( stringToColourMode( "default" ) == + ColourMode::PlatformDefault ); + } + SECTION("Wrong strings") { + REQUIRE_FALSE( stringToColourMode( "NONE" ) ); + REQUIRE_FALSE( stringToColourMode( "-" ) ); + REQUIRE_FALSE( stringToColourMode( "asdbjsdb kasbd" ) ); + } +} + + +TEST_CASE("Parsing reporter specs", "[cli][reporter-spec][approvals]") { + using Catch::parseReporterSpec; + using Catch::ReporterSpec; + using namespace std::string_literals; + + SECTION( "Correct specs" ) { + REQUIRE( parseReporterSpec( "someReporter" ) == + ReporterSpec( "someReporter"s, {}, {}, {} ) ); + REQUIRE( parseReporterSpec( "otherReporter::Xk=v::out=c:\\blah" ) == + ReporterSpec( + "otherReporter"s, "c:\\blah"s, {}, { { "Xk"s, "v"s } } ) ); + REQUIRE( parseReporterSpec( "diffReporter::Xk1=v1::Xk2==v2" ) == + ReporterSpec( "diffReporter", + {}, + {}, + { { "Xk1"s, "v1"s }, { "Xk2"s, "=v2"s } } ) ); + REQUIRE( parseReporterSpec( + "Foo:bar:reporter::colour-mode=ansi::Xk 1=v 1::Xk2=v:3" ) == + ReporterSpec( "Foo:bar:reporter", + {}, + Catch::ColourMode::ANSI, + { { "Xk 1"s, "v 1"s }, { "Xk2"s, "v:3"s } } ) ); + } + + SECTION( "Bad specs" ) { + REQUIRE_FALSE( parseReporterSpec( "::" ) ); + // Unknown Catch2 arg (should be "out") + REQUIRE_FALSE( parseReporterSpec( "reporter::output=filename" ) ); + // Wrong colour spec + REQUIRE_FALSE( parseReporterSpec( "reporter::colour-mode=custom" ) ); + // Duplicated colour spec + REQUIRE_FALSE( parseReporterSpec( "reporter::colour-mode=ansi::colour-mode=ansi" ) ); + // Duplicated out arg + REQUIRE_FALSE( parseReporterSpec( "reporter::out=f.txt::out=z.txt" ) ); + // Duplicated custom arg + REQUIRE_FALSE( parseReporterSpec( "reporter::Xa=foo::Xa=bar" ) ); + // Empty key + REQUIRE_FALSE( parseReporterSpec( "reporter::X=foo" ) ); + REQUIRE_FALSE( parseReporterSpec( "reporter::=foo" ) ); + // Empty value + REQUIRE_FALSE( parseReporterSpec( "reporter::Xa=" ) ); + // non-key value later field + REQUIRE_FALSE( parseReporterSpec( "reporter::Xab" ) ); + } +} diff --git a/tests/SelfTest/IntrospectiveTests/ColourImpl.tests.cpp b/tests/SelfTest/IntrospectiveTests/ColourImpl.tests.cpp new file mode 100644 index 0000000..615fda1 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/ColourImpl.tests.cpp @@ -0,0 +1,64 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include + +#include + +namespace { + class TestColourImpl : public Catch::ColourImpl { + using Catch::ColourImpl::ColourImpl; + // Inherited via ColourImpl + void use( Catch::Colour::Code colourCode ) const override { + m_stream->stream() << "Using code: " << colourCode << '\n'; + } + }; + + class TestStringStream : public Catch::IStream { + std::stringstream m_stream; + public: + std::ostream& stream() override { + return m_stream; + } + + std::string str() const { return m_stream.str(); } + }; +} + +TEST_CASE("ColourGuard behaviour", "[console-colours]") { + TestStringStream streamWrapper; + TestColourImpl colourImpl( &streamWrapper ); + auto& stream = streamWrapper.stream(); + + SECTION("ColourGuard is disengaged by default") { + { auto guard = colourImpl.guardColour( Catch::Colour::Red ); } + + REQUIRE( streamWrapper.str().empty() ); + } + + SECTION("ColourGuard is engaged by op<<") { + stream << "1\n" << colourImpl.guardColour( Catch::Colour::Red ) << "2\n"; + stream << "3\n"; + + REQUIRE( streamWrapper.str() == "1\nUsing code: 2\n2\nUsing code: 0\n3\n" ); + } + + SECTION("ColourGuard can be engaged explicitly") { + { + auto guard = + colourImpl.guardColour( Catch::Colour::Red ).engage( stream ); + stream << "A\n" + << "B\n"; + } + stream << "C\n"; + REQUIRE( streamWrapper.str() == + "Using code: 2\nA\nB\nUsing code: 0\nC\n" ); + } +} diff --git a/tests/SelfTest/IntrospectiveTests/Details.tests.cpp b/tests/SelfTest/IntrospectiveTests/Details.tests.cpp new file mode 100644 index 0000000..5566bb5 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/Details.tests.cpp @@ -0,0 +1,172 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include +#include + +#include + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4702) // unreachable code in the macro expansions +#endif + +TEST_CASE("Check that our error handling macros throw the right exceptions", "[!throws][internals][approvals]") { + REQUIRE_THROWS_AS(CATCH_INTERNAL_ERROR(""), std::logic_error); + REQUIRE_THROWS_AS(CATCH_ERROR(""), std::domain_error); + REQUIRE_THROWS_AS(CATCH_RUNTIME_ERROR(""), std::runtime_error); + REQUIRE_THROWS_AS([](){CATCH_ENFORCE(false, "");}(), std::domain_error); + REQUIRE_NOTHROW([](){CATCH_ENFORCE(true, "");}()); +} + +#if defined(_MSC_VER) +#pragma warning(pop) // unreachable code in the macro expansions +#endif + +TEST_CASE("CaseInsensitiveLess is case insensitive", "[comparisons][string-case]") { + Catch::Detail::CaseInsensitiveLess lt; + SECTION( "Degenerate cases" ) { + REQUIRE( lt( "", "a" ) ); + REQUIRE_FALSE( lt( "a", "a" ) ); + REQUIRE_FALSE( lt( "", "" ) ); + } + SECTION("Plain comparisons") { + REQUIRE( lt( "a", "b" ) ); + REQUIRE( lt( "a", "B" ) ); + REQUIRE( lt( "A", "b" ) ); + REQUIRE( lt( "A", "B" ) ); + } +} + +TEST_CASE( "CaseInsensitiveEqualsTo is case insensitive", + "[comparisons][string-case]" ) { + Catch::Detail::CaseInsensitiveEqualTo eq; + SECTION( "Degenerate cases" ) { + REQUIRE( eq( "", "" ) ); + REQUIRE_FALSE( eq( "", "a" ) ); + } + SECTION( "Plain comparisons" ) { + REQUIRE( eq( "a", "a" ) ); + REQUIRE( eq( "a", "A" ) ); + REQUIRE( eq( "A", "a" ) ); + REQUIRE( eq( "A", "A" ) ); + REQUIRE_FALSE( eq( "a", "b" ) ); + REQUIRE_FALSE( eq( "a", "B" ) ); + } +} + +TEST_CASE("Optional comparison ops", "[optional][approvals]") { + using Catch::Optional; + + Optional a, b; + + SECTION( "Empty optionals are equal" ) { + REQUIRE( a == b ); + REQUIRE_FALSE( a != b ); + } + SECTION( "Empty and non-empty optionals are never equal" ) { + a = 1; + REQUIRE_FALSE( a == b ); + REQUIRE( a != b ); + } + SECTION( + "non-empty optionals are equal if the contained elements are equal") { + a = 1; + b = 2; + REQUIRE( a != b ); + REQUIRE_FALSE( a == b ); + + a = 2; + REQUIRE( a == b ); + REQUIRE_FALSE( a != b ); + } +} + +namespace { + struct MoveChecker { + bool has_moved = false; + MoveChecker() = default; + MoveChecker( MoveChecker const& rhs ) = default; + MoveChecker& operator=( MoveChecker const& rhs ) = default; + MoveChecker( MoveChecker&& rhs ) noexcept { rhs.has_moved = true; } + MoveChecker& operator=( MoveChecker&& rhs ) noexcept { + rhs.has_moved = true; + return *this; + } + }; +} + +TEST_CASE( "Optional supports move ops", "[optional][approvals]" ) { + using Catch::Optional; + MoveChecker a; + Optional opt_A( a ); + REQUIRE_FALSE( a.has_moved ); + REQUIRE_FALSE( opt_A->has_moved ); + + SECTION( "Move construction from element" ) { + Optional opt_B( CATCH_MOVE( a ) ); + REQUIRE( a.has_moved ); + } + SECTION( "Move assignment from element" ) { + opt_A = CATCH_MOVE( a ); + REQUIRE( a.has_moved ); + } + SECTION( "Move construction from optional" ) { + Optional opt_B( CATCH_MOVE( opt_A ) ); + REQUIRE( opt_A->has_moved ); // NOLINT(clang-analyzer-cplusplus.Move) + } + SECTION( "Move assignment from optional" ) { + Optional opt_B( opt_A ); + REQUIRE_FALSE( opt_A->has_moved ); + opt_B = CATCH_MOVE( opt_A ); + REQUIRE( opt_A->has_moved ); // NOLINT(clang-analyzer-cplusplus.Move) + } +} + +TEST_CASE( "Decomposer checks that the argument is 0 when handling " + "only-0-comparable types", + "[decomposition][approvals]" ) { + TypeWithLit0Comparisons t{}; + + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION + CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS + + REQUIRE_THROWS( Catch::Decomposer{} <= t == 42 ); + REQUIRE_THROWS( Catch::Decomposer{} <= 42 == t ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= t == 0 ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= 0 == t ); + + REQUIRE_THROWS( Catch::Decomposer{} <= t != 42 ); + REQUIRE_THROWS( Catch::Decomposer{} <= 42 != t ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= t != 0 ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= 0 != t ); + + REQUIRE_THROWS( Catch::Decomposer{} <= t < 42 ); + REQUIRE_THROWS( Catch::Decomposer{} <= 42 < t ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= t < 0 ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= 0 < t ); + + REQUIRE_THROWS( Catch::Decomposer{} <= t <= 42 ); + REQUIRE_THROWS( Catch::Decomposer{} <= 42 <= t ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= t <= 0 ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= 0 <= t ); + + REQUIRE_THROWS( Catch::Decomposer{} <= t > 42 ); + REQUIRE_THROWS( Catch::Decomposer{} <= 42 > t ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= t > 0 ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= 0 > t ); + + REQUIRE_THROWS( Catch::Decomposer{} <= t >= 42 ); + REQUIRE_THROWS( Catch::Decomposer{} <= 42 >= t ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= t >= 0 ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= 0 >= t ); + + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION +} diff --git a/tests/SelfTest/IntrospectiveTests/FloatingPoint.tests.cpp b/tests/SelfTest/IntrospectiveTests/FloatingPoint.tests.cpp new file mode 100644 index 0000000..d218170 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/FloatingPoint.tests.cpp @@ -0,0 +1,139 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include +#include + +#include + +TEST_CASE("convertToBits", "[floating-point][conversion]") { + using Catch::Detail::convertToBits; + + CHECK( convertToBits( 0.f ) == 0 ); + CHECK( convertToBits( -0.f ) == ( 1ULL << 31 ) ); + CHECK( convertToBits( 0. ) == 0 ); + CHECK( convertToBits( -0. ) == ( 1ULL << 63 ) ); + CHECK( convertToBits( std::numeric_limits::denorm_min() ) == 1 ); + CHECK( convertToBits( std::numeric_limits::denorm_min() ) == 1 ); +} + +TEMPLATE_TEST_CASE("type-shared ulpDistance tests", "[floating-point][ulp][approvals]", float, double) { + using FP = TestType; + using Catch::ulpDistance; + + // Distance between zeros is zero + CHECK( ulpDistance( FP{}, FP{} ) == 0 ); + CHECK( ulpDistance( FP{}, -FP{} ) == 0 ); + CHECK( ulpDistance( -FP{}, -FP{} ) == 0 ); + + // Distance between same-sign infinities is zero + static constexpr FP infinity = std::numeric_limits::infinity(); + CHECK( ulpDistance( infinity, infinity ) == 0 ); + CHECK( ulpDistance( -infinity, -infinity ) == 0 ); + + // Distance between max-finite-val and same sign infinity is 1 + static constexpr FP max_finite = std::numeric_limits::max(); + CHECK( ulpDistance( max_finite, infinity ) == 1 ); + CHECK( ulpDistance( -max_finite, -infinity ) == 1 ); + + // Distance between X and 0 is half of distance between X and -X + CHECK( ulpDistance( -infinity, infinity ) == + 2 * ulpDistance( infinity, FP{} ) ); + CHECK( 2 * ulpDistance( FP{ -2. }, FP{} ) == + ulpDistance( FP{ -2. }, FP{ 2. } ) ); + CHECK( 2 * ulpDistance( FP{ 2. }, FP{} ) == + ulpDistance( FP{ -2. }, FP{ 2. } ) ); + + // Denorms are supported + CHECK( ulpDistance( std::numeric_limits::denorm_min(), FP{} ) == 1 ); + CHECK( ulpDistance( std::numeric_limits::denorm_min(), -FP{} ) == 1 ); + CHECK( ulpDistance( -std::numeric_limits::denorm_min(), FP{} ) == 1 ); + CHECK( ulpDistance( -std::numeric_limits::denorm_min(), -FP{} ) == 1 ); + CHECK( ulpDistance( std::numeric_limits::denorm_min(), + -std::numeric_limits::denorm_min() ) == 2 ); + + // Machine epsilon + CHECK( ulpDistance( FP{ 1. }, + FP{ 1. } + std::numeric_limits::epsilon() ) == 1 ); + CHECK( ulpDistance( -FP{ 1. }, + -FP{ 1. } - std::numeric_limits::epsilon() ) == 1 ); +} + +TEST_CASE("UlpDistance", "[floating-point][ulp][approvals]") { + using Catch::ulpDistance; + + CHECK( ulpDistance( 1., 2. ) == 0x10'00'00'00'00'00'00 ); + CHECK( ulpDistance( -2., 2. ) == 0x80'00'00'00'00'00'00'00 ); + CHECK( ulpDistance( 1.f, 2.f ) == 0x80'00'00 ); + CHECK( ulpDistance( -2.f, 2.f ) == 0x80'00'00'00 ); +} + + + +TEMPLATE_TEST_CASE("gamma", "[approvals][floating-point][ulp][gamma]", float, double) { + using Catch::Detail::gamma; + using Catch::Detail::directCompare; + + // We need to butcher the equal tests with the directCompare helper, + // because the Wfloat-equal triggers in decomposer rather than here, + // so we cannot locally disable it. Goddamn GCC. + CHECK( directCompare( gamma( TestType( -1. ), TestType( 1. ) ), + gamma( TestType( 0.2332 ), TestType( 1.0 ) ) ) ); + CHECK( directCompare( gamma( TestType( -2. ), TestType( 0 ) ), + gamma( TestType( 1. ), TestType( 1.5 ) ) ) ); + CHECK( gamma( TestType( 0. ), TestType( 1.0 ) ) < + gamma( TestType( 1.0 ), TestType( 1.5 ) ) ); + CHECK( gamma( TestType( 0 ), TestType( 1. ) ) < + std::numeric_limits::epsilon() ); + CHECK( gamma( TestType( -1. ), TestType( -0. ) ) < + std::numeric_limits::epsilon() ); + CHECK( directCompare( gamma( TestType( 1. ), TestType( 2. ) ), + std::numeric_limits::epsilon() ) ); + CHECK( directCompare( gamma( TestType( -2. ), TestType( -1. ) ), + std::numeric_limits::epsilon() ) ); +} + +TEMPLATE_TEST_CASE("count_equidistant_floats", + "[approvals][floating-point][distance]", + float, + double) { + using Catch::Detail::count_equidistant_floats; + auto count_steps = []( TestType a, TestType b ) { + return count_equidistant_floats( a, b, Catch::Detail::gamma( a, b ) ); + }; + + CHECK( count_steps( TestType( -1. ), TestType( 1. ) ) == + 2 * count_steps( TestType( 0. ), TestType( 1. ) ) ); +} + +TEST_CASE( "count_equidistant_floats", + "[approvals][floating-point][distance]" ) { + using Catch::Detail::count_equidistant_floats; + auto count_floats_with_scaled_ulp = []( auto a, auto b ) { + return count_equidistant_floats( a, b, Catch::Detail::gamma( a, b ) ); + }; + + CHECK( count_floats_with_scaled_ulp( 1., 1.5 ) == 1ull << 51 ); + CHECK( count_floats_with_scaled_ulp( 1.25, 1.5 ) == 1ull << 50 ); + CHECK( count_floats_with_scaled_ulp( 1.f, 1.5f ) == 1 << 22 ); + CHECK( count_floats_with_scaled_ulp( -std::numeric_limits::max(), + std::numeric_limits::max() ) == + 33554430 ); // (1 << 25) - 2 due to not including infinities + CHECK( count_floats_with_scaled_ulp( -std::numeric_limits::max(), + std::numeric_limits::max() ) == + 18014398509481982 ); // (1 << 54) - 2 due to not including infinities + + STATIC_REQUIRE( std::is_same::value ); + STATIC_REQUIRE( std::is_same::value ); +} diff --git a/tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp b/tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp new file mode 100644 index 0000000..14c9011 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp @@ -0,0 +1,575 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#if defined( __GNUC__ ) || defined( __clang__ ) +# pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + +#include + +#include +#include +#include +#include +#include +#include + +// Tests of generator implementation details +TEST_CASE("Generators internals", "[generators][internals]") { + using namespace Catch::Generators; + + SECTION("Single value") { + auto gen = value(123); + REQUIRE(gen.get() == 123); + REQUIRE_FALSE(gen.next()); + } + SECTION("Preset values") { + auto gen = values({ 1, 3, 5 }); + REQUIRE(gen.get() == 1); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 3); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 5); + REQUIRE_FALSE(gen.next()); + } + SECTION("Generator combinator") { + auto gen = makeGenerators(1, 5, values({ 2, 4 }), 0); + REQUIRE(gen.get() == 1); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 5); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 2); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 4); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 0); + REQUIRE_FALSE(gen.next()); + } + SECTION("Explicitly typed generator sequence") { + auto gen = makeGenerators(as{}, "aa", "bb", "cc"); + // This just checks that the type is std::string: + REQUIRE(gen.get().size() == 2); + // Iterate over the generator + REQUIRE(gen.get() == "aa"); + REQUIRE(gen.next()); + REQUIRE(gen.get() == "bb"); + REQUIRE(gen.next()); + REQUIRE(gen.get() == "cc"); + REQUIRE_FALSE(gen.next()); + } + SECTION("Filter generator") { + // Normal usage + SECTION("Simple filtering") { + auto gen = filter([](int i) { return i != 2; }, values({ 2, 1, 2, 3, 2, 2 })); + REQUIRE(gen.get() == 1); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 3); + REQUIRE_FALSE(gen.next()); + } + SECTION("Filter out multiple elements at the start and end") { + auto gen = filter([](int i) { return i != 2; }, values({ 2, 2, 1, 3, 2, 2 })); + REQUIRE(gen.get() == 1); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 3); + REQUIRE_FALSE(gen.next()); + } + + SECTION("Throws on construction if it can't get initial element") { + REQUIRE_THROWS_AS(filter([](int) { return false; }, value(1)), Catch::GeneratorException); + REQUIRE_THROWS_AS( + filter([](int) { return false; }, values({ 1, 2, 3 })), + Catch::GeneratorException); + } + } + SECTION("Take generator") { + SECTION("Take less") { + auto gen = take(2, values({ 1, 2, 3 })); + REQUIRE(gen.get() == 1); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 2); + REQUIRE_FALSE(gen.next()); + } + SECTION("Take more") { + auto gen = take(2, value(1)); + REQUIRE(gen.get() == 1); + REQUIRE_FALSE(gen.next()); + } + } + SECTION("Map with explicit return type") { + auto gen = map([] (int i) {return 2.0 * i; }, values({ 1, 2, 3 })); + REQUIRE(gen.get() == 2.0); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 4.0); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 6.0); + REQUIRE_FALSE(gen.next()); + } + SECTION("Map with deduced return type") { + auto gen = map([] (int i) {return 2.0 * i; }, values({ 1, 2, 3 })); + REQUIRE(gen.get() == 2.0); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 4.0); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 6.0); + REQUIRE_FALSE(gen.next()); + } + SECTION("Repeat") { + SECTION("Singular repeat") { + auto gen = repeat(1, value(3)); + REQUIRE(gen.get() == 3); + REQUIRE_FALSE(gen.next()); + } + SECTION("Actual repeat") { + auto gen = repeat(2, values({ 1, 2, 3 })); + REQUIRE(gen.get() == 1); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 2); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 3); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 1); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 2); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 3); + REQUIRE_FALSE(gen.next()); + } + } + SECTION("Range") { + SECTION("Positive auto step") { + SECTION("Integer") { + auto gen = range(-2, 2); + REQUIRE(gen.get() == -2); + REQUIRE(gen.next()); + REQUIRE(gen.get() == -1); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 0); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 1); + REQUIRE_FALSE(gen.next()); + } + } + SECTION("Negative auto step") { + SECTION("Integer") { + auto gen = range(2, -2); + REQUIRE(gen.get() == 2); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 1); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 0); + REQUIRE(gen.next()); + REQUIRE(gen.get() == -1); + REQUIRE_FALSE(gen.next()); + } + } + SECTION("Positive manual step") { + SECTION("Integer") { + SECTION("Exact") { + auto gen = range(-7, 5, 3); + REQUIRE(gen.get() == -7); + REQUIRE(gen.next()); + REQUIRE(gen.get() == -4); + REQUIRE(gen.next()); + REQUIRE(gen.get() == -1); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 2); + REQUIRE_FALSE(gen.next()); + } + SECTION("Slightly over end") { + auto gen = range(-7, 4, 3); + REQUIRE(gen.get() == -7); + REQUIRE(gen.next()); + REQUIRE(gen.get() == -4); + REQUIRE(gen.next()); + REQUIRE(gen.get() == -1); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 2); + REQUIRE_FALSE(gen.next()); + } + SECTION("Slightly under end") { + auto gen = range(-7, 6, 3); + REQUIRE(gen.get() == -7); + REQUIRE(gen.next()); + REQUIRE(gen.get() == -4); + REQUIRE(gen.next()); + REQUIRE(gen.get() == -1); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 2); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 5); + REQUIRE_FALSE(gen.next()); + } + } + + SECTION("Floating Point") { + using Catch::Approx; + SECTION("Exact") { + const auto rangeStart = -1.; + const auto rangeEnd = 1.; + const auto step = .1; + + auto gen = range(rangeStart, rangeEnd, step); + auto expected = rangeStart; + while( (rangeEnd - expected) > step ) { + INFO( "Current expected value is " << expected ); + REQUIRE(gen.get() == Approx(expected)); + REQUIRE(gen.next()); + + expected += step; + } + REQUIRE(gen.get() == Approx( rangeEnd ) ); + REQUIRE_FALSE(gen.next()); + } + SECTION("Slightly over end") { + const auto rangeStart = -1.; + const auto rangeEnd = 1.; + const auto step = .3; + + auto gen = range(rangeStart, rangeEnd, step); + auto expected = rangeStart; + while( (rangeEnd - expected) > step ) { + INFO( "Current expected value is " << expected ); + REQUIRE(gen.get() == Approx(expected)); + REQUIRE(gen.next()); + + expected += step; + } + REQUIRE_FALSE(gen.next()); + } + SECTION("Slightly under end") { + const auto rangeStart = -1.; + const auto rangeEnd = .9; + const auto step = .3; + + auto gen = range(rangeStart, rangeEnd, step); + auto expected = rangeStart; + while( (rangeEnd - expected) > step ) { + INFO( "Current expected value is " << expected ); + REQUIRE(gen.get() == Approx(expected)); + REQUIRE(gen.next()); + + expected += step; + } + REQUIRE_FALSE(gen.next()); + } + } + } + SECTION("Negative manual step") { + SECTION("Integer") { + SECTION("Exact") { + auto gen = range(5, -7, -3); + REQUIRE(gen.get() == 5); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 2); + REQUIRE(gen.next()); + REQUIRE(gen.get() == -1); + REQUIRE(gen.next()); + REQUIRE(gen.get() == -4); + REQUIRE_FALSE(gen.next()); + } + SECTION("Slightly over end") { + auto gen = range(5, -6, -3); + REQUIRE(gen.get() == 5); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 2); + REQUIRE(gen.next()); + REQUIRE(gen.get() == -1); + REQUIRE(gen.next()); + REQUIRE(gen.get() == -4); + REQUIRE_FALSE(gen.next()); + } + SECTION("Slightly under end") { + auto gen = range(5, -8, -3); + REQUIRE(gen.get() == 5); + REQUIRE(gen.next()); + REQUIRE(gen.get() == 2); + REQUIRE(gen.next()); + REQUIRE(gen.get() == -1); + REQUIRE(gen.next()); + REQUIRE(gen.get() == -4); + REQUIRE(gen.next()); + REQUIRE(gen.get() == -7); + REQUIRE_FALSE(gen.next()); + } + } + } + } + +} + + +// todo: uncopyable type used in a generator +// idea: uncopyable tag type for a stupid generator + +namespace { +struct non_copyable { + non_copyable() = default; + non_copyable(non_copyable const&) = delete; + non_copyable& operator=(non_copyable const&) = delete; + int value = -1; +}; + +// This class shows how to implement a simple generator for Catch tests +class TestGen : public Catch::Generators::IGenerator { + int current_number; +public: + + TestGen(non_copyable const& nc): + current_number(nc.value) {} + + int const& get() const override; + bool next() override { + return false; + } +}; + +// Avoids -Wweak-vtables +int const& TestGen::get() const { + return current_number; +} + +} + +TEST_CASE("GENERATE capture macros", "[generators][internals][approvals]") { + auto value = GENERATE(take(10, random(0, 10))); + + non_copyable nc; nc.value = value; + // neither `GENERATE_COPY` nor plain `GENERATE` would compile here + auto value2 = GENERATE_REF(Catch::Generators::GeneratorWrapper(Catch::Detail::make_unique(nc))); + REQUIRE(value == value2); +} + +TEST_CASE("#1809 - GENERATE_COPY and SingleValueGenerator does not compile", "[generators][compilation][approvals]") { + // Verify Issue #1809 fix, only needs to compile. + auto a = GENERATE_COPY(1, 2); + (void)a; + auto b = GENERATE_COPY(as{}, 1, 2); + (void)b; + int i = 1; + int j = 2; + auto c = GENERATE_COPY(i, j); + (void)c; + auto d = GENERATE_COPY(as{}, i, j); + (void)d; + SUCCEED(); +} + +TEST_CASE("Multiple random generators in one test case output different values", "[generators][internals][approvals]") { + SECTION("Integer") { + auto random1 = Catch::Generators::random(0, 1000); + auto random2 = Catch::Generators::random(0, 1000); + size_t same = 0; + for (size_t i = 0; i < 1000; ++i) { + same += random1.get() == random2.get(); + random1.next(); random2.next(); + } + // Because the previous low bound failed CI couple of times, + // we use a very high threshold of 20% before failure is reported. + REQUIRE(same < 200); + } + SECTION("Float") { + auto random1 = Catch::Generators::random(0., 1000.); + auto random2 = Catch::Generators::random(0., 1000.); + size_t same = 0; + for (size_t i = 0; i < 1000; ++i) { + same += random1.get() == random2.get(); + random1.next(); random2.next(); + } + // Because the previous low bound failed CI couple of times, + // we use a very high threshold of 20% before failure is reported. + REQUIRE(same < 200); + } +} + +TEST_CASE("#2040 - infinite compilation recursion in GENERATE with MSVC", "[generators][compilation][approvals]") { + int x = 42; + auto test = GENERATE_COPY(1, x, 2 * x); + CHECK(test < 100); +} + +namespace { + static bool always_true(int) { + return true; + } + + static bool is_even(int n) { + return n % 2 == 0; + } + + static bool is_multiple_of_3(int n) { + return n % 3 == 0; + } +} + +TEST_CASE("GENERATE handles function (pointers)", "[generators][compilation][approvals]") { + auto f = GENERATE(always_true, is_even, is_multiple_of_3); + REQUIRE(f(6)); +} + +TEST_CASE("GENERATE decays arrays", "[generators][compilation][approvals]") { + auto str = GENERATE("abc", "def", "gh"); + (void)str; + STATIC_REQUIRE(std::is_same::value); +} + +TEST_CASE("Generators count returned elements", "[generators][approvals]") { + auto generator = Catch::Generators::FixedValuesGenerator( { 1, 2, 3 } ); + REQUIRE( generator.currentElementIndex() == 0 ); + REQUIRE( generator.countedNext() ); + REQUIRE( generator.currentElementIndex() == 1 ); + REQUIRE( generator.countedNext() ); + REQUIRE( generator.currentElementIndex() == 2 ); + REQUIRE_FALSE( generator.countedNext() ); + REQUIRE( generator.currentElementIndex() == 2 ); +} + +TEST_CASE( "Generators can stringify their elements", + "[generators][approvals]" ) { + auto generator = + Catch::Generators::FixedValuesGenerator( { 1, 2, 3 } ); + + REQUIRE( generator.currentElementAsString() == "1"_catch_sr ); + REQUIRE( generator.countedNext() ); + REQUIRE( generator.currentElementAsString() == "2"_catch_sr ); + REQUIRE( generator.countedNext() ); + REQUIRE( generator.currentElementAsString() == "3"_catch_sr ); +} + +namespace { + class CustomStringifyGenerator + : public Catch::Generators::IGenerator { + bool m_first = true; + + std::string stringifyImpl() const override { + return m_first ? "first" : "second"; + } + + bool next() override { + if ( m_first ) { + m_first = false; + return true; + } + return false; + } + + public: + bool const& get() const override; + }; + + // Avoids -Wweak-vtables + bool const& CustomStringifyGenerator::get() const { return m_first; } +} // namespace + +TEST_CASE( "Generators can override element stringification", + "[generators][approvals]" ) { + CustomStringifyGenerator generator; + REQUIRE( generator.currentElementAsString() == "first"_catch_sr ); + REQUIRE( generator.countedNext() ); + REQUIRE( generator.currentElementAsString() == "second"_catch_sr ); +} + +namespace { + class StringifyCountingGenerator + : public Catch::Generators::IGenerator { + bool m_first = true; + mutable size_t m_stringificationCalls = 0; + + std::string stringifyImpl() const override { + ++m_stringificationCalls; + return m_first ? "first" : "second"; + } + + bool next() override { + if ( m_first ) { + m_first = false; + return true; + } + return false; + } + + public: + + bool const& get() const override; + size_t stringificationCalls() const { return m_stringificationCalls; } + }; + + // Avoids -Wweak-vtables + bool const& StringifyCountingGenerator::get() const { return m_first; } + +} // namespace + +TEST_CASE( "Generator element stringification is cached", + "[generators][approvals]" ) { + StringifyCountingGenerator generator; + REQUIRE( generator.currentElementAsString() == "first"_catch_sr ); + REQUIRE( generator.currentElementAsString() == "first"_catch_sr ); + REQUIRE( generator.currentElementAsString() == "first"_catch_sr ); + REQUIRE( generator.currentElementAsString() == "first"_catch_sr ); + REQUIRE( generator.currentElementAsString() == "first"_catch_sr ); + + REQUIRE( generator.stringificationCalls() == 1 ); +} + +TEST_CASE( "Random generators can be seeded", "[generators][approvals]" ) { + SECTION( "Integer generator" ) { + using Catch::Generators::RandomIntegerGenerator; + RandomIntegerGenerator rng1( 0, 100, 0x1234 ), + rng2( 0, 100, 0x1234 ); + + for ( size_t i = 0; i < 10; ++i ) { + REQUIRE( rng1.get() == rng2.get() ); + rng1.next(); rng2.next(); + } + } + SECTION("Float generator") { + using Catch::Generators::RandomFloatingGenerator; + RandomFloatingGenerator rng1( 0., 100., 0x1234 ), + rng2( 0., 100., 0x1234 ); + for ( size_t i = 0; i < 10; ++i ) { + REQUIRE( rng1.get() == rng2.get() ); + rng1.next(); + rng2.next(); + } + } +} + +TEST_CASE("Filter generator throws exception for empty generator", + "[generators]") { + using namespace Catch::Generators; + + REQUIRE_THROWS_AS( + filter( []( int ) { return false; }, value( 3 ) ), + Catch::GeneratorException ); +} + +TEST_CASE("from_range(container) supports ADL begin/end and arrays", "[generators][from-range][approvals]") { + using namespace Catch::Generators; + + SECTION("C array") { + int arr[3]{ 5, 6, 7 }; + auto gen = from_range( arr ); + REQUIRE( gen.get() == 5 ); + REQUIRE( gen.next() ); + REQUIRE( gen.get() == 6 ); + REQUIRE( gen.next() ); + REQUIRE( gen.get() == 7 ); + REQUIRE_FALSE( gen.next() ); + } + + SECTION( "ADL range" ) { + unrelated::needs_ADL_begin range{ 1, 2, 3 }; + auto gen = from_range( range ); + REQUIRE( gen.get() == 1 ); + REQUIRE( gen.next() ); + REQUIRE( gen.get() == 2 ); + REQUIRE( gen.next() ); + REQUIRE( gen.get() == 3 ); + REQUIRE_FALSE( gen.next() ); + } + +} diff --git a/tests/SelfTest/IntrospectiveTests/Integer.tests.cpp b/tests/SelfTest/IntrospectiveTests/Integer.tests.cpp new file mode 100644 index 0000000..8955f40 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/Integer.tests.cpp @@ -0,0 +1,224 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include + +namespace { + template + static void + CommutativeMultCheck( Int a, Int b, Int upper_result, Int lower_result ) { + using Catch::Detail::extendedMult; + using Catch::Detail::ExtendedMultResult; + CHECK( extendedMult( a, b ) == + ExtendedMultResult{ upper_result, lower_result } ); + CHECK( extendedMult( b, a ) == + ExtendedMultResult{ upper_result, lower_result } ); + } + + // Simple (and slow) implmentation of extended multiplication for tests + constexpr Catch::Detail::ExtendedMultResult + extendedMultNaive( std::uint64_t lhs, std::uint64_t rhs ) { + // This is a simple long multiplication, where we split lhs and rhs + // into two 32-bit "digits", so that we can do ops with carry in 64-bits. + // + // 32b 32b 32b 32b + // lhs L1 L2 + // * rhs R1 R2 + // ------------------------ + // | R2 * L2 | + // | R2 * L1 | + // | R1 * L2 | + // | R1 * L1 | + // ------------------------- + // | a | b | c | d | + +#define CarryBits( x ) ( x >> 32 ) +#define Digits( x ) ( x & 0xFF'FF'FF'FF ) + + auto r2l2 = Digits( rhs ) * Digits( lhs ); + auto r2l1 = Digits( rhs ) * CarryBits( lhs ); + auto r1l2 = CarryBits( rhs ) * Digits( lhs ); + auto r1l1 = CarryBits( rhs ) * CarryBits( lhs ); + + // Sum to columns first + auto d = Digits( r2l2 ); + auto c = CarryBits( r2l2 ) + Digits( r2l1 ) + Digits( r1l2 ); + auto b = CarryBits( r2l1 ) + CarryBits( r1l2 ) + Digits( r1l1 ); + auto a = CarryBits( r1l1 ); + + // Propagate carries between columns + c += CarryBits( d ); + b += CarryBits( c ); + a += CarryBits( b ); + + // Remove the used carries + c = Digits( c ); + b = Digits( b ); + a = Digits( a ); + +#undef CarryBits +#undef Digits + + return { + a << 32 | b, // upper 64 bits + c << 32 | d // lower 64 bits + }; + } + + +} // namespace + +TEST_CASE( "extendedMult 64x64", "[Integer][approvals]" ) { + // a x 0 == 0 + CommutativeMultCheck( 0x1234'5678'9ABC'DEFF, 0, 0, 0 ); + + // bit carried from low half to upper half + CommutativeMultCheck( uint64_t( 1 ) << 63, 2, 1, 0 ); + + // bits in upper half on one side, bits in lower half on other side + CommutativeMultCheck( 0xcdcd'dcdc'0000'0000, + 0x0000'0000'aeae'aeae, + 0x0000'0000'8c6e'5a77, + 0x7391'a588'0000'0000 ); + + // Some input numbers without interesting patterns + CommutativeMultCheck( 0xaaaa'aaaa'aaaa'aaaa, + 0xbbbb'bbbb'bbbb'bbbb, + 0x7d27'd27d'27d2'7d26, + 0xd82d'82d8'2d82'd82e ); + + CommutativeMultCheck( 0x7d27'd27d'27d2'7d26, + 0xd82d'82d8'2d82'd82e, + 0x69af'd991'8256'b953, + 0x8724'8909'fcb6'8cd4 ); + + CommutativeMultCheck( 0xdead'beef'dead'beef, + 0xfeed'feed'feed'feef, + 0xddbf'680b'2b0c'b558, + 0x7a36'b06f'2ce9'6321 ); + + CommutativeMultCheck( 0xddbf'680b'2b0c'b558, + 0x7a36'b06f'2ce9'6321, + 0x69dc'96c9'294b'fc7f, + 0xd038'39fa'a3dc'6858 ); + + CommutativeMultCheck( 0x61c8'8646'80b5'83eb, + 0x61c8'8646'80b5'83eb, + 0x2559'92d3'8220'8bbe, + 0xdf44'2d22'ce48'59b9 ); +} + +TEST_CASE("extendedMult 64x64 - all implementations", "[integer][approvals]") { + using Catch::Detail::extendedMult; + using Catch::Detail::extendedMultPortable; + using Catch::Detail::fillBitsFrom; + + std::random_device rng; + for (size_t i = 0; i < 100; ++i) { + auto a = fillBitsFrom( rng ); + auto b = fillBitsFrom( rng ); + CAPTURE( a, b ); + + auto naive_ab = extendedMultNaive( a, b ); + + REQUIRE( naive_ab == extendedMultNaive( b, a ) ); + REQUIRE( naive_ab == extendedMultPortable( a, b ) ); + REQUIRE( naive_ab == extendedMultPortable( b, a ) ); + REQUIRE( naive_ab == extendedMult( a, b ) ); + REQUIRE( naive_ab == extendedMult( b, a ) ); + } +} + +TEST_CASE( "SizedUnsignedType helpers", "[integer][approvals]" ) { + using Catch::Detail::SizedUnsignedType_t; + using Catch::Detail::DoubleWidthUnsignedType_t; + + STATIC_REQUIRE( sizeof( SizedUnsignedType_t<1> ) == 1 ); + STATIC_REQUIRE( sizeof( SizedUnsignedType_t<2> ) == 2 ); + STATIC_REQUIRE( sizeof( SizedUnsignedType_t<4> ) == 4 ); + STATIC_REQUIRE( sizeof( SizedUnsignedType_t<8> ) == 8 ); + + STATIC_REQUIRE( sizeof( DoubleWidthUnsignedType_t ) == 2 ); + STATIC_REQUIRE( std::is_unsigned>::value ); + STATIC_REQUIRE( sizeof( DoubleWidthUnsignedType_t ) == 4 ); + STATIC_REQUIRE( std::is_unsigned>::value ); + STATIC_REQUIRE( sizeof( DoubleWidthUnsignedType_t ) == 8 ); + STATIC_REQUIRE( std::is_unsigned>::value ); +} + +TEST_CASE( "extendedMult 32x32", "[integer][approvals]" ) { + // a x 0 == 0 + CommutativeMultCheck( 0x1234'5678, 0, 0, 0 ); + + // bit carried from low half to upper half + CommutativeMultCheck( uint32_t(1) << 31, 2, 1, 0 ); + + // bits in upper half on one side, bits in lower half on other side + CommutativeMultCheck( 0xdcdc'0000, 0x0000'aabb, 0x0000'934b, 0x6cb4'0000 ); + + // Some input numbers without interesting patterns + CommutativeMultCheck( + 0xaaaa'aaaa, 0xbbbb'bbbb, 0x7d27'd27c, 0x2d82'd82e ); + + CommutativeMultCheck( + 0x7d27'd27c, 0x2d82'd82e, 0x163f'f7e8, 0xc5b8'7248 ); + + CommutativeMultCheck( + 0xdead'beef, 0xfeed'feed, 0xddbf'6809, 0x6f8d'e543 ); + + CommutativeMultCheck( + 0xddbf'6809, 0x6f8d'e543, 0x60a0'e71e, 0x751d'475b ); +} + +TEST_CASE( "extendedMult 8x8", "[integer][approvals]" ) { + // a x 0 == 0 + CommutativeMultCheck( 0xcd, 0, 0, 0 ); + + // bit carried from low half to upper half + CommutativeMultCheck( uint8_t( 1 ) << 7, 2, 1, 0 ); + + // bits in upper half on one side, bits in lower half on other side + CommutativeMultCheck( 0x80, 0x03, 0x01, 0x80 ); + + // Some input numbers without interesting patterns + CommutativeMultCheck( 0xaa, 0xbb, 0x7c, 0x2e ); + CommutativeMultCheck( 0x7c, 0x2e, 0x16, 0x48 ); + CommutativeMultCheck( 0xdc, 0xcd, 0xb0, 0x2c ); + CommutativeMultCheck( 0xb0, 0x2c, 0x1e, 0x40 ); +} + + +TEST_CASE( "negative and positive signed integers keep their order after transposeToNaturalOrder", + "[integer][approvals]") { + using Catch::Detail::transposeToNaturalOrder; + int32_t negative( -1 ); + int32_t positive( 1 ); + uint32_t adjusted_negative = + transposeToNaturalOrder( static_cast( negative ) ); + uint32_t adjusted_positive = + transposeToNaturalOrder( static_cast( positive ) ); + REQUIRE( adjusted_negative < adjusted_positive ); + REQUIRE( adjusted_positive - adjusted_negative == 2 ); + + // Conversion has to be reversible + REQUIRE( negative == static_cast( transposeToNaturalOrder( + adjusted_negative ) ) ); + REQUIRE( positive == static_cast( transposeToNaturalOrder( + adjusted_positive ) ) ); +} + +TEST_CASE( "unsigned integers are unchanged by transposeToNaturalOrder", + "[integer][approvals]") { + using Catch::Detail::transposeToNaturalOrder; + uint32_t max = std::numeric_limits::max(); + uint32_t zero = 0; + REQUIRE( max == transposeToNaturalOrder( max ) ); + REQUIRE( zero == transposeToNaturalOrder( zero ) ); +} diff --git a/tests/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp b/tests/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp new file mode 100644 index 0000000..69251d9 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp @@ -0,0 +1,455 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 +// Adapted from donated nonius code. + + +#if defined( __GNUC__ ) || defined( __clang__ ) +# pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace { + struct manual_clock { + public: + using duration = std::chrono::nanoseconds; + using time_point = std::chrono::time_point; + using rep = duration::rep; + using period = duration::period; + enum { is_steady = true }; + + static time_point now() { + return time_point(duration(tick())); + } + + static void advance(int ticks = 1) { + tick() += ticks; + } + + private: + static rep& tick() { + static rep the_tick = 0; + return the_tick; + } + }; + + struct counting_clock { + public: + using duration = std::chrono::nanoseconds; + using time_point = std::chrono::time_point; + using rep = duration::rep; + using period = duration::period; + enum { is_steady = true }; + + static time_point now() { + static rep ticks = 0; + return time_point(duration(ticks += rate())); + } + + static void set_rate(rep new_rate) { rate() = new_rate; } + + private: + static rep& rate() { + static rep the_rate = 1; + return the_rate; + } + }; + + struct TestChronometerModel : Catch::Benchmark::Detail::ChronometerConcept { + int started = 0; + int finished = 0; + + void start() override { ++started; } + void finish() override { ++finished; } + }; +} // namespace + +TEST_CASE("warmup", "[benchmark]") { + auto rate = 1000; + counting_clock::set_rate(rate); + + auto start = counting_clock::now(); + auto iterations = Catch::Benchmark::Detail::warmup(); + auto end = counting_clock::now(); + + REQUIRE((iterations * rate) > Catch::Benchmark::Detail::warmup_time.count()); + REQUIRE((end - start) > Catch::Benchmark::Detail::warmup_time); +} + +TEST_CASE("resolution", "[benchmark]") { + auto rate = 1000; + counting_clock::set_rate(rate); + + size_t count = 10; + auto res = Catch::Benchmark::Detail::resolution(static_cast(count)); + + REQUIRE(res.size() == count); + + for (size_t i = 1; i < count; ++i) { + REQUIRE(res[i] == rate); + } +} + +TEST_CASE("estimate_clock_resolution", "[benchmark]") { + auto rate = 2'000; + counting_clock::set_rate(rate); + + int iters = 160'000; + auto res = Catch::Benchmark::Detail::estimate_clock_resolution(iters); + + REQUIRE(res.mean.count() == rate); + REQUIRE(res.outliers.total() == 0); +} + +TEST_CASE("benchmark function call", "[benchmark]") { + SECTION("without chronometer") { + auto called = 0; + auto model = TestChronometerModel{}; + auto meter = Catch::Benchmark::Chronometer{ model, 1 }; + auto fn = Catch::Benchmark::Detail::BenchmarkFunction{ [&] { + CHECK(model.started == 1); + CHECK(model.finished == 0); + ++called; + } }; + + fn(meter); + + CHECK(model.started == 1); + CHECK(model.finished == 1); + CHECK(called == 1); + } + + SECTION("with chronometer") { + auto called = 0; + auto model = TestChronometerModel{}; + auto meter = Catch::Benchmark::Chronometer{ model, 1 }; + auto fn = Catch::Benchmark::Detail::BenchmarkFunction{ [&](Catch::Benchmark::Chronometer) { + CHECK(model.started == 0); + CHECK(model.finished == 0); + ++called; + } }; + + fn(meter); + + CHECK(model.started == 0); + CHECK(model.finished == 0); + CHECK(called == 1); + } +} + +TEST_CASE("uniform samples", "[benchmark]") { + std::vector samples(100); + std::fill(samples.begin(), samples.end(), 23); + + auto e = Catch::Benchmark::Detail::bootstrap( + 0.95, + samples.data(), + samples.data() + samples.size(), + samples, + []( double const* a, double const* b ) { + auto sum = std::accumulate(a, b, 0.); + return sum / (b - a); + }); + CHECK(e.point == 23); + CHECK(e.upper_bound == 23); + CHECK(e.lower_bound == 23); + CHECK(e.confidence_interval == 0.95); +} + + +TEST_CASE("normal_cdf", "[benchmark][approvals]") { + using Catch::Benchmark::Detail::normal_cdf; + using Catch::Approx; + CHECK(normal_cdf(0.000000) == Approx(0.50000000000000000)); + CHECK(normal_cdf(1.000000) == Approx(0.84134474606854293)); + CHECK(normal_cdf(-1.000000) == Approx(0.15865525393145705)); + CHECK(normal_cdf(2.809729) == Approx(0.99752083845315409)); + CHECK(normal_cdf(-1.352570) == Approx(0.08809652095066035)); +} + +TEST_CASE("erfc_inv", "[benchmark]") { + using Catch::Benchmark::Detail::erfc_inv; + using Catch::Approx; + CHECK(erfc_inv(1.103560) == Approx(-0.09203687623843015)); + CHECK(erfc_inv(1.067400) == Approx(-0.05980291115763361)); + CHECK(erfc_inv(0.050000) == Approx(1.38590382434967796)); +} + +TEST_CASE("normal_quantile", "[benchmark]") { + using Catch::Benchmark::Detail::normal_quantile; + using Catch::Approx; + CHECK(normal_quantile(0.551780) == Approx(0.13015979861484198)); + CHECK(normal_quantile(0.533700) == Approx(0.08457408802851875)); + CHECK(normal_quantile(0.025000) == Approx(-1.95996398454005449)); +} + + +TEST_CASE("mean", "[benchmark]") { + std::vector x{ 10., 20., 14., 16., 30., 24. }; + + auto m = Catch::Benchmark::Detail::mean(x.data(), x.data() + x.size()); + + REQUIRE(m == 19.); +} + +TEST_CASE("weighted_average_quantile", "[benchmark]") { + std::vector x{ 10., 20., 14., 16., 30., 24. }; + + auto q1 = Catch::Benchmark::Detail::weighted_average_quantile(1, 4, x.data(), x.data() + x.size()); + auto med = Catch::Benchmark::Detail::weighted_average_quantile(1, 2, x.data(), x.data() + x.size()); + auto q3 = Catch::Benchmark::Detail::weighted_average_quantile(3, 4, x.data(), x.data() + x.size()); + + REQUIRE(q1 == 14.5); + REQUIRE(med == 18.); + REQUIRE(q3 == 23.); +} + +TEST_CASE("classify_outliers", "[benchmark]") { + auto require_outliers = [](Catch::Benchmark::OutlierClassification o, int los, int lom, int him, int his) { + REQUIRE(o.low_severe == los); + REQUIRE(o.low_mild == lom); + REQUIRE(o.high_mild == him); + REQUIRE(o.high_severe == his); + REQUIRE(o.total() == los + lom + him + his); + }; + + SECTION("none") { + std::vector x{ 10., 20., 14., 16., 30., 24. }; + + auto o = Catch::Benchmark::Detail::classify_outliers( + x.data(), x.data() + x.size() ); + + REQUIRE(o.samples_seen == static_cast(x.size())); + require_outliers(o, 0, 0, 0, 0); + } + SECTION("low severe") { + std::vector x{ -12., 20., 14., 16., 30., 24. }; + + auto o = Catch::Benchmark::Detail::classify_outliers( + x.data(), x.data() + x.size() ); + + REQUIRE(o.samples_seen == static_cast(x.size())); + require_outliers(o, 1, 0, 0, 0); + } + SECTION("low mild") { + std::vector x{ 1., 20., 14., 16., 30., 24. }; + + auto o = Catch::Benchmark::Detail::classify_outliers( + x.data(), x.data() + x.size() ); + + REQUIRE(o.samples_seen == static_cast(x.size())); + require_outliers(o, 0, 1, 0, 0); + } + SECTION("high mild") { + std::vector x{ 10., 20., 14., 16., 36., 24. }; + + auto o = Catch::Benchmark::Detail::classify_outliers( + x.data(), x.data() + x.size() ); + + REQUIRE(o.samples_seen == static_cast(x.size())); + require_outliers(o, 0, 0, 1, 0); + } + SECTION("high severe") { + std::vector x{ 10., 20., 14., 16., 49., 24. }; + + auto o = Catch::Benchmark::Detail::classify_outliers( + x.data(), x.data() + x.size() ); + + REQUIRE(o.samples_seen == static_cast(x.size())); + require_outliers(o, 0, 0, 0, 1); + } + SECTION("mixed") { + std::vector x{ -20., 20., 14., 16., 39., 24. }; + + auto o = Catch::Benchmark::Detail::classify_outliers( + x.data(), x.data() + x.size() ); + + REQUIRE(o.samples_seen == static_cast(x.size())); + require_outliers(o, 1, 0, 1, 0); + } +} + +TEST_CASE("analyse", "[approvals][benchmark]") { + Catch::ConfigData data{}; + data.benchmarkConfidenceInterval = 0.95; + data.benchmarkNoAnalysis = false; + data.benchmarkResamples = 1000; + data.benchmarkSamples = 99; + Catch::Config config{data}; + + using FDuration = Catch::Benchmark::FDuration; + std::vector samples(99); + for (size_t i = 0; i < samples.size(); ++i) { + samples[i] = FDuration(23 + (i % 3 - 1)); + } + + auto analysis = Catch::Benchmark::Detail::analyse(config, samples.data(), samples.data() + samples.size()); + CHECK( analysis.mean.point.count() == 23 ); + CHECK( analysis.mean.lower_bound.count() < 23 ); + CHECK(analysis.mean.lower_bound.count() > 22); + CHECK(analysis.mean.upper_bound.count() > 23); + CHECK(analysis.mean.upper_bound.count() < 24); + + CHECK(analysis.standard_deviation.point.count() > 0.5); + CHECK(analysis.standard_deviation.point.count() < 1); + CHECK(analysis.standard_deviation.lower_bound.count() > 0.5); + CHECK(analysis.standard_deviation.lower_bound.count() < 1); + CHECK(analysis.standard_deviation.upper_bound.count() > 0.5); + CHECK(analysis.standard_deviation.upper_bound.count() < 1); + + CHECK(analysis.outliers.total() == 0); + CHECK(analysis.outliers.low_mild == 0); + CHECK(analysis.outliers.low_severe == 0); + CHECK(analysis.outliers.high_mild == 0); + CHECK(analysis.outliers.high_severe == 0); + CHECK(analysis.outliers.samples_seen == static_cast(samples.size())); + + CHECK(analysis.outlier_variance < 0.5); + CHECK(analysis.outlier_variance > 0); +} + +TEST_CASE("analyse no analysis", "[benchmark]") { + Catch::ConfigData data{}; + data.benchmarkConfidenceInterval = 0.95; + data.benchmarkNoAnalysis = true; + data.benchmarkResamples = 1000; + data.benchmarkSamples = 99; + Catch::Config config{ data }; + + using FDuration = Catch::Benchmark::FDuration; + std::vector samples(99); + for (size_t i = 0; i < samples.size(); ++i) { + samples[i] = FDuration(23 + (i % 3 - 1)); + } + + auto analysis = Catch::Benchmark::Detail::analyse(config, samples.data(), samples.data() + samples.size()); + CHECK(analysis.mean.point.count() == 23); + CHECK(analysis.mean.lower_bound.count() == 23); + CHECK(analysis.mean.upper_bound.count() == 23); + + CHECK(analysis.standard_deviation.point.count() == 0); + CHECK(analysis.standard_deviation.lower_bound.count() == 0); + CHECK(analysis.standard_deviation.upper_bound.count() == 0); + + CHECK(analysis.outliers.total() == 0); + CHECK(analysis.outliers.low_mild == 0); + CHECK(analysis.outliers.low_severe == 0); + CHECK(analysis.outliers.high_mild == 0); + CHECK(analysis.outliers.high_severe == 0); + CHECK(analysis.outliers.samples_seen == 0); + + CHECK(analysis.outlier_variance == 0); +} + +TEST_CASE("run_for_at_least, int", "[benchmark]") { + manual_clock::duration time(100); + + int old_x = 1; + auto Timing = Catch::Benchmark::Detail::run_for_at_least(time, 1, [&old_x](int x) -> int { + CHECK(x >= old_x); + manual_clock::advance(x); + old_x = x; + return x + 17; + }); + + REQUIRE(Timing.elapsed >= time); + REQUIRE(Timing.result == Timing.iterations + 17); + REQUIRE(Timing.iterations >= time.count()); +} + +TEST_CASE("run_for_at_least, chronometer", "[benchmark]") { + manual_clock::duration time(100); + + int old_runs = 1; + auto Timing = Catch::Benchmark::Detail::run_for_at_least(time, 1, [&old_runs](Catch::Benchmark::Chronometer meter) -> int { + CHECK(meter.runs() >= old_runs); + manual_clock::advance(100); + meter.measure([] { + manual_clock::advance(1); + }); + old_runs = meter.runs(); + return meter.runs() + 17; + }); + + REQUIRE(Timing.elapsed >= time); + REQUIRE(Timing.result == Timing.iterations + 17); + REQUIRE(Timing.iterations >= time.count()); +} + + +TEST_CASE("measure", "[benchmark]") { + auto r = Catch::Benchmark::Detail::measure([](int x) -> int { + CHECK(x == 17); + manual_clock::advance(42); + return 23; + }, 17); + auto s = Catch::Benchmark::Detail::measure([](int x) -> int { + CHECK(x == 23); + manual_clock::advance(69); + return 17; + }, 23); + + CHECK(r.elapsed.count() == 42); + CHECK(r.result == 23); + CHECK(r.iterations == 1); + + CHECK(s.elapsed.count() == 69); + CHECK(s.result == 17); + CHECK(s.iterations == 1); +} + +TEST_CASE("run benchmark", "[benchmark][approvals]") { + counting_clock::set_rate(1000); + auto start = counting_clock::now(); + + Catch::Benchmark::Benchmark bench{ "Test Benchmark", [](Catch::Benchmark::Chronometer meter) { + counting_clock::set_rate(100000); + meter.measure([] { return counting_clock::now(); }); + } }; + + bench.run(); + auto end = counting_clock::now(); + + CHECK((end - start).count() == 2867251000); +} + +TEST_CASE("Failing benchmarks", "[!benchmark][.approvals]") { + SECTION("empty", "Benchmark that has been optimized away (because it is empty)") { + BENCHMARK("Empty benchmark") {}; + } + SECTION("throw", "Benchmark that throws an exception") { + BENCHMARK("Throwing benchmark") { + throw "just a plain literal, bleh"; + }; + } + SECTION("assert", "Benchmark that asserts inside") { + BENCHMARK("Asserting benchmark") { + REQUIRE(1 == 2); + }; + } + SECTION("fail", "Benchmark that fails inside") { + BENCHMARK("FAIL'd benchmark") { + FAIL("This benchmark only fails, nothing else"); + }; + } +} + +TEST_CASE( "Failing benchmark respects should-fail", + "[!shouldfail][!benchmark][approvals]" ) { + BENCHMARK( "Asserting benchmark" ) { REQUIRE( 1 == 2 ); }; +} diff --git a/tests/SelfTest/IntrospectiveTests/Json.tests.cpp b/tests/SelfTest/IntrospectiveTests/Json.tests.cpp new file mode 100644 index 0000000..8204e3c --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/Json.tests.cpp @@ -0,0 +1,152 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include + +#include + +namespace { + struct Custom {}; + static std::ostream& operator<<( std::ostream& os, Custom const& ) { + return os << "custom"; + } +} // namespace + +TEST_CASE( "JsonWriter", "[JSON][JsonWriter]" ) { + + std::stringstream stream; + SECTION( "Newly constructed JsonWriter does nothing" ) { + Catch::JsonValueWriter writer{ stream }; + REQUIRE( stream.str() == "" ); + } + + SECTION( "Calling writeObject will create an empty pair of braces" ) { + { auto writer = Catch::JsonValueWriter{ stream }.writeObject(); } + REQUIRE( stream.str() == "{\n}" ); + } + + SECTION( "Calling writeObject with key will create an object to write the " + "value" ) { + using Catch::Matchers::ContainsSubstring; + { + auto writer = Catch::JsonValueWriter{ stream }.writeObject(); + writer.write( "int" ).write( 1 ); + writer.write( "double" ).write( 1.5 ); + writer.write( "true" ).write( true ); + writer.write( "false" ).write( false ); + writer.write( "string" ).write( "this is a string" ); + writer.write( "array" ).writeArray().write( 1 ).write( 2 ); + } + REQUIRE_THAT( + stream.str(), + ContainsSubstring( "\"int\": 1," ) && + ContainsSubstring( "\"double\": 1.5," ) && + ContainsSubstring( "\"true\": true," ) && + ContainsSubstring( "\"false\": false," ) && + ContainsSubstring( "\"string\": \"this is a string\"," ) && + ContainsSubstring( "\"array\": [\n 1,\n 2\n ]\n}" ) ); + } + + SECTION( "nesting objects" ) { + using Catch::Matchers::ContainsSubstring; + { + auto writer = Catch::JsonValueWriter{ stream }.writeObject(); + writer.write( "empty_object" ).writeObject(); + writer.write( "fully_object" ) + .writeObject() + .write( "key" ) + .write( 1 ); + } + REQUIRE_THAT( stream.str(), + ContainsSubstring( "\"empty_object\": {\n }," ) && + ContainsSubstring( + "\"fully_object\": {\n \"key\": 1\n }" ) ); + } + + SECTION( "Calling writeArray will create an empty pair of braces" ) { + { auto writer = Catch::JsonValueWriter{ stream }.writeArray(); } + REQUIRE( stream.str() == "[\n]" ); + } + + SECTION( "Calling writeArray creates array to write the values to" ) { + { + auto writer = Catch::JsonValueWriter{ stream }.writeArray(); + writer.write( 1 ); + writer.write( 1.5 ); + writer.write( true ); + writer.write( false ); + writer.write( "this is a string" ); + writer.writeObject().write( "object" ).write( 42 ); + writer.writeArray().write( "array" ).write( 42.5 ); + } + REQUIRE( stream.str() == "[\n 1,\n 1.5,\n true,\n false,\n \"this is a string\",\n {\n \"object\": 42\n },\n [\n \"array\",\n 42.5\n ]\n]" ); + } + + SECTION( + "Moved from JsonObjectWriter shall not insert superfluous brace" ) { + { + auto writer = Catch::JsonObjectWriter{ stream }; + auto another_writer = std::move( writer ); + } + REQUIRE( stream.str() == "{\n}" ); + } + SECTION( + "Moved from JsonArrayWriter shall not insert superfluous bracket" ) { + { + auto writer = Catch::JsonArrayWriter{ stream }; + auto another_writer = std::move( writer ); + } + REQUIRE( stream.str() == "[\n]" ); + } + SECTION( "Custom class shall be quoted" ) { + Catch::JsonValueWriter{ stream }.write( Custom{} ); + REQUIRE( stream.str() == "\"custom\"" ); + } +} + +TEST_CASE( "JsonWriter escapes charaters in strings properly", "[JsonWriter]" ) { + std::stringstream sstream; + SECTION( "Quote in a string is escaped" ) { + Catch::JsonValueWriter{ sstream }.write( "\"" ); + REQUIRE( sstream.str() == "\"\\\"\"" ); + } + SECTION("Backslash in a string is escaped") { + Catch::JsonValueWriter{ sstream }.write( "\\" ); + REQUIRE( sstream.str() == "\"\\\\\"" ); + } + SECTION( "Forward slash in a string is **not** escaped" ) { + Catch::JsonValueWriter{ sstream }.write( "/" ); + REQUIRE( sstream.str() == "\"/\"" ); + } + SECTION( "Backspace in a string is escaped" ) { + Catch::JsonValueWriter{ sstream }.write( "\b" ); + REQUIRE( sstream.str() == "\"\\b\"" ); + } + SECTION( "Formfeed in a string is escaped" ) { + Catch::JsonValueWriter{ sstream }.write( "\f" ); + REQUIRE( sstream.str() == "\"\\f\"" ); + } + SECTION( "linefeed in a string is escaped" ) { + Catch::JsonValueWriter{ sstream }.write( "\n" ); + REQUIRE( sstream.str() == "\"\\n\"" ); + } + SECTION( "carriage return in a string is escaped" ) { + Catch::JsonValueWriter{ sstream }.write( "\r" ); + REQUIRE( sstream.str() == "\"\\r\"" ); + } + SECTION( "tab in a string is escaped" ) { + Catch::JsonValueWriter{ sstream }.write( "\t" ); + REQUIRE( sstream.str() == "\"\\t\"" ); + } + SECTION( "combination of characters is escaped" ) { + Catch::JsonValueWriter{ sstream }.write( "\\/\t\r\n" ); + REQUIRE( sstream.str() == "\"\\\\/\\t\\r\\n\"" ); + } +} diff --git a/tests/SelfTest/IntrospectiveTests/Parse.tests.cpp b/tests/SelfTest/IntrospectiveTests/Parse.tests.cpp new file mode 100644 index 0000000..7791355 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/Parse.tests.cpp @@ -0,0 +1,38 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include + +#include + +TEST_CASE("Parse uints", "[parse-numbers]") { + using Catch::parseUInt; + using Catch::Optional; + + SECTION("proper inputs") { + REQUIRE( parseUInt( "0" ) == Optional{ 0 } ); + REQUIRE( parseUInt( "100" ) == Optional{ 100 } ); + REQUIRE( parseUInt( "4294967295" ) == + Optional{ 4294967295 } ); + REQUIRE( parseUInt( "0xFF", 16 ) == Optional{ 255 } ); + } + SECTION( "Bad inputs" ) { + // empty + REQUIRE_FALSE( parseUInt( "" ) ); + // random noise + REQUIRE_FALSE( parseUInt( "!!KJHF*#" ) ); + // negative + REQUIRE_FALSE( parseUInt( "-1" ) ); + // too large + REQUIRE_FALSE( parseUInt( "4294967296" ) ); + REQUIRE_FALSE( parseUInt( "42949672964294967296429496729642949672964294967296" ) ); + REQUIRE_FALSE( parseUInt( "2 4" ) ); + // hex with base 10 + REQUIRE_FALSE( parseUInt( "0xFF", 10 ) ); + } +} diff --git a/tests/SelfTest/IntrospectiveTests/PartTracker.tests.cpp b/tests/SelfTest/IntrospectiveTests/PartTracker.tests.cpp new file mode 100644 index 0000000..c13ec57 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/PartTracker.tests.cpp @@ -0,0 +1,254 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include + + +using namespace Catch; + +namespace { +Catch::TestCaseTracking::NameAndLocationRef makeNAL( StringRef name ) { + return Catch::TestCaseTracking::NameAndLocationRef( name, Catch::SourceLineInfo("",0) ); +} +} + +TEST_CASE( "Tracker" ) { + + TrackerContext ctx; + ctx.startRun(); + ctx.startCycle(); + + + ITracker& testCase = SectionTracker::acquire( ctx, makeNAL( "Testcase" ) ); + REQUIRE( testCase.isOpen() ); + + ITracker& s1 = SectionTracker::acquire( ctx, makeNAL( "S1" ) ); + REQUIRE( s1.isOpen() ); + + SECTION( "successfully close one section" ) { + s1.close(); + REQUIRE( s1.isSuccessfullyCompleted() ); + REQUIRE( testCase.isComplete() == false ); + + testCase.close(); + REQUIRE( ctx.completedCycle() ); + REQUIRE( testCase.isSuccessfullyCompleted() ); + } + + SECTION( "fail one section" ) { + s1.fail(); + REQUIRE( s1.isComplete() ); + REQUIRE( s1.isSuccessfullyCompleted() == false ); + REQUIRE( testCase.isComplete() == false ); + + testCase.close(); + REQUIRE( ctx.completedCycle() ); + REQUIRE( testCase.isSuccessfullyCompleted() == false ); + + SECTION( "re-enter after failed section" ) { + ctx.startCycle(); + ITracker& testCase2 = SectionTracker::acquire( ctx, makeNAL( "Testcase" ) ); + REQUIRE( testCase2.isOpen() ); + + ITracker& s1b = SectionTracker::acquire( ctx, makeNAL( "S1" ) ); + REQUIRE( s1b.isOpen() == false ); + + testCase2.close(); + REQUIRE( ctx.completedCycle() ); + REQUIRE( testCase.isComplete() ); + REQUIRE( testCase.isSuccessfullyCompleted() ); + } + SECTION( "re-enter after failed section and find next section" ) { + ctx.startCycle(); + ITracker& testCase2 = SectionTracker::acquire( ctx, makeNAL( "Testcase" ) ); + REQUIRE( testCase2.isOpen() ); + + ITracker& s1b = SectionTracker::acquire( ctx, makeNAL( "S1" ) ); + REQUIRE( s1b.isOpen() == false ); + + ITracker& s2 = SectionTracker::acquire( ctx, makeNAL( "S2" ) ); + REQUIRE( s2.isOpen() ); + + s2.close(); + REQUIRE( ctx.completedCycle() ); + + testCase2.close(); + REQUIRE( testCase.isComplete() ); + REQUIRE( testCase.isSuccessfullyCompleted() ); + } + } + + SECTION( "successfully close one section, then find another" ) { + s1.close(); + + ITracker& s2 = SectionTracker::acquire( ctx, makeNAL( "S2" ) ); + REQUIRE( s2.isOpen() == false ); + + testCase.close(); + REQUIRE( testCase.isComplete() == false ); + + SECTION( "Re-enter - skips S1 and enters S2" ) { + ctx.startCycle(); + ITracker& testCase2 = SectionTracker::acquire( ctx, makeNAL( "Testcase" ) ); + REQUIRE( testCase2.isOpen() ); + + ITracker& s1b = SectionTracker::acquire( ctx, makeNAL( "S1" ) ); + REQUIRE( s1b.isOpen() == false ); + + ITracker& s2b = SectionTracker::acquire( ctx, makeNAL( "S2" ) ); + REQUIRE( s2b.isOpen() ); + + REQUIRE( ctx.completedCycle() == false ); + + SECTION ("Successfully close S2") { + s2b.close(); + REQUIRE( ctx.completedCycle() ); + + REQUIRE( s2b.isSuccessfullyCompleted() ); + REQUIRE( testCase2.isComplete() == false ); + + testCase2.close(); + REQUIRE( testCase2.isSuccessfullyCompleted() ); + } + SECTION ("fail S2") { + s2b.fail(); + REQUIRE( ctx.completedCycle() ); + + REQUIRE( s2b.isComplete() ); + REQUIRE( s2b.isSuccessfullyCompleted() == false ); + + testCase2.close(); + REQUIRE( testCase2.isSuccessfullyCompleted() == false ); + + // Need a final cycle + ctx.startCycle(); + ITracker& testCase3 = SectionTracker::acquire( ctx, makeNAL( "Testcase" ) ); + REQUIRE( testCase3.isOpen() ); + + ITracker& s1c = SectionTracker::acquire( ctx, makeNAL( "S1" ) ); + REQUIRE( s1c.isOpen() == false ); + + ITracker& s2c = SectionTracker::acquire( ctx, makeNAL( "S2" ) ); + REQUIRE( s2c.isOpen() == false ); + + testCase3.close(); + REQUIRE( testCase3.isSuccessfullyCompleted() ); + } + } + } + + SECTION( "open a nested section" ) { + ITracker& s2 = SectionTracker::acquire( ctx, makeNAL( "S2" ) ); + REQUIRE( s2.isOpen() ); + + s2.close(); + REQUIRE( s2.isComplete() ); + REQUIRE( s1.isComplete() == false ); + + s1.close(); + REQUIRE( s1.isComplete() ); + REQUIRE( testCase.isComplete() == false ); + + testCase.close(); + REQUIRE( testCase.isComplete() ); + } +} + +static bool previouslyRun = false; +static bool previouslyRunNested = false; + +TEST_CASE( "#1394", "[.][approvals][tracker]" ) { + // -- Don't re-run after specified section is done + REQUIRE(previouslyRun == false); + + SECTION( "RunSection" ) { + previouslyRun = true; + } + SECTION( "SkipSection" ) { + // cause an error if this section is called because it shouldn't be + REQUIRE(1 == 0); + } +} + +TEST_CASE( "#1394 nested", "[.][approvals][tracker]" ) { + REQUIRE(previouslyRunNested == false); + + SECTION( "NestedRunSection" ) { + SECTION( "s1" ) { + previouslyRunNested = true; + } + } + SECTION( "NestedSkipSection" ) { + // cause an error if this section is called because it shouldn't be + REQUIRE(1 == 0); + } +} + +// Selecting a "not last" section inside a test case via -c "section" would +// previously only run the first subsection, instead of running all of them. +// This allows us to check that `"#1670 regression check" -c A` leads to +// 2 successful assertions. +TEST_CASE("#1670 regression check", "[.approvals][tracker]") { + SECTION("A") { + SECTION("1") SUCCEED(); + SECTION("2") SUCCEED(); + } + SECTION("B") { + SECTION("1") SUCCEED(); + SECTION("2") SUCCEED(); + } +} + +// #1938 required a rework on how generator tracking works, so that `GENERATE` +// supports being sandwiched between two `SECTION`s. The following tests check +// various other scenarios through checking output in approval tests. +TEST_CASE("#1938 - GENERATE after a section", "[.][regression][generators]") { + SECTION("A") { + SUCCEED("A"); + } + auto m = GENERATE(1, 2, 3); + SECTION("B") { + REQUIRE(m); + } +} + +TEST_CASE("#1938 - flat generate", "[.][regression][generators]") { + auto m = GENERATE(1, 2, 3); + REQUIRE(m); +} + +TEST_CASE("#1938 - nested generate", "[.][regression][generators]") { + auto m = GENERATE(1, 2, 3); + auto n = GENERATE(1, 2, 3); + REQUIRE(m); + REQUIRE(n); +} + +TEST_CASE("#1938 - mixed sections and generates", "[.][regression][generators]") { + auto i = GENERATE(1, 2); + SECTION("A") { + SUCCEED("A"); + } + auto j = GENERATE(3, 4); + SECTION("B") { + SUCCEED("B"); + } + auto k = GENERATE(5, 6); + CAPTURE(i, j, k); + SUCCEED(); +} + +TEST_CASE("#1938 - Section followed by flat generate", "[.][regression][generators]") { + SECTION("A") { + REQUIRE(1); + } + auto m = GENERATE(2, 3); + REQUIRE(m); +} diff --git a/tests/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp b/tests/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp new file mode 100644 index 0000000..8932321 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp @@ -0,0 +1,609 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +TEST_CASE("Our PCG implementation provides expected results for known seeds", "[rng]") { + Catch::SimplePcg32 rng; + SECTION("Default seeded") { + REQUIRE(rng() == 0xfcdb943b); + REQUIRE(rng() == 0x6f55b921); + REQUIRE(rng() == 0x4c17a916); + REQUIRE(rng() == 0x71eae25f); + REQUIRE(rng() == 0x6ce7909c); + } + SECTION("Specific seed") { + rng.seed(0xabcd1234); + REQUIRE(rng() == 0x57c08495); + REQUIRE(rng() == 0x33c956ac); + REQUIRE(rng() == 0x2206fd76); + REQUIRE(rng() == 0x3501a35b); + REQUIRE(rng() == 0xfdffb30f); + + // Also check repeated output after reseeding + rng.seed(0xabcd1234); + REQUIRE(rng() == 0x57c08495); + REQUIRE(rng() == 0x33c956ac); + REQUIRE(rng() == 0x2206fd76); + REQUIRE(rng() == 0x3501a35b); + REQUIRE(rng() == 0xfdffb30f); + } +} + +TEST_CASE("Comparison ops", "[rng]") { + using Catch::SimplePcg32; + REQUIRE(SimplePcg32{} == SimplePcg32{}); + REQUIRE(SimplePcg32{ 0 } != SimplePcg32{}); + REQUIRE_FALSE(SimplePcg32{ 1 } == SimplePcg32{ 2 }); + REQUIRE_FALSE(SimplePcg32{ 1 } != SimplePcg32{ 1 }); +} + +TEST_CASE("Random seed generation reports unknown methods", "[rng][seed]") { + REQUIRE_THROWS(Catch::generateRandomSeed(static_cast(77))); +} + +TEST_CASE("Random seed generation accepts known methods", "[rng][seed]") { + using Catch::GenerateFrom; + const auto method = GENERATE( + GenerateFrom::Time, + GenerateFrom::RandomDevice, + GenerateFrom::Default + ); + + REQUIRE_NOTHROW(Catch::generateRandomSeed(method)); +} + +TEMPLATE_TEST_CASE("uniform_floating_point_distribution never returns infs from finite range", + "[rng][distribution][floating-point][approvals]", float, double) { + std::random_device rd{}; + Catch::SimplePcg32 pcg( rd() ); + Catch::uniform_floating_point_distribution dist( + -std::numeric_limits::max(), + std::numeric_limits::max() ); + + for (size_t i = 0; i < 10'000; ++i) { + auto ret = dist( pcg ); + REQUIRE_FALSE( std::isinf( ret ) ); + REQUIRE_FALSE( std::isnan( ret ) ); + } +} + +TEST_CASE( "fillBitsFrom - shortening and stretching", "[rng][approvals]" ) { + using Catch::Detail::fillBitsFrom; + + // The seed is not important, but the numbers below have to be repeatable. + // They should also exhibit the same general pattern of being prefixes + Catch::SimplePcg32 pcg( 0xaabb'ccdd ); + + SECTION( "Shorten to 8 bits" ) { + // We cast the result to avoid dealing with char-like type in uint8_t + auto shortened = static_cast( fillBitsFrom( pcg ) ); + REQUIRE( shortened == 0xcc ); + } + SECTION( "Shorten to 16 bits" ) { + auto shortened = fillBitsFrom( pcg ); + REQUIRE( shortened == 0xccbe ); + } + SECTION( "Keep at 32 bits" ) { + auto n = fillBitsFrom( pcg ); + REQUIRE( n == 0xccbe'5f04 ); + } + SECTION( "Stretch to 64 bits" ) { + auto stretched = fillBitsFrom( pcg ); + REQUIRE( stretched == 0xccbe'5f04'a424'a486 ); + } +} + +TEST_CASE("uniform_integer_distribution can return the bounds", "[rng][distribution]") { + Catch::uniform_integer_distribution dist( -10, 10 ); + REQUIRE( dist.a() == -10 ); + REQUIRE( dist.b() == 10 ); +} + +namespace { + template + static void CheckReturnValue(Catch::uniform_integer_distribution& dist, + Catch::SimplePcg32& rng, + T target) { + REQUIRE( dist.a() == dist.b() ); + for (int i = 0; i < 1'000; ++i) { + REQUIRE( dist( rng ) == target ); + } + } +} + +TEMPLATE_TEST_CASE( "uniform_integer_distribution can handle unit ranges", + "[rng][distribution][approvals]", + unsigned char, + signed char, + char, + uint8_t, + int8_t, + uint16_t, + int16_t, + uint32_t, + int32_t, + uint64_t, + int64_t, + size_t, + ptrdiff_t) { + // We want random seed to sample different parts of the rng state, + // the output is predetermined anyway + std::random_device rd; + auto seed = rd(); + CAPTURE( seed ); + Catch::SimplePcg32 pcg( seed ); + + // We check unitary ranges of 3 different values, min for type, max for type, + // some value inbetween just to make sure + SECTION("lowest value") { + constexpr auto lowest = std::numeric_limits::min(); + Catch::uniform_integer_distribution dist( lowest, lowest ); + CheckReturnValue( dist, pcg, lowest ); + } + SECTION( "highest value" ) { + constexpr auto highest = std::numeric_limits::max(); + Catch::uniform_integer_distribution dist( highest, highest ); + CheckReturnValue( dist, pcg, highest ); + } + SECTION( "some value" ) { + constexpr auto some = TestType( 42 ); + Catch::uniform_integer_distribution dist( some, some ); + CheckReturnValue( dist, pcg, some ); + } +} + +// Bool needs its own test because it doesn't have a valid "third" value +TEST_CASE( "uniform_integer_distribution can handle boolean unit ranges", + "[rng][distribution][approvals]" ) { + // We want random seed to sample different parts of the rng state, + // the output is predetermined anyway + std::random_device rd; + auto seed = rd(); + CAPTURE( seed ); + Catch::SimplePcg32 pcg( seed ); + + // We check unitary ranges of 3 different values, min for type, max for + // type, some value inbetween just to make sure + SECTION( "lowest value" ) { + Catch::uniform_integer_distribution dist( false, false ); + CheckReturnValue( dist, pcg, false ); + } + SECTION( "highest value" ) { + Catch::uniform_integer_distribution dist( true, true ); + CheckReturnValue( dist, pcg, true ); + } +} + +TEMPLATE_TEST_CASE( "uniform_integer_distribution can handle full width ranges", + "[rng][distribution][approvals]", + unsigned char, + signed char, + char, + uint8_t, + int8_t, + uint16_t, + int16_t, + uint32_t, + int32_t, + uint64_t, + int64_t ) { + // We want random seed to sample different parts of the rng state, + // the output is predetermined anyway + std::random_device rd; + auto seed = rd(); + CAPTURE( seed ); + Catch::SimplePcg32 pcg( seed ); + + constexpr auto lowest = std::numeric_limits::min(); + constexpr auto highest = std::numeric_limits::max(); + Catch::uniform_integer_distribution dist( lowest, highest ); + STATIC_REQUIRE( std::is_same::value ); + + // We need to do bit operations on the results, so we will have to + // cast them to unsigned type. + using BitType = std::make_unsigned_t; + BitType ORs = 0; + BitType ANDs = BitType(-1); + for (int i = 0; i < 100; ++i) { + auto bits = static_cast( dist( pcg ) ); + ORs |= bits; + ANDs &= bits; + } + // Assuming both our RNG and distribution are unbiased, asking for + // the full range should essentially give us random bit generator. + // Over long run, OR of all the generated values should have all + // bits set to 1, while AND should have all bits set to 0. + // The chance of this test failing for unbiased pipeline is + // 1 / 2**iters, which for 100 iterations is astronomical. + REQUIRE( ORs == BitType( -1 ) ); + REQUIRE( ANDs == 0 ); +} + +namespace { + template + struct uniform_integer_test_params; + + template <> + struct uniform_integer_test_params { + static constexpr bool lowest = false; + static constexpr bool highest = true; + // This seems weird, but it is an artifact of the specific seed + static constexpr bool expected[] = { true, + true, + true, + true, + true, + true, + false, + true, + true, + true, + true, + true, + false, + true, + true }; + }; + + template <> + struct uniform_integer_test_params { + static constexpr char lowest = 32; + static constexpr char highest = 126; + static constexpr char expected[] = { 'k', + '\\', + 'Z', + 'X', + '`', + 'Q', + ';', + 'o', + ']', + 'T', + 'v', + 'p', + ':', + 'S', + 't' }; + }; + + template <> + struct uniform_integer_test_params { + static constexpr uint8_t lowest = 3; + static constexpr uint8_t highest = 123; + static constexpr uint8_t expected[] = { 'c', + 'P', + 'M', + 'J', + 'U', + 'A', + '%', + 'h', + 'Q', + 'F', + 'q', + 'i', + '$', + 'E', + 'o' }; + }; + + template <> + struct uniform_integer_test_params { + static constexpr int8_t lowest = -27; + static constexpr int8_t highest = 73; + static constexpr int8_t expected[] = { '5', + '%', + '#', + ' ', + '*', + 25, + 2, + '9', + '&', + 29, + 'A', + ':', + 1, + 28, + '?' }; + }; + + template <> + struct uniform_integer_test_params { + static constexpr uint16_t lowest = 123; + static constexpr uint16_t highest = 33333; + static constexpr uint16_t expected[] = { 26684, + 21417, + 20658, + 19791, + 22896, + 17433, + 9806, + 27948, + 21767, + 18588, + 30556, + 28244, + 9439, + 18293, + 29949 }; + }; + + template <> + struct uniform_integer_test_params { + static constexpr int16_t lowest = -17222; + static constexpr int16_t highest = 17222; + static constexpr int16_t expected[] = { 10326, + 4863, + 4076, + 3177, + 6397, + 731, + -7179, + 11637, + 5226, + 1929, + 14342, + 11944, + -7560, + 1623, + 13712 }; + }; + + template <> + struct uniform_integer_test_params { + static constexpr uint32_t lowest = 17222; + static constexpr uint32_t highest = 234234; + static constexpr uint32_t expected[] = { 190784, + 156367, + 151409, + 145743, + 166032, + 130337, + 80501, + 199046, + 158654, + 137883, + 216091, + 200981, + 78099, + 135954, + 212120 }; + }; + + template <> + struct uniform_integer_test_params { + static constexpr int32_t lowest = -237272; + static constexpr int32_t highest = 234234; + static constexpr int32_t expected[] = { 139829, + 65050, + 54278, + 41969, + 86051, + 8494, + -99785, + 157781, + 70021, + 24890, + 194815, + 161985, + -105004, + 20699, + 186186 }; + }; + + template <> + struct uniform_integer_test_params { + static constexpr uint64_t lowest = 1234; + static constexpr uint64_t highest = 1234567890; + static constexpr uint64_t expected[] = { 987382749, + 763380386, + 846572137, + 359990258, + 804599765, + 1131353566, + 346324913, + 1108760730, + 1141693933, + 856999148, + 879390623, + 1149485521, + 900556586, + 952385958, + 807916408 }; + }; + + template <> + struct uniform_integer_test_params { + static constexpr int64_t lowest = -1234567890; + static constexpr int64_t highest = 1234567890; + static constexpr int64_t expected[] = { 740197113, + 292191940, + 458575608, + -514589122, + 374630781, + 1028139036, + -541919840, + 982953318, + 1048819790, + 479429651, + 524212647, + 1064402981, + 566544615, + 670203462, + 381264073 }; + }; + + // We need these definitions for C++14 and earlier, but + // GCC will complain about them in newer C++ standards +#if __cplusplus <= 201402L + constexpr bool uniform_integer_test_params::expected[]; + constexpr char uniform_integer_test_params::expected[]; + constexpr uint8_t uniform_integer_test_params::expected[]; + constexpr int8_t uniform_integer_test_params::expected[]; + constexpr uint16_t uniform_integer_test_params::expected[]; + constexpr int16_t uniform_integer_test_params::expected[]; + constexpr uint32_t uniform_integer_test_params::expected[]; + constexpr int32_t uniform_integer_test_params::expected[]; + constexpr uint64_t uniform_integer_test_params::expected[]; + constexpr int64_t uniform_integer_test_params::expected[]; +#endif + +} + +TEMPLATE_TEST_CASE( "uniform_integer_distribution is reproducible", + "[rng][distribution][approvals]", + bool, + char, + uint8_t, + int8_t, + uint16_t, + int16_t, + uint32_t, + int32_t, + uint64_t, + int64_t) { + Catch::SimplePcg32 pcg( 0xaabb'ccdd ); + + constexpr auto lowest = uniform_integer_test_params::lowest; + constexpr auto highest = uniform_integer_test_params::highest; + Catch::uniform_integer_distribution dist(lowest, highest); + + constexpr auto iters = 15; + std::array generated; + for (int i = 0; i < iters; ++i) { + generated[i] = dist( pcg ); + } + + REQUIRE_THAT(generated, Catch::Matchers::RangeEquals(uniform_integer_test_params::expected)); +} + +// The reproducibility tests assume that operations on `float`/`double` +// happen in the same precision as the operated-upon type. This is +// generally true, unless the code is compiled for 32 bit targets without +// SSE2 enabled, in which case the operations are done in the x87 FPU, +// which usually implies doing math in 80 bit floats, and then rounding +// into smaller type when the type is saved into memory. This obviously +// leads to a different answer, than doing the math in the correct precision. +#if ( defined( _MSC_VER ) && _M_IX86_FP < 2 ) || \ + ( defined( __GNUC__ ) && \ + ( ( defined( __i386__ ) || defined( __x86_64__ ) ) ) && \ + !defined( __SSE2_MATH__ ) ) +# define CATCH_TEST_CONFIG_DISABLE_FLOAT_REPRODUCIBILITY_TESTS +#endif + +#if !defined( CATCH_TEST_CONFIG_DISABLE_FLOAT_REPRODUCIBILITY_TESTS ) + +namespace { + template + struct uniform_fp_test_params; + + template<> + struct uniform_fp_test_params { + // These are exactly representable + static constexpr float lowest = -256.125f; + static constexpr float highest = 385.125f; + // These are just round-trip formatted + static constexpr float expected[] = { 92.56961f, + -23.170044f, + 310.81833f, + -53.023132f, + 105.03287f, + 198.77591f, + -172.72931f, + 51.805176f, + -241.10156f, + 64.66101f, + 212.12509f, + -49.24292f, + -177.1399f, + 245.23679f, + 173.22421f }; + }; + template <> + struct uniform_fp_test_params { + // These are exactly representable + static constexpr double lowest = -234582.9921875; + static constexpr double highest = 261238.015625; + // These are just round-trip formatted + static constexpr double expected[] = { 35031.207052832615, + 203783.3401838024, + 44667.940405848756, + -170100.5877224467, + -222966.7418051684, + 127472.72630072923, + -173510.88209096913, + 97394.16172239158, + 119123.6921592663, + 22595.741022785165, + 8988.68409120926, + 136906.86520606978, + 33369.19104222473, + 60912.7615841752, + -149060.05936760217 }; + }; + +// We need these definitions for C++14 and earlier, but +// GCC will complain about them in newer C++ standards +#if __cplusplus <= 201402L + constexpr float uniform_fp_test_params::expected[]; + constexpr double uniform_fp_test_params::expected[]; +#endif +} // namespace + +TEMPLATE_TEST_CASE( "uniform_floating_point_distribution is reproducible", + "[rng][distribution][floating-point][approvals]", + float, + double ) { + Catch::SimplePcg32 pcg( 0xaabb'aabb ); + + const auto lowest = uniform_fp_test_params::lowest; + const auto highest = uniform_fp_test_params::highest; + Catch::uniform_floating_point_distribution dist( lowest, highest ); + + constexpr auto iters = 15; + std::array generated; + for ( int i = 0; i < iters; ++i ) { + generated[i] = dist( pcg ); + } + + REQUIRE_THAT( generated, Catch::Matchers::RangeEquals( uniform_fp_test_params::expected ) ); +} + +#endif // ^^ float reproducibility tests are enabled + +TEMPLATE_TEST_CASE( "uniform_floating_point_distribution can handle unitary ranges", + "[rng][distribution][floating-point][approvals]", + float, + double ) { + std::random_device rd; + auto seed = rd(); + CAPTURE( seed ); + Catch::SimplePcg32 pcg( seed ); + + const auto highest = TestType(385.125); + Catch::uniform_floating_point_distribution dist( highest, + highest ); + + constexpr auto iters = 20; + for (int i = 0; i < iters; ++i) { + REQUIRE( Catch::Detail::directCompare( dist( pcg ), highest ) ); + } +} diff --git a/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp b/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp new file mode 100644 index 0000000..86ba117 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp @@ -0,0 +1,330 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace { + class StringIStream : public Catch::IStream { + public: + std::ostream& stream() override { return sstr; } + std::string str() const { return sstr.str(); } + private: + std::stringstream sstr; + }; + + //! config must outlive the function + Catch::ReporterConfig makeDummyRepConfig( Catch::Config const& config ) { + return Catch::ReporterConfig{ + &config, + Catch::Detail::make_unique(), + Catch::ColourMode::None, + {} }; + } +} + +TEST_CASE( "The default listing implementation write to provided stream", + "[reporters][reporter-helpers]" ) { + using Catch::Matchers::ContainsSubstring; + using namespace std::string_literals; + + StringIStream sstream; + SECTION( "Listing tags" ) { + std::vector tags(1); + tags[0].add("fakeTag"_catch_sr); + Catch::defaultListTags(sstream.stream(), tags, false); + + auto listingString = sstream.str(); + REQUIRE_THAT(listingString, ContainsSubstring("[fakeTag]"s)); + } + SECTION( "Listing reporters" ) { + std::vector reporters( + { { "fake reporter", "fake description" } } ); + Catch::defaultListReporters(sstream.stream(), reporters, Catch::Verbosity::Normal); + + auto listingString = sstream.str(); + REQUIRE_THAT( listingString, + ContainsSubstring( "fake reporter"s ) && + ContainsSubstring( "fake description"s ) ); + } + SECTION( "Listing tests" ) { + Catch::TestCaseInfo fakeInfo{ + ""s, + { "fake test name"_catch_sr, "[fakeTestTag]"_catch_sr }, + { "fake-file.cpp", 123456789 } }; + std::vector tests({ {&fakeInfo, nullptr} }); + auto colour = Catch::makeColourImpl( Catch::ColourMode::None, &sstream); + Catch::defaultListTests(sstream.stream(), colour.get(), tests, false, Catch::Verbosity::Normal); + + auto listingString = sstream.str(); + REQUIRE_THAT( listingString, + ContainsSubstring( "fake test name"s ) && + ContainsSubstring( "fakeTestTag"s ) ); + } + SECTION( "Listing listeners" ) { + std::vector listeners( + { { "fakeListener"_catch_sr, "fake description" } } ); + + Catch::defaultListListeners( sstream.stream(), listeners ); + auto listingString = sstream.str(); + REQUIRE_THAT( listingString, + ContainsSubstring( "fakeListener"s ) && + ContainsSubstring( "fake description"s ) ); + } +} + +TEST_CASE( "Reporter's write listings to provided stream", "[reporters]" ) { + using Catch::Matchers::ContainsSubstring; + using namespace std::string_literals; + + auto const& factories = Catch::getRegistryHub().getReporterRegistry().getFactories(); + // If there are no reporters, the test would pass falsely + // while there is something obviously broken + REQUIRE_FALSE(factories.empty()); + + for (auto const& factory : factories) { + INFO("Tested reporter: " << factory.first); + auto sstream = Catch::Detail::make_unique(); + auto& sstreamRef = *sstream; + + Catch::ConfigData cfg_data; + cfg_data.rngSeed = 1234; + Catch::Config config( cfg_data ); + auto reporter = factory.second->create( Catch::ReporterConfig{ + &config, CATCH_MOVE( sstream ), Catch::ColourMode::None, {} } ); + + DYNAMIC_SECTION( factory.first << " reporter lists tags" ) { + std::vector tags(1); + tags[0].add("fakeTag"_catch_sr); + reporter->listTags(tags); + + auto listingString = sstreamRef.str(); + REQUIRE_THAT(listingString, ContainsSubstring("fakeTag"s)); + } + + DYNAMIC_SECTION( factory.first << " reporter lists reporters" ) { + std::vector reporters( + { { "fake reporter", "fake description" } } ); + reporter->listReporters(reporters); + + auto listingString = sstreamRef.str(); + REQUIRE_THAT(listingString, ContainsSubstring("fake reporter"s)); + } + + DYNAMIC_SECTION( factory.first << " reporter lists tests" ) { + Catch::TestCaseInfo fakeInfo{ + ""s, + { "fake test name"_catch_sr, "[fakeTestTag]"_catch_sr }, + { "fake-file.cpp", 123456789 } }; + std::vector tests({ {&fakeInfo, nullptr} }); + reporter->listTests(tests); + + auto listingString = sstreamRef.str(); + REQUIRE_THAT( listingString, + ContainsSubstring( "fake test name"s ) && + ContainsSubstring( "fakeTestTag"s ) ); + } + } +} + + +TEST_CASE("Reproducer for #2309 - a very long description past 80 chars (default console width) with a late colon : blablabla", "[console-reporter]") { + SUCCEED(); +} + +namespace { + // A listener that writes provided string into destination, + // to record order of testRunStarting invocation. + class MockListener : public Catch::EventListenerBase { + std::string m_witness; + std::vector& m_recorder; + public: + MockListener( std::string witness, + std::vector& recorder, + Catch::IConfig const* config ): + EventListenerBase( config ), + m_witness( CATCH_MOVE(witness) ), + m_recorder( recorder ) + {} + + void testRunStarting( Catch::TestRunInfo const& ) override { + m_recorder.push_back( m_witness ); + } + }; + // A reporter that writes provided string into destination, + // to record order of testRunStarting invocation. + class MockReporter : public Catch::StreamingReporterBase { + std::string m_witness; + std::vector& m_recorder; + public: + MockReporter( std::string witness, + std::vector& recorder, + Catch::ReporterConfig&& config ): + StreamingReporterBase( CATCH_MOVE(config) ), + m_witness( CATCH_MOVE(witness) ), + m_recorder( recorder ) + {} + + void testRunStarting( Catch::TestRunInfo const& ) override { + m_recorder.push_back( m_witness ); + } + }; +} // namespace + +TEST_CASE("Multireporter calls reporters and listeners in correct order", + "[reporters][multi-reporter]") { + Catch::Config config( Catch::ConfigData{} ); + + // We add reporters before listeners, to check that internally they + // get sorted properly, and listeners are called first anyway. + Catch::MultiReporter multiReporter( &config ); + std::vector records; + multiReporter.addReporter( Catch::Detail::make_unique( + "Goodbye", records, makeDummyRepConfig(config) ) ); + multiReporter.addListener( + Catch::Detail::make_unique( "Hello", records, &config ) ); + multiReporter.addListener( + Catch::Detail::make_unique( "world", records, &config ) ); + multiReporter.addReporter( Catch::Detail::make_unique( + "world", records, makeDummyRepConfig(config) ) ); + multiReporter.testRunStarting( { "" } ); + + std::vector expected( { "Hello", "world", "Goodbye", "world" } ); + REQUIRE( records == expected ); +} + +namespace { + // A listener that sets it preferences to test that multireporter, + // properly sets up its own preferences + class PreferenceListener : public Catch::EventListenerBase { + public: + PreferenceListener( bool redirectStdout, + bool reportAllAssertions, + Catch::IConfig const* config ): + EventListenerBase( config ) { + m_preferences.shouldRedirectStdOut = redirectStdout; + m_preferences.shouldReportAllAssertions = reportAllAssertions; + } + }; + // A reporter that sets it preferences to test that multireporter, + // properly sets up its own preferences + class PreferenceReporter : public Catch::StreamingReporterBase { + public: + PreferenceReporter( bool redirectStdout, + bool reportAllAssertions, + Catch::ReporterConfig&& config ): + StreamingReporterBase( CATCH_MOVE(config) ) { + m_preferences.shouldRedirectStdOut = redirectStdout; + m_preferences.shouldReportAllAssertions = reportAllAssertions; + } + }; +} // namespace + +TEST_CASE("Multireporter updates ReporterPreferences properly", + "[reporters][multi-reporter]") { + + Catch::Config config( Catch::ConfigData{} ); + Catch::MultiReporter multiReporter( &config ); + + // Post init defaults + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == false ); + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == false ); + + SECTION( "Adding listeners" ) { + multiReporter.addListener( + Catch::Detail::make_unique( + true, false, &config ) ); + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ); + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == false ); + + multiReporter.addListener( + Catch::Detail::make_unique( + false, true, &config ) ); + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ); + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == true); + + multiReporter.addListener( + Catch::Detail::make_unique( + false, false, &config ) ); + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ); + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == true ); + } + SECTION( "Adding reporters" ) { + multiReporter.addReporter( + Catch::Detail::make_unique( + true, false, makeDummyRepConfig(config) ) ); + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ); + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == false ); + + multiReporter.addReporter( + Catch::Detail::make_unique( + false, true, makeDummyRepConfig( config ) ) ); + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ); + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == true ); + + multiReporter.addReporter( + Catch::Detail::make_unique( + false, false, makeDummyRepConfig( config ) ) ); + REQUIRE( multiReporter.getPreferences().shouldRedirectStdOut == true ); + REQUIRE( multiReporter.getPreferences().shouldReportAllAssertions == true ); + } +} + +namespace { + class TestReporterFactory : public Catch::IReporterFactory { + Catch::IEventListenerPtr create( Catch::ReporterConfig&& ) const override { + CATCH_INTERNAL_ERROR( + "This factory should never create a reporter" ); + } + std::string getDescription() const override { + return "Fake test factory"; + } + }; +} + +TEST_CASE("Registering reporter with '::' in name fails", + "[reporters][registration]") { + Catch::ReporterRegistry registry; + + REQUIRE_THROWS_WITH( registry.registerReporter( + "with::doublecolons", + Catch::Detail::make_unique() ), + "'::' is not allowed in reporter name: 'with::doublecolons'" ); +} + +TEST_CASE("Registering multiple reporters with the same name fails", + "[reporters][registration][approvals]") { + Catch::ReporterRegistry registry; + + registry.registerReporter( + "some-reporter-name", + Catch::Detail::make_unique() ); + + REQUIRE_THROWS_WITH( + registry.registerReporter( + "some-reporter-name", + Catch::Detail::make_unique() ), + "reporter using 'some-reporter-name' as name was already registered" ); +} diff --git a/tests/SelfTest/IntrospectiveTests/Sharding.tests.cpp b/tests/SelfTest/IntrospectiveTests/Sharding.tests.cpp new file mode 100644 index 0000000..8e6009d --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/Sharding.tests.cpp @@ -0,0 +1,45 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include + +#include + +#include +#include + +TEST_CASE("Sharding Function", "[approvals]") { + std::vector testContainer = { 0, 1, 2, 3, 4, 5, 6 }; + std::unordered_map> expectedShardSizes = { + {1, {7}}, + {2, {4, 3}}, + {3, {3, 2, 2}}, + {4, {2, 2, 2, 1}}, + {5, {2, 2, 1, 1, 1}}, + {6, {2, 1, 1, 1, 1, 1}}, + {7, {1, 1, 1, 1, 1, 1, 1}}, + }; + + auto shardCount = GENERATE(range(1, 7)); + auto shardIndex = GENERATE_COPY(filter([=](int i) { return i < shardCount; }, range(0, 6))); + + std::vector result = Catch::createShard(testContainer, shardCount, shardIndex); + + auto& sizes = expectedShardSizes[shardCount]; + REQUIRE(result.size() == sizes[shardIndex]); + + std::size_t startIndex = 0; + for(int i = 0; i < shardIndex; i++) { + startIndex += sizes[i]; + } + + for(std::size_t i = 0; i < sizes[shardIndex]; i++) { + CHECK(result[i] == testContainer[i + startIndex]); + } +} diff --git a/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp b/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp new file mode 100644 index 0000000..738cb52 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp @@ -0,0 +1,32 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include + +#include + +TEST_CASE( "Cout stream properly declares it writes to stdout", "[streams]" ) { + REQUIRE( Catch::makeStream( "-" )->isConsole() ); +} + +TEST_CASE( "Empty stream name opens cout stream", "[streams]" ) { + REQUIRE( Catch::makeStream( "" )->isConsole() ); +} + +TEST_CASE( "stdout and stderr streams have %-starting name", "[streams]" ) { + REQUIRE( Catch::makeStream( "%stderr" )->isConsole() ); + REQUIRE( Catch::makeStream( "%stdout" )->isConsole() ); +} + +TEST_CASE( "request an unknown %-starting stream fails", "[streams]" ) { + REQUIRE_THROWS( Catch::makeStream( "%somestream" ) ); +} + +TEST_CASE( "makeStream recognizes %debug stream name", "[streams]" ) { + REQUIRE_NOTHROW( Catch::makeStream( "%debug" ) ); +} diff --git a/tests/SelfTest/IntrospectiveTests/String.tests.cpp b/tests/SelfTest/IntrospectiveTests/String.tests.cpp new file mode 100644 index 0000000..43c58b4 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/String.tests.cpp @@ -0,0 +1,212 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include + +#include + +TEST_CASE( "StringRef", "[Strings][StringRef]" ) { + using Catch::StringRef; + + SECTION( "Empty string" ) { + StringRef empty; + REQUIRE( empty.empty() ); + REQUIRE( empty.size() == 0 ); + REQUIRE( std::strcmp( empty.data(), "" ) == 0 ); + } + + SECTION( "From string literal" ) { + StringRef s = "hello"; + REQUIRE( s.empty() == false ); + REQUIRE( s.size() == 5 ); + + auto rawChars = s.data(); + REQUIRE( std::strcmp( rawChars, "hello" ) == 0 ); + + REQUIRE(s.data() == rawChars); + } + SECTION( "From sub-string" ) { + StringRef original = StringRef( "original string" ).substr(0, 8); + REQUIRE( original == "original" ); + + REQUIRE_NOTHROW(original.data()); + } + SECTION( "Copy construction is shallow" ) { + StringRef original = StringRef( "original string" ); + StringRef copy = original; + REQUIRE(original.begin() == copy.begin()); + } + SECTION( "Copy assignment is shallow" ) { + StringRef original = StringRef( "original string" ); + StringRef copy; + copy = original; + REQUIRE(original.begin() == copy.begin()); + } + + SECTION( "Substrings" ) { + StringRef s = "hello world!"; + StringRef ss = s.substr(0, 5); + + SECTION( "zero-based substring" ) { + REQUIRE( ss.empty() == false ); + REQUIRE( ss.size() == 5 ); + REQUIRE( std::strncmp( ss.data(), "hello", 5 ) == 0 ); + REQUIRE( ss == "hello" ); + } + + SECTION( "non-zero-based substring") { + ss = s.substr( 6, 6 ); + REQUIRE( ss.size() == 6 ); + REQUIRE( std::strcmp( ss.data(), "world!" ) == 0 ); + } + + SECTION( "Pointer values of full refs should match" ) { + StringRef s2 = s; + REQUIRE( s.data() == s2.data() ); + } + + SECTION( "Pointer values of substring refs should also match" ) { + REQUIRE( s.data() == ss.data() ); + } + + SECTION("Past the end substring") { + REQUIRE(s.substr(s.size() + 1, 123).empty()); + } + + SECTION("Substring off the end are trimmed") { + ss = s.substr(6, 123); + REQUIRE(std::strcmp(ss.data(), "world!") == 0); + } + SECTION("substring start after the end is empty") { + REQUIRE(s.substr(1'000'000, 1).empty()); + } + } + + SECTION( "Comparisons are deep" ) { + char buffer1[] = "Hello"; + char buffer2[] = "Hello"; + CHECK(reinterpret_cast(buffer1) != reinterpret_cast(buffer2)); + + StringRef left(buffer1), right(buffer2); + REQUIRE( left == right ); + REQUIRE(left != left.substr(0, 3)); + } + + SECTION( "from std::string" ) { + std::string stdStr = "a standard string"; + + SECTION( "implicitly constructed" ) { + StringRef sr = stdStr; + REQUIRE( sr == "a standard string" ); + REQUIRE( sr.size() == stdStr.size() ); + } + SECTION( "explicitly constructed" ) { + StringRef sr( stdStr ); + REQUIRE( sr == "a standard string" ); + REQUIRE( sr.size() == stdStr.size() ); + } + SECTION( "assigned" ) { + StringRef sr; + sr = stdStr; + REQUIRE( sr == "a standard string" ); + REQUIRE( sr.size() == stdStr.size() ); + } + } + + SECTION( "to std::string" ) { + StringRef sr = "a stringref"; + + SECTION( "explicitly constructed" ) { + std::string stdStr( sr ); + REQUIRE( stdStr == "a stringref" ); + REQUIRE( stdStr.size() == sr.size() ); + } + SECTION( "assigned" ) { + std::string stdStr; + stdStr = static_cast(sr); + REQUIRE( stdStr == "a stringref" ); + REQUIRE( stdStr.size() == sr.size() ); + } + } + + SECTION("std::string += StringRef") { + StringRef sr = "the stringref contents"; + std::string lhs("some string += "); + lhs += sr; + REQUIRE(lhs == "some string += the stringref contents"); + } + SECTION("StringRef + StringRef") { + StringRef sr1 = "abraka", sr2 = "dabra"; + std::string together = sr1 + sr2; + REQUIRE(together == "abrakadabra"); + } +} + +TEST_CASE("StringRef at compilation time", "[Strings][StringRef][constexpr]") { + using Catch::StringRef; + SECTION("Simple constructors") { + constexpr StringRef empty{}; + STATIC_REQUIRE(empty.size() == 0); + STATIC_REQUIRE(empty.begin() == empty.end()); + + constexpr char const* const abc = "abc"; + + constexpr StringRef stringref(abc, 3); + STATIC_REQUIRE(stringref.size() == 3); + STATIC_REQUIRE(stringref.data() == abc); + STATIC_REQUIRE(stringref.begin() == abc); + STATIC_REQUIRE(stringref.begin() != stringref.end()); + STATIC_REQUIRE(stringref.substr(10, 0).empty()); + STATIC_REQUIRE(stringref.substr(2, 1).data() == abc + 2); + STATIC_REQUIRE(stringref[1] == 'b'); + + + constexpr StringRef shortened(abc, 2); + STATIC_REQUIRE(shortened.size() == 2); + STATIC_REQUIRE(shortened.data() == abc); + STATIC_REQUIRE(shortened.begin() != shortened.end()); + } + SECTION("UDL construction") { + constexpr auto sr1 = "abc"_catch_sr; + STATIC_REQUIRE_FALSE(sr1.empty()); + STATIC_REQUIRE(sr1.size() == 3); + + using Catch::operator""_sr; + constexpr auto sr2 = ""_sr; + STATIC_REQUIRE(sr2.empty()); + STATIC_REQUIRE(sr2.size() == 0); + } +} + +TEST_CASE("StringRef::compare", "[Strings][StringRef][approvals]") { + using Catch::StringRef; + + SECTION("Same length on both sides") { + StringRef sr1("abcdc"); + StringRef sr2("abcdd"); + StringRef sr3("abcdc"); + + REQUIRE(sr1.compare(sr2) < 0); + REQUIRE(sr2.compare(sr1) > 0); + REQUIRE(sr1.compare(sr3) == 0); + REQUIRE(sr3.compare(sr1) == 0); + } + SECTION("Different lengths") { + StringRef sr1("def"); + StringRef sr2("deff"); + StringRef sr3("ab"); + + REQUIRE(sr1.compare(sr2) < 0); + REQUIRE(sr2.compare(sr1) > 0); + REQUIRE(sr1.compare(sr3) > 0); + REQUIRE(sr2.compare(sr3) > 0); + REQUIRE(sr3.compare(sr1) < 0); + REQUIRE(sr3.compare(sr2) < 0); + } +} diff --git a/tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp b/tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp new file mode 100644 index 0000000..f30573c --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp @@ -0,0 +1,94 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include + +static const char * const no_whitespace = "There is no extra whitespace here"; +static const char * const leading_whitespace = " \r \t\n There is no extra whitespace here"; +static const char * const trailing_whitespace = "There is no extra whitespace here \t \n \r "; +static const char * const whitespace_at_both_ends = " \r\n \t There is no extra whitespace here \t\t\t \n"; + +TEST_CASE("Trim strings", "[string-manip]") { + using Catch::trim; using Catch::StringRef; + static_assert(std::is_same::value, "Trimming std::string should return std::string"); + static_assert(std::is_same::value, "Trimming StringRef should return StringRef"); + + REQUIRE(trim(std::string(no_whitespace)) == no_whitespace); + REQUIRE(trim(std::string(leading_whitespace)) == no_whitespace); + REQUIRE(trim(std::string(trailing_whitespace)) == no_whitespace); + REQUIRE(trim(std::string(whitespace_at_both_ends)) == no_whitespace); + + REQUIRE(trim(StringRef(no_whitespace)) == StringRef(no_whitespace)); + REQUIRE(trim(StringRef(leading_whitespace)) == StringRef(no_whitespace)); + REQUIRE(trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace)); + REQUIRE(trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace)); +} + +TEST_CASE("replaceInPlace", "[string-manip]") { + std::string letters = "abcdefcg"; + SECTION("replace single char") { + CHECK(Catch::replaceInPlace(letters, "b", "z")); + CHECK(letters == "azcdefcg"); + } + SECTION("replace two chars") { + CHECK(Catch::replaceInPlace(letters, "c", "z")); + CHECK(letters == "abzdefzg"); + } + SECTION("replace first char") { + CHECK(Catch::replaceInPlace(letters, "a", "z")); + CHECK(letters == "zbcdefcg"); + } + SECTION("replace last char") { + CHECK(Catch::replaceInPlace(letters, "g", "z")); + CHECK(letters == "abcdefcz"); + } + SECTION("replace all chars") { + CHECK(Catch::replaceInPlace(letters, letters, "replaced")); + CHECK(letters == "replaced"); + } + SECTION("replace no chars") { + CHECK_FALSE(Catch::replaceInPlace(letters, "x", "z")); + CHECK(letters == letters); + } + SECTION("no replace in already-replaced string") { + SECTION("lengthening") { + CHECK(Catch::replaceInPlace(letters, "c", "cc")); + CHECK(letters == "abccdefccg"); + } + SECTION("shortening") { + std::string s = "----"; + CHECK(Catch::replaceInPlace(s, "--", "-")); + CHECK(s == "--"); + } + } + SECTION("escape '") { + std::string s = "didn't"; + CHECK(Catch::replaceInPlace(s, "'", "|'")); + CHECK(s == "didn|'t"); + } +} + +TEST_CASE("splitString", "[string-manip]") { + using namespace Catch::Matchers; + using Catch::splitStringRef; + using Catch::StringRef; + + CHECK_THAT(splitStringRef("", ','), Equals(std::vector())); + CHECK_THAT(splitStringRef("abc", ','), Equals(std::vector{"abc"})); + CHECK_THAT(splitStringRef("abc,def", ','), Equals(std::vector{"abc", "def"})); +} + +TEST_CASE("startsWith", "[string-manip]") { + using Catch::startsWith; + + CHECK_FALSE(startsWith("", 'c')); + CHECK(startsWith(std::string("abc"), 'a')); + CHECK(startsWith("def"_catch_sr, 'd')); +} diff --git a/tests/SelfTest/IntrospectiveTests/Tag.tests.cpp b/tests/SelfTest/IntrospectiveTests/Tag.tests.cpp new file mode 100644 index 0000000..4372375 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/Tag.tests.cpp @@ -0,0 +1,117 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include +#include +#include + +TEST_CASE( "Tag alias can be registered against tag patterns" ) { + + Catch::TagAliasRegistry registry; + + registry.add( "[@zzz]", "[one][two]", Catch::SourceLineInfo( "file", 2 ) ); + + SECTION( "The same tag alias can only be registered once" ) { + + try { + registry.add( "[@zzz]", "[one][two]", Catch::SourceLineInfo( "file", 10 ) ); + FAIL( "expected exception" ); + } + catch( std::exception& ex ) { + std::string what = ex.what(); + using namespace Catch::Matchers; + CHECK_THAT( what, ContainsSubstring( "[@zzz]" ) ); + CHECK_THAT( what, ContainsSubstring( "file" ) ); + CHECK_THAT( what, ContainsSubstring( "2" ) ); + CHECK_THAT( what, ContainsSubstring( "10" ) ); + } + } + + SECTION( "Tag aliases must be of the form [@name]" ) { + CHECK_THROWS( registry.add( "[no ampersat]", "", Catch::SourceLineInfo( "file", 3 ) ) ); + CHECK_THROWS( registry.add( "[the @ is not at the start]", "", Catch::SourceLineInfo( "file", 3 ) ) ); + CHECK_THROWS( registry.add( "@no square bracket at start]", "", Catch::SourceLineInfo( "file", 3 ) ) ); + CHECK_THROWS( registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) ) ); + } +} + +// Dummy line info for creating dummy test cases below +static constexpr Catch::SourceLineInfo dummySourceLineInfo = CATCH_INTERNAL_LINEINFO; + +TEST_CASE("shortened hide tags are split apart", "[tags]") { + using Catch::StringRef; + using Catch::Tag; + using Catch::Matchers::VectorContains; + + Catch::TestCaseInfo testcase("", {"fake test name", "[.magic-tag]"}, dummySourceLineInfo); + REQUIRE_THAT( testcase.tags, VectorContains( Tag( "magic-tag" ) ) + && VectorContains( Tag( "."_catch_sr ) ) ); +} + +TEST_CASE("tags with dots in later positions are not parsed as hidden", "[tags]") { + using Catch::StringRef; + using Catch::Matchers::VectorContains; + Catch::TestCaseInfo testcase("", { "fake test name", "[magic.tag]" }, dummySourceLineInfo); + + REQUIRE(testcase.tags.size() == 1); + REQUIRE(testcase.tags[0].original == "magic.tag"_catch_sr); +} + +TEST_CASE( "empty tags are not allowed", "[tags]" ) { + REQUIRE_THROWS( + Catch::TestCaseInfo("", { "test with an empty tag", "[]" }, dummySourceLineInfo) + ); +} + +TEST_CASE( "Tags with spaces and non-alphanumerical characters are accepted", + "[tags]" ) { + using Catch::Tag; + using Catch::Matchers::VectorContains; + + Catch::TestCaseInfo testCase( + "", + { "fake test name", "[tag with spaces][I said \"good day\" sir!]" }, + dummySourceLineInfo ); + + REQUIRE( testCase.tags.size() == 2 ); + REQUIRE_THAT( testCase.tags, + VectorContains( Tag( "tag with spaces" ) ) && + VectorContains( Tag( "I said \"good day\" sir!"_catch_sr ) ) ); +} + +TEST_CASE( "Test case with identical tags keeps just one", "[tags]" ) { + using Catch::Tag; + + Catch::TestCaseInfo testCase( + "", + { "fake test name", "[TaG1][tAg1][TAG1][tag1]" }, + dummySourceLineInfo ); + + REQUIRE( testCase.tags.size() == 1 ); + REQUIRE( testCase.tags[0] == Tag( "tag1" ) ); +} + +TEST_CASE("Mismatched square brackets in tags are caught and reported", + "[tags][approvals]") { + using Catch::TestCaseInfo; + using Catch::Matchers::ContainsSubstring; + REQUIRE_THROWS_WITH( TestCaseInfo( "", + { "test with unclosed tag", "[abc" }, + dummySourceLineInfo ), + ContainsSubstring("registering test case 'test with unclosed tag'") ); + REQUIRE_THROWS_WITH( TestCaseInfo( "", + { "test with nested tags", "[abc[def]]" }, + dummySourceLineInfo ), + ContainsSubstring("registering test case 'test with nested tags'") ); + REQUIRE_THROWS_WITH( TestCaseInfo( "", + { "test with superfluous close tags", "[abc][def]]" }, + dummySourceLineInfo ), + ContainsSubstring("registering test case 'test with superfluous close tags'") ); +} diff --git a/tests/SelfTest/IntrospectiveTests/TestCaseInfoHasher.tests.cpp b/tests/SelfTest/IntrospectiveTests/TestCaseInfoHasher.tests.cpp new file mode 100644 index 0000000..03cb3f0 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/TestCaseInfoHasher.tests.cpp @@ -0,0 +1,72 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include + +static constexpr Catch::SourceLineInfo dummySourceLineInfo = CATCH_INTERNAL_LINEINFO; + +using Catch::TestCaseInfo; +using Catch::TestCaseInfoHasher; + +TEST_CASE("Hashers with same seed produce same hash", "[test-case-hash]") { + TestCaseInfo dummy( "", { "name", "[a-tag]" }, dummySourceLineInfo ); + + TestCaseInfoHasher h1( 0x12345678 ); + TestCaseInfoHasher h2( 0x12345678 ); + + REQUIRE( h1( dummy ) == h2( dummy ) ); +} + +TEST_CASE( + "Hashers with different seed produce different hash with same test case", + "[test-case-hash]") { + TestCaseInfo dummy( "", { "name", "[a-tag]" }, dummySourceLineInfo ); + + TestCaseInfoHasher h1( 0x12345678 ); + TestCaseInfoHasher h2( 0x87654321 ); + + REQUIRE( h1( dummy ) != h2( dummy ) ); +} + +TEST_CASE("Hashing test case produces same hash across multiple calls", + "[test-case-hash]") { + TestCaseInfo dummy( "", { "name", "[a-tag]" }, dummySourceLineInfo ); + + TestCaseInfoHasher h( 0x12345678 ); + + REQUIRE( h( dummy ) == h( dummy ) ); +} + +TEST_CASE("Hashing different test cases produces different result", "[test-case-hash]") { + TestCaseInfoHasher h( 0x12345678 ); + SECTION("Different test name") { + TestCaseInfo dummy1( "class", { "name-1", "[a-tag]" }, dummySourceLineInfo ); + TestCaseInfo dummy2( + "class", { "name-2", "[a-tag]" }, dummySourceLineInfo ); + + REQUIRE( h( dummy1 ) != h( dummy2 ) ); + } + SECTION("Different classname") { + TestCaseInfo dummy1( + "class-1", { "name", "[a-tag]" }, dummySourceLineInfo ); + TestCaseInfo dummy2( + "class-2", { "name", "[a-tag]" }, dummySourceLineInfo ); + + REQUIRE( h( dummy1 ) != h( dummy2 ) ); + } + SECTION("Different tags") { + TestCaseInfo dummy1( + "class", { "name", "[a-tag]" }, dummySourceLineInfo ); + TestCaseInfo dummy2( + "class", { "name", "[b-tag]" }, dummySourceLineInfo ); + + REQUIRE( h( dummy1 ) != h( dummy2 ) ); + } +} diff --git a/tests/SelfTest/IntrospectiveTests/TestSpec.tests.cpp b/tests/SelfTest/IntrospectiveTests/TestSpec.tests.cpp new file mode 100644 index 0000000..11a7a7a --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/TestSpec.tests.cpp @@ -0,0 +1,365 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace { + auto fakeTestCase(const char* name, const char* desc = "") { return Catch::makeTestCaseInfo("", { name, desc }, CATCH_INTERNAL_LINEINFO); } +} + +TEST_CASE( "Parse test names and tags", "[command-line][test-spec][approvals]" ) { + using Catch::parseTestSpec; + using Catch::TestSpec; + + auto tcA = fakeTestCase( "a" ); + auto tcB = fakeTestCase( "b", "[one][x]" ); + auto tcC = fakeTestCase( "longer name with spaces", "[two][three][.][x]" ); + auto tcD = fakeTestCase( "zlonger name with spacesz" ); + + SECTION( "Empty test spec should have no filters" ) { + TestSpec spec; + CHECK( spec.hasFilters() == false ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + } + + SECTION( "Test spec from empty string should have no filters" ) { + TestSpec spec = parseTestSpec( "" ); + CHECK( spec.hasFilters() == false ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + } + + SECTION( "Test spec from just a comma should have no filters" ) { + TestSpec spec = parseTestSpec( "," ); + CHECK( spec.hasFilters() == false ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + } + + SECTION( "Test spec from name should have one filter" ) { + TestSpec spec = parseTestSpec( "b" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == true ); + } + + SECTION( "Test spec from quoted name should have one filter" ) { + TestSpec spec = parseTestSpec( "\"b\"" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == true ); + } + + SECTION( "Test spec from name should have one filter" ) { + TestSpec spec = parseTestSpec( "b" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == true ); + CHECK( spec.matches( *tcC ) == false ); + } + + SECTION( "Wildcard at the start" ) { + TestSpec spec = parseTestSpec( "*spaces" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == true ); + CHECK( spec.matches( *tcD ) == false ); + CHECK( parseTestSpec( "*a" ).matches( *tcA ) == true ); + } + SECTION( "Wildcard at the end" ) { + TestSpec spec = parseTestSpec( "long*" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == true ); + CHECK( spec.matches( *tcD ) == false ); + CHECK( parseTestSpec( "a*" ).matches( *tcA ) == true ); + } + SECTION( "Wildcard at both ends" ) { + TestSpec spec = parseTestSpec( "*name*" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == true ); + CHECK( spec.matches( *tcD ) == true ); + CHECK( parseTestSpec( "*a*" ).matches( *tcA ) == true ); + } + SECTION( "Redundant wildcard at the start" ) { + TestSpec spec = parseTestSpec( "*a" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == true ); + CHECK( spec.matches( *tcB ) == false ); + } + SECTION( "Redundant wildcard at the end" ) { + TestSpec spec = parseTestSpec( "a*" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == true ); + CHECK( spec.matches( *tcB ) == false ); + } + SECTION( "Redundant wildcard at both ends" ) { + TestSpec spec = parseTestSpec( "*a*" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == true ); + CHECK( spec.matches( *tcB ) == false ); + } + SECTION( "Wildcard at both ends, redundant at start" ) { + TestSpec spec = parseTestSpec( "*longer*" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == true ); + CHECK( spec.matches( *tcD ) == true ); + } + SECTION( "Just wildcard" ) { + TestSpec spec = parseTestSpec( "*" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == true ); + CHECK( spec.matches( *tcB ) == true ); + CHECK( spec.matches( *tcC ) == true ); + CHECK( spec.matches( *tcD ) == true ); + } + + SECTION( "Single tag" ) { + TestSpec spec = parseTestSpec( "[one]" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == true ); + CHECK( spec.matches( *tcC ) == false ); + } + SECTION( "Single tag, two matches" ) { + TestSpec spec = parseTestSpec( "[x]" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == true ); + CHECK( spec.matches( *tcC ) == true ); + } + SECTION( "Two tags" ) { + TestSpec spec = parseTestSpec( "[two][x]" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == true ); + } + SECTION( "Two tags, spare separated" ) { + TestSpec spec = parseTestSpec( "[two] [x]" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == true ); + } + SECTION( "Wildcarded name and tag" ) { + TestSpec spec = parseTestSpec( "*name*[x]" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == true ); + CHECK( spec.matches( *tcD ) == false ); + } + SECTION( "Single tag exclusion" ) { + TestSpec spec = parseTestSpec( "~[one]" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == true ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == false ); + } + SECTION( "One tag exclusion and one tag inclusion" ) { + TestSpec spec = parseTestSpec( "~[two][x]" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == true ); + CHECK( spec.matches( *tcC ) == false ); + } + SECTION( "One tag exclusion and one wldcarded name inclusion" ) { + TestSpec spec = parseTestSpec( "~[two]*name*" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == false ); + CHECK( spec.matches( *tcD ) == true ); + } + SECTION( "One tag exclusion, using exclude:, and one wldcarded name inclusion" ) { + TestSpec spec = parseTestSpec( "exclude:[two]*name*" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == false ); + CHECK( spec.matches( *tcD ) == true ); + } + SECTION( "name exclusion" ) { + TestSpec spec = parseTestSpec( "~b" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == true ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == false ); + CHECK( spec.matches( *tcD ) == true ); + } + SECTION( "wildcarded name exclusion" ) { + TestSpec spec = parseTestSpec( "~*name*" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == true ); + CHECK( spec.matches( *tcB ) == true ); + CHECK( spec.matches( *tcC ) == false ); + CHECK( spec.matches( *tcD ) == false ); + } + SECTION( "wildcarded name exclusion with tag inclusion" ) { + TestSpec spec = parseTestSpec( "~*name*,[three]" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == true ); + CHECK( spec.matches( *tcB ) == true ); + CHECK( spec.matches( *tcC ) == true ); + CHECK( spec.matches( *tcD ) == false ); + } + SECTION( "wildcarded name exclusion, using exclude:, with tag inclusion" ) { + TestSpec spec = parseTestSpec( "exclude:*name*,[three]" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == true ); + CHECK( spec.matches( *tcB ) == true ); + CHECK( spec.matches( *tcC ) == true ); + CHECK( spec.matches( *tcD ) == false ); + } + SECTION( "two wildcarded names" ) { + TestSpec spec = parseTestSpec( R"("longer*""*spaces")" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == true ); + CHECK( spec.matches( *tcD ) == false ); + } + SECTION( "empty tag" ) { + TestSpec spec = parseTestSpec( "[]" ); + CHECK( spec.hasFilters() == false ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == false ); + CHECK( spec.matches( *tcD ) == false ); + } + SECTION( "empty quoted name" ) { + TestSpec spec = parseTestSpec( "\"\"" ); + CHECK( spec.hasFilters() == false ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == false ); + CHECK( spec.matches( *tcD ) == false ); + } + SECTION( "quoted string followed by tag exclusion" ) { + TestSpec spec = parseTestSpec( "\"*name*\"~[.]" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == false ); + CHECK( spec.matches( *tcD ) == true ); + } + SECTION( "Leading and trailing spaces in test spec" ) { + TestSpec spec = parseTestSpec( "\" aardvark \"" ); + CHECK( spec.matches( *fakeTestCase( " aardvark " ) ) ); + CHECK( spec.matches( *fakeTestCase( " aardvark" ) ) ); + CHECK( spec.matches( *fakeTestCase( " aardvark " ) ) ); + CHECK( spec.matches( *fakeTestCase( "aardvark " ) ) ); + CHECK( spec.matches( *fakeTestCase( "aardvark" ) ) ); + + } + SECTION( "Leading and trailing spaces in test name" ) { + TestSpec spec = parseTestSpec( "aardvark" ); + CHECK( spec.matches( *fakeTestCase( " aardvark " ) ) ); + CHECK( spec.matches( *fakeTestCase( " aardvark" ) ) ); + CHECK( spec.matches( *fakeTestCase( " aardvark " ) ) ); + CHECK( spec.matches( *fakeTestCase( "aardvark " ) ) ); + CHECK( spec.matches( *fakeTestCase( "aardvark" ) ) ); + } + SECTION("Shortened hide tags are split apart when parsing") { + TestSpec spec = parseTestSpec("[.foo]"); + CHECK(spec.matches(*fakeTestCase("hidden and foo", "[.][foo]"))); + CHECK_FALSE(spec.matches(*fakeTestCase("only foo", "[foo]"))); + } + SECTION("Shortened hide tags also properly handle exclusion") { + TestSpec spec = parseTestSpec("~[.foo]"); + CHECK_FALSE(spec.matches(*fakeTestCase("hidden and foo", "[.][foo]"))); + CHECK_FALSE(spec.matches(*fakeTestCase("only foo", "[foo]"))); + CHECK_FALSE(spec.matches(*fakeTestCase("only hidden", "[.]"))); + CHECK(spec.matches(*fakeTestCase("neither foo nor hidden", "[bar]"))); + } +} + +TEST_CASE("#1905 -- test spec parser properly clears internal state between compound tests", "[command-line][test-spec]") { + using Catch::parseTestSpec; + using Catch::TestSpec; + // We ask for one of 2 different tests and the latter one of them has a , in name that needs escaping + TestSpec spec = parseTestSpec(R"("spec . char","spec \, char")"); + + REQUIRE(spec.matches(*fakeTestCase("spec . char"))); + REQUIRE(spec.matches(*fakeTestCase("spec , char"))); + REQUIRE_FALSE(spec.matches(*fakeTestCase(R"(spec \, char)"))); +} + +TEST_CASE("#1912 -- test spec parser handles escaping", "[command-line][test-spec]") { + using Catch::parseTestSpec; + using Catch::TestSpec; + + SECTION("Various parentheses") { + TestSpec spec = parseTestSpec(R"(spec {a} char,spec \[a] char)"); + + REQUIRE(spec.matches(*fakeTestCase(R"(spec {a} char)"))); + REQUIRE(spec.matches(*fakeTestCase(R"(spec [a] char)"))); + REQUIRE_FALSE(spec.matches(*fakeTestCase("differs but has similar tag", "[a]"))); + } + SECTION("backslash in test name") { + TestSpec spec = parseTestSpec(R"(spec \\ char)"); + + REQUIRE(spec.matches(*fakeTestCase(R"(spec \ char)"))); + } +} + +TEST_CASE("Test spec serialization is round-trippable", "[test-spec][serialization][approvals]") { + using Catch::parseTestSpec; + using Catch::TestSpec; + + auto serializedTestSpec = []( std::string const& spec ) { + Catch::ReusableStringStream sstr; + sstr << parseTestSpec( spec ); + return sstr.str(); + }; + + SECTION("Spaces are normalized") { + CHECK( serializedTestSpec( "[abc][def]" ) == "[abc] [def]" ); + CHECK( serializedTestSpec( "[def] [abc]" ) == "[def] [abc]" ); + CHECK( serializedTestSpec( "[def] [abc]" ) == "[def] [abc]" ); + } + SECTION("Output is order dependent") { + CHECK( serializedTestSpec( "[abc][def]" ) == "[abc] [def]" ); + CHECK( serializedTestSpec( "[def][abc]" ) == "[def] [abc]" ); + } + SECTION("Multiple disjunct filters") { + CHECK( serializedTestSpec( "[abc],[def]" ) == "[abc],[def]" ); + CHECK( serializedTestSpec( "[def],[abc],[idkfa]" ) == "[def],[abc],[idkfa]" ); + } + SECTION("Test names are enclosed in string") { + CHECK( serializedTestSpec( "Some test" ) == "\"Some test\"" ); + CHECK( serializedTestSpec( "*Some test" ) == "\"*Some test\"" ); + CHECK( serializedTestSpec( "* Some test" ) == "\"* Some test\"" ); + CHECK( serializedTestSpec( "* Some test *" ) == "\"* Some test *\"" ); + } + SECTION( "Mixing test names and tags" ) { + CHECK( serializedTestSpec( "some test[abcd]" ) == + "\"some test\" [abcd]" ); + CHECK( serializedTestSpec( "[ab]some test[cd]" ) == + "[ab] \"some test\" [cd]" ); + } +} diff --git a/tests/SelfTest/IntrospectiveTests/TestSpecParser.tests.cpp b/tests/SelfTest/IntrospectiveTests/TestSpecParser.tests.cpp new file mode 100644 index 0000000..ae27b40 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/TestSpecParser.tests.cpp @@ -0,0 +1,55 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include +#include +#include + +namespace { + static constexpr Catch::SourceLineInfo dummySourceLineInfo = CATCH_INTERNAL_LINEINFO; + + static Catch::TestSpec parseAndCreateSpec(std::string const& str) { + Catch::TagAliasRegistry registry; + Catch::TestSpecParser parser( registry ); + + parser.parse( str ); + auto spec = parser.testSpec(); + REQUIRE( spec.hasFilters() ); + REQUIRE( spec.getInvalidSpecs().empty()); + + return spec; + } + +} + +TEST_CASE( "Parsing tags with non-alphabetical characters is pass-through", + "[test-spec][test-spec-parser]" ) { + auto const& tagString = GENERATE( as{}, + "[tag with spaces]", + "[I said \"good day\" sir!]" ); + CAPTURE(tagString); + + auto spec = parseAndCreateSpec( tagString ); + + Catch::TestCaseInfo testCase( + "", { "fake test name", tagString }, dummySourceLineInfo ); + + REQUIRE( spec.matches( testCase ) ); +} + +TEST_CASE("Parsed tags are matched case insensitive", + "[test-spec][test-spec-parser]") { + auto spec = parseAndCreateSpec( "[CASED tag]" ); + + Catch::TestCaseInfo testCase( + "", { "fake test name", "[cased TAG]" }, dummySourceLineInfo ); + + REQUIRE( spec.matches( testCase ) ); +} diff --git a/tests/SelfTest/IntrospectiveTests/TextFlow.tests.cpp b/tests/SelfTest/IntrospectiveTests/TextFlow.tests.cpp new file mode 100644 index 0000000..de03ed0 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/TextFlow.tests.cpp @@ -0,0 +1,400 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include + +#include + +using Catch::TextFlow::Column; +using Catch::TextFlow::AnsiSkippingString; + +namespace { + static std::string as_written(Column const& c) { + std::stringstream sstr; + sstr << c; + return sstr.str(); + } +} + +TEST_CASE( "TextFlow::Column one simple line", + "[TextFlow][column][approvals]" ) { + Column col( "simple short line" ); + + REQUIRE(as_written(col) == "simple short line"); +} + +TEST_CASE( "TextFlow::Column respects already present newlines", + "[TextFlow][column][approvals]" ) { + Column col( "abc\ndef" ); + REQUIRE( as_written( col ) == "abc\ndef" ); +} + +TEST_CASE( "TextFlow::Column respects width setting", + "[TextFlow][column][approvals]" ) { + Column col( "The quick brown fox jumped over the lazy dog" ); + + SECTION( "width=20" ) { + col.width( 20 ); + REQUIRE( as_written( col ) == "The quick brown fox\n" + "jumped over the lazy\n" + "dog" ); + } + SECTION("width=10") { + col.width( 10 ); + REQUIRE( as_written( col ) == "The quick\n" + "brown fox\n" + "jumped\n" + "over the\n" + "lazy dog" ); + } + SECTION("width=5") { + // This is so small some words will have to be split with hyphen + col.width(5); + REQUIRE( as_written( col ) == "The\n" + "quick\n" + "brown\n" + "fox\n" + "jump-\n" + "ed\n" + "over\n" + "the\n" + "lazy\n" + "dog" ); + } +} + +TEST_CASE( "TextFlow::Column respects indentation setting", + "[TextFlow][column][approvals]" ) { + Column col( "First line\nSecond line\nThird line" ); + + SECTION("Default: no indentation at all") { + REQUIRE(as_written(col) == "First line\nSecond line\nThird line"); + } + SECTION("Indentation on first line only") { + col.initialIndent(3); + REQUIRE(as_written(col) == " First line\nSecond line\nThird line"); + } + SECTION("Indentation on all lines") { + col.indent(3); + REQUIRE(as_written(col) == " First line\n Second line\n Third line"); + } + SECTION("Indentation on later lines only") { + col.indent(5).initialIndent(0); + REQUIRE(as_written(col) == "First line\n Second line\n Third line"); + } + SECTION("Different indentation on first and later lines") { + col.initialIndent(1).indent(2); + REQUIRE(as_written(col) == " First line\n Second line\n Third line"); + } +} + +TEST_CASE("TextFlow::Column indentation respects whitespace", "[TextFlow][column][approvals]") { + Column col(" text with whitespace\n after newlines"); + + SECTION("No extra indentation") { + col.initialIndent(0).indent(0); + REQUIRE(as_written(col) == " text with whitespace\n after newlines"); + } + SECTION("Different indentation on first and later lines") { + col.initialIndent(1).indent(2); + REQUIRE(as_written(col) == " text with whitespace\n after newlines"); + } +} + +TEST_CASE( "TextFlow::Column linebreaking prefers boundary characters", + "[TextFlow][column][approvals]" ) { + SECTION("parentheses") { + Column col("(Hello)aaa(World)"); + SECTION("width=20") { + col.width(20); + REQUIRE(as_written(col) == "(Hello)aaa(World)"); + } + SECTION("width=15") { + col.width(15); + REQUIRE(as_written(col) == "(Hello)aaa\n(World)"); + } + SECTION("width=8") { + col.width(8); + REQUIRE(as_written(col) == "(Hello)\naaa\n(World)"); + } + } + SECTION("commas") { + Column col("Hello, world"); + col.width(8); + + REQUIRE(as_written(col) == "Hello,\nworld"); + } +} + + +TEST_CASE( "TextFlow::Column respects indentation for empty lines", + "[TextFlow][column][approvals][!shouldfail]" ) { + // This is currently bugged and does not do what it should + Column col("\n\nthird line"); + col.indent(2); + + //auto b = col.begin(); + //auto e = col.end(); + + //auto b1 = *b; + //++b; + //auto b2 = *b; + //++b; + //auto b3 = *b; + //++b; + + //REQUIRE(b == e); + + std::string written = as_written(col); + + REQUIRE(written == " \n \n third line"); +} + +TEST_CASE( "TextFlow::Column leading/trailing whitespace", + "[TextFlow][column][approvals]" ) { + SECTION("Trailing whitespace") { + Column col("some trailing whitespace: \t"); + REQUIRE(as_written(col) == "some trailing whitespace: \t"); + } + SECTION("Some leading whitespace") { + Column col("\t \t whitespace wooo"); + REQUIRE(as_written(col) == "\t \t whitespace wooo"); + } + SECTION("both") { + Column col(" abc "); + REQUIRE(as_written(col) == " abc "); + } + SECTION("whitespace only") { + Column col("\t \t"); + REQUIRE(as_written(col) == "\t \t"); + } +} + +TEST_CASE( "TextFlow::Column can handle empty string", + "[TextFlow][column][approvals]" ) { + Column col(""); + REQUIRE(as_written(col) == ""); +} + +TEST_CASE( "#1400 - TextFlow::Column wrapping would sometimes duplicate words", + "[TextFlow][column][regression][approvals]" ) { + const auto long_string = std::string( + "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque nisl \n" + "massa, luctus ut ligula vitae, suscipit tempus velit. Vivamus sodales, quam in \n" + "convallis posuere, libero nisi ultricies orci, nec lobortis.\n"); + + auto col = Column(long_string) + .width(79) + .indent(2); + + REQUIRE(as_written(col) == + " Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque nisl \n" + " massa, luctus ut ligula vitae, suscipit tempus velit. Vivamus sodales, quam\n" + " in \n" + " convallis posuere, libero nisi ultricies orci, nec lobortis."); +} + +TEST_CASE( "TextFlow::AnsiSkippingString skips ansi sequences", + "[TextFlow][ansiskippingstring][approvals]" ) { + + SECTION("basic string") { + std::string text = "a\033[38;2;98;174;239mb\033[38mc\033[0md\033[me"; + AnsiSkippingString str(text); + + SECTION( "iterates forward" ) { + auto it = str.begin(); + CHECK(*it == 'a'); + ++it; + CHECK(*it == 'b'); + ++it; + CHECK(*it == 'c'); + ++it; + CHECK(*it == 'd'); + ++it; + CHECK(*it == 'e'); + ++it; + CHECK(it == str.end()); + } + SECTION( "iterates backwards" ) { + auto it = str.end(); + --it; + CHECK(*it == 'e'); + --it; + CHECK(*it == 'd'); + --it; + CHECK(*it == 'c'); + --it; + CHECK(*it == 'b'); + --it; + CHECK(*it == 'a'); + CHECK(it == str.begin()); + } + } + + SECTION( "ansi escape sequences at the start" ) { + std::string text = "\033[38;2;98;174;239ma\033[38;2;98;174;239mb\033[38mc\033[0md\033[me"; + AnsiSkippingString str(text); + auto it = str.begin(); + CHECK(*it == 'a'); + ++it; + CHECK(*it == 'b'); + ++it; + CHECK(*it == 'c'); + ++it; + CHECK(*it == 'd'); + ++it; + CHECK(*it == 'e'); + ++it; + CHECK(it == str.end()); + --it; + CHECK(*it == 'e'); + --it; + CHECK(*it == 'd'); + --it; + CHECK(*it == 'c'); + --it; + CHECK(*it == 'b'); + --it; + CHECK(*it == 'a'); + CHECK(it == str.begin()); + } + + SECTION( "ansi escape sequences at the end" ) { + std::string text = "a\033[38;2;98;174;239mb\033[38mc\033[0md\033[me\033[38;2;98;174;239m"; + AnsiSkippingString str(text); + auto it = str.begin(); + CHECK(*it == 'a'); + ++it; + CHECK(*it == 'b'); + ++it; + CHECK(*it == 'c'); + ++it; + CHECK(*it == 'd'); + ++it; + CHECK(*it == 'e'); + ++it; + CHECK(it == str.end()); + --it; + CHECK(*it == 'e'); + --it; + CHECK(*it == 'd'); + --it; + CHECK(*it == 'c'); + --it; + CHECK(*it == 'b'); + --it; + CHECK(*it == 'a'); + CHECK(it == str.begin()); + } + + SECTION( "skips consecutive escapes" ) { + std::string text = "\033[38;2;98;174;239m\033[38;2;98;174;239ma\033[38;2;98;174;239mb\033[38m\033[38m\033[38mc\033[0md\033[me"; + AnsiSkippingString str(text); + auto it = str.begin(); + CHECK(*it == 'a'); + ++it; + CHECK(*it == 'b'); + ++it; + CHECK(*it == 'c'); + ++it; + CHECK(*it == 'd'); + ++it; + CHECK(*it == 'e'); + ++it; + CHECK(it == str.end()); + --it; + CHECK(*it == 'e'); + --it; + CHECK(*it == 'd'); + --it; + CHECK(*it == 'c'); + --it; + CHECK(*it == 'b'); + --it; + CHECK(*it == 'a'); + CHECK(it == str.begin()); + } + + SECTION( "handles incomplete ansi sequences" ) { + std::string text = "a\033[b\033[30c\033[30;d\033[30;2e"; + AnsiSkippingString str(text); + CHECK(std::string(str.begin(), str.end()) == text); + } +} + +TEST_CASE( "TextFlow::AnsiSkippingString computes the size properly", + "[TextFlow][ansiskippingstring][approvals]" ) { + std::string text = "\033[38;2;98;174;239m\033[38;2;98;174;239ma\033[38;2;98;174;239mb\033[38m\033[38m\033[38mc\033[0md\033[me"; + AnsiSkippingString str(text); + CHECK(str.size() == 5); +} + +TEST_CASE( "TextFlow::AnsiSkippingString substrings properly", + "[TextFlow][ansiskippingstring][approvals]" ) { + SECTION("basic test") { + std::string text = "a\033[38;2;98;174;239mb\033[38mc\033[0md\033[me"; + AnsiSkippingString str(text); + auto a = str.begin(); + auto b = str.begin(); + ++b; + ++b; + CHECK(str.substring(a, b) == "a\033[38;2;98;174;239mb\033[38m"); + ++a; + ++b; + CHECK(str.substring(a, b) == "b\033[38mc\033[0m"); + CHECK(str.substring(a, str.end()) == "b\033[38mc\033[0md\033[me"); + CHECK(str.substring(str.begin(), str.end()) == text); + } + SECTION("escapes at the start") { + std::string text = "\033[38;2;98;174;239m\033[38;2;98;174;239ma\033[38;2;98;174;239mb\033[38m\033[38m\033[38mc\033[0md\033[me"; + AnsiSkippingString str(text); + auto a = str.begin(); + auto b = str.begin(); + ++b; + ++b; + CHECK(str.substring(a, b) == "\033[38;2;98;174;239m\033[38;2;98;174;239ma\033[38;2;98;174;239mb\033[38m\033[38m\033[38m"); + ++a; + ++b; + CHECK(str.substring(a, b) == "b\033[38m\033[38m\033[38mc\033[0m"); + CHECK(str.substring(a, str.end()) == "b\033[38m\033[38m\033[38mc\033[0md\033[me"); + CHECK(str.substring(str.begin(), str.end()) == text); + } + SECTION("escapes at the end") { + std::string text = "a\033[38;2;98;174;239mb\033[38mc\033[0md\033[me\033[38m"; + AnsiSkippingString str(text); + auto a = str.begin(); + auto b = str.begin(); + ++b; + ++b; + CHECK(str.substring(a, b) == "a\033[38;2;98;174;239mb\033[38m"); + ++a; + ++b; + CHECK(str.substring(a, b) == "b\033[38mc\033[0m"); + CHECK(str.substring(a, str.end()) == "b\033[38mc\033[0md\033[me\033[38m"); + CHECK(str.substring(str.begin(), str.end()) == text); + } +} + +TEST_CASE( "TextFlow::Column skips ansi escape sequences", + "[TextFlow][column][approvals]" ) { + std::string text = "\033[38;2;98;174;239m\033[38;2;198;120;221mThe quick brown \033[38;2;198;120;221mfox jumped over the lazy dog\033[0m"; + Column col(text); + + SECTION( "width=20" ) { + col.width( 20 ); + REQUIRE( as_written( col ) == "\033[38;2;98;174;239m\033[38;2;198;120;221mThe quick brown \033[38;2;198;120;221mfox\n" + "jumped over the lazy\n" + "dog\033[0m" ); + } + + SECTION( "width=80" ) { + col.width( 80 ); + REQUIRE( as_written( col ) == text ); + } +} diff --git a/tests/SelfTest/IntrospectiveTests/ToString.tests.cpp b/tests/SelfTest/IntrospectiveTests/ToString.tests.cpp new file mode 100644 index 0000000..e190460 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/ToString.tests.cpp @@ -0,0 +1,120 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include +#include +#include + +#include + +enum class EnumClass3 { Value1, Value2, Value3, Value4 }; + +struct UsesSentinel { + using const_iterator = int const*; + using const_sentinel = std::nullptr_t; + + const_iterator begin() const { return nullptr; } + const_iterator end() const { return nullptr; } +}; + +TEST_CASE( "parseEnums", "[Strings][enums]" ) { + using namespace Catch::Matchers; + using Catch::Detail::parseEnums; + + SECTION( "No enums" ) + CHECK_THAT( parseEnums( "" ), Equals( std::vector{} ) ); + + SECTION( "One enum value" ) { + CHECK_THAT( parseEnums( "ClassName::EnumName::Value1" ), + Equals(std::vector{"Value1"} ) ); + CHECK_THAT( parseEnums( "Value1" ), + Equals( std::vector{"Value1"} ) ); + CHECK_THAT( parseEnums( "EnumName::Value1" ), + Equals(std::vector{"Value1"} ) ); + } + + SECTION( "Multiple enum values" ) { + CHECK_THAT( parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), + Equals( std::vector{"Value1", "Value2"} ) ); + CHECK_THAT( parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), + Equals( std::vector{"Value1", "Value2", "Value3"} ) ); + CHECK_THAT( parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), + Equals( std::vector{"Value1", "Value2", "Value3"} ) ); + } +} + +TEST_CASE( "Directly creating an EnumInfo" ) { + + using namespace Catch::Detail; + auto enumInfo = makeEnumInfo( "EnumName", "EnumName::Value1, EnumName::Value2", {0, 1} ); + + CHECK( enumInfo->lookup(0) == "Value1" ); + CHECK( enumInfo->lookup(1) == "Value2" ); + CHECK( enumInfo->lookup(3) == "{** unexpected enum value **}" ); +} + +TEST_CASE("Range type with sentinel") { + CHECK( Catch::Detail::stringify(UsesSentinel{}) == "{ }" ); +} + +TEST_CASE("convertIntoString stringification helper", "[toString][approvals]") { + using namespace std::string_literals; + using Catch::Detail::convertIntoString; + using namespace Catch; + + SECTION("No escaping") { + CHECK(convertIntoString(""_sr, false) == R"("")"s); + CHECK(convertIntoString("abcd"_sr, false) == R"("abcd")"s); + CHECK(convertIntoString("ab\ncd"_sr, false) == "\"ab\ncd\""s); + CHECK(convertIntoString("ab\r\ncd"_sr, false) == "\"ab\r\ncd\""s); + CHECK(convertIntoString("ab\"cd"_sr, false) == R"("ab"cd")"s); + } + SECTION("Escaping invisibles") { + CHECK(convertIntoString(""_sr, true) == R"("")"s); + CHECK(convertIntoString("ab\ncd"_sr, true) == R"("ab\ncd")"s); + CHECK(convertIntoString("ab\r\ncd"_sr, true) == R"("ab\r\ncd")"s); + CHECK(convertIntoString("ab\tcd"_sr, true) == R"("ab\tcd")"s); + CHECK(convertIntoString("ab\fcd"_sr, true) == R"("ab\fcd")"s); + CHECK(convertIntoString("ab\"cd"_sr, true) == R"("ab"cd")"s); + } +} + +TEMPLATE_TEST_CASE( "Stringifying char arrays with statically known sizes", + "[toString]", + char, + signed char, + unsigned char ) { + using namespace std::string_literals; + TestType with_null_terminator[10] = "abc"; + CHECK( ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s ); + + TestType no_null_terminator[3] = { 'a', 'b', 'c' }; + CHECK( ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s ); +} + +TEST_CASE( "#2944 - Stringifying dates before 1970 should not crash", "[.approvals]" ) { + using Catch::Matchers::Equals; + using Days = std::chrono::duration>; + using SysDays = std::chrono::time_point; + Catch::StringMaker sm; + + // Check simple date first + const SysDays post1970{ Days{ 1 } }; + auto converted_post = sm.convert( post1970 ); + REQUIRE( converted_post == "1970-01-02T00:00:00Z" ); + + const SysDays pre1970{ Days{ -1 } }; + auto converted_pre = sm.convert( pre1970 ); + REQUIRE_THAT( + converted_pre, + Equals( "1969-12-31T00:00:00Z" ) || + Equals( "gmtime from provided timepoint has failed. This " + "happens e.g. with pre-1970 dates using Microsoft libc" ) ); +} diff --git a/tests/SelfTest/IntrospectiveTests/Traits.tests.cpp b/tests/SelfTest/IntrospectiveTests/Traits.tests.cpp new file mode 100644 index 0000000..459e0d4 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/Traits.tests.cpp @@ -0,0 +1,45 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include + + +#define ADD_TRAIT_TEST_CASE( op ) \ + TEST_CASE( "is_" #op "_comparable", \ + "[traits][is_comparable][approvals]" ) { \ + using Catch::Detail::is_##op##_0_comparable; \ + using Catch::Detail::is_##op##_comparable; \ + \ + STATIC_REQUIRE( is_##op##_comparable::value ); \ + STATIC_REQUIRE( \ + is_##op##_comparable::value ); \ + STATIC_REQUIRE( !is_##op##_comparable::value ); \ + STATIC_REQUIRE( \ + !is_##op##_comparable::value ); \ + STATIC_REQUIRE( \ + !is_##op##_comparable::value ); \ + \ + STATIC_REQUIRE( is_##op##_0_comparable::value ); \ + STATIC_REQUIRE( \ + is_##op##_0_comparable::value ); \ + STATIC_REQUIRE( !is_##op##_0_comparable::value ); \ + \ + /* This test fails with MSVC in permissive mode, because of course it does */ \ + /* STATIC_REQUIRE( !is_##op##_0_comparable::value ); */ \ +} + +ADD_TRAIT_TEST_CASE(lt) +ADD_TRAIT_TEST_CASE(gt) +ADD_TRAIT_TEST_CASE(le) +ADD_TRAIT_TEST_CASE(ge) +ADD_TRAIT_TEST_CASE(eq) +ADD_TRAIT_TEST_CASE(ne) + +#undef ADD_TRAIT_TEST_CASE diff --git a/tests/SelfTest/IntrospectiveTests/UniquePtr.tests.cpp b/tests/SelfTest/IntrospectiveTests/UniquePtr.tests.cpp new file mode 100644 index 0000000..420bf1b --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/UniquePtr.tests.cpp @@ -0,0 +1,141 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include + +#include + +namespace { + struct unique_ptr_test_helper { + bool dummy = false; + }; +} // end unnamed namespace + +TEST_CASE("unique_ptr reimplementation: basic functionality", "[internals][unique-ptr]") { + using Catch::Detail::unique_ptr; + SECTION("Default constructed unique_ptr is empty") { + unique_ptr ptr; + REQUIRE_FALSE(ptr); + REQUIRE(ptr.get() == nullptr); + } + SECTION("Take ownership of allocation") { + auto naked_ptr = new int{ 0 }; + unique_ptr ptr(naked_ptr); + REQUIRE(ptr); + REQUIRE(*ptr == 0); + REQUIRE(ptr.get() == naked_ptr); + SECTION("Plain reset deallocates") { + ptr.reset(); // this makes naked_ptr dangling! + REQUIRE_FALSE(ptr); + REQUIRE(ptr.get() == nullptr); + } + SECTION("Reset replaces ownership") { + ptr.reset(new int{ 2 }); + REQUIRE(ptr); + REQUIRE(ptr.get() != nullptr); + REQUIRE(*ptr == 2); + } + } + SECTION("Release releases ownership") { + auto naked_ptr = new int{ 1 }; + unique_ptr ptr(naked_ptr); + ptr.release(); + CHECK_FALSE(ptr); + CHECK(ptr.get() == nullptr); + delete naked_ptr; + } + SECTION("Move constructor") { + unique_ptr ptr1(new int{ 1 }); + auto ptr2(std::move(ptr1)); + REQUIRE_FALSE(ptr1); + REQUIRE(ptr2); + REQUIRE(*ptr2 == 1); + } + SECTION("Move assignment") { + unique_ptr ptr1(new int{ 1 }), ptr2(new int{ 2 }); + ptr1 = std::move(ptr2); + REQUIRE_FALSE(ptr2); + REQUIRE(ptr1); + REQUIRE(*ptr1 == 2); + } + SECTION("free swap") { + unique_ptr ptr1(new int{ 1 }), ptr2(new int{ 2 }); + swap(ptr1, ptr2); + REQUIRE(*ptr1 == 2); + REQUIRE(*ptr2 == 1); + } +} + + +namespace { + struct base { + int i; + base(int i_) :i(i_) {} + }; + struct derived : base { using base::base; }; + struct unrelated {}; + +} // end unnamed namespace + +static_assert( std::is_constructible, + Catch::Detail::unique_ptr>::value, "Upcasting is supported"); +static_assert(!std::is_constructible, + Catch::Detail::unique_ptr>::value, "Downcasting is not supported"); +static_assert(!std::is_constructible, + Catch::Detail::unique_ptr>::value, "Cannot just convert one ptr type to another"); + +TEST_CASE("Upcasting special member functions", "[internals][unique-ptr]") { + using Catch::Detail::unique_ptr; + + unique_ptr dptr(new derived{3}); + SECTION("Move constructor") { + unique_ptr bptr(std::move(dptr)); + REQUIRE(bptr->i == 3); + } + SECTION("move assignment") { + unique_ptr bptr(new base{ 1 }); + bptr = std::move(dptr); + REQUIRE(bptr->i == 3); + } +} + +namespace { + struct move_detector { + bool has_moved = false; + move_detector() = default; + move_detector(move_detector const& rhs) = default; + move_detector& operator=(move_detector const& rhs) = default; + + move_detector(move_detector&& rhs) noexcept { + rhs.has_moved = true; + } + move_detector& operator=(move_detector&& rhs) noexcept { + rhs.has_moved = true; + return *this; + } + }; +} // end unnamed namespace + +TEST_CASE("make_unique reimplementation", "[internals][unique-ptr]") { + using Catch::Detail::make_unique; + SECTION("From lvalue copies") { + move_detector lval; + auto ptr = make_unique(lval); + REQUIRE_FALSE(lval.has_moved); + } + SECTION("From rvalue moves") { + move_detector rval; + auto ptr = make_unique(std::move(rval)); + REQUIRE(rval.has_moved); + } + SECTION("Variadic constructor") { + auto ptr = make_unique>(1, 2., 3); + REQUIRE(*ptr == std::tuple{1, 2., 3}); + } +} diff --git a/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp b/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp new file mode 100644 index 0000000..b5982b8 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp @@ -0,0 +1,183 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include + +#include +#include + +#include + +static std::string encode( std::string const& str, Catch::XmlEncode::ForWhat forWhat = Catch::XmlEncode::ForTextNodes ) { + Catch::ReusableStringStream oss; + oss << Catch::XmlEncode( str, forWhat ); + return oss.str(); +} + +TEST_CASE( "XmlEncode", "[XML]" ) { + SECTION( "normal string" ) { + REQUIRE( encode( "normal string" ) == "normal string" ); + } + SECTION( "empty string" ) { + REQUIRE( encode( "" ) == "" ); + } + SECTION( "string with ampersand" ) { + REQUIRE( encode( "smith & jones" ) == "smith & jones" ); + } + SECTION( "string with less-than" ) { + REQUIRE( encode( "smith < jones" ) == "smith < jones" ); + } + SECTION( "string with greater-than" ) { + REQUIRE( encode( "smith > jones" ) == "smith > jones" ); + REQUIRE( encode( "smith ]]> jones" ) == "smith ]]> jones" ); + } + SECTION( "string with quotes" ) { + std::string stringWithQuotes = "don't \"quote\" me on that"; + REQUIRE( encode( stringWithQuotes ) == stringWithQuotes ); + REQUIRE( encode( stringWithQuotes, Catch::XmlEncode::ForAttributes ) == "don't "quote" me on that" ); + } + SECTION( "string with control char (1)" ) { + REQUIRE( encode( "[\x01]" ) == "[\\x01]" ); + } + SECTION( "string with control char (x7F)" ) { + REQUIRE( encode( "[\x7F]" ) == "[\\x7F]" ); + } +} + +// Thanks to Peter Bindels (dascandy) for some of the tests +TEST_CASE("XmlEncode: UTF-8", "[XML][UTF-8][approvals]") { + SECTION("Valid utf-8 strings") { + CHECK(encode("Here be 👾") == "Here be 👾"); + CHECK(encode("šš") == "šš"); + + CHECK(encode("\xDF\xBF") == "\xDF\xBF"); // 0x7FF + CHECK(encode("\xE0\xA0\x80") == "\xE0\xA0\x80"); // 0x800 + CHECK(encode("\xED\x9F\xBF") == "\xED\x9F\xBF"); // 0xD7FF + CHECK(encode("\xEE\x80\x80") == "\xEE\x80\x80"); // 0xE000 + CHECK(encode("\xEF\xBF\xBF") == "\xEF\xBF\xBF"); // 0xFFFF + CHECK(encode("\xF0\x90\x80\x80") == "\xF0\x90\x80\x80"); // 0x10000 + CHECK(encode("\xF4\x8F\xBF\xBF") == "\xF4\x8F\xBF\xBF"); // 0x10FFFF + } + SECTION("Invalid utf-8 strings") { + SECTION("Various broken strings") { + CHECK(encode("Here \xFF be \xF0\x9F\x91\xBE") == "Here \\xFF be 👾"); + CHECK(encode("\xFF") == "\\xFF"); + CHECK(encode("\xC5\xC5\xA0") == "\\xC5Š"); + CHECK(encode("\xF4\x90\x80\x80") == "\\xF4\\x90\\x80\\x80"); // 0x110000 -- out of unicode range + } + + SECTION("Overlong encodings") { + CHECK(encode("\xC0\x80") == "\\xC0\\x80"); // \0 + CHECK(encode("\xF0\x80\x80\x80") == "\\xF0\\x80\\x80\\x80"); // Super-over-long \0 + CHECK(encode("\xC1\xBF") == "\\xC1\\xBF"); // ASCII char as UTF-8 (0x7F) + CHECK(encode("\xE0\x9F\xBF") == "\\xE0\\x9F\\xBF"); // 0x7FF + CHECK(encode("\xF0\x8F\xBF\xBF") == "\\xF0\\x8F\\xBF\\xBF"); // 0xFFFF + } + + // Note that we actually don't modify surrogate pairs, as we do not do strict checking + SECTION("Surrogate pairs") { + CHECK(encode("\xED\xA0\x80") == "\xED\xA0\x80"); // Invalid surrogate half 0xD800 + CHECK(encode("\xED\xAF\xBF") == "\xED\xAF\xBF"); // Invalid surrogate half 0xDBFF + CHECK(encode("\xED\xB0\x80") == "\xED\xB0\x80"); // Invalid surrogate half 0xDC00 + CHECK(encode("\xED\xBF\xBF") == "\xED\xBF\xBF"); // Invalid surrogate half 0xDFFF + } + + SECTION("Invalid start byte") { + CHECK(encode("\x80") == "\\x80"); + CHECK(encode("\x81") == "\\x81"); + CHECK(encode("\xBC") == "\\xBC"); + CHECK(encode("\xBF") == "\\xBF"); + // Out of range + CHECK(encode("\xF5\x80\x80\x80") == "\\xF5\\x80\\x80\\x80"); + CHECK(encode("\xF6\x80\x80\x80") == "\\xF6\\x80\\x80\\x80"); + CHECK(encode("\xF7\x80\x80\x80") == "\\xF7\\x80\\x80\\x80"); + } + + SECTION("Missing continuation byte(s)") { + // Missing first continuation byte + CHECK(encode("\xDE") == "\\xDE"); + CHECK(encode("\xDF") == "\\xDF"); + CHECK(encode("\xE0") == "\\xE0"); + CHECK(encode("\xEF") == "\\xEF"); + CHECK(encode("\xF0") == "\\xF0"); + CHECK(encode("\xF4") == "\\xF4"); + + // Missing second continuation byte + CHECK(encode("\xE0\x80") == "\\xE0\\x80"); + CHECK(encode("\xE0\xBF") == "\\xE0\\xBF"); + CHECK(encode("\xE1\x80") == "\\xE1\\x80"); + CHECK(encode("\xF0\x80") == "\\xF0\\x80"); + CHECK(encode("\xF4\x80") == "\\xF4\\x80"); + + // Missing third continuation byte + CHECK(encode("\xF0\x80\x80") == "\\xF0\\x80\\x80"); + CHECK(encode("\xF4\x80\x80") == "\\xF4\\x80\\x80"); + } + } +} + +TEST_CASE("XmlWriter writes boolean attributes as true/false", "[XML][XmlWriter]") { + using Catch::Matchers::ContainsSubstring; + std::stringstream stream; + { + Catch::XmlWriter xml(stream); + + xml.scopedElement("Element1") + .writeAttribute("attr1", true) + .writeAttribute("attr2", false); + } + + REQUIRE_THAT( stream.str(), + ContainsSubstring(R"(attr1="true")") && + ContainsSubstring(R"(attr2="false")") ); +} + +TEST_CASE("XmlWriter does not escape comments", "[XML][XmlWriter][approvals]") { + using Catch::Matchers::ContainsSubstring; + std::stringstream stream; + { + Catch::XmlWriter xml(stream); + + xml.writeComment(R"(unescaped special chars: < > ' " &)"); + } + REQUIRE_THAT( stream.str(), + ContainsSubstring(R"()")); +} + +TEST_CASE("XmlWriter errors out when writing text without enclosing element", "[XmlWriter][approvals]") { + std::stringstream stream; + Catch::XmlWriter xml(stream); + REQUIRE_THROWS(xml.writeText("some text")); +} + +TEST_CASE("XmlWriter escapes text properly", "[XML][XmlWriter][approvals]") { + using Catch::Matchers::ContainsSubstring; + std::stringstream stream; + { + Catch::XmlWriter xml(stream); + xml.scopedElement("root") + .writeText(R"(Special chars need escaping: < > ' " &)"); + } + + REQUIRE_THAT( stream.str(), + ContainsSubstring(R"(Special chars need escaping: < > ' " &)")); +} + +TEST_CASE("XmlWriter escapes attributes properly", "[XML][XmlWriter][approvals]") { + using Catch::Matchers::ContainsSubstring; + std::stringstream stream; + { + Catch::XmlWriter xml(stream); + xml.scopedElement("root") + .writeAttribute("some-attribute", R"(Special chars need escaping: < > ' " &)"); + } + + REQUIRE_THAT(stream.str(), + ContainsSubstring(R"(some-attribute="Special chars need escaping: < > ' " &")")); +} diff --git a/tests/SelfTest/Misc/invalid-test-names.input b/tests/SelfTest/Misc/invalid-test-names.input new file mode 100644 index 0000000..e2bc88e --- /dev/null +++ b/tests/SelfTest/Misc/invalid-test-names.input @@ -0,0 +1 @@ +Test with special, characters in \" name diff --git a/tests/SelfTest/Misc/plain-old-tests.input b/tests/SelfTest/Misc/plain-old-tests.input new file mode 100644 index 0000000..ae6d9f1 --- /dev/null +++ b/tests/SelfTest/Misc/plain-old-tests.input @@ -0,0 +1,2 @@ +random SECTION tests +nested SECTION tests diff --git a/tests/SelfTest/Misc/special-characters-in-file.input b/tests/SelfTest/Misc/special-characters-in-file.input new file mode 100644 index 0000000..b68a6bf --- /dev/null +++ b/tests/SelfTest/Misc/special-characters-in-file.input @@ -0,0 +1 @@ +Test with special\, characters \"in name diff --git a/tests/SelfTest/TestRegistrations.cpp b/tests/SelfTest/TestRegistrations.cpp new file mode 100644 index 0000000..d7a6966 --- /dev/null +++ b/tests/SelfTest/TestRegistrations.cpp @@ -0,0 +1,180 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include +#include +#include + + +// Some example tag aliases +CATCH_REGISTER_TAG_ALIAS("[@nhf]", "[failing]~[.]") +CATCH_REGISTER_TAG_ALIAS("[@tricky]", "[tricky]~[.]") + +#ifdef __clang__ +# pragma clang diagnostic ignored "-Wpadded" +# pragma clang diagnostic ignored "-Wweak-vtables" +#endif + +/** + * Event listener that internally counts and validates received events. + * + * Currently only performs validation by counting received events, rather + * than performing full matching. This means that it won't fail if the *Ended + * events are provided in wrong order, as long as they come in the right amount + * and with the right nesting. + */ +class ValidatingTestListener : public Catch::EventListenerBase { + struct EventCounter { + int starting = 0; + int ended = 0; + + bool hasActiveEvent() const { + return starting > ended; + } + bool hasSingleActiveEvent() const { + return starting - 1 == ended; + } + bool allEventsEnded() const { + return starting == ended; + } + }; + +public: + static std::string getDescription() { + return "Validates ordering of Catch2's listener events"; + } + + ValidatingTestListener(Catch::IConfig const* config) : + EventListenerBase(config) { + m_preferences.shouldReportAllAssertions = true; + } + + void testRunStarting( Catch::TestRunInfo const& ) override { + CATCH_ENFORCE( m_testRunCounter.starting == 0, + "Test run can only start once" ); + ++m_testRunCounter.starting; + } + void testCaseStarting(Catch::TestCaseInfo const&) override { + CATCH_ENFORCE( m_testRunCounter.hasActiveEvent(), + "Test case can only be started if the test run has already started" ); + CATCH_ENFORCE( m_testCaseCounter.allEventsEnded(), + "Test case cannot start if there is an unfinished one" ); + + ++m_testCaseCounter.starting; + + // Reset the part tracking for partial test case events + m_lastSeenPartNumber = uint64_t(-1); + } + + void testCasePartialStarting(Catch::TestCaseInfo const&, + uint64_t partNumber) override { + CATCH_ENFORCE( m_testCaseCounter.hasSingleActiveEvent(), + "Test case can only be partially started if the test case has fully started already" ); + CATCH_ENFORCE( m_lastSeenPartNumber + 1 == partNumber, + "Partial test case started out of order" ); + + ++m_testCasePartialCounter.starting; + m_lastSeenPartNumber = partNumber; + } + + void sectionStarting(Catch::SectionInfo const&) override { + CATCH_ENFORCE( m_testCaseCounter.hasSingleActiveEvent(), + "Section can only start in a test case" ); + CATCH_ENFORCE( m_testCasePartialCounter.hasSingleActiveEvent(), + "Section can only start in a test case" ); + + ++m_sectionCounter.starting; + } + + void assertionStarting(Catch::AssertionInfo const&) override { + CATCH_ENFORCE( m_testCaseCounter.hasSingleActiveEvent(), + "Assertion can only start if test case is started" ); + + ++m_assertionCounter.starting; + } + void assertionEnded(Catch::AssertionStats const&) override { + // todo: + // * Check that assertions are balanced + // * Check that assertions has started + ++m_assertionCounter.ended; + } + + void sectionEnded(Catch::SectionStats const&) override { + CATCH_ENFORCE( m_sectionCounter.hasActiveEvent(), + "Section ended without corresponding start" ); + // TODO: Check that all assertions ended + + ++m_sectionCounter.ended; + } + + + void testCasePartialEnded(Catch::TestCaseStats const&, + uint64_t partNumber) override { + CATCH_ENFORCE( m_lastSeenPartNumber == partNumber, + "Partial test case ended out of order" ); + CATCH_ENFORCE( m_testCasePartialCounter.hasSingleActiveEvent(), + "Partial test case ended without corresponding start" ); + CATCH_ENFORCE( m_sectionCounter.allEventsEnded(), + "Partial test case ended with unbalanced sections" ); + // TODO: Check that all assertions ended + + ++m_testCasePartialCounter.ended; + } + + + void testCaseEnded(Catch::TestCaseStats const&) override { + CATCH_ENFORCE( m_testCaseCounter.hasSingleActiveEvent(), + "Test case end is not matched with test case start" ); + CATCH_ENFORCE( m_testCasePartialCounter.allEventsEnded(), + "A partial test case has not ended" ); + CATCH_ENFORCE( m_sectionCounter.allEventsEnded(), + "Test case ended with unbalanced sections" ); + + // TODO: Check that all assertions ended + + ++m_testCaseCounter.ended; + } + void testRunEnded( Catch::TestRunStats const& ) override { + CATCH_ENFORCE( m_testRunCounter.hasSingleActiveEvent(), + "Test run end is not matched with test run start" ); + CATCH_ENFORCE( m_testRunCounter.ended == 0, + "Test run can only end once" ); + + ++m_testRunCounter.ended; + } + + ~ValidatingTestListener() override; + +private: + EventCounter m_testRunCounter; + EventCounter m_testCaseCounter; + EventCounter m_testCasePartialCounter; + uint64_t m_lastSeenPartNumber = 0; + EventCounter m_sectionCounter; + EventCounter m_assertionCounter; +}; + + +ValidatingTestListener::~ValidatingTestListener() { + // Throwing from noexcept destructor terminates, but we don't mind + // because this is test-only check and we don't need to try and recover + // from assumption violation here. + + CATCH_ENFORCE( m_testRunCounter.ended < 2, + "Test run should be started at most once" ); + CATCH_ENFORCE( m_testRunCounter.allEventsEnded(), + "The test run has not finished" ); + CATCH_ENFORCE( m_testCaseCounter.allEventsEnded(), + "A test case did not finish" ); + + // TODO: other counters being balanced? +} + +CATCH_REGISTER_LISTENER( ValidatingTestListener ) diff --git a/tests/SelfTest/TimingTests/Sleep.tests.cpp b/tests/SelfTest/TimingTests/Sleep.tests.cpp new file mode 100644 index 0000000..4e9e385 --- /dev/null +++ b/tests/SelfTest/TimingTests/Sleep.tests.cpp @@ -0,0 +1,24 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include + +#include +#include + +TEST_CASE( "sleep_for_100ms", "[.min_duration_test][approvals]" ) +{ + std::this_thread::sleep_for( std::chrono::milliseconds( 100 ) ); + CHECK( true ); +} + +TEST_CASE( "sleep_for_1000ms", "[.min_duration_test][approvals]" ) +{ + std::this_thread::sleep_for( std::chrono::milliseconds( 1'000 ) ); + CHECK( true ); +} diff --git a/tests/SelfTest/UsageTests/Approx.tests.cpp b/tests/SelfTest/UsageTests/Approx.tests.cpp new file mode 100644 index 0000000..c3d41cb --- /dev/null +++ b/tests/SelfTest/UsageTests/Approx.tests.cpp @@ -0,0 +1,218 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include + +#include + +using Catch::Approx; + +namespace { + static double divide(double a, double b) { + return a / b; + } + + class StrongDoubleTypedef { + double d_ = 0.0; + + public: + explicit StrongDoubleTypedef(double d) : d_(d) {} + explicit operator double() const { return d_; } + }; + + static std::ostream& operator<<(std::ostream& os, StrongDoubleTypedef td) { + return os << "StrongDoubleTypedef(" << static_cast(td) << ")"; + } +} // end unnamed namespace + +using namespace Catch::literals; + +/////////////////////////////////////////////////////////////////////////////// +TEST_CASE( "A comparison that uses literals instead of the normal constructor", "[Approx]" ) { + double d = 1.23; + + REQUIRE( d == 1.23_a ); + REQUIRE( d != 1.22_a ); + REQUIRE( -d == -1.23_a ); + + REQUIRE( d == 1.2_a .epsilon(.1) ); + REQUIRE( d != 1.2_a .epsilon(.001) ); + REQUIRE( d == 1_a .epsilon(.3) ); +} + +TEST_CASE( "Some simple comparisons between doubles", "[Approx]" ) { + double d = 1.23; + + REQUIRE( d == Approx( 1.23 ) ); + REQUIRE( d != Approx( 1.22 ) ); + REQUIRE( d != Approx( 1.24 ) ); + + REQUIRE( d == 1.23_a ); + REQUIRE( d != 1.22_a ); + + REQUIRE( Approx( d ) == 1.23 ); + REQUIRE( Approx( d ) != 1.22 ); + REQUIRE( Approx( d ) != 1.24 ); +} + +/////////////////////////////////////////////////////////////////////////////// +TEST_CASE( "Approximate comparisons with different epsilons", "[Approx]" ) { + double d = 1.23; + + REQUIRE( d != Approx( 1.231 ) ); + REQUIRE( d == Approx( 1.231 ).epsilon( 0.1 ) ); +} + +/////////////////////////////////////////////////////////////////////////////// +TEST_CASE( "Less-than inequalities with different epsilons", "[Approx]" ) { + double d = 1.23; + + REQUIRE( d <= Approx( 1.24 ) ); + REQUIRE( d <= Approx( 1.23 ) ); + REQUIRE_FALSE( d <= Approx( 1.22 ) ); + REQUIRE( d <= Approx( 1.22 ).epsilon(0.1) ); +} + +/////////////////////////////////////////////////////////////////////////////// +TEST_CASE( "Greater-than inequalities with different epsilons", "[Approx]" ) { + double d = 1.23; + + REQUIRE( d >= Approx( 1.22 ) ); + REQUIRE( d >= Approx( 1.23 ) ); + REQUIRE_FALSE( d >= Approx( 1.24 ) ); + REQUIRE( d >= Approx( 1.24 ).epsilon(0.1) ); +} + +/////////////////////////////////////////////////////////////////////////////// +TEST_CASE( "Approximate comparisons with floats", "[Approx]" ) { + REQUIRE( 1.23f == Approx( 1.23f ) ); + REQUIRE( 0.0f == Approx( 0.0f ) ); +} + +/////////////////////////////////////////////////////////////////////////////// +TEST_CASE( "Approximate comparisons with ints", "[Approx]" ) { + REQUIRE( 1 == Approx( 1 ) ); + REQUIRE( 0 == Approx( 0 ) ); +} + +/////////////////////////////////////////////////////////////////////////////// +TEST_CASE( "Approximate comparisons with mixed numeric types", "[Approx]" ) { + const double dZero = 0; + const double dSmall = 0.00001; + const double dMedium = 1.234; + + REQUIRE( 1.0f == Approx( 1 ) ); + REQUIRE( 0 == Approx( dZero) ); + REQUIRE( 0 == Approx( dSmall ).margin( 0.001 ) ); + REQUIRE( 1.234f == Approx( dMedium ) ); + REQUIRE( dMedium == Approx( 1.234f ) ); +} + +/////////////////////////////////////////////////////////////////////////////// +TEST_CASE( "Use a custom approx", "[Approx][custom]" ) { + double d = 1.23; + + Approx approx = Approx::custom().epsilon( 0.01 ); + + REQUIRE( d == approx( 1.23 ) ); + REQUIRE( d == approx( 1.22 ) ); + REQUIRE( d == approx( 1.24 ) ); + REQUIRE( d != approx( 1.25 ) ); + + REQUIRE( approx( d ) == 1.23 ); + REQUIRE( approx( d ) == 1.22 ); + REQUIRE( approx( d ) == 1.24 ); + REQUIRE( approx( d ) != 1.25 ); +} + +TEST_CASE( "Approximate PI", "[Approx][PI]" ) { + REQUIRE( divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) ); + REQUIRE( divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) ); +} + +/////////////////////////////////////////////////////////////////////////////// + +TEST_CASE( "Absolute margin", "[Approx]" ) { + REQUIRE( 104.0 != Approx(100.0) ); + REQUIRE( 104.0 == Approx(100.0).margin(5) ); + REQUIRE( 104.0 == Approx(100.0).margin(4) ); + REQUIRE( 104.0 != Approx(100.0).margin(3) ); + REQUIRE( 100.3 != Approx(100.0) ); + REQUIRE( 100.3 == Approx(100.0).margin(0.5) ); +} + +TEST_CASE("Approx with exactly-representable margin", "[Approx]") { + CHECK( 0.25f == Approx(0.0f).margin(0.25f) ); + + CHECK( 0.0f == Approx(0.25f).margin(0.25f) ); + CHECK( 0.5f == Approx(0.25f).margin(0.25f) ); + + CHECK( 245.0f == Approx(245.25f).margin(0.25f) ); + CHECK( 245.5f == Approx(245.25f).margin(0.25f) ); +} + +TEST_CASE("Approx setters validate their arguments", "[Approx]") { + REQUIRE_NOTHROW(Approx(0).margin(0)); + REQUIRE_NOTHROW(Approx(0).margin(1234656)); + + REQUIRE_THROWS_AS(Approx(0).margin(-2), std::domain_error); + + REQUIRE_NOTHROW(Approx(0).epsilon(0)); + REQUIRE_NOTHROW(Approx(0).epsilon(1)); + + REQUIRE_THROWS_AS(Approx(0).epsilon(-0.001), std::domain_error); + REQUIRE_THROWS_AS(Approx(0).epsilon(1.0001), std::domain_error); +} + +TEST_CASE("Default scale is invisible to comparison", "[Approx]") { + REQUIRE(101.000001 != Approx(100).epsilon(0.01)); + REQUIRE(std::pow(10, -5) != Approx(std::pow(10, -7))); +} + +TEST_CASE("Epsilon only applies to Approx's value", "[Approx]") { + REQUIRE(101.01 != Approx(100).epsilon(0.01)); +} + +TEST_CASE("Assorted miscellaneous tests", "[Approx][approvals]") { + REQUIRE(INFINITY == Approx(INFINITY)); + REQUIRE(-INFINITY != Approx(INFINITY)); + REQUIRE(1 != Approx(INFINITY)); + REQUIRE(INFINITY != Approx(1)); + REQUIRE(NAN != Approx(NAN)); + REQUIRE_FALSE(NAN == Approx(NAN)); +} + +TEST_CASE( "Comparison with explicitly convertible types", "[Approx]" ) +{ + StrongDoubleTypedef td(10.0); + + REQUIRE(td == Approx(10.0)); + REQUIRE(Approx(10.0) == td); + + REQUIRE(td != Approx(11.0)); + REQUIRE(Approx(11.0) != td); + + REQUIRE(td <= Approx(10.0)); + REQUIRE(td <= Approx(11.0)); + REQUIRE(Approx(10.0) <= td); + REQUIRE(Approx(9.0) <= td); + + REQUIRE(td >= Approx(9.0)); + REQUIRE(td >= Approx(td)); + REQUIRE(Approx(td) >= td); + REQUIRE(Approx(11.0) >= td); + +} + +TEST_CASE("Approx::operator() is const correct", "[Approx][.approvals]") { + const Approx ap = Approx(0.0).margin(0.01); + + // As long as this compiles, the test should be considered passing + REQUIRE(1.0 == ap(1.0)); +} diff --git a/tests/SelfTest/UsageTests/BDD.tests.cpp b/tests/SelfTest/UsageTests/BDD.tests.cpp new file mode 100644 index 0000000..5ac8605 --- /dev/null +++ b/tests/SelfTest/UsageTests/BDD.tests.cpp @@ -0,0 +1,106 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include + +namespace { + + static bool itDoesThis() { return true; } + + static bool itDoesThat() { return true; } + + // a trivial fixture example to support SCENARIO_METHOD tests + struct Fixture { + Fixture(): d_counter( 0 ) {} + + int counter() { return d_counter++; } + + int d_counter; + }; + +} + + +SCENARIO("Do that thing with the thing", "[Tags]") { + GIVEN("This stuff exists") { + // make stuff exist + AND_GIVEN("And some assumption") { + // Validate assumption + WHEN("I do this") { + // do this + THEN("it should do this") { + REQUIRE(itDoesThis()); + AND_THEN("do that") { + REQUIRE(itDoesThat()); + } + } + } + } + } +} + +SCENARIO( "Vector resizing affects size and capacity", + "[vector][bdd][size][capacity]" ) { + GIVEN( "an empty vector" ) { + std::vector v; + REQUIRE( v.size() == 0 ); + + WHEN( "it is made larger" ) { + v.resize( 10 ); + THEN( "the size and capacity go up" ) { + REQUIRE( v.size() == 10 ); + REQUIRE( v.capacity() >= 10 ); + + AND_WHEN( "it is made smaller again" ) { + v.resize( 5 ); + THEN( + "the size goes down but the capacity stays the same" ) { + REQUIRE( v.size() == 5 ); + REQUIRE( v.capacity() >= 10 ); + } + } + } + } + + WHEN( "we reserve more space" ) { + v.reserve( 10 ); + THEN( "The capacity is increased but the size remains the same" ) { + REQUIRE( v.capacity() >= 10 ); + REQUIRE( v.size() == 0 ); + } + } + } +} + +SCENARIO("This is a really long scenario name to see how the list command deals with wrapping", + "[very long tags][lots][long][tags][verbose]" + "[one very long tag name that should cause line wrapping writing out using the list command]" + "[anotherReallyLongTagNameButThisOneHasNoObviousWrapPointsSoShouldSplitWithinAWordUsingADashCharacter]") { + GIVEN("A section name that is so long that it cannot fit in a single console width") { + WHEN("The test headers are printed as part of the normal running of the scenario") { + THEN("The, deliberately very long and overly verbose (you see what I did there?) section names must wrap, along with an indent") { + SUCCEED("boo!"); + } + } + } +} + +SCENARIO_METHOD(Fixture, + "BDD tests requiring Fixtures to provide commonly-accessed data or methods", + "[bdd][fixtures]") { + const int before(counter()); + GIVEN("No operations precede me") { + REQUIRE(before == 0); + WHEN("We get the count") { + const int after(counter()); + THEN("Subsequently values are higher") { + REQUIRE(after > before); + } + } + } +} diff --git a/tests/SelfTest/UsageTests/Benchmark.tests.cpp b/tests/SelfTest/UsageTests/Benchmark.tests.cpp new file mode 100644 index 0000000..c489eaa --- /dev/null +++ b/tests/SelfTest/UsageTests/Benchmark.tests.cpp @@ -0,0 +1,173 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 +// Adapted from donated nonius code. + +#include +#include +#include +#include + +#include + +namespace { + std::uint64_t Fibonacci(std::uint64_t number) { + return number < 2 ? number : Fibonacci(number - 1) + Fibonacci(number - 2); + } +} + +TEST_CASE("Benchmark Fibonacci", "[!benchmark]") { + CHECK(Fibonacci(0) == 0); + // some more asserts.. + CHECK(Fibonacci(5) == 5); + // some more asserts.. + + REQUIRE( Fibonacci( 20 ) == 6'765 ); + BENCHMARK( "Fibonacci 20" ) { + return Fibonacci(20); + }; + + REQUIRE( Fibonacci( 25 ) == 75'025 ); + BENCHMARK( "Fibonacci 25" ) { + return Fibonacci(25); + }; + + BENCHMARK("Fibonacci 30") { + return Fibonacci(30); + }; + + BENCHMARK("Fibonacci 35") { + return Fibonacci(35); + }; +} + +TEST_CASE("Benchmark containers", "[!benchmark]") { + static const int size = 100; + + std::vector v; + std::map m; + + SECTION("without generator") { + BENCHMARK("Load up a vector") { + v = std::vector(); + for (int i = 0; i < size; ++i) + v.push_back(i); + }; + REQUIRE(v.size() == size); + + // test optimizer control + BENCHMARK("Add up a vector's content") { + uint64_t add = 0; + for (int i = 0; i < size; ++i) + add += v[i]; + return add; + }; + + BENCHMARK("Load up a map") { + m = std::map(); + for (int i = 0; i < size; ++i) + m.insert({ i, i + 1 }); + }; + REQUIRE(m.size() == size); + + BENCHMARK("Reserved vector") { + v = std::vector(); + v.reserve(size); + for (int i = 0; i < size; ++i) + v.push_back(i); + }; + REQUIRE(v.size() == size); + + BENCHMARK("Resized vector") { + v = std::vector(); + v.resize(size); + for (int i = 0; i < size; ++i) + v[i] = i; + }; + REQUIRE(v.size() == size); + + int array[size] {}; + BENCHMARK("A fixed size array that should require no allocations") { + for (int i = 0; i < size; ++i) + array[i] = i; + }; + int sum = 0; + for (int val : array) + sum += val; + REQUIRE(sum > size); + + SECTION("XYZ") { + + BENCHMARK_ADVANCED("Load up vector with chronometer")(Catch::Benchmark::Chronometer meter) { + std::vector k; + meter.measure([&](int idx) { + k = std::vector(); + for (int i = 0; i < size; ++i) + k.push_back(idx); + }); + REQUIRE(k.size() == size); + }; + + int runs = 0; + BENCHMARK("Fill vector indexed", benchmarkIndex) { + v = std::vector(); + v.resize(size); + for (int i = 0; i < size; ++i) + v[i] = benchmarkIndex; + runs = benchmarkIndex; + }; + + for (int val : v) { + REQUIRE(val == runs); + } + } + } + + SECTION("with generator") { + auto generated = GENERATE(range(0, 10)); + BENCHMARK("Fill vector generated") { + v = std::vector(); + v.resize(size); + for (int i = 0; i < size; ++i) + v[i] = generated; + }; + for (int val : v) { + REQUIRE(val == generated); + } + } + + SECTION("construct and destroy example") { + BENCHMARK_ADVANCED("construct")(Catch::Benchmark::Chronometer meter) { + std::vector> storage(meter.runs()); + meter.measure([&](int i) { storage[i].construct("thing"); }); + }; + + BENCHMARK_ADVANCED("destroy")(Catch::Benchmark::Chronometer meter) { + std::vector> storage(meter.runs()); + for(auto&& o : storage) + o.construct("thing"); + meter.measure([&](int i) { storage[i].destruct(); }); + }; + } +} + +TEST_CASE("Skip benchmark macros", "[!benchmark]") { + std::vector v; + BENCHMARK("fill vector") { + v.emplace_back(1); + v.emplace_back(2); + v.emplace_back(3); + }; + REQUIRE(v.size() == 0); + + std::size_t counter{0}; + BENCHMARK_ADVANCED("construct vector")(Catch::Benchmark::Chronometer meter) { + std::vector> storage(meter.runs()); + meter.measure([&](int i) { storage[i].construct("thing"); counter++; }); + }; + REQUIRE(counter == 0); +} diff --git a/tests/SelfTest/UsageTests/Class.tests.cpp b/tests/SelfTest/UsageTests/Class.tests.cpp new file mode 100644 index 0000000..75510f1 --- /dev/null +++ b/tests/SelfTest/UsageTests/Class.tests.cpp @@ -0,0 +1,159 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#if defined( __GNUC__ ) || defined( __clang__ ) +# pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + +#include +#include +#include + +namespace { + + class TestClass { + std::string s; + + public: + TestClass(): s( "hello" ) {} + + void succeedingCase() { REQUIRE( s == "hello" ); } + void failingCase() { REQUIRE( s == "world" ); } + }; + + struct Fixture { + Fixture(): m_a( 1 ) {} + + int m_a; + }; + + struct Persistent_Fixture { + mutable int m_a = 0; + }; + + template struct Template_Fixture { + Template_Fixture(): m_a( 1 ) {} + + T m_a; + }; + + template struct Template_Fixture_2 { + Template_Fixture_2() = default; + + T m_a; + }; + + template struct Template_Foo { + size_t size() { return 0; } + }; + + template struct Template_Foo_2 { + size_t size() { return V; } + }; + + template struct Nttp_Fixture { int value = V; }; + +} // end unnamed namespace + +METHOD_AS_TEST_CASE( TestClass::succeedingCase, "A METHOD_AS_TEST_CASE based test run that succeeds", "[class]" ) +METHOD_AS_TEST_CASE( TestClass::failingCase, "A METHOD_AS_TEST_CASE based test run that fails", "[.][class][failing]" ) + +TEST_CASE_METHOD( Fixture, "A TEST_CASE_METHOD based test run that succeeds", "[class]" ) +{ + REQUIRE( m_a == 1 ); +} + +TEST_CASE_PERSISTENT_FIXTURE( Persistent_Fixture, "A TEST_CASE_PERSISTENT_FIXTURE based test run that succeeds", "[class]" ) +{ + SECTION( "First partial run" ) { + REQUIRE( m_a++ == 0 ); + } + + SECTION( "Second partial run" ) { + REQUIRE( m_a == 1 ); + } +} + +TEMPLATE_TEST_CASE_METHOD(Template_Fixture, "A TEMPLATE_TEST_CASE_METHOD based test run that succeeds", "[class][template]", int, float, double) { + REQUIRE( Template_Fixture::m_a == 1 ); +} + +TEMPLATE_TEST_CASE_METHOD_SIG(Nttp_Fixture, "A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds", "[class][template][nttp]",((int V), V), 1, 3, 6) { + REQUIRE(Nttp_Fixture::value > 0); +} + +TEMPLATE_PRODUCT_TEST_CASE_METHOD(Template_Fixture_2, "A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds","[class][template][product]",(std::vector,Template_Foo),(int,float)) +{ + REQUIRE( Template_Fixture_2::m_a.size() == 0 ); +} + +TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG(Template_Fixture_2, "A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds", "[class][template][product][nttp]", ((typename T, size_t S), T, S),(std::array, Template_Foo_2), ((int,2), (float,6))) +{ + REQUIRE(Template_Fixture_2{}.m_a.size() >= 2); +} + +using MyTypes = std::tuple; +TEMPLATE_LIST_TEST_CASE_METHOD(Template_Fixture, "Template test case method with test types specified inside std::tuple", "[class][template][list]", MyTypes) +{ + REQUIRE( Template_Fixture::m_a == 1 ); +} + +// We should be able to write our tests within a different namespace +namespace Inner +{ + TEST_CASE_METHOD( Fixture, "A TEST_CASE_METHOD based test run that fails", "[.][class][failing]" ) + { + REQUIRE( m_a == 2 ); + } + + TEST_CASE_PERSISTENT_FIXTURE( Persistent_Fixture, "A TEST_CASE_PERSISTENT_FIXTURE based test run that fails", "[.][class][failing]" ) + { + SECTION( "First partial run" ) { + REQUIRE( m_a++ == 0 ); + } + + SECTION( "Second partial run" ) { + REQUIRE( m_a == 0 ); + } + } + + TEMPLATE_TEST_CASE_METHOD(Template_Fixture,"A TEMPLATE_TEST_CASE_METHOD based test run that fails", "[.][class][template][failing]", int, float, double) + { + REQUIRE( Template_Fixture::m_a == 2 ); + } + + TEMPLATE_TEST_CASE_METHOD_SIG(Nttp_Fixture, "A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails", "[.][class][template][nttp][failing]", ((int V), V), 1, 3, 6) { + REQUIRE(Nttp_Fixture::value == 0); + } + + TEMPLATE_PRODUCT_TEST_CASE_METHOD(Template_Fixture_2, "A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails","[.][class][template][product][failing]",(std::vector,Template_Foo),(int,float)) + { + REQUIRE( Template_Fixture_2::m_a.size() == 1 ); + } + + TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG(Template_Fixture_2, "A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails", "[.][class][template][product][nttp][failing]", ((typename T, size_t S), T, S), (std::array, Template_Foo_2), ((int, 2), (float, 6))) + { + REQUIRE(Template_Fixture_2{}.m_a.size() < 2); + } +} // namespace + + +// We want a class in nested namespace so we can test JUnit's classname normalization. +namespace { + namespace A { + namespace B { + class TestClass {}; + } + } +} // namespace + +TEST_CASE_METHOD( A::B::TestClass, + "A TEST_CASE_METHOD testing junit classname normalization", + "[class][approvals]" ) { + SUCCEED(); +} diff --git a/tests/SelfTest/UsageTests/Compilation.tests.cpp b/tests/SelfTest/UsageTests/Compilation.tests.cpp new file mode 100644 index 0000000..7a6a1f2 --- /dev/null +++ b/tests/SelfTest/UsageTests/Compilation.tests.cpp @@ -0,0 +1,525 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include + +#include +#include + +// Setup for #1403 -- look for global overloads of operator << for classes +// in a different namespace. +#include + +namespace foo { + struct helper_1403 { + bool operator==(helper_1403) const { return true; } + }; +} + +namespace bar { + template + struct TypeList {}; +} + +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-Wmissing-declarations" +#endif +static std::ostream& operator<<(std::ostream& out, foo::helper_1403 const&) { + return out << "[1403 helper]"; +} +/////////////////////////////// + +#include +#include +#include + +#include + +// Comparison operators can return non-booleans. +// This is unusual, but should be supported. +struct logic_t { + logic_t operator< (logic_t) const { return {}; } + logic_t operator<=(logic_t) const { return {}; } + logic_t operator> (logic_t) const { return {}; } + logic_t operator>=(logic_t) const { return {}; } + logic_t operator==(logic_t) const { return {}; } + logic_t operator!=(logic_t) const { return {}; } + explicit operator bool() const { return true; } +}; + + +static void throws_int(bool b) { + if (b) { + throw 1; + } +} + +template +bool templated_tests(T t) { + int a = 3; + REQUIRE(a == t); + CHECK(a == t); + REQUIRE_THROWS(throws_int(true)); + CHECK_THROWS_AS(throws_int(true), int); + REQUIRE_NOTHROW(throws_int(false)); + REQUIRE_THAT("aaa", Catch::Matchers::EndsWith("aaa")); + return true; +} + +struct A {}; + +static std::ostream &operator<<(std::ostream &o, const A &) { return o << 0; } + +struct B : private A { + bool operator==(int) const { return true; } +}; + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-function" +#endif +#ifdef __GNUC__ +// Note that because -~GCC~-, this warning cannot be silenced temporarily, by pushing diagnostic stack... +// Luckily it is firing in test files and thus can be silenced for the whole file, without losing much. +#pragma GCC diagnostic ignored "-Wunused-function" +#endif + +B f(); + +std::ostream g(); + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + +template +struct Fixture_1245 {}; + +// This is a minimal example for an issue we have found in 1.7.0 +struct dummy_809 { + int i; +}; + +template +bool operator==(const T& val, dummy_809 f) { + return val == f.i; +} + +TEST_CASE("#809") { + dummy_809 f; + f.i = 42; + REQUIRE(42 == f); +} + + +// ------------------------------------------------------------------ +// Changes to REQUIRE_THROWS_AS made it stop working in a template in +// an unfixable way (as long as C++03 compatibility is being kept). +// To prevent these from happening in the future, this needs to compile + + TEST_CASE("#833") { + REQUIRE(templated_tests(3)); + } + + +// Test containing example where original stream insertable check breaks compilation +TEST_CASE("#872") { + A dummy; + CAPTURE(dummy); + B x; + REQUIRE (x == 4); +} + +TEST_CASE("#1027: Bitfields can be captured") { + struct Y { + uint32_t v : 1; + }; + Y y{ 0 }; + REQUIRE(y.v == 0); + REQUIRE(0 == y.v); +} + +// Comparison operators can return non-booleans. +// This is unusual, but should be supported. +TEST_CASE("#1147") { + logic_t t1, t2; + REQUIRE(t1 == t2); + REQUIRE(t1 != t2); + REQUIRE(t1 < t2); + REQUIRE(t1 > t2); + REQUIRE(t1 <= t2); + REQUIRE(t1 >= t2); +} + +// unsigned array +TEST_CASE("#1238") { + unsigned char uarr[] = "123"; + CAPTURE(uarr); + signed char sarr[] = "456"; + CAPTURE(sarr); + + REQUIRE(std::memcmp(uarr, "123", sizeof(uarr)) == 0); + REQUIRE(std::memcmp(sarr, "456", sizeof(sarr)) == 0); +} + +TEST_CASE_METHOD((Fixture_1245), "#1245", "[compilation]") { + SUCCEED(); +} + +TEST_CASE("#1403", "[compilation]") { + ::foo::helper_1403 h1, h2; + REQUIRE(h1 == h2); +} + +TEST_CASE("Optionally static assertions", "[compilation]") { + STATIC_REQUIRE( std::is_void::value ); + STATIC_REQUIRE_FALSE( std::is_void::value ); + STATIC_CHECK( std::is_void::value ); + STATIC_CHECK_FALSE( std::is_void::value ); +} + +TEST_CASE("#1548", "[compilation]") { + using namespace bar; + REQUIRE(std::is_same, TypeList>::value); +} + + // #925 + using signal_t = void (*) (void*); + + struct TestClass { + signal_t testMethod_uponComplete_arg = nullptr; + }; + + namespace utility { + inline static void synchronizing_callback( void * ) { } + } + +#if defined (_MSC_VER) +#pragma warning(push) +// The function pointer comparison below triggers warning because of +// calling conventions +#pragma warning(disable:4244) +#endif + TEST_CASE("#925: comparing function pointer to function address failed to compile", "[!nonportable]" ) { + TestClass test; + REQUIRE(utility::synchronizing_callback != test.testMethod_uponComplete_arg); + } +#if defined (_MSC_VER) +#pragma warning(pop) +#endif + +TEST_CASE( "#1319: Sections can have description (even if it is not saved", + "[compilation]" ) { + SECTION( "SectionName", "This is a long form section description" ) { + SUCCEED(); + } +} + +TEST_CASE("Lambdas in assertions") { + REQUIRE([]() { return true; }()); +} + +namespace { + struct HasBitOperators { + int value; + + friend HasBitOperators operator| (HasBitOperators lhs, HasBitOperators rhs) { + return { lhs.value | rhs.value }; + } + friend HasBitOperators operator& (HasBitOperators lhs, HasBitOperators rhs) { + return { lhs.value & rhs.value }; + } + friend HasBitOperators operator^ (HasBitOperators lhs, HasBitOperators rhs) { + return { lhs.value ^ rhs.value }; + } + explicit operator bool() const { + return !!value; + } + + friend std::ostream& operator<<(std::ostream& out, HasBitOperators val) { + out << "Val: " << val.value; + return out; + } + }; +} + +TEST_CASE("Assertion macros support bit operators and bool conversions", "[compilation][bitops]") { + HasBitOperators lhs{ 1 }, rhs{ 2 }; + REQUIRE(lhs | rhs); + REQUIRE_FALSE(lhs & rhs); + REQUIRE(HasBitOperators{ 1 } & HasBitOperators{ 1 }); + REQUIRE(lhs ^ rhs); + REQUIRE_FALSE(lhs ^ lhs); +} + +namespace { + struct ImmovableType { + ImmovableType() = default; + + ImmovableType(ImmovableType const&) = delete; + ImmovableType& operator=(ImmovableType const&) = delete; + ImmovableType(ImmovableType&&) = delete; + ImmovableType& operator=(ImmovableType&&) = delete; + + friend bool operator==(ImmovableType const&, ImmovableType const&) { + return true; + } + }; +} + +TEST_CASE("Immovable types are supported in basic assertions", "[compilation][.approvals]") { + REQUIRE(ImmovableType{} == ImmovableType{}); +} + +namespace adl { + +struct always_true { + explicit operator bool() const { return true; } +}; + +#define COMPILATION_TEST_DEFINE_UNIVERSAL_OPERATOR(op) \ +template \ +auto operator op (T&&, U&&) { \ + return always_true{}; \ +} + +COMPILATION_TEST_DEFINE_UNIVERSAL_OPERATOR(==) +COMPILATION_TEST_DEFINE_UNIVERSAL_OPERATOR(!=) +COMPILATION_TEST_DEFINE_UNIVERSAL_OPERATOR(<) +COMPILATION_TEST_DEFINE_UNIVERSAL_OPERATOR(>) +COMPILATION_TEST_DEFINE_UNIVERSAL_OPERATOR(<=) +COMPILATION_TEST_DEFINE_UNIVERSAL_OPERATOR(>=) +COMPILATION_TEST_DEFINE_UNIVERSAL_OPERATOR(|) +COMPILATION_TEST_DEFINE_UNIVERSAL_OPERATOR(&) +COMPILATION_TEST_DEFINE_UNIVERSAL_OPERATOR(^) + +#undef COMPILATION_TEST_DEFINE_UNIVERSAL_OPERATOR + +} + +TEST_CASE("ADL universal operators don't hijack expression deconstruction", "[compilation][.approvals]") { + REQUIRE(adl::always_true{}); + REQUIRE(0 == adl::always_true{}); + REQUIRE(0 != adl::always_true{}); + REQUIRE(0 < adl::always_true{}); + REQUIRE(0 > adl::always_true{}); + REQUIRE(0 <= adl::always_true{}); + REQUIRE(0 >= adl::always_true{}); + REQUIRE(0 | adl::always_true{}); + REQUIRE(0 & adl::always_true{}); + REQUIRE(0 ^ adl::always_true{}); +} + +TEST_CASE( "#2555 - types that can only be compared with 0 literal implemented as pointer conversion are supported", + "[compilation][approvals]" ) { + REQUIRE( TypeWithLit0Comparisons{} < 0 ); + REQUIRE_FALSE( 0 < TypeWithLit0Comparisons{} ); + REQUIRE( TypeWithLit0Comparisons{} <= 0 ); + REQUIRE_FALSE( 0 <= TypeWithLit0Comparisons{} ); + + REQUIRE( TypeWithLit0Comparisons{} > 0 ); + REQUIRE_FALSE( 0 > TypeWithLit0Comparisons{} ); + REQUIRE( TypeWithLit0Comparisons{} >= 0 ); + REQUIRE_FALSE( 0 >= TypeWithLit0Comparisons{} ); + + REQUIRE( TypeWithLit0Comparisons{} == 0 ); + REQUIRE_FALSE( 0 == TypeWithLit0Comparisons{} ); + REQUIRE( TypeWithLit0Comparisons{} != 0 ); + REQUIRE_FALSE( 0 != TypeWithLit0Comparisons{} ); +} + +// These tests require `consteval` to propagate through `constexpr` calls +// which is a late DR against C++20. +#if defined( CATCH_CPP20_OR_GREATER ) && defined( __cpp_consteval ) && \ + __cpp_consteval >= 202211L +// Can't have internal linkage to avoid warnings +void ZeroLiteralErrorFunc(); +namespace { + struct ZeroLiteralConsteval { + template , int> = 0> + consteval ZeroLiteralConsteval( T zero ) noexcept { + if ( zero != 0 ) { ZeroLiteralErrorFunc(); } + } + }; + + // Should only be constructible from literal 0. Uses the propagating + // consteval constructor trick (currently used by MSVC, might be used + // by libc++ in the future as well). + struct TypeWithConstevalLit0Comparison { +# define DEFINE_COMP_OP( op ) \ + constexpr friend bool operator op( TypeWithConstevalLit0Comparison, \ + ZeroLiteralConsteval ) { \ + return true; \ + } \ + constexpr friend bool operator op( ZeroLiteralConsteval, \ + TypeWithConstevalLit0Comparison ) { \ + return false; \ + } \ + /* std::orderings only have these for ==, but we add them for all \ + operators so we can test all overloads for decomposer */ \ + constexpr friend bool operator op( TypeWithConstevalLit0Comparison, \ + TypeWithConstevalLit0Comparison ) { \ + return true; \ + } + + DEFINE_COMP_OP( < ) + DEFINE_COMP_OP( <= ) + DEFINE_COMP_OP( > ) + DEFINE_COMP_OP( >= ) + DEFINE_COMP_OP( == ) + DEFINE_COMP_OP( != ) + +#undef DEFINE_COMP_OP + }; + +} // namespace + +namespace Catch { + template <> + struct capture_by_value : std::true_type {}; +} + +TEST_CASE( "#2555 - types that can only be compared with 0 literal implemented as consteval check are supported", + "[compilation][approvals]" ) { + REQUIRE( TypeWithConstevalLit0Comparison{} < 0 ); + REQUIRE_FALSE( 0 < TypeWithConstevalLit0Comparison{} ); + REQUIRE( TypeWithConstevalLit0Comparison{} <= 0 ); + REQUIRE_FALSE( 0 <= TypeWithConstevalLit0Comparison{} ); + + REQUIRE( TypeWithConstevalLit0Comparison{} > 0 ); + REQUIRE_FALSE( 0 > TypeWithConstevalLit0Comparison{} ); + REQUIRE( TypeWithConstevalLit0Comparison{} >= 0 ); + REQUIRE_FALSE( 0 >= TypeWithConstevalLit0Comparison{} ); + + REQUIRE( TypeWithConstevalLit0Comparison{} == 0 ); + REQUIRE_FALSE( 0 == TypeWithConstevalLit0Comparison{} ); + REQUIRE( TypeWithConstevalLit0Comparison{} != 0 ); + REQUIRE_FALSE( 0 != TypeWithConstevalLit0Comparison{} ); +} + +// We check all comparison ops to test, even though orderings, the primary +// motivation for this functionality, only have self-comparison (and thus +// have the ambiguity issue) for `==` and `!=`. +TEST_CASE( "Comparing const instances of type registered with capture_by_value", + "[regression][approvals][compilation]" ) { + SECTION("Type with consteval-int constructor") { + auto const const_Lit0Type_1 = TypeWithConstevalLit0Comparison{}; + auto const const_Lit0Type_2 = TypeWithConstevalLit0Comparison{}; + REQUIRE( const_Lit0Type_1 == const_Lit0Type_2 ); + REQUIRE( const_Lit0Type_1 <= const_Lit0Type_2 ); + REQUIRE( const_Lit0Type_1 < const_Lit0Type_2 ); + REQUIRE( const_Lit0Type_1 >= const_Lit0Type_2 ); + REQUIRE( const_Lit0Type_1 > const_Lit0Type_2 ); + REQUIRE( const_Lit0Type_1 != const_Lit0Type_2 ); + } + SECTION("Type with constexpr-int constructor") { + auto const const_Lit0Type_1 = TypeWithLit0Comparisons{}; + auto const const_Lit0Type_2 = TypeWithLit0Comparisons{}; + REQUIRE( const_Lit0Type_1 == const_Lit0Type_2 ); + REQUIRE( const_Lit0Type_1 <= const_Lit0Type_2 ); + REQUIRE( const_Lit0Type_1 < const_Lit0Type_2 ); + REQUIRE( const_Lit0Type_1 >= const_Lit0Type_2 ); + REQUIRE( const_Lit0Type_1 > const_Lit0Type_2 ); + REQUIRE( const_Lit0Type_1 != const_Lit0Type_2 ); + } +} + +#endif // C++20 consteval + + +namespace { + struct MultipleImplicitConstructors { + MultipleImplicitConstructors( double ) {} + MultipleImplicitConstructors( int64_t ) {} + bool operator==( MultipleImplicitConstructors ) const { return true; } + bool operator!=( MultipleImplicitConstructors ) const { return true; } + bool operator<( MultipleImplicitConstructors ) const { return true; } + bool operator<=( MultipleImplicitConstructors ) const { return true; } + bool operator>( MultipleImplicitConstructors ) const { return true; } + bool operator>=( MultipleImplicitConstructors ) const { return true; } + }; +} +TEST_CASE("#2571 - tests compile types that have multiple implicit constructors from lit 0", + "[compilation][approvals]") { + MultipleImplicitConstructors mic1( 0.0 ); + MultipleImplicitConstructors mic2( 0.0 ); + REQUIRE( mic1 == mic2 ); + REQUIRE( mic1 != mic2 ); + REQUIRE( mic1 < mic2 ); + REQUIRE( mic1 <= mic2 ); + REQUIRE( mic1 > mic2 ); + REQUIRE( mic1 >= mic2 ); +} + +#if defined( CATCH_CONFIG_CPP20_COMPARE_OVERLOADS ) +// This test does not test all the related codepaths, but it is the original +// reproducer +TEST_CASE( "Comparing const std::weak_ordering instances must compile", + "[compilation][approvals][regression]" ) { + auto const const_ordering_1 = std::weak_ordering::less; + auto const const_ordering_2 = std::weak_ordering::less; + auto plain_ordering_1 = std::weak_ordering::less; + REQUIRE( const_ordering_1 == plain_ordering_1 ); + REQUIRE( const_ordering_1 == const_ordering_2 ); + REQUIRE( plain_ordering_1 == const_ordering_1 ); +} +#endif + +// Reproduce issue with yaml-cpp iterators, where the `const_iterator` +// for Node type has `const T` as the value_type. This is wrong for +// multitude of reasons, but there might be other libraries in the wild +// that share this issue, and the workaround needed to support +// `from_range(iter, iter)` helper with those libraries is easy enough. +class HasBadIterator { + std::array m_arr{}; + +public: + class iterator { + const int* m_ptr = nullptr; + + public: + iterator( const int* ptr ): m_ptr( ptr ) {} + + using difference_type = std::ptrdiff_t; + using value_type = const int; + using pointer = const int*; + using reference = const int&; + using iterator_category = std::input_iterator_tag; + + iterator& operator++() { + ++m_ptr; + return *this; + } + + iterator operator++( int ) { + auto ret( *this ); + ++( *this ); + return ret; + } + + friend bool operator==( iterator lhs, iterator rhs ) { + return lhs.m_ptr == rhs.m_ptr; + } + friend bool operator!=( iterator lhs, iterator rhs ) { + return !( lhs == rhs ); + } + + int operator*() const { return *m_ptr; } + }; + + iterator cbegin() const { return { m_arr.data() }; } + iterator cend() const { return { m_arr.data() + m_arr.size() }; } +}; + +TEST_CASE("from_range(iter, iter) supports const_iterators", "[generators][from-range][approvals]") { + using namespace Catch::Generators; + + HasBadIterator data; + auto gen = from_range(data.cbegin(), data.cend()); + (void)gen; +} diff --git a/tests/SelfTest/UsageTests/Condition.tests.cpp b/tests/SelfTest/UsageTests/Condition.tests.cpp new file mode 100644 index 0000000..211dd3b --- /dev/null +++ b/tests/SelfTest/UsageTests/Condition.tests.cpp @@ -0,0 +1,334 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wpadded" +// Wdouble-promotion is not supported until 3.8 +# if (__clang_major__ > 3) || (__clang_major__ == 3 && __clang_minor__ > 7) +# pragma clang diagnostic ignored "-Wdouble-promotion" +# endif +#endif + +#include +#include + +using Catch::Approx; + +#include +#include +#include + +namespace { + + struct TestData { + int int_seven = 7; + std::string str_hello = "hello"; + float float_nine_point_one = 9.1f; + double double_pi = 3.1415926535; + }; + + static const char* returnsConstNull() { return nullptr; } + static char* returnsNull() { return nullptr; } + +} // end unnamed namespace + +// The "failing" tests all use the CHECK macro, which continues if the specific test fails. +// This allows us to see all results, even if an earlier check fails + +// Equality tests +TEST_CASE( "Equality checks that should succeed" ) +{ + TestData data; + + REQUIRE( data.int_seven == 7 ); + REQUIRE( data.float_nine_point_one == Approx( 9.1f ) ); + REQUIRE( data.double_pi == Approx( 3.1415926535 ) ); + REQUIRE( data.str_hello == "hello" ); + REQUIRE( "hello" == data.str_hello ); + REQUIRE( data.str_hello.size() == 5 ); + + double x = 1.1 + 0.1 + 0.1; + REQUIRE( x == Approx( 1.3 ) ); +} + +TEST_CASE( "Equality checks that should fail", "[.][failing][!mayfail]" ) +{ + TestData data; + + CHECK( data.int_seven == 6 ); + CHECK( data.int_seven == 8 ); + CHECK( data.int_seven == 0 ); + CHECK( data.float_nine_point_one == Approx( 9.11f ) ); + CHECK( data.float_nine_point_one == Approx( 9.0f ) ); + CHECK( data.float_nine_point_one == Approx( 1 ) ); + CHECK( data.float_nine_point_one == Approx( 0 ) ); + CHECK( data.double_pi == Approx( 3.1415 ) ); + CHECK( data.str_hello == "goodbye" ); + CHECK( data.str_hello == "hell" ); + CHECK( data.str_hello == "hello1" ); + CHECK( data.str_hello.size() == 6 ); + + double x = 1.1 + 0.1 + 0.1; + CHECK( x == Approx( 1.301 ) ); +} + +// Needed to test junit reporter's handling of mayfail test cases and sections +TEST_CASE("Mayfail test case with nested sections", "[!mayfail]") { + SECTION("A") { + SECTION("1") { FAIL(); } + SECTION("2") { FAIL(); } + } + SECTION("B") { + SECTION("1") { FAIL(); } + SECTION("2") { FAIL(); } + } +} + + +TEST_CASE( "Inequality checks that should succeed" ) +{ + TestData data; + + REQUIRE( data.int_seven != 6 ); + REQUIRE( data.int_seven != 8 ); + REQUIRE( data.float_nine_point_one != Approx( 9.11f ) ); + REQUIRE( data.float_nine_point_one != Approx( 9.0f ) ); + REQUIRE( data.float_nine_point_one != Approx( 1 ) ); + REQUIRE( data.float_nine_point_one != Approx( 0 ) ); + REQUIRE( data.double_pi != Approx( 3.1415 ) ); + REQUIRE( data.str_hello != "goodbye" ); + REQUIRE( data.str_hello != "hell" ); + REQUIRE( data.str_hello != "hello1" ); + REQUIRE( data.str_hello.size() != 6 ); +} + +TEST_CASE( "Inequality checks that should fail", "[.][failing][!shouldfail]" ) +{ + TestData data; + + CHECK( data.int_seven != 7 ); + CHECK( data.float_nine_point_one != Approx( 9.1f ) ); + CHECK( data.double_pi != Approx( 3.1415926535 ) ); + CHECK( data.str_hello != "hello" ); + CHECK( data.str_hello.size() != 5 ); +} + +// Ordering comparison tests +TEST_CASE( "Ordering comparison checks that should succeed" ) +{ + TestData data; + + REQUIRE( data.int_seven < 8 ); + REQUIRE( data.int_seven > 6 ); + REQUIRE( data.int_seven > 0 ); + REQUIRE( data.int_seven > -1 ); + + REQUIRE( data.int_seven >= 7 ); + REQUIRE( data.int_seven >= 6 ); + REQUIRE( data.int_seven <= 7 ); + REQUIRE( data.int_seven <= 8 ); + + REQUIRE( data.float_nine_point_one > 9 ); + REQUIRE( data.float_nine_point_one < 10 ); + REQUIRE( data.float_nine_point_one < 9.2 ); + + REQUIRE( data.str_hello <= "hello" ); + REQUIRE( data.str_hello >= "hello" ); + + REQUIRE( data.str_hello < "hellp" ); + REQUIRE( data.str_hello < "zebra" ); + REQUIRE( data.str_hello > "hellm" ); + REQUIRE( data.str_hello > "a" ); +} + +TEST_CASE( "Ordering comparison checks that should fail", "[.][failing]" ) +{ + TestData data; + + CHECK( data.int_seven > 7 ); + CHECK( data.int_seven < 7 ); + CHECK( data.int_seven > 8 ); + CHECK( data.int_seven < 6 ); + CHECK( data.int_seven < 0 ); + CHECK( data.int_seven < -1 ); + + CHECK( data.int_seven >= 8 ); + CHECK( data.int_seven <= 6 ); + + CHECK( data.float_nine_point_one < 9 ); + CHECK( data.float_nine_point_one > 10 ); + CHECK( data.float_nine_point_one > 9.2 ); + + CHECK( data.str_hello > "hello" ); + CHECK( data.str_hello < "hello" ); + CHECK( data.str_hello > "hellp" ); + CHECK( data.str_hello > "z" ); + CHECK( data.str_hello < "hellm" ); + CHECK( data.str_hello < "a" ); + + CHECK( data.str_hello >= "z" ); + CHECK( data.str_hello <= "a" ); +} + +#ifdef __clang__ +# pragma clang diagnostic pop +#endif + + +// Comparisons with int literals +TEST_CASE( "Comparisons with int literals don't warn when mixing signed/ unsigned" ) +{ + int i = 1; + unsigned int ui = 2; + long l = 3; + unsigned long ul = 4; + char c = 5; + unsigned char uc = 6; + + REQUIRE( i == 1 ); + REQUIRE( ui == 2 ); + REQUIRE( l == 3 ); + REQUIRE( ul == 4 ); + REQUIRE( c == 5 ); + REQUIRE( uc == 6 ); + + REQUIRE( 1 == i ); + REQUIRE( 2 == ui ); + REQUIRE( 3 == l ); + REQUIRE( 4 == ul ); + REQUIRE( 5 == c ); + REQUIRE( 6 == uc ); + + REQUIRE( (std::numeric_limits::max)() > ul ); +} + +// Disable warnings about sign conversions for the next two tests +// (as we are deliberately invoking them) +// - Currently only disabled for GCC/ LLVM. Should add VC++ too +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsign-compare" +#pragma GCC diagnostic ignored "-Wsign-conversion" +#endif +#ifdef _MSC_VER +#pragma warning(disable:4389) // '==' : signed/unsigned mismatch +#endif + +TEST_CASE( "comparisons between int variables" ) +{ + long long_var = 1L; + unsigned char unsigned_char_var = 1; + unsigned short unsigned_short_var = 1; + unsigned int unsigned_int_var = 1; + unsigned long unsigned_long_var = 1L; + + REQUIRE( long_var == unsigned_char_var ); + REQUIRE( long_var == unsigned_short_var ); + REQUIRE( long_var == unsigned_int_var ); + REQUIRE( long_var == unsigned_long_var ); +} + +TEST_CASE( "comparisons between const int variables" ) +{ + const unsigned char unsigned_char_var = 1; + const unsigned short unsigned_short_var = 1; + const unsigned int unsigned_int_var = 1; + const unsigned long unsigned_long_var = 1L; + + REQUIRE( unsigned_char_var == 1 ); + REQUIRE( unsigned_short_var == 1 ); + REQUIRE( unsigned_int_var == 1 ); + REQUIRE( unsigned_long_var == 1 ); +} + +TEST_CASE( "Comparisons between unsigned ints and negative signed ints match c++ standard behaviour" ) +{ + CHECK( ( -1 > 2u ) ); + CHECK( -1 > 2u ); + + CHECK( ( 2u < -1 ) ); + CHECK( 2u < -1 ); + + const int minInt = (std::numeric_limits::min)(); + CHECK( ( minInt > 2u ) ); + CHECK( minInt > 2u ); +} + +TEST_CASE( "Comparisons between ints where one side is computed" ) +{ + CHECK( 54 == 6*9 ); +} + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif + +TEST_CASE( "Pointers can be compared to null" ) +{ + TestData* p = nullptr; + TestData* pNULL = nullptr; + + REQUIRE( p == nullptr ); + REQUIRE( p == pNULL ); + + TestData data; + p = &data; + + REQUIRE( p != nullptr ); + + const TestData* cp = p; + REQUIRE( cp != nullptr ); + + const TestData* const cpc = p; + REQUIRE( cpc != nullptr ); + + REQUIRE( returnsNull() == nullptr ); + REQUIRE( returnsConstNull() == nullptr ); + + REQUIRE( nullptr != p ); +} + +// Not (!) tests +// The problem with the ! operator is that it has right-to-left associativity. +// This means we can't isolate it when we decompose. The simple REQUIRE( !false ) form, therefore, +// cannot have the operand value extracted. The test will work correctly, and the situation +// is detected and a warning issued. +// An alternative form of the macros (CHECK_FALSE and REQUIRE_FALSE) can be used instead to capture +// the operand value. +TEST_CASE( "'Not' checks that should succeed" ) +{ + bool falseValue = false; + + REQUIRE( false == false ); + REQUIRE( true == true ); + REQUIRE( !false ); + REQUIRE_FALSE( false ); + + REQUIRE( !falseValue ); + REQUIRE_FALSE( falseValue ); + + REQUIRE( !(1 == 2) ); + REQUIRE_FALSE( 1 == 2 ); +} + +TEST_CASE( "'Not' checks that should fail", "[.][failing]" ) +{ + bool trueValue = true; + + CHECK( false != false ); + CHECK( true != true ); + CHECK( !true ); + CHECK_FALSE( true ); + + CHECK( !trueValue ); + CHECK_FALSE( trueValue ); + + CHECK( !(1 == 1) ); + CHECK_FALSE( 1 == 1 ); +} diff --git a/tests/SelfTest/UsageTests/Decomposition.tests.cpp b/tests/SelfTest/UsageTests/Decomposition.tests.cpp new file mode 100644 index 0000000..e92f740 --- /dev/null +++ b/tests/SelfTest/UsageTests/Decomposition.tests.cpp @@ -0,0 +1,41 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include + +namespace { + +struct truthy { + truthy(bool b):m_value(b){} + operator bool() const { + return false; + } + bool m_value; +}; + +std::ostream& operator<<(std::ostream& o, truthy) { + o << "Hey, its truthy!"; + return o; +} + +} // end anonymous namespace + +#include + +TEST_CASE( "Reconstruction should be based on stringification: #914" , "[Decomposition][failing][.]") { + CHECK(truthy(false)); +} + +TEST_CASE("#1005: Comparing pointer to int and long (NULL can be either on various systems)", "[Decomposition][approvals]") { + FILE* fptr = nullptr; + REQUIRE( fptr == 0 ); + REQUIRE_FALSE( fptr != 0 ); + REQUIRE( fptr == 0l ); + REQUIRE_FALSE( fptr != 0l ); +} diff --git a/tests/SelfTest/UsageTests/EnumToString.tests.cpp b/tests/SelfTest/UsageTests/EnumToString.tests.cpp new file mode 100644 index 0000000..268a7ca --- /dev/null +++ b/tests/SelfTest/UsageTests/EnumToString.tests.cpp @@ -0,0 +1,108 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include + + +namespace { +// Enum without user-provided stream operator +enum Enum1 { Enum1Value0, Enum1Value1 }; + +// Enum with user-provided stream operator +enum Enum2 { Enum2Value0, Enum2Value1 }; + +std::ostream& operator<<( std::ostream& os, Enum2 v ) { + return os << "E2{" << static_cast(v) << "}"; +} +} // end anonymous namespace + +TEST_CASE( "toString(enum)", "[toString][enum]" ) { + Enum1 e0 = Enum1Value0; + CHECK( ::Catch::Detail::stringify(e0) == "0" ); + Enum1 e1 = Enum1Value1; + CHECK( ::Catch::Detail::stringify(e1) == "1" ); +} + +TEST_CASE( "toString(enum w/operator<<)", "[toString][enum]" ) { + Enum2 e0 = Enum2Value0; + CHECK( ::Catch::Detail::stringify(e0) == "E2{0}" ); + Enum2 e1 = Enum2Value1; + CHECK( ::Catch::Detail::stringify(e1) == "E2{1}" ); +} + +// Enum class without user-provided stream operator +namespace { +enum class EnumClass1 { EnumClass1Value0, EnumClass1Value1 }; + +// Enum class with user-provided stream operator +enum class EnumClass2 { EnumClass2Value0, EnumClass2Value1 }; + +std::ostream& operator<<( std::ostream& os, EnumClass2 e2 ) { + switch( static_cast( e2 ) ) { + case static_cast( EnumClass2::EnumClass2Value0 ): + return os << "E2/V0"; + case static_cast( EnumClass2::EnumClass2Value1 ): + return os << "E2/V1"; + default: + return os << "Unknown enum value " << static_cast( e2 ); + } +} + +} // end anonymous namespace + +TEST_CASE( "toString(enum class)", "[toString][enum][enumClass]" ) { + EnumClass1 e0 = EnumClass1::EnumClass1Value0; + CHECK( ::Catch::Detail::stringify(e0) == "0" ); + EnumClass1 e1 = EnumClass1::EnumClass1Value1; + CHECK( ::Catch::Detail::stringify(e1) == "1" ); +} + + +TEST_CASE( "toString(enum class w/operator<<)", "[toString][enum][enumClass]" ) { + EnumClass2 e0 = EnumClass2::EnumClass2Value0; + CHECK( ::Catch::Detail::stringify(e0) == "E2/V0" ); + EnumClass2 e1 = EnumClass2::EnumClass2Value1; + CHECK( ::Catch::Detail::stringify(e1) == "E2/V1" ); + + auto e3 = static_cast(10); + CHECK( ::Catch::Detail::stringify(e3) == "Unknown enum value 10" ); +} + +enum class EnumClass3 { Value1, Value2, Value3, Value4 }; + +CATCH_REGISTER_ENUM( EnumClass3, EnumClass3::Value1, EnumClass3::Value2, EnumClass3::Value3 ) + + +TEST_CASE( "Enums can quickly have stringification enabled using CATCH_REGISTER_ENUM" ) { + using Catch::Detail::stringify; + REQUIRE( stringify( EnumClass3::Value1 ) == "Value1" ); + REQUIRE( stringify( EnumClass3::Value2 ) == "Value2" ); + REQUIRE( stringify( EnumClass3::Value3 ) == "Value3" ); + REQUIRE( stringify( EnumClass3::Value4 ) == "{** unexpected enum value **}" ); + + EnumClass3 ec3 = EnumClass3::Value2; + REQUIRE( stringify( ec3 ) == "Value2" ); +} + +namespace Bikeshed { + enum class Colours { Red, Green, Blue }; +} + +// Important!: This macro must appear at top level scope - not inside a namespace +// You can fully qualify the names, or use a using if you prefer +CATCH_REGISTER_ENUM( Bikeshed::Colours, + Bikeshed::Colours::Red, + Bikeshed::Colours::Green, + Bikeshed::Colours::Blue ) + +TEST_CASE( "Enums in namespaces can quickly have stringification enabled using CATCH_REGISTER_ENUM" ) { + using Catch::Detail::stringify; + REQUIRE( stringify( Bikeshed::Colours::Red ) == "Red" ); + REQUIRE( stringify( Bikeshed::Colours::Blue ) == "Blue" ); +} diff --git a/tests/SelfTest/UsageTests/Exception.tests.cpp b/tests/SelfTest/UsageTests/Exception.tests.cpp new file mode 100644 index 0000000..7c6b0c8 --- /dev/null +++ b/tests/SelfTest/UsageTests/Exception.tests.cpp @@ -0,0 +1,204 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include + +#include +#include + +#ifdef _MSC_VER +#pragma warning(disable:4702) // Unreachable code -- unconditional throws and so on +#endif +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wweak-vtables" +#pragma clang diagnostic ignored "-Wmissing-noreturn" +#pragma clang diagnostic ignored "-Wunreachable-code-return" +#endif + +namespace { + + int thisThrows() { + throw std::domain_error("expected exception"); + return 1; + } + + int thisDoesntThrow() { + return 0; + } + + class CustomException { + public: + explicit CustomException(const std::string& msg) + : m_msg(msg) {} + + std::string const& getMessage() const { + return m_msg; + } + + private: + std::string m_msg; + }; + + class CustomStdException : public std::exception { + public: + explicit CustomStdException(const std::string& msg) + : m_msg(msg) {} + ~CustomStdException() noexcept override = default; + + CustomStdException( CustomStdException const& ) = default; + CustomStdException& operator=( CustomStdException const& ) = default; + + std::string const& getMessage() const { + return m_msg; + } + + private: + std::string m_msg; + }; + + [[noreturn]] void throwCustom() { + throw CustomException("custom exception - not std"); + } + +} + +TEST_CASE( "When checked exceptions are thrown they can be expected or unexpected", "[!throws]" ) { + REQUIRE_THROWS_AS( thisThrows(), std::domain_error ); + REQUIRE_NOTHROW( thisDoesntThrow() ); + REQUIRE_THROWS( thisThrows() ); +} + +TEST_CASE( "Expected exceptions that don't throw or unexpected exceptions fail the test", "[.][failing][!throws]" ) { + CHECK_THROWS_AS( thisThrows(), std::string ); + CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error ); + CHECK_NOTHROW( thisThrows() ); +} + +TEST_CASE( "When unchecked exceptions are thrown directly they are always failures", "[.][failing][!throws]" ) { + throw std::domain_error( "unexpected exception" ); +} + +TEST_CASE( "An unchecked exception reports the line of the last assertion", "[.][failing][!throws]" ) { + CHECK( 1 == 1 ); + throw std::domain_error( "unexpected exception" ); +} + +TEST_CASE( "When unchecked exceptions are thrown from sections they are always failures", "[.][failing][!throws]" ) { + SECTION( "section name" ) { + throw std::domain_error("unexpected exception"); + } +} + +TEST_CASE( "When unchecked exceptions are thrown from functions they are always failures", "[.][failing][!throws]" ) { + CHECK( thisThrows() == 0 ); +} + +TEST_CASE( "When unchecked exceptions are thrown during a REQUIRE the test should abort fail", "[.][failing][!throws]" ) { + REQUIRE( thisThrows() == 0 ); + FAIL( "This should never happen" ); +} + +TEST_CASE( "When unchecked exceptions are thrown during a CHECK the test should continue", "[.][failing][!throws]" ) { + try { + CHECK(thisThrows() == 0); + } + catch(...) { + FAIL( "This should never happen" ); + } +} + +TEST_CASE( "When unchecked exceptions are thrown, but caught, they do not affect the test", "[!throws]" ) { + try { + throw std::domain_error( "unexpected exception" ); + } + catch(...) {} // NOLINT(bugprone-empty-catch) +} + + +CATCH_TRANSLATE_EXCEPTION( CustomException const& ex ) { + return ex.getMessage(); +} + +CATCH_TRANSLATE_EXCEPTION( CustomStdException const& ex ) { + return ex.getMessage(); +} + +CATCH_TRANSLATE_EXCEPTION( double const& ex ) { + return Catch::Detail::stringify( ex ); +} + +TEST_CASE("Non-std exceptions can be translated", "[.][failing][!throws]" ) { + throw CustomException( "custom exception" ); +} + +TEST_CASE("Custom std-exceptions can be custom translated", "[.][failing][!throws]" ) { + throw CustomStdException( "custom std exception" ); +} + +TEST_CASE( "Custom exceptions can be translated when testing for nothrow", "[.][failing][!throws]" ) { + REQUIRE_NOTHROW( throwCustom() ); +} + +TEST_CASE( "Custom exceptions can be translated when testing for throwing as something else", "[.][failing][!throws]" ) { + REQUIRE_THROWS_AS( throwCustom(), std::exception ); +} + +TEST_CASE( "Unexpected exceptions can be translated", "[.][failing][!throws]" ) { + throw double( 3.14 ); // NOLINT(readability-redundant-casting): the type is important here, so we want to be explicit +} + +TEST_CASE("Thrown string literals are translated", "[.][failing][!throws]") { + throw "For some reason someone is throwing a string literal!"; +} + +TEST_CASE("thrown std::strings are translated", "[.][failing][!throws]") { + throw std::string{ "Why would you throw a std::string?" }; +} + + +TEST_CASE( "Exception messages can be tested for", "[!throws]" ) { + using namespace Catch::Matchers; + SECTION( "exact match" ) + REQUIRE_THROWS_WITH( thisThrows(), "expected exception" ); + SECTION( "different case" ) + REQUIRE_THROWS_WITH( thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) ); + SECTION( "wildcarded" ) { + REQUIRE_THROWS_WITH( thisThrows(), StartsWith( "expected" ) ); + REQUIRE_THROWS_WITH( thisThrows(), EndsWith( "exception" ) ); + REQUIRE_THROWS_WITH( thisThrows(), ContainsSubstring( "except" ) ); + REQUIRE_THROWS_WITH( thisThrows(), ContainsSubstring( "exCept", Catch::CaseSensitive::No ) ); + } +} + +TEST_CASE( "Mismatching exception messages failing the test", "[.][failing][!throws]" ) { + REQUIRE_THROWS_WITH( thisThrows(), "expected exception" ); + REQUIRE_THROWS_WITH( thisThrows(), "should fail" ); + REQUIRE_THROWS_WITH( thisThrows(), "expected exception" ); +} + +TEST_CASE( "#748 - captures with unexpected exceptions", "[.][failing][!throws][!shouldfail]" ) { + int answer = 42; + CAPTURE( answer ); + // the message should be printed on the first two sections but not on the third + SECTION( "outside assertions" ) { + thisThrows(); + } + SECTION( "inside REQUIRE_NOTHROW" ) { + REQUIRE_NOTHROW( thisThrows() ); + } + SECTION( "inside REQUIRE_THROWS" ) { + REQUIRE_THROWS( thisThrows() ); + } +} + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif diff --git a/tests/SelfTest/UsageTests/Generators.tests.cpp b/tests/SelfTest/UsageTests/Generators.tests.cpp new file mode 100644 index 0000000..f04cf4f --- /dev/null +++ b/tests/SelfTest/UsageTests/Generators.tests.cpp @@ -0,0 +1,323 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include +#include +#include + +#include + + +// Generators and sections can be nested freely +TEST_CASE("Generators -- simple", "[generators]") { + auto i = GENERATE(1, 2, 3); + SECTION("one") { + auto j = GENERATE(values({ -3, -2, -1 })); + REQUIRE(j < i); + } + + SECTION("two") { + // You can also explicitly set type for generators via Catch::Generators::as + auto str = GENERATE(as{}, "a", "bb", "ccc"); + REQUIRE(4u * i > str.size()); + } +} + +// You can create a cartesian-product of generators by creating multiple ones +TEST_CASE("3x3x3 ints", "[generators]") { + auto x = GENERATE(1, 2, 3); + auto y = GENERATE(4, 5, 6); + auto z = GENERATE(7, 8, 9); + // These assertions will be run 27 times (3x3x3) + CHECK(x < y); + CHECK(y < z); + REQUIRE(x < z); +} + +// You can also create data tuples +TEST_CASE("tables", "[generators]") { + // Note that this will not compile with libstdc++ older than libstdc++6 + // See https://stackoverflow.com/questions/12436586/tuple-vector-and-initializer-list + // for possible workarounds + // auto data = GENERATE(table({ + // {"first", 5}, + // {"second", 6}, + // {"third", 5}, + // {"etc...", 6} + // })); + + // Workaround for the libstdc++ bug mentioned above + using tuple_type = std::tuple; + auto data = GENERATE(table({ + tuple_type{"first", 5}, + tuple_type{"second", 6}, + tuple_type{"third", 5}, + tuple_type{"etc...", 6} + })); + + REQUIRE(strlen(std::get<0>(data)) == static_cast(std::get<1>(data))); +} + + +#ifdef __cpp_structured_bindings + +// Structured bindings make the table utility much nicer to use +TEST_CASE( "strlen2", "[approvals][generators]" ) { + using tuple_type = std::tuple; // see above workaround + auto [test_input, expected] = + GENERATE( table( { tuple_type{ "one", 3 }, + tuple_type{ "two", 3 }, + tuple_type{ "three", 5 }, + tuple_type{ "four", 4 } } ) ); + + REQUIRE( test_input.size() == expected ); +} +#endif + + +// An alternate way of doing data tables without structured bindings +struct Data { std::string str; size_t len; }; + +TEST_CASE( "strlen3", "[generators]" ) { + auto data = GENERATE( values({ + {"one", 3}, + {"two", 3}, + {"three", 5}, + {"four", 4} + })); + + REQUIRE( data.str.size() == data.len ); +} + + + +#ifdef __cpp_structured_bindings + +// Based on example from https://docs.cucumber.io/gherkin/reference/#scenario-outline +// (thanks to https://github.com/catchorg/Catch2/issues/850#issuecomment-399504851) + +// Note that GIVEN, WHEN, and THEN now forward onto DYNAMIC_SECTION instead of SECTION. +// DYNAMIC_SECTION takes its name as a stringstream-style expression, so can be formatted using +// variables in scope - such as the generated variables here. This reads quite nicely in the +// test name output (the full scenario description). + +static auto eatCucumbers( int start, int eat ) -> int { return start-eat; } + +SCENARIO("Eating cucumbers", "[generators][approvals]") { + using tuple_type = std::tuple; + auto [start, eat, left] = GENERATE( table( + { tuple_type{ 12, 5, 7 }, tuple_type{ 20, 5, 15 } } ) ); + + GIVEN( "there are " << start << " cucumbers" ) + WHEN( "I eat " << eat << " cucumbers" ) + THEN( "I should have " << left << " cucumbers" ) { + REQUIRE( eatCucumbers( start, eat ) == left ); + } +} +#endif + +// There are also some generic generator manipulators +TEST_CASE("Generators -- adapters", "[generators][generic]") { + // TODO: This won't work yet, introduce GENERATE_VAR? + //auto numbers = Catch::Generators::values({ 1, 2, 3, 4, 5, 6 }); + SECTION("Filtering by predicate") { + SECTION("Basic usage") { + // This filters out all odd (false) numbers, giving [2, 4, 6] + auto i = GENERATE(filter([] (int val) { return val % 2 == 0; }, values({ 1, 2, 3, 4, 5, 6 }))); + REQUIRE(i % 2 == 0); + } + SECTION("Throws if there are no matching values") { + using namespace Catch::Generators; + REQUIRE_THROWS_AS(filter([] (int) {return false; }, value(1)), Catch::GeneratorException); + } + } + SECTION("Shortening a range") { + // This takes the first 3 elements from the values, giving back [1, 2, 3] + auto i = GENERATE(take(3, values({ 1, 2, 3, 4, 5, 6 }))); + REQUIRE(i < 4); + } + SECTION("Transforming elements") { + SECTION("Same type") { + // This doubles values [1, 2, 3] into [2, 4, 6] + auto i = GENERATE(map([] (int val) { return val * 2; }, values({ 1, 2, 3 }))); + REQUIRE(i % 2 == 0); + } + SECTION("Different type") { + // This takes a generator that returns ints and maps them into strings + auto i = GENERATE(map([] (int val) { return std::to_string(val); }, values({ 1, 2, 3 }))); + REQUIRE(i.size() == 1); + } + SECTION("Different deduced type") { + // This takes a generator that returns ints and maps them into strings + auto i = GENERATE(map([] (int val) { return std::to_string(val); }, values({ 1, 2, 3 }))); + REQUIRE(i.size() == 1); + } + } + SECTION("Repeating a generator") { + // This will return values [1, 2, 3, 1, 2, 3] + auto j = GENERATE(repeat(2, values({ 1, 2, 3 }))); + REQUIRE(j > 0); + } + SECTION("Chunking a generator into sized pieces") { + SECTION("Number of elements in source is divisible by chunk size") { + auto chunk2 = GENERATE(chunk(2, values({ 1, 1, 2, 2, 3, 3 }))); + REQUIRE(chunk2.size() == 2); + REQUIRE(chunk2.front() == chunk2.back()); + } + SECTION("Number of elements in source is not divisible by chunk size") { + auto chunk2 = GENERATE(chunk(2, values({ 1, 1, 2, 2, 3 }))); + REQUIRE(chunk2.size() == 2); + REQUIRE(chunk2.front() == chunk2.back()); + REQUIRE(chunk2.front() < 3); + } + SECTION("Chunk size of zero") { + auto chunk2 = GENERATE(take(3, chunk(0, value(1)))); + REQUIRE(chunk2.size() == 0); + } + SECTION("Throws on too small generators") { + using namespace Catch::Generators; + REQUIRE_THROWS_AS(chunk(2, value(1)), Catch::GeneratorException); + } + } +} + +// Note that because of the non-reproducibility of distributions, +// anything involving the random generators cannot be part of approvals +TEST_CASE("Random generator", "[generators][approvals]") { + SECTION("Infer int from integral arguments") { + auto val = GENERATE(take(4, random(0, 1))); + STATIC_REQUIRE(std::is_same::value); + REQUIRE(0 <= val); + REQUIRE(val <= 1); + } + SECTION("Infer double from double arguments") { + auto val = GENERATE(take(4, random(0., 1.))); + STATIC_REQUIRE(std::is_same::value); + REQUIRE(0. <= val); + REQUIRE(val < 1); + } +} + + +TEST_CASE("Nested generators and captured variables", "[generators]") { + // Workaround for old libstdc++ + using record = std::tuple; + // Set up 3 ranges to generate numbers from + auto extent = GENERATE(table({ + record{3, 7}, + record{-5, -3}, + record{90, 100} + })); + + auto from = std::get<0>(extent); + auto to = std::get<1>(extent); + + auto values = GENERATE_COPY(range(from, to)); + REQUIRE(values > -6); +} + +namespace { + size_t call_count = 0; + size_t test_count = 0; + std::vector make_data() { + return { 1, 3, 5, 7, 9, 11 }; + } + std::vector make_data_counted() { + ++call_count; + return make_data(); + } +} + +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wexit-time-destructors" +#endif + +TEST_CASE("Copy and then generate a range", "[generators]") { + SECTION("from var and iterators") { + static auto data = make_data(); + + // It is important to notice that a generator is only initialized + // **once** per run. What this means is that modifying data will not + // modify the underlying generator. + auto elem = GENERATE_REF(from_range(data.begin(), data.end())); + REQUIRE(elem % 2 == 1); + } + SECTION("From a temporary container") { + auto elem = GENERATE(from_range(make_data_counted())); + ++test_count; + REQUIRE(elem % 2 == 1); + } + SECTION("Final validation") { + REQUIRE(call_count == 1); + REQUIRE(make_data().size() == test_count); + } +} + +#if defined( __clang__ ) +# pragma clang diagnostic pop +#endif + +TEST_CASE("#1913 - GENERATE inside a for loop should not keep recreating the generator", "[regression][generators]") { + static int counter = 0; + for (int i = 0; i < 3; ++i) { + int _ = GENERATE(1, 2); + (void)_; + ++counter; + } + // There should be at most 6 (3 * 2) counter increments + REQUIRE(counter < 7); +} + +TEST_CASE("#1913 - GENERATEs can share a line", "[regression][generators]") { + int i = GENERATE(1, 2); int j = GENERATE(3, 4); + REQUIRE(i != j); +} + +namespace { + class test_generator : public Catch::Generators::IGenerator { + public: + [[noreturn]] explicit test_generator() { + // removing the following line will cause the program to terminate + // gracefully. + throw Catch::GeneratorException( "failure to init" ); + } + + auto get() const -> int const& override { + static constexpr int value = 1; + return value; + } + + auto next() -> bool override { return false; } + }; + + static auto make_test_generator() + -> Catch::Generators::GeneratorWrapper { + return { new test_generator() }; + } + +} // namespace + +TEST_CASE( "#2615 - Throwing in constructor generator fails test case but does not abort", + "[!shouldfail][regression][generators]" ) { + // this should fail the test case, but not abort the application + auto sample = GENERATE( make_test_generator() ); + // this assertion shouldn't trigger + REQUIRE( sample == 0 ); +} + +TEST_CASE( "GENERATE can combine literals and generators", "[generators]" ) { + auto i = GENERATE( 2, + 4, + take( 2, + filter( []( int val ) { return val % 2 == 0; }, + random( -100, 100 ) ) ) ); + REQUIRE( i % 2 == 0 ); +} diff --git a/tests/SelfTest/UsageTests/Matchers.tests.cpp b/tests/SelfTest/UsageTests/Matchers.tests.cpp new file mode 100644 index 0000000..7c4501c --- /dev/null +++ b/tests/SelfTest/UsageTests/Matchers.tests.cpp @@ -0,0 +1,1144 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wweak-vtables" +# pragma clang diagnostic ignored "-Wpadded" +#endif + +namespace { + + static const char* testStringForMatching() { + return "this string contains 'abc' as a substring"; + } + + static const char* testStringForMatching2() { + return "some completely different text that contains one common word"; + } + + static bool alwaysTrue( int ) { return true; } + static bool alwaysFalse( int ) { return false; } + +#ifdef _MSC_VER +# pragma warning( disable : 4702 ) // Unreachable code -- MSVC 19 (VS 2015) + // sees right through the indirection +#endif + + struct SpecialException : std::exception { + SpecialException( int i_ ): i( i_ ) {} + + char const* what() const noexcept override { + return "SpecialException::what"; + } + + int i; + }; + + struct DerivedException : std::exception { + char const* what() const noexcept override { + return "DerivedException::what"; + } + }; + + static void doesNotThrow() {} + + [[noreturn]] static void throwsSpecialException( int i ) { + throw SpecialException{ i }; + } + + [[noreturn]] static void throwsAsInt( int i ) { throw i; } + + [[noreturn]] static void throwsDerivedException() { + throw DerivedException{}; + } + + class ExceptionMatcher + : public Catch::Matchers::MatcherBase { + int m_expected; + + public: + ExceptionMatcher( int i ): m_expected( i ) {} + + bool match( SpecialException const& se ) const override { + return se.i == m_expected; + } + + std::string describe() const override { + std::ostringstream ss; + ss << "special exception has value of " << m_expected; + return ss.str(); + } + }; + + using namespace Catch::Matchers; + +#ifdef __DJGPP__ + static float nextafter( float from, float to ) { + return ::nextafterf( from, to ); + } + + static double nextafter( double from, double to ) { + return ::nextafter( from, to ); + } +#else + using std::nextafter; +#endif + +} // end unnamed namespace + +TEST_CASE( "String matchers", "[matchers]" ) { + REQUIRE_THAT( testStringForMatching(), ContainsSubstring( "string" ) ); + REQUIRE_THAT( testStringForMatching(), + ContainsSubstring( "string", Catch::CaseSensitive::No ) ); + CHECK_THAT( testStringForMatching(), ContainsSubstring( "abc" ) ); + CHECK_THAT( testStringForMatching(), + ContainsSubstring( "aBC", Catch::CaseSensitive::No ) ); + + CHECK_THAT( testStringForMatching(), StartsWith( "this" ) ); + CHECK_THAT( testStringForMatching(), + StartsWith( "THIS", Catch::CaseSensitive::No ) ); + CHECK_THAT( testStringForMatching(), EndsWith( "substring" ) ); + CHECK_THAT( testStringForMatching(), + EndsWith( " SuBsTrInG", Catch::CaseSensitive::No ) ); +} + +TEST_CASE( "Contains string matcher", "[.][failing][matchers]" ) { + CHECK_THAT( testStringForMatching(), + ContainsSubstring( "not there", Catch::CaseSensitive::No ) ); + CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) ); +} + +TEST_CASE( "StartsWith string matcher", "[.][failing][matchers]" ) { + CHECK_THAT( testStringForMatching(), StartsWith( "This String" ) ); + CHECK_THAT( testStringForMatching(), + StartsWith( "string", Catch::CaseSensitive::No ) ); +} + +TEST_CASE( "EndsWith string matcher", "[.][failing][matchers]" ) { + CHECK_THAT( testStringForMatching(), EndsWith( "Substring" ) ); + CHECK_THAT( testStringForMatching(), + EndsWith( "this", Catch::CaseSensitive::No ) ); +} + +TEST_CASE( "Equals string matcher", "[.][failing][matchers]" ) { + CHECK_THAT( testStringForMatching(), + Equals( "this string contains 'ABC' as a substring" ) ); + CHECK_THAT( testStringForMatching(), + Equals( "something else", Catch::CaseSensitive::No ) ); +} + +TEST_CASE( "Equals", "[matchers]" ) { + CHECK_THAT( testStringForMatching(), + Equals( "this string contains 'abc' as a substring" ) ); + CHECK_THAT( testStringForMatching(), + Equals( "this string contains 'ABC' as a substring", + Catch::CaseSensitive::No ) ); +} + +TEST_CASE( "Regex string matcher -- libstdc++-4.8 workaround", + "[matchers][approvals]" ) { +// DJGPP has similar problem with its regex support as libstdc++ 4.8 +#ifndef __DJGPP__ + REQUIRE_THAT( testStringForMatching(), + Matches( "this string contains 'abc' as a substring" ) ); + REQUIRE_THAT( testStringForMatching(), + Matches( "this string CONTAINS 'abc' as a substring", + Catch::CaseSensitive::No ) ); + REQUIRE_THAT( testStringForMatching(), + Matches( "^this string contains 'abc' as a substring$" ) ); + REQUIRE_THAT( testStringForMatching(), Matches( "^.* 'abc' .*$" ) ); + REQUIRE_THAT( testStringForMatching(), + Matches( "^.* 'ABC' .*$", Catch::CaseSensitive::No ) ); +#endif + + REQUIRE_THAT( testStringForMatching2(), + !Matches( "this string contains 'abc' as a substring" ) ); +} + +TEST_CASE( "Regex string matcher", "[matchers][.failing]" ) { + CHECK_THAT( testStringForMatching(), + Matches( "this STRING contains 'abc' as a substring" ) ); + CHECK_THAT( testStringForMatching(), + Matches( "contains 'abc' as a substring" ) ); + CHECK_THAT( testStringForMatching(), + Matches( "this string contains 'abc' as a" ) ); +} + +TEST_CASE( "Matchers can be (AllOf) composed with the && operator", + "[matchers][operators][operator&&]" ) { + CHECK_THAT( testStringForMatching(), + ContainsSubstring( "string" ) && ContainsSubstring( "abc" ) && + ContainsSubstring( "substring" ) && ContainsSubstring( "contains" ) ); +} + +TEST_CASE( "Matchers can be (AnyOf) composed with the || operator", + "[matchers][operators][operator||]" ) { + CHECK_THAT( testStringForMatching(), + ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || + ContainsSubstring( "random" ) ); + CHECK_THAT( testStringForMatching2(), + ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || + ContainsSubstring( "random" ) ); +} + +TEST_CASE( "Matchers can be composed with both && and ||", + "[matchers][operators][operator||][operator&&]" ) { + CHECK_THAT( testStringForMatching(), + ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && + ContainsSubstring( "substring" ) ); +} + +TEST_CASE( "Matchers can be composed with both && and || - failing", + "[matchers][operators][operator||][operator&&][.failing]" ) { + CHECK_THAT( testStringForMatching(), + ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && + ContainsSubstring( "random" ) ); +} + +TEST_CASE( "Matchers can be negated (Not) with the ! operator", + "[matchers][operators][not]" ) { + CHECK_THAT( testStringForMatching(), !ContainsSubstring( "different" ) ); +} + +TEST_CASE( "Matchers can be negated (Not) with the ! operator - failing", + "[matchers][operators][not][.failing]" ) { + CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) ); +} + +template struct CustomAllocator : private std::allocator { + using size_type = size_t; + using difference_type = ptrdiff_t; + using pointer = T*; + using const_pointer = const T*; + using reference = T&; + using const_reference = const T&; + using value_type = T; + + template struct rebind { using other = CustomAllocator; }; + + using propagate_on_container_move_assignment = std::true_type; + using is_always_equal = std::true_type; + + CustomAllocator() = default; + + CustomAllocator( const CustomAllocator& other ): + std::allocator( other ) {} + + template CustomAllocator( const CustomAllocator& ) {} + + ~CustomAllocator() = default; + + using std::allocator::allocate; + using std::allocator::deallocate; +}; + +TEST_CASE( "Vector matchers", "[matchers][vector]" ) { + std::vector v; + v.push_back( 1 ); + v.push_back( 2 ); + v.push_back( 3 ); + + std::vector v2; + v2.push_back( 1 ); + v2.push_back( 2 ); + + std::vector v3; + v3.push_back( 1 ); + v3.push_back( 2 ); + v3.push_back( 3 ); + + std::vector v4; + v4.push_back( 1 + 1e-8 ); + v4.push_back( 2 + 1e-8 ); + v4.push_back( 3 + 1e-8 ); + + std::vector> v5; + v5.push_back( 1 ); + v5.push_back( 2 ); + v5.push_back( 3 ); + + std::vector> v6; + v6.push_back( 1 ); + v6.push_back( 2 ); + + std::vector empty; + + SECTION( "Contains (element)" ) { + CHECK_THAT( v, VectorContains( 1 ) ); + CHECK_THAT( v, VectorContains( 2 ) ); + CHECK_THAT( v5, ( VectorContains>( 2 ) ) ); + } + SECTION( "Contains (vector)" ) { + CHECK_THAT( v, Contains( v2 ) ); + CHECK_THAT( v, Contains( { 1, 2 } ) ); + CHECK_THAT( v5, + ( Contains, CustomAllocator>( + v2 ) ) ); + + v2.push_back( 3 ); // now exactly matches + CHECK_THAT( v, Contains( v2 ) ); + + CHECK_THAT( v, Contains( empty ) ); + CHECK_THAT( empty, Contains( empty ) ); + + CHECK_THAT( v5, + ( Contains, CustomAllocator>( + v2 ) ) ); + CHECK_THAT( v5, Contains( v6 ) ); + } + SECTION( "Contains (element), composed" ) { + CHECK_THAT( v, VectorContains( 1 ) && VectorContains( 2 ) ); + } + + SECTION( "Equals" ) { + + // Same vector + CHECK_THAT( v, Equals( v ) ); + + CHECK_THAT( empty, Equals( empty ) ); + + // Different vector with same elements + CHECK_THAT( v, Equals( { 1, 2, 3 } ) ); + v2.push_back( 3 ); + CHECK_THAT( v, Equals( v2 ) ); + + CHECK_THAT( + v5, + ( Equals, CustomAllocator>( v2 ) ) ); + + v6.push_back( 3 ); + CHECK_THAT( v5, Equals( v6 ) ); + } + SECTION( "UnorderedEquals" ) { + CHECK_THAT( v, UnorderedEquals( v ) ); + CHECK_THAT( v, UnorderedEquals( { 3, 2, 1 } ) ); + CHECK_THAT( empty, UnorderedEquals( empty ) ); + + auto permuted = v; + std::next_permutation( begin( permuted ), end( permuted ) ); + REQUIRE_THAT( permuted, UnorderedEquals( v ) ); + + std::reverse( begin( permuted ), end( permuted ) ); + REQUIRE_THAT( permuted, UnorderedEquals( v ) ); + + CHECK_THAT( + v5, + ( UnorderedEquals, CustomAllocator>( + permuted ) ) ); + + auto v5_permuted = v5; + std::next_permutation( begin( v5_permuted ), end( v5_permuted ) ); + CHECK_THAT( v5_permuted, UnorderedEquals( v5 ) ); + } +} + +TEST_CASE( "Vector matchers that fail", "[matchers][vector][.][failing]" ) { + std::vector v; + v.push_back( 1 ); + v.push_back( 2 ); + v.push_back( 3 ); + + std::vector v2; + v2.push_back( 1 ); + v2.push_back( 2 ); + + std::vector v3; + v3.push_back( 1 ); + v3.push_back( 2 ); + v3.push_back( 3 ); + + std::vector v4; + v4.push_back( 1.1 ); + v4.push_back( 2.1 ); + v4.push_back( 3.1 ); + + std::vector empty; + + SECTION( "Contains (element)" ) { + CHECK_THAT( v, VectorContains( -1 ) ); + CHECK_THAT( empty, VectorContains( 1 ) ); + } + SECTION( "Contains (vector)" ) { + CHECK_THAT( empty, Contains( v ) ); + v2.push_back( 4 ); + CHECK_THAT( v, Contains( v2 ) ); + } + + SECTION( "Equals" ) { + + CHECK_THAT( v, Equals( v2 ) ); + CHECK_THAT( v2, Equals( v ) ); + CHECK_THAT( empty, Equals( v ) ); + CHECK_THAT( v, Equals( empty ) ); + } + SECTION( "UnorderedEquals" ) { + CHECK_THAT( v, UnorderedEquals( empty ) ); + CHECK_THAT( empty, UnorderedEquals( v ) ); + + auto permuted = v; + std::next_permutation( begin( permuted ), end( permuted ) ); + permuted.pop_back(); + CHECK_THAT( permuted, UnorderedEquals( v ) ); + + std::reverse( begin( permuted ), end( permuted ) ); + CHECK_THAT( permuted, UnorderedEquals( v ) ); + } +} + +namespace { + struct SomeType { + int i; + friend bool operator==( SomeType lhs, SomeType rhs ) { + return lhs.i == rhs.i; + } + }; +} // end anonymous namespace + +TEST_CASE( "Vector matcher with elements without !=", "[matchers][vector][approvals]" ) { + std::vector lhs, rhs; + lhs.push_back( { 1 } ); + lhs.push_back( { 2 } ); + rhs.push_back( { 1 } ); + rhs.push_back( { 1 } ); + + REQUIRE_THAT( lhs, !Equals(rhs) ); +} + +TEST_CASE( "Exception matchers that succeed", + "[matchers][exceptions][!throws]" ) { + CHECK_THROWS_MATCHES( + throwsSpecialException( 1 ), SpecialException, ExceptionMatcher{ 1 } ); + REQUIRE_THROWS_MATCHES( + throwsSpecialException( 2 ), SpecialException, ExceptionMatcher{ 2 } ); +} + +TEST_CASE( "Exception matchers that fail", + "[matchers][exceptions][!throws][.failing]" ) { + SECTION( "No exception" ) { + CHECK_THROWS_MATCHES( + doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ); + REQUIRE_THROWS_MATCHES( + doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ); + } + SECTION( "Type mismatch" ) { + CHECK_THROWS_MATCHES( + throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ); + REQUIRE_THROWS_MATCHES( + throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ); + } + SECTION( "Contents are wrong" ) { + CHECK_THROWS_MATCHES( throwsSpecialException( 3 ), + SpecialException, + ExceptionMatcher{ 1 } ); + REQUIRE_THROWS_MATCHES( throwsSpecialException( 4 ), + SpecialException, + ExceptionMatcher{ 1 } ); + } +} + +TEST_CASE( "Floating point matchers: float", "[matchers][floating-point]" ) { + SECTION( "Relative" ) { + REQUIRE_THAT( 10.f, WithinRel( 11.1f, 0.1f ) ); + REQUIRE_THAT( 10.f, !WithinRel( 11.2f, 0.1f ) ); + REQUIRE_THAT( 1.f, !WithinRel( 0.f, 0.99f ) ); + REQUIRE_THAT( -0.f, WithinRel( 0.f ) ); + SECTION( "Some subnormal values" ) { + auto v1 = std::numeric_limits::min(); + auto v2 = v1; + for ( int i = 0; i < 5; ++i ) { + v2 = std::nextafter( v1, 0.f ); + } + REQUIRE_THAT( v1, WithinRel( v2 ) ); + } + } + SECTION( "Margin" ) { + REQUIRE_THAT( 1.f, WithinAbs( 1.f, 0 ) ); + REQUIRE_THAT( 0.f, WithinAbs( 1.f, 1 ) ); + + REQUIRE_THAT( 0.f, !WithinAbs( 1.f, 0.99f ) ); + REQUIRE_THAT( 0.f, !WithinAbs( 1.f, 0.99f ) ); + + REQUIRE_THAT( 0.f, WithinAbs( -0.f, 0 ) ); + + REQUIRE_THAT( 11.f, !WithinAbs( 10.f, 0.5f ) ); + REQUIRE_THAT( 10.f, !WithinAbs( 11.f, 0.5f ) ); + REQUIRE_THAT( -10.f, WithinAbs( -10.f, 0.5f ) ); + REQUIRE_THAT( -10.f, WithinAbs( -9.6f, 0.5f ) ); + } + SECTION( "ULPs" ) { + REQUIRE_THAT( 1.f, WithinULP( 1.f, 0 ) ); + REQUIRE_THAT(-1.f, WithinULP( -1.f, 0 ) ); + + REQUIRE_THAT( nextafter( 1.f, 2.f ), WithinULP( 1.f, 1 ) ); + REQUIRE_THAT( 0.f, WithinULP( nextafter( 0.f, 1.f ), 1 ) ); + REQUIRE_THAT( 1.f, WithinULP( nextafter( 1.f, 0.f ), 1 ) ); + REQUIRE_THAT( 1.f, !WithinULP( nextafter( 1.f, 2.f ), 0 ) ); + + REQUIRE_THAT( 1.f, WithinULP( 1.f, 0 ) ); + REQUIRE_THAT( -0.f, WithinULP( 0.f, 0 ) ); + } + SECTION( "Composed" ) { + REQUIRE_THAT( 1.f, WithinAbs( 1.f, 0.5 ) || WithinULP( 1.f, 1 ) ); + REQUIRE_THAT( 1.f, WithinAbs( 2.f, 0.5 ) || WithinULP( 1.f, 0 ) ); + REQUIRE_THAT( 0.0001f, + WithinAbs( 0.f, 0.001f ) || WithinRel( 0.f, 0.1f ) ); + } + SECTION( "Constructor validation" ) { + REQUIRE_NOTHROW( WithinAbs( 1.f, 0.f ) ); + REQUIRE_THROWS_AS( WithinAbs( 1.f, -1.f ), std::domain_error ); + + REQUIRE_NOTHROW( WithinULP( 1.f, 0 ) ); + REQUIRE_THROWS_AS( WithinULP( 1.f, static_cast( -1 ) ), + std::domain_error ); + + REQUIRE_NOTHROW( WithinRel( 1.f, 0.f ) ); + REQUIRE_THROWS_AS( WithinRel( 1.f, -0.2f ), std::domain_error ); + REQUIRE_THROWS_AS( WithinRel( 1.f, 1.f ), std::domain_error ); + } + SECTION( "IsNaN" ) { + REQUIRE_THAT( 1., !IsNaN() ); + } +} + +TEST_CASE( "Floating point matchers: double", "[matchers][floating-point]" ) { + SECTION( "Relative" ) { + REQUIRE_THAT( 10., WithinRel( 11.1, 0.1 ) ); + REQUIRE_THAT( 10., !WithinRel( 11.2, 0.1 ) ); + REQUIRE_THAT( 1., !WithinRel( 0., 0.99 ) ); + REQUIRE_THAT( -0., WithinRel( 0. ) ); + SECTION( "Some subnormal values" ) { + auto v1 = std::numeric_limits::min(); + auto v2 = v1; + for ( int i = 0; i < 5; ++i ) { + v2 = std::nextafter( v1, 0 ); + } + REQUIRE_THAT( v1, WithinRel( v2 ) ); + } + } + SECTION( "Margin" ) { + REQUIRE_THAT( 1., WithinAbs( 1., 0 ) ); + REQUIRE_THAT( 0., WithinAbs( 1., 1 ) ); + + REQUIRE_THAT( 0., !WithinAbs( 1., 0.99 ) ); + REQUIRE_THAT( 0., !WithinAbs( 1., 0.99 ) ); + + REQUIRE_THAT( 11., !WithinAbs( 10., 0.5 ) ); + REQUIRE_THAT( 10., !WithinAbs( 11., 0.5 ) ); + REQUIRE_THAT( -10., WithinAbs( -10., 0.5 ) ); + REQUIRE_THAT( -10., WithinAbs( -9.6, 0.5 ) ); + } + SECTION( "ULPs" ) { + REQUIRE_THAT( 1., WithinULP( 1., 0 ) ); + + REQUIRE_THAT( nextafter( 1., 2. ), WithinULP( 1., 1 ) ); + REQUIRE_THAT( 0., WithinULP( nextafter( 0., 1. ), 1 ) ); + REQUIRE_THAT( 1., WithinULP( nextafter( 1., 0. ), 1 ) ); + REQUIRE_THAT( 1., !WithinULP( nextafter( 1., 2. ), 0 ) ); + + REQUIRE_THAT( 1., WithinULP( 1., 0 ) ); + REQUIRE_THAT( -0., WithinULP( 0., 0 ) ); + } + SECTION( "Composed" ) { + REQUIRE_THAT( 1., WithinAbs( 1., 0.5 ) || WithinULP( 2., 1 ) ); + REQUIRE_THAT( 1., WithinAbs( 2., 0.5 ) || WithinULP( 1., 0 ) ); + REQUIRE_THAT( 0.0001, WithinAbs( 0., 0.001 ) || WithinRel( 0., 0.1 ) ); + } + SECTION( "Constructor validation" ) { + REQUIRE_NOTHROW( WithinAbs( 1., 0. ) ); + REQUIRE_THROWS_AS( WithinAbs( 1., -1. ), std::domain_error ); + + REQUIRE_NOTHROW( WithinULP( 1., 0 ) ); + + REQUIRE_NOTHROW( WithinRel( 1., 0. ) ); + REQUIRE_THROWS_AS( WithinRel( 1., -0.2 ), std::domain_error ); + REQUIRE_THROWS_AS( WithinRel( 1., 1. ), std::domain_error ); + } + SECTION("IsNaN") { + REQUIRE_THAT( 1., !IsNaN() ); + } +} + +TEST_CASE( "Floating point matchers that are problematic in approvals", + "[approvals][matchers][floating-point]" ) { + REQUIRE_THAT( NAN, !WithinAbs( NAN, 0 ) ); + REQUIRE_THAT( NAN, !( WithinAbs( NAN, 100 ) || WithinULP( NAN, 123 ) ) ); + REQUIRE_THAT( NAN, !WithinULP( NAN, 123 ) ); + REQUIRE_THAT( INFINITY, WithinRel( INFINITY ) ); + REQUIRE_THAT( -INFINITY, !WithinRel( INFINITY ) ); + REQUIRE_THAT( 1., !WithinRel( INFINITY ) ); + REQUIRE_THAT( INFINITY, !WithinRel( 1. ) ); + REQUIRE_THAT( NAN, !WithinRel( NAN ) ); + REQUIRE_THAT( 1., !WithinRel( NAN ) ); + REQUIRE_THAT( NAN, !WithinRel( 1. ) ); + REQUIRE_THAT( NAN, IsNaN() ); + REQUIRE_THAT( static_cast(NAN), IsNaN() ); +} + +TEST_CASE( "Arbitrary predicate matcher", "[matchers][generic]" ) { + SECTION( "Function pointer" ) { + REQUIRE_THAT( 1, Predicate( alwaysTrue, "always true" ) ); + REQUIRE_THAT( 1, !Predicate( alwaysFalse, "always false" ) ); + } + SECTION( "Lambdas + different type" ) { + REQUIRE_THAT( "Hello olleH", + Predicate( + []( std::string const& str ) -> bool { + return str.front() == str.back(); + }, + "First and last character should be equal" ) ); + + REQUIRE_THAT( + "This wouldn't pass", + !Predicate( []( std::string const& str ) -> bool { + return str.front() == str.back(); + } ) ); + } +} + +TEST_CASE( "Regression test #1", "[matchers][vector]" ) { + // At some point, UnorderedEqualsMatcher skipped + // mismatched prefixed before doing the comparison itself + std::vector actual = { 'a', 'b' }; + std::vector expected = { 'c', 'b' }; + + CHECK_THAT( actual, !UnorderedEquals( expected ) ); +} + +TEST_CASE( "Predicate matcher can accept const char*", + "[matchers][compilation]" ) { + REQUIRE_THAT( "foo", Predicate( []( const char* const& ) { + return true; + } ) ); +} + +TEST_CASE( "Vector Approx matcher", "[matchers][approx][vector]" ) { + using Catch::Matchers::Approx; + SECTION( "Empty vector is roughly equal to an empty vector" ) { + std::vector empty; + REQUIRE_THAT( empty, Approx( empty ) ); + } + SECTION( "Vectors with elements" ) { + std::vector v1( { 1., 2., 3. } ); + SECTION( "A vector is approx equal to itself" ) { + REQUIRE_THAT( v1, Approx( v1 ) ); + REQUIRE_THAT( v1, Approx( { 1., 2., 3. } ) ); + } + std::vector v2( { 1.5, 2.5, 3.5 } ); + SECTION( "Different length" ) { + auto temp( v1 ); + temp.push_back( 4 ); + REQUIRE_THAT( v1, !Approx( temp ) ); + } + SECTION( "Same length, different elements" ) { + REQUIRE_THAT( v1, !Approx( v2 ) ); + REQUIRE_THAT( v1, Approx( v2 ).margin( 0.5 ) ); + REQUIRE_THAT( v1, Approx( v2 ).epsilon( 0.5 ) ); + REQUIRE_THAT( v1, Approx( v2 ).epsilon( 0.1 ).scale( 500 ) ); + } + } +} + +TEST_CASE( "Vector Approx matcher -- failing", + "[matchers][approx][vector][.failing]" ) { + using Catch::Matchers::Approx; + SECTION( "Empty and non empty vectors are not approx equal" ) { + std::vector empty, t1( { 1, 2 } ); + CHECK_THAT( empty, Approx( t1 ) ); + } + SECTION( "Just different vectors" ) { + std::vector v1( { 2., 4., 6. } ), v2( { 1., 3., 5. } ); + CHECK_THAT( v1, Approx( v2 ) ); + } +} + +TEST_CASE( "Exceptions matchers", "[matchers][exceptions][!throws]" ) { + REQUIRE_THROWS_MATCHES( throwsDerivedException(), + DerivedException, + Message( "DerivedException::what" ) ); + REQUIRE_THROWS_MATCHES( throwsDerivedException(), + DerivedException, + !Message( "derivedexception::what" ) ); + REQUIRE_THROWS_MATCHES( throwsSpecialException( 2 ), + SpecialException, + !Message( "DerivedException::what" ) ); + REQUIRE_THROWS_MATCHES( throwsSpecialException( 2 ), + SpecialException, + Message( "SpecialException::what" ) ); +} + +TEST_CASE( "Exception message can be matched", "[matchers][exceptions][!throws]" ) { + REQUIRE_THROWS_MATCHES( throwsDerivedException(), + DerivedException, + MessageMatches( StartsWith( "Derived" ) ) ); + REQUIRE_THROWS_MATCHES( throwsDerivedException(), + DerivedException, + MessageMatches( EndsWith( "::what" ) ) ); + REQUIRE_THROWS_MATCHES( throwsDerivedException(), + DerivedException, + MessageMatches( !StartsWith( "::what" ) ) ); + REQUIRE_THROWS_MATCHES( throwsSpecialException( 2 ), + SpecialException, + MessageMatches( StartsWith( "Special" ) ) ); +} + +struct CheckedTestingMatcher : Catch::Matchers::MatcherBase { + mutable bool matchCalled = false; + bool matchSucceeds = false; + + bool match( int const& ) const override { + matchCalled = true; + return matchSucceeds; + } + std::string describe() const override { + return "CheckedTestingMatcher set to " + + ( matchSucceeds ? std::string( "succeed" ) + : std::string( "fail" ) ); + } +}; + +TEST_CASE( "Composed matchers shortcircuit", "[matchers][composed]" ) { + // Check that if first returns false, second is not touched + CheckedTestingMatcher first, second; + SECTION( "MatchAllOf" ) { + first.matchSucceeds = false; + + Detail::MatchAllOf matcher = + Detail::MatchAllOf{} && first && second; + CHECK_FALSE( matcher.match( 1 ) ); + + // These two assertions are the important ones + REQUIRE( first.matchCalled ); + REQUIRE( !second.matchCalled ); + } + // Check that if first returns true, second is not touched + SECTION( "MatchAnyOf" ) { + first.matchSucceeds = true; + + Detail::MatchAnyOf matcher = + Detail::MatchAnyOf{} || first || second; + CHECK( matcher.match( 1 ) ); + + // These two assertions are the important ones + REQUIRE( first.matchCalled ); + REQUIRE( !second.matchCalled ); + } +} + +struct CheckedTestingGenericMatcher : Catch::Matchers::MatcherGenericBase { + mutable bool matchCalled = false; + bool matchSucceeds = false; + + bool match( int const& ) const { + matchCalled = true; + return matchSucceeds; + } + std::string describe() const override { + return "CheckedTestingGenericMatcher set to " + + ( matchSucceeds ? std::string( "succeed" ) + : std::string( "fail" ) ); + } +}; + +TEST_CASE( "Composed generic matchers shortcircuit", + "[matchers][composed][generic]" ) { + // Check that if first returns false, second is not touched + CheckedTestingGenericMatcher first, second; + SECTION( "MatchAllOf" ) { + first.matchSucceeds = false; + + Detail::MatchAllOfGeneric + matcher{ first, second }; + + CHECK_FALSE( matcher.match( 1 ) ); + + // These two assertions are the important ones + REQUIRE( first.matchCalled ); + REQUIRE( !second.matchCalled ); + } + // Check that if first returns true, second is not touched + SECTION( "MatchAnyOf" ) { + first.matchSucceeds = true; + + Detail::MatchAnyOfGeneric + matcher{ first, second }; + CHECK( matcher.match( 1 ) ); + + // These two assertions are the important ones + REQUIRE( first.matchCalled ); + REQUIRE( !second.matchCalled ); + } +} + +template +struct EqualsRangeMatcher : Catch::Matchers::MatcherGenericBase { + + EqualsRangeMatcher( Range const& range ): m_range{ range } {} + + template bool match( OtherRange const& other ) const { + using std::begin; + using std::end; + + return std::equal( + begin( m_range ), end( m_range ), begin( other ), end( other ) ); + } + + std::string describe() const override { + return "Equals: " + Catch::rangeToString( m_range ); + } + +private: + Range const& m_range; +}; + +template +auto EqualsRange( const Range& range ) -> EqualsRangeMatcher { + return EqualsRangeMatcher{ range }; +} + +TEST_CASE( "Combining templated matchers", "[matchers][templated]" ) { + std::array container{ { 1, 2, 3 } }; + + std::array a{ { 1, 2, 3 } }; + std::vector b{ 0, 1, 2 }; + std::list c{ 4, 5, 6 }; + + REQUIRE_THAT( container, + EqualsRange( a ) || EqualsRange( b ) || EqualsRange( c ) ); +} + +TEST_CASE( "Combining templated and concrete matchers", + "[matchers][templated]" ) { + std::vector vec{ 1, 3, 5 }; + + std::array a{ { 5, 3, 1 } }; + + REQUIRE_THAT( vec, + Predicate>( + []( auto const& v ) { + return std::all_of( + v.begin(), v.end(), []( int elem ) { + return elem % 2 == 1; + } ); + }, + "All elements are odd" ) && + !EqualsRange( a ) ); + + const std::string str = "foobar"; + const std::array arr{ { 'f', 'o', 'o', 'b', 'a', 'r' } }; + const std::array bad_arr{ { 'o', 'o', 'f', 'b', 'a', 'r' } }; + + using Catch::Matchers::EndsWith; + using Catch::Matchers::StartsWith; + + REQUIRE_THAT( + str, StartsWith( "foo" ) && EqualsRange( arr ) && EndsWith( "bar" ) ); + REQUIRE_THAT( str, + StartsWith( "foo" ) && !EqualsRange( bad_arr ) && + EndsWith( "bar" ) ); + + REQUIRE_THAT( + str, EqualsRange( arr ) && StartsWith( "foo" ) && EndsWith( "bar" ) ); + REQUIRE_THAT( str, + !EqualsRange( bad_arr ) && StartsWith( "foo" ) && + EndsWith( "bar" ) ); + + REQUIRE_THAT( str, + EqualsRange( bad_arr ) || + ( StartsWith( "foo" ) && EndsWith( "bar" ) ) ); + REQUIRE_THAT( str, + ( StartsWith( "foo" ) && EndsWith( "bar" ) ) || + EqualsRange( bad_arr ) ); +} + +TEST_CASE( "Combining concrete matchers does not use templated matchers", + "[matchers][templated]" ) { + using Catch::Matchers::EndsWith; + using Catch::Matchers::StartsWith; + + STATIC_REQUIRE( + std::is_same>::value ); +} + +struct MatcherA : Catch::Matchers::MatcherGenericBase { + std::string describe() const override { + return "equals: (int) 1 or (string) \"1\""; + } + bool match( int i ) const { return i == 1; } + bool match( std::string const& s ) const { return s == "1"; } +}; + +struct MatcherB : Catch::Matchers::MatcherGenericBase { + std::string describe() const override { return "equals: (long long) 1"; } + bool match( long long l ) const { return l == 1ll; } +}; + +struct MatcherC : Catch::Matchers::MatcherGenericBase { + std::string describe() const override { return "equals: (T) 1"; } + template bool match( T t ) const { return t == T{ 1 }; } +}; + +struct MatcherD : Catch::Matchers::MatcherGenericBase { + std::string describe() const override { return "equals: true"; } + bool match( bool b ) const { return b == true; } +}; + +TEST_CASE( "Combining only templated matchers", "[matchers][templated]" ) { + STATIC_REQUIRE( + std::is_same>::value ); + + REQUIRE_THAT( 1, MatcherA() || MatcherB() ); + + STATIC_REQUIRE( + std::is_same>::value ); + + REQUIRE_THAT( 1, MatcherA() && MatcherB() ); + + STATIC_REQUIRE( + std::is_same< + decltype( MatcherA() || !MatcherB() ), + Catch::Matchers::Detail::MatchAnyOfGeneric< + MatcherA, + Catch::Matchers::Detail::MatchNotOfGeneric>>::value ); + + REQUIRE_THAT( 1, MatcherA() || !MatcherB() ); +} + +TEST_CASE( "Combining MatchAnyOfGeneric does not nest", + "[matchers][templated]" ) { + // MatchAnyOfGeneric LHS + some matcher RHS + STATIC_REQUIRE( + std::is_same< + decltype( ( MatcherA() || MatcherB() ) || MatcherC() ), + Catch::Matchers::Detail:: + MatchAnyOfGeneric>::value ); + + REQUIRE_THAT( 1, ( MatcherA() || MatcherB() ) || MatcherC() ); + + // some matcher LHS + MatchAnyOfGeneric RHS + STATIC_REQUIRE( + std::is_same< + decltype( MatcherA() || ( MatcherB() || MatcherC() ) ), + Catch::Matchers::Detail:: + MatchAnyOfGeneric>::value ); + + REQUIRE_THAT( 1, MatcherA() || ( MatcherB() || MatcherC() ) ); + + // MatchAnyOfGeneric LHS + MatchAnyOfGeneric RHS + STATIC_REQUIRE( + std::is_same< + decltype( ( MatcherA() || MatcherB() ) || + ( MatcherC() || MatcherD() ) ), + Catch::Matchers::Detail:: + MatchAnyOfGeneric>:: + value ); + + REQUIRE_THAT( + 1, ( MatcherA() || MatcherB() ) || ( MatcherC() || MatcherD() ) ); +} + +TEST_CASE( "Combining MatchAllOfGeneric does not nest", + "[matchers][templated]" ) { + // MatchAllOfGeneric lhs + some matcher RHS + STATIC_REQUIRE( + std::is_same< + decltype( ( MatcherA() && MatcherB() ) && MatcherC() ), + Catch::Matchers::Detail:: + MatchAllOfGeneric>::value ); + + REQUIRE_THAT( 1, ( MatcherA() && MatcherB() ) && MatcherC() ); + + // some matcher LHS + MatchAllOfGeneric RSH + STATIC_REQUIRE( + std::is_same< + decltype( MatcherA() && ( MatcherB() && MatcherC() ) ), + Catch::Matchers::Detail:: + MatchAllOfGeneric>::value ); + + REQUIRE_THAT( 1, MatcherA() && ( MatcherB() && MatcherC() ) ); + + // MatchAllOfGeneric LHS + MatchAllOfGeneric RHS + STATIC_REQUIRE( + std::is_same< + decltype( ( MatcherA() && MatcherB() ) && + ( MatcherC() && MatcherD() ) ), + Catch::Matchers::Detail:: + MatchAllOfGeneric>:: + value ); + + REQUIRE_THAT( + 1, ( MatcherA() && MatcherB() ) && ( MatcherC() && MatcherD() ) ); +} + +TEST_CASE( "Combining MatchNotOfGeneric does not nest", + "[matchers][templated]" ) { + STATIC_REQUIRE( + std::is_same< + decltype( !MatcherA() ), + Catch::Matchers::Detail::MatchNotOfGeneric>::value ); + + REQUIRE_THAT( 0, !MatcherA() ); + + STATIC_REQUIRE( + std::is_same::value ); + + REQUIRE_THAT( 1, !!MatcherA() ); + + STATIC_REQUIRE( + std::is_same< + decltype( !!!MatcherA() ), + Catch::Matchers::Detail::MatchNotOfGeneric>::value ); + + REQUIRE_THAT( 0, !!!MatcherA() ); + + STATIC_REQUIRE( + std::is_same::value ); + + REQUIRE_THAT( 1, !!!!MatcherA() ); +} + +struct EvilAddressOfOperatorUsed : std::exception { + const char* what() const noexcept override { + return "overloaded address-of operator of matcher was used instead of " + "std::addressof"; + } +}; + +struct EvilCommaOperatorUsed : std::exception { + const char* what() const noexcept override { + return "overloaded comma operator of matcher was used"; + } +}; + +struct EvilMatcher : Catch::Matchers::MatcherGenericBase { + std::string describe() const override { return "equals: 45"; } + + bool match( int i ) const { return i == 45; } + + EvilMatcher const* operator&() const { throw EvilAddressOfOperatorUsed(); } + + int operator,( EvilMatcher const& ) const { throw EvilCommaOperatorUsed(); } +}; + +TEST_CASE( "Overloaded comma or address-of operators are not used", + "[matchers][templated]" ) { + REQUIRE_THROWS_AS( ( EvilMatcher(), EvilMatcher() ), + EvilCommaOperatorUsed ); + REQUIRE_THROWS_AS( &EvilMatcher(), EvilAddressOfOperatorUsed ); + REQUIRE_NOTHROW( EvilMatcher() || ( EvilMatcher() && !EvilMatcher() ) ); + REQUIRE_NOTHROW( ( EvilMatcher() && EvilMatcher() ) || !EvilMatcher() ); +} + +struct ImmovableMatcher : Catch::Matchers::MatcherGenericBase { + ImmovableMatcher() = default; + ImmovableMatcher( ImmovableMatcher const& ) = delete; + ImmovableMatcher( ImmovableMatcher&& ) = delete; + ImmovableMatcher& operator=( ImmovableMatcher const& ) = delete; + ImmovableMatcher& operator=( ImmovableMatcher&& ) = delete; + + std::string describe() const override { return "always false"; } + + template bool match( T&& ) const { return false; } +}; + +struct MatcherWasMovedOrCopied : std::exception { + const char* what() const noexcept override { + return "attempted to copy or move a matcher"; + } +}; + +struct ThrowOnCopyOrMoveMatcher : Catch::Matchers::MatcherGenericBase { + ThrowOnCopyOrMoveMatcher() = default; + + [[noreturn]] ThrowOnCopyOrMoveMatcher( ThrowOnCopyOrMoveMatcher const& other ): + Catch::Matchers::MatcherGenericBase( other ) { + throw MatcherWasMovedOrCopied(); + } + // NOLINTNEXTLINE(performance-noexcept-move-constructor) + [[noreturn]] ThrowOnCopyOrMoveMatcher( ThrowOnCopyOrMoveMatcher&& other ): + Catch::Matchers::MatcherGenericBase( CATCH_MOVE(other) ) { + throw MatcherWasMovedOrCopied(); + } + ThrowOnCopyOrMoveMatcher& operator=( ThrowOnCopyOrMoveMatcher const& ) { + throw MatcherWasMovedOrCopied(); + } + // NOLINTNEXTLINE(performance-noexcept-move-constructor) + ThrowOnCopyOrMoveMatcher& operator=( ThrowOnCopyOrMoveMatcher&& ) { + throw MatcherWasMovedOrCopied(); + } + + std::string describe() const override { return "always false"; } + + template bool match( T&& ) const { return false; } +}; + +TEST_CASE( "Matchers are not moved or copied", + "[matchers][templated][approvals]" ) { + REQUIRE_NOTHROW( + ( ThrowOnCopyOrMoveMatcher() && ThrowOnCopyOrMoveMatcher() ) || + !ThrowOnCopyOrMoveMatcher() ); +} + +TEST_CASE( "Immovable matchers can be used", + "[matchers][templated][approvals]" ) { + REQUIRE_THAT( 123, + ( ImmovableMatcher() && ImmovableMatcher() ) || + !ImmovableMatcher() ); +} + +struct ReferencingMatcher : Catch::Matchers::MatcherGenericBase { + std::string describe() const override { return "takes reference"; } + bool match( int& i ) const { return i == 22; } +}; + +TEST_CASE( "Matchers can take references", + "[matchers][templated][approvals]" ) { + REQUIRE_THAT( 22, ReferencingMatcher{} ); +} + +#ifdef __clang__ +# pragma clang diagnostic pop +#endif + +TEMPLATE_TEST_CASE( + "#2152 - ULP checks between differently signed values were wrong", + "[matchers][floating-point][ulp]", + float, + double ) { + using Catch::Matchers::WithinULP; + + static constexpr TestType smallest_non_zero = + std::numeric_limits::denorm_min(); + + CHECK_THAT( smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) ); + CHECK_THAT( smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) ); +} diff --git a/tests/SelfTest/UsageTests/MatchersRanges.tests.cpp b/tests/SelfTest/UsageTests/MatchersRanges.tests.cpp new file mode 100644 index 0000000..4f906b9 --- /dev/null +++ b/tests/SelfTest/UsageTests/MatchersRanges.tests.cpp @@ -0,0 +1,936 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include + +struct MoveOnlyTestElement { + int num = 0; + MoveOnlyTestElement(int n) :num(n) {} + + MoveOnlyTestElement(MoveOnlyTestElement&& rhs) = default; + MoveOnlyTestElement& operator=(MoveOnlyTestElement&& rhs) = default; + + friend bool operator==(MoveOnlyTestElement const& lhs, MoveOnlyTestElement const& rhs) { + return lhs.num == rhs.num; + } + + friend std::ostream& operator<<(std::ostream& out, MoveOnlyTestElement const& elem) { + out << elem.num; + return out; + } +}; + +TEST_CASE("Basic use of the Contains range matcher", "[matchers][templated][contains]") { + using Catch::Matchers::Contains; + + SECTION("Different argument ranges, same element type, default comparison") { + std::array a{ { 1,2,3 } }; + std::vector b{ 0,1,2 }; + std::list c{ 4,5,6 }; + + // A contains 1 + REQUIRE_THAT(a, Contains(1)); + // B contains 1 + REQUIRE_THAT(b, Contains(1)); + // C does not contain 1 + REQUIRE_THAT(c, !Contains(1)); + } + + SECTION("Different argument ranges, same element type, custom comparison") { + std::array a{ { 1,2,3 } }; + std::vector b{ 0,1,2 }; + std::list c{ 4,5,6 }; + + auto close_enough = [](int lhs, int rhs) { return std::abs(lhs - rhs) <= 1; }; + + // A contains 1, which is "close enough" to 0 + REQUIRE_THAT(a, Contains(0, close_enough)); + // B contains 0 directly + REQUIRE_THAT(b, Contains(0, close_enough)); + // C does not contain anything "close enough" to 0 + REQUIRE_THAT(c, !Contains(0, close_enough)); + } + + SECTION("Different element type, custom comparisons") { + std::array a{ { "abc", "abcd" , "abcde" } }; + + REQUIRE_THAT(a, Contains(4, [](auto&& lhs, size_t sz) { + return lhs.size() == sz; + })); + } + + SECTION("Can handle type that requires ADL-found free function begin and end") { + unrelated::needs_ADL_begin in{1, 2, 3, 4, 5}; + + REQUIRE_THAT(in, Contains(1)); + REQUIRE_THAT(in, !Contains(8)); + } + + SECTION("Initialization with move only types") { + std::array in{ { MoveOnlyTestElement{ 1 }, MoveOnlyTestElement{ 2 }, MoveOnlyTestElement{ 3 } } }; + + REQUIRE_THAT(in, Contains(MoveOnlyTestElement{ 2 })); + REQUIRE_THAT(in, !Contains(MoveOnlyTestElement{ 9 })); + } + + SECTION("Matching using matcher") { + std::array in{ {1, 2, 3} }; + + REQUIRE_THAT(in, Contains(Catch::Matchers::WithinAbs(0.5, 0.5))); + } +} + +namespace { + + struct has_empty { + bool empty() const { return false; } + }; + +} // end unnamed namespace + +TEST_CASE("Basic use of the Empty range matcher", "[matchers][templated][empty]") { + using Catch::Matchers::IsEmpty; + SECTION("Simple, std-provided containers") { + std::array empty_array{}; + std::array non_empty_array{}; + REQUIRE_THAT(empty_array, IsEmpty()); + REQUIRE_THAT(non_empty_array, !IsEmpty()); + + std::vector empty_vec; + std::vector non_empty_vec{ 'a', 'b', 'c' }; + REQUIRE_THAT(empty_vec, IsEmpty()); + REQUIRE_THAT(non_empty_vec, !IsEmpty()); + + std::list>> inner_lists_are_empty; + inner_lists_are_empty.push_back({}); + REQUIRE_THAT(inner_lists_are_empty, !IsEmpty()); + REQUIRE_THAT(inner_lists_are_empty.front(), IsEmpty()); + } + SECTION("Type with empty") { + REQUIRE_THAT(has_empty{}, !IsEmpty()); + } + SECTION("Type requires ADL found empty free function") { + REQUIRE_THAT(unrelated::ADL_empty{}, IsEmpty()); + } +} + +namespace { + class LessThanMatcher final : public Catch::Matchers::MatcherBase { + size_t m_target; + public: + explicit LessThanMatcher(size_t target): + m_target(target) + {} + + bool match(size_t const& size) const override { + return size < m_target; + } + + std::string describe() const override { + return "is less than " + std::to_string(m_target); + } + }; + + LessThanMatcher Lt(size_t sz) { + return LessThanMatcher{ sz }; + } + + struct has_size { + size_t size() const { + return 13; + } + }; + +} // end unnamed namespace + +TEST_CASE("Usage of the SizeIs range matcher", "[matchers][templated][size]") { + using Catch::Matchers::SizeIs; + SECTION("Some with stdlib containers") { + std::vector empty_vec; + REQUIRE_THAT(empty_vec, SizeIs(0)); + REQUIRE_THAT(empty_vec, !SizeIs(2)); + REQUIRE_THAT(empty_vec, SizeIs(Lt(2))); + + std::array arr{}; + REQUIRE_THAT(arr, SizeIs(2)); + REQUIRE_THAT(arr, SizeIs( Lt(3))); + REQUIRE_THAT(arr, !SizeIs(!Lt(3))); + + std::map map{ {1, 1}, {2, 2}, {3, 3} }; + REQUIRE_THAT(map, SizeIs(3)); + } + SECTION("Type requires ADL found size free function") { + REQUIRE_THAT(unrelated::ADL_size{}, SizeIs(12)); + } + SECTION("Type has size member") { + REQUIRE_THAT(has_size{}, SizeIs(13)); + } +} + + +TEST_CASE("Usage of AllMatch range matcher", "[matchers][templated][quantifiers]") { + using Catch::Matchers::AllMatch; + using Catch::Matchers::Predicate; + + SECTION("Basic usage") { + using Catch::Matchers::Contains; + using Catch::Matchers::SizeIs; + + std::array, 5> data{{ + {{ 0, 1, 2, 3, 5 }}, + {{ 4,-3,-2, 5, 0 }}, + {{ 0, 0, 0, 5, 0 }}, + {{ 0,-5, 0, 5, 0 }}, + {{ 1, 0, 0,-1, 5 }} + }}; + + REQUIRE_THAT(data, AllMatch(SizeIs(5))); + REQUIRE_THAT(data, !AllMatch(Contains(0) && Contains(1))); + } + + SECTION("Type requires ADL found begin and end") { + unrelated::needs_ADL_begin needs_adl{ 1, 2, 3, 4, 5 }; + REQUIRE_THAT( needs_adl, AllMatch( Predicate( []( int elem ) { + return elem < 6; + } ) ) ); + } + + SECTION("Shortcircuiting") { + with_mocked_iterator_access mocked{ 1, 2, 3, 4, 5 }; + SECTION("All are read") { + auto allMatch = AllMatch(Predicate([](int elem) { + return elem < 10; + })); + REQUIRE_THAT(mocked, allMatch); + REQUIRE(mocked.m_derefed[0]); + REQUIRE(mocked.m_derefed[1]); + REQUIRE(mocked.m_derefed[2]); + REQUIRE(mocked.m_derefed[3]); + REQUIRE(mocked.m_derefed[4]); + } + SECTION("Short-circuited") { + auto allMatch = AllMatch(Predicate([](int elem) { + return elem < 3; + })); + REQUIRE_THAT(mocked, !allMatch); + REQUIRE(mocked.m_derefed[0]); + REQUIRE(mocked.m_derefed[1]); + REQUIRE(mocked.m_derefed[2]); + REQUIRE_FALSE(mocked.m_derefed[3]); + REQUIRE_FALSE(mocked.m_derefed[4]); + } + } +} + +TEST_CASE("Usage of AnyMatch range matcher", "[matchers][templated][quantifiers]") { + using Catch::Matchers::AnyMatch; + using Catch::Matchers::Predicate; + + SECTION("Basic usage") { + using Catch::Matchers::Contains; + using Catch::Matchers::SizeIs; + + std::array, 5> data{ { + {{ 0, 1, 2, 3, 5 }}, + {{ 4,-3,-2, 5, 0 }}, + {{ 0, 0, 0, 5, 0 }}, + {{ 0,-5, 0, 5, 0 }}, + {{ 1, 0, 0,-1, 5 }} + } }; + + REQUIRE_THAT(data, AnyMatch(SizeIs(5))); + REQUIRE_THAT(data, !AnyMatch(Contains(0) && Contains(10))); + } + + SECTION( "Type requires ADL found begin and end" ) { + unrelated::needs_ADL_begin needs_adl{ 1, 2, 3, 4, 5 }; + REQUIRE_THAT( needs_adl, AnyMatch( Predicate( []( int elem ) { + return elem < 3; + } ) ) ); + } + + SECTION("Shortcircuiting") { + with_mocked_iterator_access mocked{ 1, 2, 3, 4, 5 }; + SECTION("All are read") { + auto anyMatch = AnyMatch( + Predicate( []( int elem ) { return elem > 10; } ) ); + REQUIRE_THAT( mocked, !anyMatch ); + REQUIRE( mocked.m_derefed[0] ); + REQUIRE( mocked.m_derefed[1] ); + REQUIRE( mocked.m_derefed[2] ); + REQUIRE( mocked.m_derefed[3] ); + REQUIRE( mocked.m_derefed[4] ); + } + SECTION("Short-circuited") { + auto anyMatch = AnyMatch( + Predicate( []( int elem ) { return elem < 3; } ) ); + REQUIRE_THAT( mocked, anyMatch ); + REQUIRE( mocked.m_derefed[0] ); + REQUIRE_FALSE( mocked.m_derefed[1] ); + REQUIRE_FALSE( mocked.m_derefed[2] ); + REQUIRE_FALSE( mocked.m_derefed[3] ); + REQUIRE_FALSE( mocked.m_derefed[4] ); + } + } +} + +TEST_CASE("Usage of NoneMatch range matcher", "[matchers][templated][quantifiers]") { + using Catch::Matchers::NoneMatch; + using Catch::Matchers::Predicate; + + SECTION("Basic usage") { + using Catch::Matchers::Contains; + using Catch::Matchers::SizeIs; + + std::array, 5> data{ { + {{ 0, 1, 2, 3, 5 }}, + {{ 4,-3,-2, 5, 0 }}, + {{ 0, 0, 0, 5, 0 }}, + {{ 0,-5, 0, 5, 0 }}, + {{ 1, 0, 0,-1, 5 }} + } }; + + REQUIRE_THAT(data, NoneMatch(SizeIs(6))); + REQUIRE_THAT(data, !NoneMatch(Contains(0) && Contains(1))); + } + + SECTION( "Type requires ADL found begin and end" ) { + unrelated::needs_ADL_begin needs_adl{ 1, 2, 3, 4, 5 }; + REQUIRE_THAT( needs_adl, NoneMatch( Predicate( []( int elem ) { + return elem > 6; + } ) ) ); + } + + SECTION("Shortcircuiting") { + with_mocked_iterator_access mocked{ 1, 2, 3, 4, 5 }; + SECTION("All are read") { + auto noneMatch = NoneMatch( + Predicate([](int elem) { return elem > 10; })); + REQUIRE_THAT(mocked, noneMatch); + REQUIRE(mocked.m_derefed[0]); + REQUIRE(mocked.m_derefed[1]); + REQUIRE(mocked.m_derefed[2]); + REQUIRE(mocked.m_derefed[3]); + REQUIRE(mocked.m_derefed[4]); + } + SECTION("Short-circuited") { + auto noneMatch = NoneMatch( + Predicate([](int elem) { return elem < 3; })); + REQUIRE_THAT(mocked, !noneMatch); + REQUIRE(mocked.m_derefed[0]); + REQUIRE_FALSE(mocked.m_derefed[1]); + REQUIRE_FALSE(mocked.m_derefed[2]); + REQUIRE_FALSE(mocked.m_derefed[3]); + REQUIRE_FALSE(mocked.m_derefed[4]); + } + } +} + +namespace { + struct ConvertibleToBool + { + bool v; + + explicit operator bool() const + { + return v; + } + }; +} + +namespace Catch { + template <> + struct StringMaker { + static std::string + convert( ConvertibleToBool const& convertible_to_bool ) { + return ::Catch::Detail::stringify( convertible_to_bool.v ); + } + }; +} // namespace Catch + +TEST_CASE("Usage of AllTrue range matcher", "[matchers][templated][quantifiers]") { + using Catch::Matchers::AllTrue; + + SECTION( "Basic usage" ) { + SECTION( "All true evaluates to true" ) { + std::array const data{ { true, true, true, true, true } }; + REQUIRE_THAT( data, AllTrue() ); + } + SECTION( "Empty evaluates to true" ) { + std::array const data{}; + REQUIRE_THAT( data, AllTrue() ); + } + SECTION( "One false evaluates to false" ) { + std::array const data{ { true, true, false, true, true } }; + REQUIRE_THAT( data, !AllTrue() ); + } + SECTION( "All false evaluates to false" ) { + std::array const data{ + { false, false, false, false, false } }; + REQUIRE_THAT( data, !AllTrue() ); + } + } + + SECTION( "Contained type is convertible to bool" ) { + SECTION( "All true evaluates to true" ) { + std::array const data{ + { { true }, { true }, { true }, { true }, { true } } }; + REQUIRE_THAT( data, AllTrue() ); + } + SECTION( "One false evaluates to false" ) { + std::array const data{ + { { true }, { true }, { false }, { true }, { true } } }; + REQUIRE_THAT( data, !AllTrue() ); + } + SECTION( "All false evaluates to false" ) { + std::array const data{ + { { false }, { false }, { false }, { false }, { false } } }; + REQUIRE_THAT( data, !AllTrue() ); + } + } + + SECTION( "Shortcircuiting" ) { + SECTION( "All are read" ) { + with_mocked_iterator_access const mocked{ + true, true, true, true, true }; + REQUIRE_THAT( mocked, AllTrue() ); + REQUIRE( mocked.m_derefed[0] ); + REQUIRE( mocked.m_derefed[1] ); + REQUIRE( mocked.m_derefed[2] ); + REQUIRE( mocked.m_derefed[3] ); + REQUIRE( mocked.m_derefed[4] ); + } + SECTION( "Short-circuited" ) { + with_mocked_iterator_access const mocked{ + true, true, false, true, true }; + REQUIRE_THAT( mocked, !AllTrue() ); + REQUIRE( mocked.m_derefed[0] ); + REQUIRE( mocked.m_derefed[1] ); + REQUIRE( mocked.m_derefed[2] ); + REQUIRE_FALSE( mocked.m_derefed[3] ); + REQUIRE_FALSE( mocked.m_derefed[4] ); + } + } +} + +TEST_CASE( "Usage of NoneTrue range matcher", "[matchers][templated][quantifiers]" ) { + using Catch::Matchers::NoneTrue; + + SECTION( "Basic usage" ) { + SECTION( "All true evaluates to false" ) { + std::array const data{ { true, true, true, true, true } }; + REQUIRE_THAT( data, !NoneTrue() ); + } + SECTION( "Empty evaluates to true" ) { + std::array const data{}; + REQUIRE_THAT( data, NoneTrue() ); + } + SECTION( "One true evaluates to false" ) { + std::array const data{ + { false, false, true, false, false } }; + REQUIRE_THAT( data, !NoneTrue() ); + } + SECTION( "All false evaluates to true" ) { + std::array const data{ + { false, false, false, false, false } }; + REQUIRE_THAT( data, NoneTrue() ); + } + } + + SECTION( "Contained type is convertible to bool" ) { + SECTION( "All true evaluates to false" ) { + std::array const data{ + { { true }, { true }, { true }, { true }, { true } } }; + REQUIRE_THAT( data, !NoneTrue() ); + } + SECTION( "One true evaluates to false" ) { + std::array const data{ + { { false }, { false }, { true }, { false }, { false } } }; + REQUIRE_THAT( data, !NoneTrue() ); + } + SECTION( "All false evaluates to true" ) { + std::array const data{ + { { false }, { false }, { false }, { false }, { false } } }; + REQUIRE_THAT( data, NoneTrue() ); + } + } + + SECTION( "Shortcircuiting" ) { + SECTION( "All are read" ) { + with_mocked_iterator_access const mocked{ + false, false, false, false, false }; + REQUIRE_THAT( mocked, NoneTrue() ); + REQUIRE( mocked.m_derefed[0] ); + REQUIRE( mocked.m_derefed[1] ); + REQUIRE( mocked.m_derefed[2] ); + REQUIRE( mocked.m_derefed[3] ); + REQUIRE( mocked.m_derefed[4] ); + } + SECTION( "Short-circuited" ) { + with_mocked_iterator_access const mocked{ + false, false, true, true, true }; + REQUIRE_THAT( mocked, !NoneTrue() ); + REQUIRE( mocked.m_derefed[0] ); + REQUIRE( mocked.m_derefed[1] ); + REQUIRE( mocked.m_derefed[2] ); + REQUIRE_FALSE( mocked.m_derefed[3] ); + REQUIRE_FALSE( mocked.m_derefed[4] ); + } + } +} + +TEST_CASE( "Usage of AnyTrue range matcher", "[matchers][templated][quantifiers]" ) { + using Catch::Matchers::AnyTrue; + + SECTION( "Basic usage" ) { + SECTION( "All true evaluates to true" ) { + std::array const data{ { true, true, true, true, true } }; + REQUIRE_THAT( data, AnyTrue() ); + } + SECTION( "Empty evaluates to false" ) { + std::array const data{}; + REQUIRE_THAT( data, !AnyTrue() ); + } + SECTION( "One true evaluates to true" ) { + std::array const data{ + { false, false, true, false, false } }; + REQUIRE_THAT( data, AnyTrue() ); + } + SECTION( "All false evaluates to false" ) { + std::array const data{ + { false, false, false, false, false } }; + REQUIRE_THAT( data, !AnyTrue() ); + } + } + + SECTION( "Contained type is convertible to bool" ) { + SECTION( "All true evaluates to true" ) { + std::array const data{ + { { true }, { true }, { true }, { true }, { true } } }; + REQUIRE_THAT( data, AnyTrue() ); + } + SECTION( "One true evaluates to true" ) { + std::array const data{ + { { false }, { false }, { true }, { false }, { false } } }; + REQUIRE_THAT( data, AnyTrue() ); + } + SECTION( "All false evaluates to false" ) { + std::array const data{ + { { false }, { false }, { false }, { false }, { false } } }; + REQUIRE_THAT( data, !AnyTrue() ); + } + } + + SECTION( "Shortcircuiting" ) { + SECTION( "All are read" ) { + with_mocked_iterator_access const mocked{ + false, false, false, false, true }; + REQUIRE_THAT( mocked, AnyTrue() ); + REQUIRE( mocked.m_derefed[0] ); + REQUIRE( mocked.m_derefed[1] ); + REQUIRE( mocked.m_derefed[2] ); + REQUIRE( mocked.m_derefed[3] ); + REQUIRE( mocked.m_derefed[4] ); + } + SECTION( "Short-circuited" ) { + with_mocked_iterator_access const mocked{ + false, false, true, true, true }; + REQUIRE_THAT( mocked, AnyTrue() ); + REQUIRE( mocked.m_derefed[0] ); + REQUIRE( mocked.m_derefed[1] ); + REQUIRE( mocked.m_derefed[2] ); + REQUIRE_FALSE( mocked.m_derefed[3] ); + REQUIRE_FALSE( mocked.m_derefed[4] ); + } + } +} + +TEST_CASE("All/Any/None True matchers support types with ADL begin", + "[approvals][matchers][quantifiers][templated]") { + using Catch::Matchers::AllTrue; + using Catch::Matchers::NoneTrue; + using Catch::Matchers::AnyTrue; + + + SECTION( "Type requires ADL found begin and end" ) { + unrelated::needs_ADL_begin const needs_adl{ + true, true, true, true, true }; + REQUIRE_THAT( needs_adl, AllTrue() ); + } + + SECTION( "Type requires ADL found begin and end" ) { + unrelated::needs_ADL_begin const needs_adl{ + false, false, false, false, false }; + REQUIRE_THAT( needs_adl, NoneTrue() ); + } + + SECTION( "Type requires ADL found begin and end" ) { + unrelated::needs_ADL_begin const needs_adl{ + false, false, true, false, false }; + REQUIRE_THAT( needs_adl, AnyTrue() ); + } +} + +// Range loop iterating over range with different types for begin and end is a +// C++17 feature, and GCC refuses to compile such code unless the lang mode is +// set to C++17 or later. +#if defined(CATCH_CPP17_OR_GREATER) + +TEST_CASE( "The quantifier range matchers support types with different types returned from begin and end", + "[matchers][templated][quantifiers][approvals]" ) { + using Catch::Matchers::AllMatch; + using Catch::Matchers::AllTrue; + using Catch::Matchers::AnyMatch; + using Catch::Matchers::AnyTrue; + using Catch::Matchers::NoneMatch; + using Catch::Matchers::NoneTrue; + + using Catch::Matchers::Predicate; + + SECTION( "AllAnyNoneMatch" ) { + has_different_begin_end_types diff_types{ 1, 2, 3, 4, 5 }; + REQUIRE_THAT( diff_types, !AllMatch( Predicate( []( int elem ) { + return elem < 3; + } ) ) ); + + REQUIRE_THAT( diff_types, AnyMatch( Predicate( []( int elem ) { + return elem < 2; + } ) ) ); + + REQUIRE_THAT( diff_types, !NoneMatch( Predicate( []( int elem ) { + return elem < 3; + } ) ) ); + } + SECTION( "AllAnyNoneTrue" ) { + has_different_begin_end_types diff_types{ false, false, true, false, false }; + + REQUIRE_THAT( diff_types, !AllTrue() ); + REQUIRE_THAT( diff_types, AnyTrue() ); + REQUIRE_THAT( diff_types, !NoneTrue() ); + } +} + +TEST_CASE( "RangeEquals supports ranges with different types returned from begin and end", + "[matchers][templated][range][approvals] ") { + using Catch::Matchers::RangeEquals; + using Catch::Matchers::UnorderedRangeEquals; + + has_different_begin_end_types diff_types{ 1, 2, 3, 4, 5 }; + std::array arr1{ { 1, 2, 3, 4, 5 } }, arr2{ { 2, 3, 4, 5, 6 } }; + + REQUIRE_THAT( diff_types, RangeEquals( arr1 ) ); + REQUIRE_THAT( diff_types, RangeEquals( arr2, []( int l, int r ) { + return l + 1 == r; + } ) ); + REQUIRE_THAT( diff_types, UnorderedRangeEquals( diff_types ) ); +} + +TEST_CASE( "RangeContains supports ranges with different types returned from " + "begin and end", + "[matchers][templated][range][approvals]" ) { + using Catch::Matchers::Contains; + + has_different_begin_end_types diff_types{ 1, 2, 3, 4, 5 }; + REQUIRE_THAT( diff_types, Contains( size_t( 3 ) ) ); + REQUIRE_THAT( diff_types, Contains( LessThanMatcher( size_t( 4 ) ) ) ); +} + +#endif + +TEST_CASE( "Usage of RangeEquals range matcher", "[matchers][templated][quantifiers]" ) { + using Catch::Matchers::RangeEquals; + + // In these tests, the types are always the same - type conversion is in the next section + SECTION( "Basic usage" ) { + SECTION( "Empty container matches empty container" ) { + const std::vector empty_vector; + CHECK_THAT( empty_vector, RangeEquals( empty_vector ) ); + } + SECTION( "Empty container does not match non-empty container" ) { + const std::vector empty_vector; + const std::vector non_empty_vector{ 1 }; + CHECK_THAT( empty_vector, !RangeEquals( non_empty_vector ) ); + // ...and in reverse + CHECK_THAT( non_empty_vector, !RangeEquals( empty_vector ) ); + } + SECTION( "Two equal 1-length non-empty containers" ) { + const std::array non_empty_array{ { 1 } }; + CHECK_THAT( non_empty_array, RangeEquals( non_empty_array ) ); + } + SECTION( "Two equal-sized, equal, non-empty containers" ) { + const std::array array_a{ { 1, 2, 3 } }; + CHECK_THAT( array_a, RangeEquals( array_a ) ); + } + SECTION( "Two equal-sized, non-equal, non-empty containers" ) { + const std::array array_a{ { 1, 2, 3 } }; + const std::array array_b{ { 2, 2, 3 } }; + const std::array array_c{ { 1, 2, 2 } }; + CHECK_THAT( array_a, !RangeEquals( array_b ) ); + CHECK_THAT( array_a, !RangeEquals( array_c ) ); + } + SECTION( "Two non-equal-sized, non-empty containers (with same first " + "elements)" ) { + const std::vector vector_a{ 1, 2, 3 }; + const std::vector vector_b{ 1, 2, 3, 4 }; + CHECK_THAT( vector_a, !RangeEquals( vector_b ) ); + } + } + + SECTION( "Custom predicate" ) { + + auto close_enough = []( int lhs, int rhs ) { + return std::abs( lhs - rhs ) <= 1; + }; + + SECTION( "Two equal non-empty containers (close enough)" ) { + const std::vector vector_a{ { 1, 2, 3 } }; + const std::vector vector_a_plus_1{ { 2, 3, 4 } }; + CHECK_THAT( vector_a, RangeEquals( vector_a_plus_1, close_enough ) ); + } + SECTION( "Two non-equal non-empty containers (close enough)" ) { + const std::vector vector_a{ { 1, 2, 3 } }; + const std::vector vector_b{ { 3, 3, 4 } }; + CHECK_THAT( vector_a, !RangeEquals( vector_b, close_enough ) ); + } + } + + SECTION( "Ranges that need ADL begin/end" ) { + unrelated::needs_ADL_begin const + needs_adl1{ 1, 2, 3, 4, 5 }, + needs_adl2{ 1, 2, 3, 4, 5 }, + needs_adl3{ 2, 3, 4, 5, 6 }; + + REQUIRE_THAT( needs_adl1, RangeEquals( needs_adl2 ) ); + REQUIRE_THAT( needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { + return l + 1 == r; + } ) ); + } + + SECTION( "Compare against std::initializer_list" ) { + const std::array array_a{ { 1, 2, 3 } }; + + REQUIRE_THAT( array_a, RangeEquals( { 1, 2, 3 } ) ); + REQUIRE_THAT( array_a, RangeEquals( { 2, 4, 6 }, []( int l, int r ) { + return l * 2 == r; + } ) ); + } + + SECTION("Check short-circuiting behaviour") { + with_mocked_iterator_access const mocked1{ 1, 2, 3, 4 }; + + SECTION( "Check short-circuits on failure" ) { + std::array arr{ { 1, 2, 4, 4 } }; + + REQUIRE_THAT( mocked1, !RangeEquals( arr ) ); + REQUIRE( mocked1.m_derefed[0] ); + REQUIRE( mocked1.m_derefed[1] ); + REQUIRE( mocked1.m_derefed[2] ); + REQUIRE_FALSE( mocked1.m_derefed[3] ); + } + SECTION("All elements are checked on success") { + std::array arr{ { 1, 2, 3, 4 } }; + + REQUIRE_THAT( mocked1, RangeEquals( arr ) ); + REQUIRE( mocked1.m_derefed[0] ); + REQUIRE( mocked1.m_derefed[1] ); + REQUIRE( mocked1.m_derefed[2] ); + REQUIRE( mocked1.m_derefed[3] ); + } + } +} + +TEST_CASE( "Usage of UnorderedRangeEquals range matcher", + "[matchers][templated][quantifiers]" ) { + using Catch::Matchers::UnorderedRangeEquals; + + // In these tests, the types are always the same - type conversion is in the + // next section + SECTION( "Basic usage" ) { + SECTION( "Empty container matches empty container" ) { + const std::vector empty_vector; + CHECK_THAT( empty_vector, UnorderedRangeEquals( empty_vector ) ); + } + SECTION( "Empty container does not match non-empty container" ) { + const std::vector empty_vector; + const std::vector non_empty_vector{ 1 }; + CHECK_THAT( empty_vector, + !UnorderedRangeEquals( non_empty_vector ) ); + // ...and in reverse + CHECK_THAT( non_empty_vector, + !UnorderedRangeEquals( empty_vector ) ); + } + SECTION( "Two equal 1-length non-empty containers" ) { + const std::array non_empty_array{ { 1 } }; + CHECK_THAT( non_empty_array, + UnorderedRangeEquals( non_empty_array ) ); + } + SECTION( "Two equal-sized, equal, non-empty containers" ) { + const std::array array_a{ { 1, 2, 3 } }; + CHECK_THAT( array_a, UnorderedRangeEquals( array_a ) ); + } + SECTION( "Two equal-sized, non-equal, non-empty containers" ) { + const std::array array_a{ { 1, 2, 3 } }; + const std::array array_b{ { 2, 2, 3 } }; + CHECK_THAT( array_a, !UnorderedRangeEquals( array_b ) ); + } + SECTION( "Two non-equal-sized, non-empty containers" ) { + const std::vector vector_a{ 1, 2, 3 }; + const std::vector vector_b{ 1, 2, 3, 4 }; + CHECK_THAT( vector_a, !UnorderedRangeEquals( vector_b ) ); + } + } + + SECTION( "Custom predicate" ) { + + auto close_enough = []( int lhs, int rhs ) { + return std::abs( lhs - rhs ) <= 1; + }; + + SECTION( "Two equal non-empty containers (close enough)" ) { + const std::vector vector_a{ { 1, 10, 20 } }; + const std::vector vector_a_plus_1{ { 11, 21, 2 } }; + CHECK_THAT( vector_a, + UnorderedRangeEquals( vector_a_plus_1, close_enough ) ); + } + SECTION( "Two non-equal non-empty containers (close enough)" ) { + const std::vector vector_a{ { 1, 10, 21 } }; + const std::vector vector_b{ { 11, 21, 3 } }; + CHECK_THAT( vector_a, + !UnorderedRangeEquals( vector_b, close_enough ) ); + } + } + + + SECTION( "Ranges that need ADL begin/end" ) { + unrelated::needs_ADL_begin const + needs_adl1{ 1, 2, 3, 4, 5 }, + needs_adl2{ 1, 2, 3, 4, 5 }; + + REQUIRE_THAT( needs_adl1, UnorderedRangeEquals( needs_adl2 ) ); + } + + SECTION( "Compare against std::initializer_list" ) { + const std::array array_a{ { 1, 10, 20 } }; + + REQUIRE_THAT( array_a, UnorderedRangeEquals( { 10, 20, 1 } ) ); + REQUIRE_THAT( array_a, + UnorderedRangeEquals( { 11, 21, 2 }, []( int l, int r ) { + return std::abs( l - r ) <= 1; + } ) ); + } +} + +/** + * Return true if the type given has a random access iterator type. + */ +template +static constexpr bool ContainerIsRandomAccess( const Container& ) { + using array_iter_category = typename std::iterator_traits< + typename Container::iterator>::iterator_category; + + return std::is_base_of::value; +} + +TEST_CASE( "Type conversions of RangeEquals and similar", + "[matchers][templated][quantifiers]" ) { + using Catch::Matchers::RangeEquals; + using Catch::Matchers::UnorderedRangeEquals; + + // In these test, we can always test RangeEquals and + // UnorderedRangeEquals in the same way, since we're mostly + // testing the template type deductions (and RangeEquals + // implies UnorderedRangeEquals) + + SECTION( "Container conversions" ) { + SECTION( "Two equal containers of different container types" ) { + const std::array array_int_a{ { 1, 2, 3 } }; + const int c_array[3] = { 1, 2, 3 }; + CHECK_THAT( array_int_a, RangeEquals( c_array ) ); + CHECK_THAT( array_int_a, UnorderedRangeEquals( c_array ) ); + } + SECTION( "Two equal containers of different container types " + "(differ in array N)" ) { + const std::array array_int_3{ { 1, 2, 3 } }; + const std::array array_int_4{ { 1, 2, 3, 4 } }; + CHECK_THAT( array_int_3, !RangeEquals( array_int_4 ) ); + CHECK_THAT( array_int_3, !UnorderedRangeEquals( array_int_4 ) ); + } + SECTION( "Two equal containers of different container types and value " + "types" ) { + const std::array array_int_a{ { 1, 2, 3 } }; + const std::vector vector_char_a{ 1, 2, 3 }; + CHECK_THAT( array_int_a, RangeEquals( vector_char_a ) ); + CHECK_THAT( array_int_a, UnorderedRangeEquals( vector_char_a ) ); + } + SECTION( "Two equal containers, one random access, one not" ) { + const std::array array_int_a{ { 1, 2, 3 } }; + const std::list list_char_a{ 1, 2, 3 }; + + // Verify these types really are different in random access nature + STATIC_REQUIRE( ContainerIsRandomAccess( array_int_a ) != + ContainerIsRandomAccess( list_char_a ) ); + + CHECK_THAT( array_int_a, RangeEquals( list_char_a ) ); + CHECK_THAT( array_int_a, UnorderedRangeEquals( list_char_a ) ); + } + } + + SECTION( "Value type" ) { + SECTION( "Two equal containers of different value types" ) { + const std::vector vector_int_a{ 1, 2, 3 }; + const std::vector vector_char_a{ 1, 2, 3 }; + CHECK_THAT( vector_int_a, RangeEquals( vector_char_a ) ); + CHECK_THAT( vector_int_a, UnorderedRangeEquals( vector_char_a ) ); + } + SECTION( "Two non-equal containers of different value types" ) { + const std::vector vector_int_a{ 1, 2, 3 }; + const std::vector vector_char_b{ 1, 2, 2 }; + CHECK_THAT( vector_int_a, !RangeEquals( vector_char_b ) ); + CHECK_THAT( vector_int_a, !UnorderedRangeEquals( vector_char_b ) ); + } + } + + SECTION( "Ranges with begin that needs ADL" ) { + unrelated::needs_ADL_begin a{ 1, 2, 3 }, b{ 3, 2, 1 }; + REQUIRE_THAT( a, !RangeEquals( b ) ); + REQUIRE_THAT( a, UnorderedRangeEquals( b ) ); + } + + SECTION( "Custom predicate" ) { + + auto close_enough = []( int lhs, int rhs ) { + return std::abs( lhs - rhs ) <= 1; + }; + + SECTION( "Two equal non-empty containers (close enough)" ) { + const std::vector vector_a{ { 1, 2, 3 } }; + const std::array array_a_plus_1{ { 2, 3, 4 } }; + CHECK_THAT( vector_a, + RangeEquals( array_a_plus_1, close_enough ) ); + CHECK_THAT( vector_a, + UnorderedRangeEquals( array_a_plus_1, close_enough ) ); + } + } +} \ No newline at end of file diff --git a/tests/SelfTest/UsageTests/Message.tests.cpp b/tests/SelfTest/UsageTests/Message.tests.cpp new file mode 100644 index 0000000..7626e00 --- /dev/null +++ b/tests/SelfTest/UsageTests/Message.tests.cpp @@ -0,0 +1,312 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include + +TEST_CASE( "INFO and WARN do not abort tests", "[messages][.]" ) { + INFO( "this is a " << "message" ); // This should output the message if a failure occurs + WARN( "this is a " << "warning" ); // This should always output the message but then continue +} + +TEST_CASE( "#1455 - INFO and WARN can start with a linebreak", "[messages][.]" ) { + // Previously these would be hidden from the console reporter output, + // because it would fail at properly reflowing the text + INFO( "\nThis info message starts with a linebreak" ); + WARN( "\nThis warning message starts with a linebreak" ); +} + +TEST_CASE( "SUCCEED counts as a test pass", "[messages]" ) { + SUCCEED( "this is a " << "success" ); +} + +TEST_CASE( "INFO gets logged on failure", "[failing][messages][.]" ) { + INFO( "this message should be logged" ); + INFO( "so should this" ); + int a = 2; + REQUIRE( a == 1 ); +} + +TEST_CASE( "INFO gets logged on failure, even if captured before successful assertions", "[failing][messages][.]" ) { + INFO( "this message may be logged later" ); + int a = 2; + CHECK( a == 2 ); + + INFO( "this message should be logged" ); + + CHECK( a == 1 ); + + INFO( "and this, but later" ); + + CHECK( a == 0 ); + + INFO( "but not this" ); + + CHECK( a == 2 ); +} + +TEST_CASE( "FAIL aborts the test", "[failing][messages][.]" ) { + FAIL( "This is a " << "failure" ); // This should output the message and abort + WARN( "We should never see this"); +} + +TEST_CASE( "FAIL_CHECK does not abort the test", "[failing][messages][.]" ) { + FAIL_CHECK( "This is a " << "failure" ); // This should output the message then continue + WARN( "This message appears in the output"); +} + +TEST_CASE( "FAIL does not require an argument", "[failing][messages][.]" ) { + FAIL(); +} + +TEST_CASE( "SUCCEED does not require an argument", "[messages][.]" ) { + SUCCEED(); +} + +TEST_CASE( "Output from all sections is reported", "[failing][messages][.]" ) { + SECTION( "one" ) { + FAIL( "Message from section one" ); + } + + SECTION( "two" ) { + FAIL( "Message from section two" ); + } +} + +TEST_CASE( "Standard output from all sections is reported", "[messages][.]" ) { + SECTION( "one" ) { + std::cout << "Message from section one\n"; + } + + SECTION( "two" ) { + std::cout << "Message from section two\n"; + } +} + +TEST_CASE( "Standard error is reported and redirected", "[messages][.][approvals]" ) { + SECTION( "std::cerr" ) { + std::cerr << "Write to std::cerr\n"; + } + SECTION( "std::clog" ) { + std::clog << "Write to std::clog\n"; + } + SECTION( "Interleaved writes to cerr and clog" ) { + std::cerr << "Inter"; + std::clog << "leaved"; + std::cerr << ' '; + std::clog << "writes"; + std::cerr << " to error"; + std::clog << " streams\n" << std::flush; + } +} + +TEST_CASE( "INFO is reset for each loop", "[messages][failing][.]" ) { + for( int i=0; i<100; i++ ) + { + INFO( "current counter " << i ); + CAPTURE( i ); + REQUIRE( i < 10 ); + } +} + +TEST_CASE( "The NO_FAIL macro reports a failure but does not fail the test", "[messages]" ) { + CHECK_NOFAIL( 1 == 2 ); +} + +TEST_CASE( "just info", "[info][isolated info][messages]" ) { + INFO( "this should never be seen" ); +} +TEST_CASE( "just failure", "[fail][isolated info][.][messages]" ) { + FAIL( "Previous info should not be seen" ); +} + + +TEST_CASE( "sends information to INFO", "[.][failing]" ) { + INFO( "hi" ); + int i = 7; + CAPTURE( i ); + REQUIRE( false ); +} + +TEST_CASE( "Pointers can be converted to strings", "[messages][.][approvals]" ) { + int p; + WARN( "actual address of p: " << &p ); + WARN( "toString(p): " << ::Catch::Detail::stringify( &p ) ); +} + +template +static void unscoped_info( T msg ) { + UNSCOPED_INFO( msg ); +} + +TEST_CASE( "just unscoped info", "[unscoped][info]" ) { + unscoped_info( "this should NOT be seen" ); + unscoped_info( "this also should NOT be seen" ); +} + +TEST_CASE( "just failure after unscoped info", "[failing][.][unscoped][info]" ) { + FAIL( "previous unscoped info SHOULD not be seen" ); +} + +TEST_CASE( "print unscoped info if passing unscoped info is printed", "[unscoped][info]" ) { + unscoped_info( "this MAY be seen IF info is printed for passing assertions" ); + REQUIRE( true ); +} + +TEST_CASE( "prints unscoped info on failure", "[failing][.][unscoped][info]" ) { + unscoped_info( "this SHOULD be seen" ); + unscoped_info( "this SHOULD also be seen" ); + REQUIRE( false ); + unscoped_info( "but this should NOT be seen" ); +} + +TEST_CASE( "not prints unscoped info from previous failures", "[failing][.][unscoped][info]" ) { + unscoped_info( "this MAY be seen only for the FIRST assertion IF info is printed for passing assertions" ); + REQUIRE( true ); + unscoped_info( "this MAY be seen only for the SECOND assertion IF info is printed for passing assertions" ); + REQUIRE( true ); + unscoped_info( "this SHOULD be seen" ); + REQUIRE( false ); +} + +TEST_CASE( "prints unscoped info only for the first assertion", "[failing][.][unscoped][info]" ) { + unscoped_info( "this SHOULD be seen only ONCE" ); + CHECK( false ); + CHECK( true ); + unscoped_info( "this MAY also be seen only ONCE IF info is printed for passing assertions" ); + CHECK( true ); + CHECK( true ); +} + +TEST_CASE( "stacks unscoped info in loops", "[failing][.][unscoped][info]" ) { + UNSCOPED_INFO("Count 1 to 3..."); + for (int i = 1; i <= 3; i++) { + unscoped_info(i); + } + CHECK( false ); + + UNSCOPED_INFO("Count 4 to 6..."); + for (int i = 4; i <= 6; i++) { + unscoped_info(i); + } + CHECK( false ); +} + +TEST_CASE( "mix info, unscoped info and warning", "[unscoped][info]" ) { + INFO("info"); + unscoped_info("unscoped info"); + WARN("and warn may mix"); + WARN("they are not cleared after warnings"); +} + +TEST_CASE( "CAPTURE can deal with complex expressions", "[messages][capture]" ) { + int a = 1; + int b = 2; + int c = 3; + CAPTURE( a, b, c, a + b, a+b, c > b, a == 1 ); + SUCCEED(); +} + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-value" // In (1, 2), the "1" is unused ... +#endif +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-value" // All the comma operators are side-effect free +#endif +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable:4709) // comma in indexing operator +#endif + +template +struct helper_1436 { + helper_1436(T1 t1_, T2 t2_): + t1{ t1_ }, + t2{ t2_ } + {} + T1 t1; + T2 t2; +}; + +template +std::ostream& operator<<(std::ostream& out, helper_1436 const& helper) { + out << "{ " << helper.t1 << ", " << helper.t2 << " }"; + return out; +} + +// Clang and gcc have different names for this warning, and clang also +// warns about an unused value. This warning must be disabled for C++20. +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wpragmas" +#pragma GCC diagnostic ignored "-Wcomma-subscript" +#elif defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wunknown-warning-option" +#pragma clang diagnostic ignored "-Wdeprecated-comma-subscript" +#pragma clang diagnostic ignored "-Wunused-value" +#endif + +namespace { + template + struct custom_index_op { + constexpr custom_index_op( std::initializer_list ) {} + constexpr T operator[]( size_t ) { return T{}; } +#if defined( __cpp_multidimensional_subscript ) && \ + __cpp_multidimensional_subscript >= 202110L + constexpr T operator[]( size_t, size_t, size_t ) const noexcept { + return T{}; + } +#endif + }; +} + +TEST_CASE("CAPTURE can deal with complex expressions involving commas", "[messages][capture]") { + CAPTURE(custom_index_op{1, 2, 3}[0, 1, 2], + custom_index_op{1, 2, 3}[(0, 1)], + custom_index_op{1, 2, 3}[0]); + CAPTURE((helper_1436{12, -12}), + (helper_1436(-12, 12))); + CAPTURE( (1, 2), (2, 3) ); + SUCCEED(); +} + +#ifdef __GNUG__ +#pragma GCC diagnostic pop +#endif + +TEST_CASE("CAPTURE parses string and character constants", "[messages][capture]") { + CAPTURE(("comma, in string", "escaped, \", "), "single quote in string,',", "some escapes, \\,\\\\"); + CAPTURE("some, ), unmatched, } prenheses {[<"); + CAPTURE('"', '\'', ',', '}', ')', '(', '{'); + SUCCEED(); +} + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif +#ifdef _MSC_VER +#pragma warning(pop) +#endif + +TEST_CASE( "INFO and UNSCOPED_INFO can stream multiple arguments", + "[messages][info][.failing]" ) { + INFO( "This info" + << " has multiple" + << " parts." ); + UNSCOPED_INFO( "This unscoped info" + << " has multiple" + << " parts." ); + FAIL( "Show infos!" ); +} diff --git a/tests/SelfTest/UsageTests/Misc.tests.cpp b/tests/SelfTest/UsageTests/Misc.tests.cpp new file mode 100644 index 0000000..3697f06 --- /dev/null +++ b/tests/SelfTest/UsageTests/Misc.tests.cpp @@ -0,0 +1,560 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include +#include + + +#include +#include +#include +#include +#include + +namespace { + + static const char* makeString(bool makeNull) { + return makeNull ? nullptr : "valid string"; + } + static bool testCheckedIf(bool flag) { + CHECKED_IF(flag) + return true; + else + return false; + } + static bool testCheckedElse(bool flag) { + CHECKED_ELSE(flag) + return false; + + return true; + } + + static unsigned int Factorial(unsigned int number) { + return number > 1 ? Factorial(number - 1) * number : 1; + } + + static int f() { + return 1; + } + + static void manuallyRegisteredTestFunction() { + SUCCEED("was called"); + } + + struct AutoTestReg { + AutoTestReg() { + REGISTER_TEST_CASE(manuallyRegisteredTestFunction, "ManuallyRegistered"); + } + }; + + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS + static AutoTestReg autoTestReg; + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION + + template + struct Foo { + size_t size() { return 0; } + }; + + template + struct Bar { + size_t size() { return S; } + }; + +} + +TEST_CASE( "random SECTION tests", "[.][sections][failing]" ) { + int a = 1; + int b = 2; + + SECTION( "doesn't equal" ) { + REQUIRE( a != b ); + REQUIRE( b != a ); + } + + SECTION( "not equal" ) { + REQUIRE( a != b); + } +} + +TEST_CASE( "nested SECTION tests", "[.][sections][failing]" ) { + int a = 1; + int b = 2; + + SECTION( "doesn't equal" ) { + REQUIRE( a != b ); + REQUIRE( b != a ); + + SECTION( "not equal" ) { + REQUIRE( a != b); + } + } +} + +TEST_CASE( "more nested SECTION tests", "[sections][failing][.]" ) { + int a = 1; + int b = 2; + + SECTION( "doesn't equal" ) { + SECTION( "equal" ) { + REQUIRE( a == b ); + } + + SECTION( "not equal" ) { + REQUIRE( a != b ); + } + SECTION( "less than" ) { + REQUIRE( a < b ); + } + } +} + +TEST_CASE( "even more nested SECTION tests", "[sections]" ) { + SECTION( "c" ) { + SECTION( "d (leaf)" ) { + SUCCEED(); // avoid failing due to no tests + } + + SECTION( "e (leaf)" ) { + SUCCEED(); // avoid failing due to no tests + } + } + + SECTION( "f (leaf)" ) { + SUCCEED(); // avoid failing due to no tests + } +} + +TEST_CASE( "looped SECTION tests", "[.][failing][sections]" ) { + int a = 1; + + for( int b = 0; b < 10; ++b ) { + DYNAMIC_SECTION( "b is currently: " << b ) { + CHECK( b > a ); + } + } +} + +TEST_CASE( "looped tests", "[.][failing]" ) { + static const int fib[] = { 1, 1, 2, 3, 5, 8, 13, 21 }; + + for( std::size_t i=0; i < sizeof(fib)/sizeof(int); ++i ) { + INFO( "Testing if fib[" << i << "] (" << fib[i] << ") is even" ); + CHECK( ( fib[i] % 2 ) == 0 ); + } +} + +TEST_CASE( "Sends stuff to stdout and stderr", "[.]" ) { + std::cout << "A string sent directly to stdout\n" << std::flush; + std::cerr << "A string sent directly to stderr\n" << std::flush; + std::clog << "A string sent to stderr via clog\n" << std::flush; +} + +TEST_CASE( "null strings" ) { + REQUIRE( makeString( false ) != static_cast(nullptr)); + REQUIRE( makeString( true ) == static_cast(nullptr)); +} + +TEST_CASE( "checkedIf" ) { + REQUIRE( testCheckedIf( true ) ); +} + +TEST_CASE( "checkedIf, failing", "[failing][.]" ) { + REQUIRE( testCheckedIf( false ) ); +} + +TEST_CASE( "checkedElse" ) { + REQUIRE( testCheckedElse( true ) ); +} + +TEST_CASE( "checkedElse, failing", "[failing][.]" ) { + REQUIRE( testCheckedElse( false ) ); +} + +TEST_CASE("Testing checked-if", "[checked-if]") { + CHECKED_IF(true) { + SUCCEED(); + } + CHECKED_IF(false) { + FAIL(); + } + CHECKED_ELSE(true) { + FAIL(); + } + CHECKED_ELSE(false) { + SUCCEED(); + } +} + +TEST_CASE("Testing checked-if 2", "[checked-if][!shouldfail]") { + CHECKED_IF(true) { + FAIL(); + } + // If the checked if is not entered, this passes and the test + // fails, because of the [!shouldfail] tag. + SUCCEED(); +} + +TEST_CASE("Testing checked-if 3", "[checked-if][!shouldfail]") { + CHECKED_ELSE(false) { + FAIL(); + } + // If the checked false is not entered, this passes and the test + // fails, because of the [!shouldfail] tag. + SUCCEED(); +} + +[[noreturn]] +TEST_CASE("Testing checked-if 4", "[checked-if][!shouldfail]") { + CHECKED_ELSE(true) {} + throw std::runtime_error("Uncaught exception should fail!"); +} + +[[noreturn]] +TEST_CASE("Testing checked-if 5", "[checked-if][!shouldfail]") { + CHECKED_ELSE(false) {} + throw std::runtime_error("Uncaught exception should fail!"); +} + +TEST_CASE( "xmlentitycheck" ) { + SECTION( "embedded xml: it should be possible to embed xml characters, such as <, \" or &, or even whole documents within an attribute" ) { + SUCCEED(); // We need this here to stop it failing due to no tests + } + SECTION( "encoded chars: these should all be encoded: &&&\"\"\"<<<&\"<<&\"" ) { + SUCCEED(); // We need this here to stop it failing due to no tests + } +} + +TEST_CASE( "send a single char to INFO", "[failing][.]" ) { + INFO(3); + REQUIRE(false); +} + +TEST_CASE( "Factorials are computed", "[factorial]" ) { + REQUIRE( Factorial(0) == 1 ); + REQUIRE( Factorial(1) == 1 ); + REQUIRE( Factorial(2) == 2 ); + REQUIRE( Factorial(3) == 6 ); + REQUIRE( Factorial(10) == 3628800 ); +} + +TEST_CASE( "An empty test with no assertions", "[empty]" ) {} + +TEST_CASE( "Nice descriptive name", "[tag1][tag2][tag3][.]" ) { + WARN( "This one ran" ); +} +TEST_CASE( "first tag", "[tag1]" ) {} +TEST_CASE( "second tag", "[tag2]" ) {} + +TEST_CASE( "vectors can be sized and resized", "[vector]" ) { + + std::vector v( 5 ); + + REQUIRE( v.size() == 5 ); + REQUIRE( v.capacity() >= 5 ); + + SECTION( "resizing bigger changes size and capacity" ) { + v.resize( 10 ); + + REQUIRE( v.size() == 10 ); + REQUIRE( v.capacity() >= 10 ); + } + SECTION( "resizing smaller changes size but not capacity" ) { + v.resize( 0 ); + + REQUIRE( v.size() == 0 ); + REQUIRE( v.capacity() >= 5 ); + + SECTION( "We can use the 'swap trick' to reset the capacity" ) { + std::vector empty; + empty.swap( v ); + + REQUIRE( v.capacity() == 0 ); + } + } + SECTION( "reserving bigger changes capacity but not size" ) { + v.reserve( 10 ); + + REQUIRE( v.size() == 5 ); + REQUIRE( v.capacity() >= 10 ); + } + SECTION( "reserving smaller does not change size or capacity" ) { + v.reserve( 0 ); + + REQUIRE( v.size() == 5 ); + REQUIRE( v.capacity() >= 5 ); + } +} + +TEMPLATE_TEST_CASE( "TemplateTest: vectors can be sized and resized", "[vector][template]", int, float, std::string, (std::tuple) ) { + + std::vector v( 5 ); + + REQUIRE( v.size() == 5 ); + REQUIRE( v.capacity() >= 5 ); + + SECTION( "resizing bigger changes size and capacity" ) { + v.resize( 10 ); + + REQUIRE( v.size() == 10 ); + REQUIRE( v.capacity() >= 10 ); + } + SECTION( "resizing smaller changes size but not capacity" ) { + v.resize( 0 ); + + REQUIRE( v.size() == 0 ); + REQUIRE( v.capacity() >= 5 ); + + SECTION( "We can use the 'swap trick' to reset the capacity" ) { + std::vector empty; + empty.swap( v ); + + REQUIRE( v.capacity() == 0 ); + } + } + SECTION( "reserving bigger changes capacity but not size" ) { + v.reserve( 10 ); + + REQUIRE( v.size() == 5 ); + REQUIRE( v.capacity() >= 10 ); + } + SECTION( "reserving smaller does not change size or capacity" ) { + v.reserve( 0 ); + + REQUIRE( v.size() == 5 ); + REQUIRE( v.capacity() >= 5 ); + } +} + +TEMPLATE_TEST_CASE_SIG("TemplateTestSig: vectors can be sized and resized", "[vector][template][nttp]", ((typename TestType, int V), TestType, V), (int,5), (float,4), (std::string,15), ((std::tuple), 6)) { + + std::vector v(V); + + REQUIRE(v.size() == V); + REQUIRE(v.capacity() >= V); + + SECTION("resizing bigger changes size and capacity") { + v.resize(2 * V); + + REQUIRE(v.size() == 2 * V); + REQUIRE(v.capacity() >= 2 * V); + } + SECTION("resizing smaller changes size but not capacity") { + v.resize(0); + + REQUIRE(v.size() == 0); + REQUIRE(v.capacity() >= V); + + SECTION("We can use the 'swap trick' to reset the capacity") { + std::vector empty; + empty.swap(v); + + REQUIRE(v.capacity() == 0); + } + } + SECTION("reserving bigger changes capacity but not size") { + v.reserve(2 * V); + + REQUIRE(v.size() == V); + REQUIRE(v.capacity() >= 2 * V); + } + SECTION("reserving smaller does not change size or capacity") { + v.reserve(0); + + REQUIRE(v.size() == V); + REQUIRE(v.capacity() >= V); + } +} + +TEMPLATE_PRODUCT_TEST_CASE("A Template product test case", "[template][product]", (std::vector, Foo), (int, float)) { + TestType x; + REQUIRE(x.size() == 0); +} + +TEMPLATE_PRODUCT_TEST_CASE_SIG("A Template product test case with array signature", "[template][product][nttp]", ((typename T, size_t S), T, S), (std::array, Bar), ((int, 9), (float, 42))) { + TestType x; + REQUIRE(x.size() > 0); +} + +TEMPLATE_PRODUCT_TEST_CASE("Product with differing arities", "[template][product]", std::tuple, (int, (int, double), (int, double, float))) { + REQUIRE(std::tuple_size::value >= 1); +} + +using MyTypes = std::tuple; +TEMPLATE_LIST_TEST_CASE("Template test case with test types specified inside std::tuple", "[template][list]", MyTypes) +{ + REQUIRE(std::is_arithmetic::value); +} + +struct NonDefaultConstructibleType { + NonDefaultConstructibleType() = delete; +}; + +using MyNonDefaultConstructibleTypes = std::tuple; +TEMPLATE_LIST_TEST_CASE("Template test case with test types specified inside non-default-constructible std::tuple", "[template][list]", MyNonDefaultConstructibleTypes) +{ + REQUIRE(std::is_trivially_copyable::value); +} + +struct NonCopyableAndNonMovableType { + NonCopyableAndNonMovableType() = default; + + NonCopyableAndNonMovableType(NonCopyableAndNonMovableType const &) = delete; + NonCopyableAndNonMovableType(NonCopyableAndNonMovableType &&) = delete; + auto operator=(NonCopyableAndNonMovableType const &) -> NonCopyableAndNonMovableType & = delete; + auto operator=(NonCopyableAndNonMovableType &&) -> NonCopyableAndNonMovableType & = delete; +}; + +using NonCopyableAndNonMovableTypes = std::tuple; +TEMPLATE_LIST_TEST_CASE("Template test case with test types specified inside non-copyable and non-movable std::tuple", "[template][list]", NonCopyableAndNonMovableTypes) +{ + REQUIRE(std::is_default_constructible::value); +} + +// https://github.com/philsquared/Catch/issues/166 +TEST_CASE("A couple of nested sections followed by a failure", "[failing][.]") { + SECTION("Outer") + SECTION("Inner") + SUCCEED("that's not flying - that's failing in style"); + + FAIL("to infinity and beyond"); +} + +TEST_CASE("not allowed", "[!throws]") { + // This test case should not be included if you run with -e on the command line + SUCCEED(); +} + +TEST_CASE( "Tabs and newlines show in output", "[.][whitespace][failing]" ) { + + // Based on issue #242 + std::string s1 = "if ($b == 10) {\n\t\t$a\t= 20;\n}"; + std::string s2 = "if ($b == 10) {\n\t$a = 20;\n}\n"; + CHECK( s1 == s2 ); +} + + +#if defined(CATCH_CONFIG_WCHAR) +TEST_CASE( "toString on const wchar_t const pointer returns the string contents", "[toString]" ) { + const wchar_t * const s = L"wide load"; + std::string result = ::Catch::Detail::stringify( s ); + CHECK( result == "\"wide load\"" ); +} + +TEST_CASE( "toString on const wchar_t pointer returns the string contents", "[toString]" ) { + const wchar_t * s = L"wide load"; + std::string result = ::Catch::Detail::stringify( s ); + CHECK( result == "\"wide load\"" ); +} + +TEST_CASE( "toString on wchar_t const pointer returns the string contents", "[toString]" ) { + auto const s = const_cast( L"wide load" ); + std::string result = ::Catch::Detail::stringify( s ); + CHECK( result == "\"wide load\"" ); +} + +TEST_CASE( "toString on wchar_t returns the string contents", "[toString]" ) { + auto s = const_cast( L"wide load" ); + std::string result = ::Catch::Detail::stringify( s ); + CHECK( result == "\"wide load\"" ); +} +#endif // CATCH_CONFIG_WCHAR + +TEST_CASE( "long long" ) { + constexpr long long l = std::numeric_limits::max(); + + REQUIRE( l == std::numeric_limits::max() ); +} + +TEST_CASE( "This test 'should' fail but doesn't", "[.][failing][!shouldfail]" ) { + SUCCEED( "oops!" ); +} + +TEST_CASE( "# A test name that starts with a #" ) { + SUCCEED( "yay" ); +} + +TEST_CASE( "#835 -- errno should not be touched by Catch2", "[.][failing][!shouldfail]" ) { + errno = 1; + // Check that reporting failed test doesn't change errno. + CHECK(f() == 0); + // We want to avoid expanding `errno` macro in assertion, because + // we capture the expression after macro expansion, and would have + // to normalize the ways different platforms spell `errno`. + const auto errno_after = errno; + REQUIRE(errno_after == 1); +} + +TEST_CASE( "#961 -- Dynamically created sections should all be reported", "[.]" ) { + for (char i = '0'; i < '5'; ++i) { + SECTION(std::string("Looped section ") + i) { + SUCCEED( "Everything is OK" ); + } + } +} + +TEST_CASE( "#1175 - Hidden Test", "[.]" ) { + // Just for checking that hidden test is not listed by default + SUCCEED(); +} + +TEMPLATE_TEST_CASE_SIG("#1954 - 7 arg template test case sig compiles", "[regression][.compilation]", + ((int Tnx, int Tnu, int Tny, int Tph, int Tch, int Tineq, int Teq), Tnx, Tnu, Tny, Tph, Tch, Tineq, Teq), + (1, 1, 1, 1, 1, 0, 0), (5, 1, 1, 1, 1, 0, 0), (5, 3, 1, 1, 1, 0, 0)) { + SUCCEED(); +} + +TEST_CASE("Same test name but with different tags is fine", "[.approvals][some-tag]") {} +TEST_CASE("Same test name but with different tags is fine", "[.approvals][other-tag]") {} + +// MinGW doesn't support __try, and Clang has only very partial support +#if defined(_MSC_VER) +void throw_and_catch() +{ + __try { + RaiseException(0xC0000005, 0, 0, NULL); + } + __except (1) + { + + } +} + + +TEST_CASE("Validate SEH behavior - handled", "[approvals][FatalConditionHandler][CATCH_PLATFORM_WINDOWS]") +{ + // Validate that Catch2 framework correctly handles tests raising and handling SEH exceptions. + throw_and_catch(); +} + +void throw_no_catch() +{ + RaiseException(0xC0000005, 0, 0, NULL); +} + +TEST_CASE("Validate SEH behavior - unhandled", "[.approvals][FatalConditionHandler][CATCH_PLATFORM_WINDOWS]") +{ + // Validate that Catch2 framework correctly handles tests raising and not handling SEH exceptions. + throw_no_catch(); +} + +static LONG CALLBACK dummyExceptionFilter(PEXCEPTION_POINTERS ExceptionInfo) { + return EXCEPTION_CONTINUE_SEARCH; +} + +TEST_CASE("Validate SEH behavior - no crash for stack unwinding", "[approvals][!throws][!shouldfail][FatalConditionHandler][CATCH_PLATFORM_WINDOWS]") +{ + // Trigger stack unwinding with SEH top-level filter changed and validate the test fails expectedly with no application crash + SetUnhandledExceptionFilter(dummyExceptionFilter); + throw 1; +} + +#endif // _MSC_VER diff --git a/tests/SelfTest/UsageTests/Skip.tests.cpp b/tests/SelfTest/UsageTests/Skip.tests.cpp new file mode 100644 index 0000000..661795e --- /dev/null +++ b/tests/SelfTest/UsageTests/Skip.tests.cpp @@ -0,0 +1,100 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include + +#include + +TEST_CASE( "tests can be skipped dynamically at runtime", "[skipping]" ) { + SKIP(); + FAIL( "this is not reached" ); +} + +TEST_CASE( "skipped tests can optionally provide a reason", "[skipping]" ) { + const int answer = 43; + SKIP( "skipping because answer = " << answer ); + FAIL( "this is not reached" ); +} + +TEST_CASE( "sections can be skipped dynamically at runtime", "[skipping]" ) { + SECTION( "not skipped" ) { SUCCEED(); } + SECTION( "skipped" ) { SKIP(); } + SECTION( "also not skipped" ) { SUCCEED(); } +} + +TEST_CASE( "nested sections can be skipped dynamically at runtime", + "[skipping]" ) { + SECTION( "A" ) { std::cout << "a"; } + SECTION( "B" ) { + SECTION( "B1" ) { std::cout << "b1"; } + SECTION( "B2" ) { SKIP(); } + } + std::cout << "!\n"; +} + +TEST_CASE( "dynamic skipping works with generators", "[skipping]" ) { + const int answer = GENERATE( 41, 42, 43 ); + if ( answer != 42 ) { SKIP( "skipping because answer = " << answer ); } + SUCCEED(); +} + +TEST_CASE( "failed assertions before SKIP cause test case to fail", + "[skipping][!shouldfail]" ) { + CHECK( 3 == 4 ); + SKIP(); +} + +TEST_CASE( "a succeeding test can still be skipped", + "[skipping][!shouldfail]" ) { + SUCCEED(); + SKIP(); +} + +TEST_CASE( "failing in some unskipped sections causes entire test case to fail", + "[skipping][!shouldfail]" ) { + SECTION( "skipped" ) { SKIP(); } + SECTION( "not skipped" ) { FAIL(); } +} + +TEST_CASE( "failing for some generator values causes entire test case to fail", + "[skipping][!shouldfail]" ) { + int i = GENERATE( 1, 2, 3, 4 ); + if ( i % 2 == 0 ) { + SKIP(); + } else { + FAIL(); + } +} + +namespace { + class test_skip_generator : public Catch::Generators::IGenerator { + public: + explicit test_skip_generator() { SKIP( "This generator is empty" ); } + + auto get() const -> int const& override { + static constexpr int value = 1; + return value; + } + + auto next() -> bool override { return false; } + }; + + static auto make_test_skip_generator() + -> Catch::Generators::GeneratorWrapper { + return { new test_skip_generator() }; + } + +} // namespace + +TEST_CASE( "Empty generators can SKIP in constructor", "[skipping]" ) { + // The generator signals emptiness with `SKIP` + auto sample = GENERATE( make_test_skip_generator() ); + // This assertion would fail, but shouldn't trigger + REQUIRE( sample == 0 ); +} diff --git a/tests/SelfTest/UsageTests/ToStringByte.tests.cpp b/tests/SelfTest/UsageTests/ToStringByte.tests.cpp new file mode 100644 index 0000000..624abbf --- /dev/null +++ b/tests/SelfTest/UsageTests/ToStringByte.tests.cpp @@ -0,0 +1,23 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include + +#if defined(CATCH_CONFIG_CPP17_BYTE) + +TEST_CASE( "std::byte -> toString", "[toString][byte][approvals]" ) { + using type = std::byte; + REQUIRE( "0" == ::Catch::Detail::stringify( type{ 0 } ) ); +} + +TEST_CASE( "std::vector -> toString", "[toString][byte][approvals]" ) { + using type = std::vector; + REQUIRE( "{ 0, 1, 2 }" == ::Catch::Detail::stringify( type{ std::byte{0}, std::byte{1}, std::byte{2} } ) ); +} + +#endif // CATCH_INTERNAL_CONFIG_CPP17_BYTE diff --git a/tests/SelfTest/UsageTests/ToStringChrono.tests.cpp b/tests/SelfTest/UsageTests/ToStringChrono.tests.cpp new file mode 100644 index 0000000..744b899 --- /dev/null +++ b/tests/SelfTest/UsageTests/ToStringChrono.tests.cpp @@ -0,0 +1,51 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include + +#include +#include + +TEST_CASE("Stringifying std::chrono::duration helpers", "[toString][chrono]") { + // No literals because we still support c++11 + auto hour = std::chrono::hours(1); + auto minute = std::chrono::minutes(1); + auto seconds = std::chrono::seconds(60); + auto micro = std::chrono::microseconds(1); + auto milli = std::chrono::milliseconds(1); + auto nano = std::chrono::nanoseconds(1); + REQUIRE(minute == seconds); + REQUIRE(hour != seconds); + REQUIRE(micro != milli); + REQUIRE(nano != micro); +} + +TEST_CASE("Stringifying std::chrono::duration with weird ratios", "[toString][chrono]") { + std::chrono::duration> half_minute(1); + std::chrono::duration> pico_second(1); + std::chrono::duration> femto_second(1); + std::chrono::duration> atto_second(1); + REQUIRE(half_minute != femto_second); + REQUIRE(pico_second != atto_second); +} + +TEST_CASE("Stringifying std::chrono::time_point", "[toString][chrono]") { + auto now = std::chrono::system_clock::now(); + auto later = now + std::chrono::minutes(2); + REQUIRE(now != later); +} + +TEST_CASE("Stringifying std::chrono::time_point", "[toString][chrono][!nonportable]") { + auto now = std::chrono::high_resolution_clock::now(); + auto later = now + std::chrono::minutes(2); + REQUIRE(now != later); + + auto now2 = std::chrono::steady_clock::now(); + auto later2 = now2 + std::chrono::minutes(2); + REQUIRE(now2 != later2); +} diff --git a/tests/SelfTest/UsageTests/ToStringGeneral.tests.cpp b/tests/SelfTest/UsageTests/ToStringGeneral.tests.cpp new file mode 100644 index 0000000..78c0c80 --- /dev/null +++ b/tests/SelfTest/UsageTests/ToStringGeneral.tests.cpp @@ -0,0 +1,200 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#define CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER +#include + +#include +#include + +TEST_CASE( "Character pretty printing" ){ + SECTION("Specifically escaped"){ + CHECK(::Catch::Detail::stringify('\t') == "'\\t'"); + CHECK(::Catch::Detail::stringify('\n') == "'\\n'"); + CHECK(::Catch::Detail::stringify('\r') == "'\\r'"); + CHECK(::Catch::Detail::stringify('\f') == "'\\f'"); + } + SECTION("General chars"){ + CHECK(::Catch::Detail::stringify( ' ' ) == "' '" ); + CHECK(::Catch::Detail::stringify( 'A' ) == "'A'" ); + CHECK(::Catch::Detail::stringify( 'z' ) == "'z'" ); + } + SECTION("Low ASCII"){ + CHECK(::Catch::Detail::stringify( '\0' ) == "0" ); + CHECK(::Catch::Detail::stringify( static_cast(2) ) == "2" ); + CHECK(::Catch::Detail::stringify( static_cast(5) ) == "5" ); + } +} + + +TEST_CASE( "Capture and info messages" ) { + SECTION("Capture should stringify like assertions") { + int i = 2; + CAPTURE(i); + REQUIRE(true); + } + SECTION("Info should NOT stringify the way assertions do") { + int i = 3; + INFO(i); + REQUIRE(true); + } +} + +TEST_CASE( "std::map is convertible string", "[toString]" ) { + + SECTION( "empty" ) { + std::map emptyMap; + + REQUIRE( Catch::Detail::stringify( emptyMap ) == "{ }" ); + } + + SECTION( "single item" ) { + std::map map = { { "one", 1 } }; + + REQUIRE( Catch::Detail::stringify( map ) == "{ { \"one\", 1 } }" ); + } + + SECTION( "several items" ) { + std::map map = { + { "abc", 1 }, + { "def", 2 }, + { "ghi", 3 } + }; + + REQUIRE( Catch::Detail::stringify( map ) == "{ { \"abc\", 1 }, { \"def\", 2 }, { \"ghi\", 3 } }" ); + } +} + +TEST_CASE( "std::set is convertible string", "[toString]" ) { + + SECTION( "empty" ) { + std::set emptySet; + + REQUIRE( Catch::Detail::stringify( emptySet ) == "{ }" ); + } + + SECTION( "single item" ) { + std::set set = { "one" }; + + REQUIRE( Catch::Detail::stringify( set ) == "{ \"one\" }" ); + } + + SECTION( "several items" ) { + std::set set = { "abc", "def", "ghi" }; + + REQUIRE( Catch::Detail::stringify( set ) == "{ \"abc\", \"def\", \"ghi\" }" ); + } +} + +TEST_CASE("Static arrays are convertible to string", "[toString]") { + SECTION("Single item") { + int singular[1] = { 1 }; + REQUIRE(Catch::Detail::stringify(singular) == "{ 1 }"); + } + SECTION("Multiple") { + int arr[3] = { 3, 2, 1 }; + REQUIRE(Catch::Detail::stringify(arr) == "{ 3, 2, 1 }"); + } + SECTION("Non-trivial inner items") { + std::vector arr[2] = { {"1:1", "1:2", "1:3"}, {"2:1", "2:2"} }; + REQUIRE(Catch::Detail::stringify(arr) == R"({ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } })"); + } +} + +#ifdef CATCH_CONFIG_CPP17_STRING_VIEW + +TEST_CASE("String views are stringified like other strings", "[toString][approvals]") { + std::string_view view{"abc"}; + CHECK(Catch::Detail::stringify(view) == R"("abc")"); + + std::string_view arr[] { view }; + CHECK(Catch::Detail::stringify(arr) == R"({ "abc" })"); +} + +#endif + +TEST_CASE("Precision of floating point stringification can be set", "[toString][floatingPoint]") { + SECTION("Floats") { + using sm = Catch::StringMaker; + const auto oldPrecision = sm::precision; + + const float testFloat = 1.12345678901234567899f; + sm::precision = 5; + auto str1 = sm::convert( testFloat ); + // "1." prefix = 2 chars, f suffix is another char + CHECK(str1.size() == 3 + 5); + + sm::precision = 10; + auto str2 = sm::convert(testFloat); + REQUIRE(str2.size() == 3 + 10); + sm::precision = oldPrecision; + } + SECTION("Double") { + using sm = Catch::StringMaker; + const auto oldPrecision = sm::precision; + + const double testDouble = 1.123456789012345678901234567899; + sm::precision = 5; + auto str1 = sm::convert(testDouble); + // "1." prefix = 2 chars + CHECK(str1.size() == 2 + 5); + + sm::precision = 15; + auto str2 = sm::convert(testDouble); + REQUIRE(str2.size() == 2 + 15); + + sm::precision = oldPrecision; + } +} + +namespace { + +struct WhatException : std::exception { + char const* what() const noexcept override { + return "This exception has overridden what() method"; + } + ~WhatException() override; +}; + +struct OperatorException : std::exception { + ~OperatorException() override; +}; + +std::ostream& operator<<(std::ostream& out, OperatorException const&) { + out << "OperatorException"; + return out; +} + +struct StringMakerException : std::exception { + ~StringMakerException() override; +}; + +} // end anonymous namespace + +namespace Catch { +template <> +struct StringMaker { + static std::string convert(StringMakerException const&) { + return "StringMakerException"; + } +}; +} + +// Avoid -Wweak-tables +WhatException::~WhatException() = default; +OperatorException::~OperatorException() = default; +StringMakerException::~StringMakerException() = default; + + + + +TEST_CASE("Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified", "[toString][exception]") { + REQUIRE(::Catch::Detail::stringify(WhatException{}) == "This exception has overridden what() method"); + REQUIRE(::Catch::Detail::stringify(OperatorException{}) == "OperatorException"); + REQUIRE(::Catch::Detail::stringify(StringMakerException{}) == "StringMakerException"); +} diff --git a/tests/SelfTest/UsageTests/ToStringOptional.tests.cpp b/tests/SelfTest/UsageTests/ToStringOptional.tests.cpp new file mode 100644 index 0000000..3671771 --- /dev/null +++ b/tests/SelfTest/UsageTests/ToStringOptional.tests.cpp @@ -0,0 +1,35 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#define CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER +#include + +#if defined(CATCH_CONFIG_CPP17_OPTIONAL) + +TEST_CASE( "std::optional -> toString", "[toString][optional][approvals]" ) { + using type = std::optional; + REQUIRE( "{ }" == ::Catch::Detail::stringify( type{} ) ); + REQUIRE( "0" == ::Catch::Detail::stringify( type{ 0 } ) ); +} + +TEST_CASE( "std::optional -> toString", "[toString][optional][approvals]" ) { + using type = std::optional; + REQUIRE( "{ }" == ::Catch::Detail::stringify( type{} ) ); + REQUIRE( "\"abc\"" == ::Catch::Detail::stringify( type{ "abc" } ) ); +} + +TEST_CASE( "std::vector > -> toString", "[toString][optional][approvals]" ) { + using type = std::vector >; + REQUIRE( "{ 0, { }, 2 }" == ::Catch::Detail::stringify( type{ 0, {}, 2 } ) ); +} + +TEST_CASE( "std::nullopt -> toString", "[toString][optional][approvals]" ) { + REQUIRE( "{ }" == ::Catch::Detail::stringify( std::nullopt ) ); +} + +#endif // CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL diff --git a/tests/SelfTest/UsageTests/ToStringPair.tests.cpp b/tests/SelfTest/UsageTests/ToStringPair.tests.cpp new file mode 100644 index 0000000..f5cb239 --- /dev/null +++ b/tests/SelfTest/UsageTests/ToStringPair.tests.cpp @@ -0,0 +1,38 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#define CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER +#include + +TEST_CASE( "std::pair -> toString", "[toString][pair]" ) { + std::pair value( 34, "xyzzy" ); + REQUIRE( ::Catch::Detail::stringify( value ) == "{ 34, \"xyzzy\" }" ); +} + +TEST_CASE( "std::pair -> toString", "[toString][pair]" ) { + std::pair value( 34, "xyzzy" ); + REQUIRE( ::Catch::Detail::stringify(value) == "{ 34, \"xyzzy\" }" ); +} + +TEST_CASE( "std::vector > -> toString", "[toString][pair]" ) { + std::vector > pr; + pr.push_back( std::make_pair("green", 55 ) ); + REQUIRE( ::Catch::Detail::stringify( pr ) == "{ { \"green\", 55 } }" ); +} + +// This is pretty contrived - I figure if this works, anything will... +TEST_CASE( "pair > -> toString", "[toString][pair]" ) { + typedef std::pair left_t; + typedef std::pair right_t; + + left_t left( 42, "Arthur" ); + right_t right( "Ford", 24 ); + + std::pair pair( left, right ); + REQUIRE( ::Catch::Detail::stringify( pair ) == "{ { 42, \"Arthur\" }, { \"Ford\", 24 } }" ); +} diff --git a/tests/SelfTest/UsageTests/ToStringTuple.tests.cpp b/tests/SelfTest/UsageTests/ToStringTuple.tests.cpp new file mode 100644 index 0000000..9d1d2c4 --- /dev/null +++ b/tests/SelfTest/UsageTests/ToStringTuple.tests.cpp @@ -0,0 +1,54 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#define CATCH_CONFIG_ENABLE_TUPLE_STRINGMAKER +#include + +#include + +TEST_CASE( "tuple<>", "[toString][tuple]" ) +{ + typedef std::tuple<> type; + CHECK( "{ }" == ::Catch::Detail::stringify(type{}) ); + type value {}; + CHECK( "{ }" == ::Catch::Detail::stringify(value) ); +} + +TEST_CASE( "tuple", "[toString][tuple]" ) +{ + typedef std::tuple type; + CHECK( "{ 0 }" == ::Catch::Detail::stringify(type{0}) ); +} + + +TEST_CASE( "tuple", "[toString][tuple]" ) +{ + typedef std::tuple type; + CHECK( "1.5f" == ::Catch::Detail::stringify(float(1.5)) ); + CHECK( "{ 1.5f, 0 }" == ::Catch::Detail::stringify(type{1.5f,0}) ); +} + +TEST_CASE( "tuple", "[toString][tuple]" ) +{ + typedef std::tuple type; + CHECK( "{ \"hello\", \"world\" }" == ::Catch::Detail::stringify(type{"hello","world"}) ); +} + +TEST_CASE( "tuple,tuple<>,float>", "[toString][tuple]" ) +{ + typedef std::tuple,std::tuple<>,float> type; + type value { std::tuple{42}, {}, 1.5f }; + CHECK( "{ { 42 }, { }, 1.5f }" == ::Catch::Detail::stringify(value) ); +} + +TEST_CASE( "tuple", "[approvals][toString][tuple]" ) { + typedef std::tuple type; + type value { nullptr, 42, "Catch me" }; + CHECK( "{ nullptr, 42, \"Catch me\" }" == ::Catch::Detail::stringify(value) ); +} + diff --git a/tests/SelfTest/UsageTests/ToStringVariant.tests.cpp b/tests/SelfTest/UsageTests/ToStringVariant.tests.cpp new file mode 100644 index 0000000..197ba55 --- /dev/null +++ b/tests/SelfTest/UsageTests/ToStringVariant.tests.cpp @@ -0,0 +1,99 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#define CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER +#include + +#if defined(CATCH_CONFIG_CPP17_VARIANT) + +#include +#include + +// We need 2 types with non-trivial copies/moves +struct MyType1 { + MyType1() = default; + [[noreturn]] MyType1(MyType1 const&) { throw 1; } + MyType1& operator=(MyType1 const&) { throw 3; } +}; +struct MyType2 { + MyType2() = default; + [[noreturn]] MyType2(MyType2 const&) { throw 2; } + MyType2& operator=(MyType2 const&) { throw 4; } +}; + +TEST_CASE( "variant", "[toString][variant][approvals]") +{ + using type = std::variant; + CHECK( "{ }" == ::Catch::Detail::stringify(type{}) ); + type value {}; + CHECK( "{ }" == ::Catch::Detail::stringify(value) ); + CHECK( "{ }" == ::Catch::Detail::stringify(std::get<0>(value)) ); +} + +TEST_CASE( "variant", "[toString][variant][approvals]") +{ + using type = std::variant; + CHECK( "0" == ::Catch::Detail::stringify(type{0}) ); +} + +TEST_CASE( "variant", "[toString][variant][approvals]") +{ + using type = std::variant; + CHECK( "0.5f" == ::Catch::Detail::stringify(type{0.5f}) ); + CHECK( "0" == ::Catch::Detail::stringify(type{0}) ); +} + +TEST_CASE( "variant -- valueless-by-exception", "[toString][variant][approvals]" ) { + using type = std::variant; + + type value; + REQUIRE_THROWS_AS(value.emplace(MyType2{}), int); + REQUIRE(value.valueless_by_exception()); + CHECK("{valueless variant}" == ::Catch::Detail::stringify(value)); +} + + +TEST_CASE( "variant", "[toString][variant][approvals]") +{ + using type = std::variant; + CHECK( "\"foo\"" == ::Catch::Detail::stringify(type{"foo"}) ); + CHECK( "0" == ::Catch::Detail::stringify(type{0}) ); +} + +TEST_CASE( "variant, string>", "[toString][variant][approvals]") +{ + using inner = std::variant; + using type = std::variant; + CHECK( "0.5f" == ::Catch::Detail::stringify(type{0.5f}) ); + CHECK( "0" == ::Catch::Detail::stringify(type{0}) ); + CHECK( "\"foo\"" == ::Catch::Detail::stringify(type{"foo"}) ); + + SECTION("valueless nested variant") { + type value = inner{0.5f}; + REQUIRE( std::holds_alternative(value) ); + REQUIRE( std::holds_alternative(std::get(value)) ); + + REQUIRE_THROWS_AS( std::get<0>(value).emplace(MyType1{}), int ); + + // outer variant is still valid and contains inner + REQUIRE( std::holds_alternative(value) ); + // inner variant is valueless + REQUIRE( std::get(value).valueless_by_exception() ); + CHECK( "{valueless variant}" == ::Catch::Detail::stringify(value) ); + } +} + +TEST_CASE( "variant", "[toString][variant][approvals]" ) +{ + using type = std::variant; + CHECK( "nullptr" == ::Catch::Detail::stringify(type{nullptr}) ); + CHECK( "42" == ::Catch::Detail::stringify(type{42}) ); + CHECK( "\"Catch me\"" == ::Catch::Detail::stringify(type{"Catch me"}) ); +} + +#endif // CATCH_INTERNAL_CONFIG_CPP17_VARIANT diff --git a/tests/SelfTest/UsageTests/ToStringVector.tests.cpp b/tests/SelfTest/UsageTests/ToStringVector.tests.cpp new file mode 100644 index 0000000..c042744 --- /dev/null +++ b/tests/SelfTest/UsageTests/ToStringVector.tests.cpp @@ -0,0 +1,94 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include +#include +#include + +// vector +TEST_CASE( "vector -> toString", "[toString][vector]" ) +{ + std::vector vv; + REQUIRE( ::Catch::Detail::stringify(vv) == "{ }" ); + vv.push_back( 42 ); + REQUIRE( ::Catch::Detail::stringify(vv) == "{ 42 }" ); + vv.push_back( 250 ); + REQUIRE( ::Catch::Detail::stringify(vv) == "{ 42, 250 }" ); +} + +TEST_CASE( "vector -> toString", "[toString][vector]" ) +{ + std::vector vv; + REQUIRE( ::Catch::Detail::stringify(vv) == "{ }" ); + vv.emplace_back( "hello" ); + REQUIRE( ::Catch::Detail::stringify(vv) == "{ \"hello\" }" ); + vv.emplace_back( "world" ); + REQUIRE( ::Catch::Detail::stringify(vv) == "{ \"hello\", \"world\" }" ); +} + +namespace { + /* Minimal Allocator */ + template + struct minimal_allocator { + using value_type = T; + using size_type = std::size_t; + + minimal_allocator() = default; + template + minimal_allocator(const minimal_allocator&) {} + + + T *allocate( size_type n ) { + return static_cast( ::operator new( n * sizeof(T) ) ); + } + void deallocate( T *p, size_type /*n*/ ) { + ::operator delete( static_cast(p) ); + } + template + bool operator==( const minimal_allocator& ) const { return true; } + template + bool operator!=( const minimal_allocator& ) const { return false; } + }; +} + +TEST_CASE( "vector -> toString", "[toString][vector,allocator]" ) { + std::vector > vv; + REQUIRE( ::Catch::Detail::stringify(vv) == "{ }" ); + vv.push_back( 42 ); + REQUIRE( ::Catch::Detail::stringify(vv) == "{ 42 }" ); + vv.push_back( 250 ); + REQUIRE( ::Catch::Detail::stringify(vv) == "{ 42, 250 }" ); +} + +TEST_CASE( "vec> -> toString", "[toString][vector,allocator]" ) { + using inner = std::vector>; + using vector = std::vector; + vector v; + REQUIRE( ::Catch::Detail::stringify(v) == "{ }" ); + v.push_back( inner { "hello" } ); + v.push_back( inner { "world" } ); + REQUIRE( ::Catch::Detail::stringify(v) == "{ { \"hello\" }, { \"world\" } }" ); +} + +// Based on PR by mat-so: https://github.com/catchorg/Catch2/pull/606/files#diff-43562f40f8c6dcfe2c54557316e0f852 +TEST_CASE( "vector -> toString", "[toString][containers][vector]" ) { + std::vector bools; + REQUIRE( ::Catch::Detail::stringify(bools) == "{ }"); + bools.push_back(true); + REQUIRE( ::Catch::Detail::stringify(bools) == "{ true }"); + bools.push_back(false); + REQUIRE( ::Catch::Detail::stringify(bools) == "{ true, false }"); +} +TEST_CASE( "array -> toString", "[toString][containers][array]" ) { + std::array empty; + REQUIRE( Catch::Detail::stringify( empty ) == "{ }" ); + std::array oneValue = {{ 42 }}; + REQUIRE( Catch::Detail::stringify( oneValue ) == "{ 42 }" ); + std::array twoValues = {{ 42, 250 }}; + REQUIRE( Catch::Detail::stringify( twoValues ) == "{ 42, 250 }" ); +} diff --git a/tests/SelfTest/UsageTests/ToStringWhich.tests.cpp b/tests/SelfTest/UsageTests/ToStringWhich.tests.cpp new file mode 100644 index 0000000..ec7a49e --- /dev/null +++ b/tests/SelfTest/UsageTests/ToStringWhich.tests.cpp @@ -0,0 +1,186 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include + + + +#if defined(__GNUC__) +// This has to be left enabled until end of the TU, because the GCC +// frontend reports operator<<(std::ostream& os, const has_maker_and_operator&) +// as unused anyway +# pragma GCC diagnostic ignored "-Wunused-function" +#endif + +namespace { + +struct has_operator { }; +struct has_maker {}; +struct has_maker_and_operator {}; +struct has_neither {}; +struct has_template_operator {}; + +std::ostream& operator<<(std::ostream& os, const has_operator&) { + os << "operator<<( has_operator )"; + return os; +} + +std::ostream& operator<<(std::ostream& os, const has_maker_and_operator&) { + os << "operator<<( has_maker_and_operator )"; + return os; +} + +template +StreamT& operator<<(StreamT& os, const has_template_operator&) { + os << "operator<<( has_template_operator )"; + return os; +} + +} // end anonymous namespace + +namespace Catch { + template<> + struct StringMaker { + static std::string convert( const has_maker& ) { + return "StringMaker"; + } + }; + template<> + struct StringMaker { + static std::string convert( const has_maker_and_operator& ) { + return "StringMaker"; + } + }; +} + +// Call the operator +TEST_CASE( "stringify( has_operator )", "[toString]" ) { + has_operator item; + REQUIRE( ::Catch::Detail::stringify( item ) == "operator<<( has_operator )" ); +} + +// Call the stringmaker +TEST_CASE( "stringify( has_maker )", "[toString]" ) { + has_maker item; + REQUIRE( ::Catch::Detail::stringify( item ) == "StringMaker" ); +} + +// Call the stringmaker +TEST_CASE( "stringify( has_maker_and_operator )", "[toString]" ) { + has_maker_and_operator item; + REQUIRE( ::Catch::Detail::stringify( item ) == "StringMaker" ); +} + +TEST_CASE("stringify( has_neither )", "[toString]") { + has_neither item; + REQUIRE( ::Catch::Detail::stringify(item) == "{?}" ); +} + +// Call the templated operator +TEST_CASE( "stringify( has_template_operator )", "[toString]" ) { + has_template_operator item; + REQUIRE( ::Catch::Detail::stringify( item ) == "operator<<( has_template_operator )" ); +} + + +// Vectors... + +TEST_CASE( "stringify( vectors )", "[toString]" ) { + std::vector v(1); + REQUIRE( ::Catch::Detail::stringify( v ) == "{ operator<<( has_operator ) }" ); +} + +TEST_CASE( "stringify( vectors )", "[toString]" ) { + std::vector v(1); + REQUIRE( ::Catch::Detail::stringify( v ) == "{ StringMaker }" ); +} + +TEST_CASE( "stringify( vectors )", "[toString]" ) { + std::vector v(1); + REQUIRE( ::Catch::Detail::stringify( v ) == "{ StringMaker }" ); +} + +namespace { + +// Range-based conversion should only be used if other possibilities fail +struct int_iterator { + using iterator_category = std::input_iterator_tag; + using difference_type = std::ptrdiff_t; + using value_type = int; + using reference = int&; + using pointer = int*; + + int_iterator() = default; + int_iterator(int i) :val(i) {} + + value_type operator*() const { return val; } + bool operator==(int_iterator rhs) const { return val == rhs.val; } + bool operator!=(int_iterator rhs) const { return val != rhs.val; } + int_iterator operator++() { ++val; return *this; } + int_iterator operator++(int) { + auto temp(*this); + ++val; + return temp; + } +private: + int val = 5; +}; + +struct streamable_range { + int_iterator begin() const { return int_iterator{ 1 }; } + int_iterator end() const { return {}; } +}; + +std::ostream& operator<<(std::ostream& os, const streamable_range&) { + os << "op<<(streamable_range)"; + return os; +} + +struct stringmaker_range { + int_iterator begin() const { return int_iterator{ 1 }; } + int_iterator end() const { return {}; } +}; + +} // end anonymous namespace + +namespace Catch { +template <> +struct StringMaker { + static std::string convert(stringmaker_range const&) { + return "stringmaker(streamable_range)"; + } +}; +} + +namespace { + +struct just_range { + int_iterator begin() const { return int_iterator{ 1 }; } + int_iterator end() const { return {}; } +}; + +struct disabled_range { + int_iterator begin() const { return int_iterator{ 1 }; } + int_iterator end() const { return {}; } +}; + +} // end anonymous namespace + +namespace Catch { +template <> +struct is_range { + static const bool value = false; +}; +} + +TEST_CASE("stringify ranges", "[toString]") { + REQUIRE(::Catch::Detail::stringify(streamable_range{}) == "op<<(streamable_range)"); + REQUIRE(::Catch::Detail::stringify(stringmaker_range{}) == "stringmaker(streamable_range)"); + REQUIRE(::Catch::Detail::stringify(just_range{}) == "{ 1, 2, 3, 4 }"); + REQUIRE(::Catch::Detail::stringify(disabled_range{}) == "{?}"); +} diff --git a/tests/SelfTest/UsageTests/Tricky.tests.cpp b/tests/SelfTest/UsageTests/Tricky.tests.cpp new file mode 100644 index 0000000..041d786 --- /dev/null +++ b/tests/SelfTest/UsageTests/Tricky.tests.cpp @@ -0,0 +1,380 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#ifdef __clang__ +#pragma clang diagnostic ignored "-Wpadded" +#endif + +#ifdef _MSC_VER +#pragma warning (disable : 4702) // Disable unreachable code warning for the last test + // that is triggered when compiling as Win32|Release +#endif + +#include +#include +#include + +#include +#include +#include + +struct Opaque +{ + int val; + bool operator ==( const Opaque& o ) const + { + return val == o.val; + } +}; + +/////////////////////////////////////////////////////////////////////////////// +TEST_CASE +( + "A failing expression with a non streamable type is still captured", + "[Tricky][failing][.]" +) +{ + + Opaque o1, o2; + o1.val = 7; + o2.val = 8; + + CHECK( &o1 == &o2 ); + CHECK( o1 == o2 ); +} + +/////////////////////////////////////////////////////////////////////////////// +TEST_CASE +( + "An expression with side-effects should only be evaluated once", + "[Tricky]" +) +{ + int i = 7; + + REQUIRE( i++ == 7 ); + REQUIRE( i++ == 8 ); + +} + +namespace A { + struct X + { + X() : a(4), b(2), c(7) {} + X(int v) : a(v), b(2), c(7) {} + int a; + int b; + int c; + }; +} + +namespace B { + struct Y + { + Y() : a(4), b(2), c(7) {} + Y(int v) : a(v), b(2), c(7) {} + int a; + int b; + int c; + }; +} + +inline bool operator==(const A::X& lhs, const B::Y& rhs) +{ + return (lhs.a == rhs.a); +} + +inline bool operator==(const B::Y& lhs, const A::X& rhs) +{ + return (lhs.a == rhs.a); +} + + +/////////////////////////////////////////////////////////////////////////////// +/* This, currently, does not compile with LLVM +TEST_CASE +( + "Operators at different namespace levels not hijacked by Koenig lookup" + "[Tricky]" +) +{ + A::X x; + B::Y y; + REQUIRE( x == y ); +} +*/ + +namespace ObjectWithConversions +{ + struct Object + { + operator unsigned int() const {return 0xc0000000;} + }; + + /////////////////////////////////////////////////////////////////////////////// + TEST_CASE + ( + "Implicit conversions are supported inside assertion macros", + "[Tricky][approvals]" + ) + { + Object o; + REQUIRE(0xc0000000 == o ); + } +} + +namespace EnumBitFieldTests +{ + enum Bits : uint32_t { + bit0 = 0x0001, + bit1 = 0x0002, + bit2 = 0x0004, + bit3 = 0x0008, + bit1and2 = bit1 | bit2, + bit30 = 0x40000000, + bit31 = 0x80000000, + bit30and31 = bit30 | bit31 + }; + + TEST_CASE( "Test enum bit values", "[Tricky]" ) + { + REQUIRE( 0xc0000000 == bit30and31 ); + } +} + +struct Obj +{ + Obj():prop(&p){} + + int p = 0; + int* prop; +}; + +TEST_CASE("boolean member", "[Tricky]") +{ + Obj obj; + REQUIRE( obj.prop != nullptr ); +} + +// Tests for a problem submitted by Ralph McArdell +// +// The static bool value should not need to be defined outside the +// struct it is declared in - but when evaluating it in a deduced +// context it appears to require the extra definition. +// The issue was fixed by adding bool overloads to bypass the +// templates that were there to deduce it. +template +struct is_true +{ + static const bool value = B; +}; + +TEST_CASE( "(unimplemented) static bools can be evaluated", "[Tricky]" ) +{ + SECTION("compare to true") + { + REQUIRE( is_true::value == true ); + REQUIRE( true == is_true::value ); + } + SECTION("compare to false") + { + REQUIRE( is_true::value == false ); + REQUIRE( false == is_true::value ); + } + + SECTION("negation") + { + REQUIRE( !is_true::value ); + } + + SECTION("double negation") + { + REQUIRE( !!is_true::value ); + } + + SECTION("direct") + { + REQUIRE( is_true::value ); + REQUIRE_FALSE( is_true::value ); + } +} + +struct Boolable +{ + explicit Boolable( bool value ) : m_value( value ) {} + + explicit operator bool() const { + return m_value; + } + + bool m_value; +}; + +TEST_CASE( "Objects that evaluated in boolean contexts can be checked", "[Tricky][SafeBool]" ) +{ + Boolable True( true ); + Boolable False( false ); + + CHECK( True ); + CHECK( !False ); + CHECK_FALSE( False ); +} + +TEST_CASE( "Assertions then sections", "[Tricky]" ) +{ + // This was causing a failure due to the way the console reporter was handling + // the current section + + REQUIRE( true ); + + SECTION( "A section" ) + { + REQUIRE( true ); + + SECTION( "Another section" ) + { + REQUIRE( true ); + } + SECTION( "Another other section" ) + { + REQUIRE( true ); + } + } +} + +struct Awkward +{ + operator int() const { return 7; } +}; + +TEST_CASE( "non streamable - with conv. op", "[Tricky]" ) +{ + Awkward awkward; + std::string s = ::Catch::Detail::stringify( awkward ); + REQUIRE( s == "7" ); +} + +inline void foo() {} + +using fooptr_t = void (*)(); + +TEST_CASE( "Comparing function pointers", "[Tricky][function pointer]" ) +{ + // This was giving a warning in VS2010 + // #179 + fooptr_t a = foo; + + REQUIRE( a ); + REQUIRE( a == &foo ); +} + +struct S +{ + void f() {} +}; + + +TEST_CASE( "Comparing member function pointers", "[Tricky][member function pointer][approvals]" ) +{ + using MF = void (S::*)(); + MF m = &S::f; + + CHECK( m == &S::f ); +} + +class ClassName {}; + +TEST_CASE( "pointer to class", "[Tricky]" ) +{ + ClassName *p = 0; + REQUIRE( p == 0 ); +} + +#include + +TEST_CASE( "null_ptr", "[Tricky]" ) +{ + std::unique_ptr ptr; + REQUIRE(ptr.get() == nullptr); +} + +TEST_CASE( "X/level/0/a", "[Tricky]" ) { SUCCEED(""); } +TEST_CASE( "X/level/0/b", "[Tricky][fizz]" ){ SUCCEED(""); } +TEST_CASE( "X/level/1/a", "[Tricky]" ) { SUCCEED(""); } +TEST_CASE( "X/level/1/b", "[Tricky]" ) { SUCCEED(""); } + +TEST_CASE( "has printf" ) { + + // This can cause problems as, currently, stdout itself is not redirected - only the cout (and cerr) buffer + printf( "loose text artifact\n" ); +} + +namespace { + struct constructor_throws { + [[noreturn]] constructor_throws() { + throw 1; + } + }; +} + +TEST_CASE("Commas in various macros are allowed") { + REQUIRE_THROWS( std::vector{constructor_throws{}, constructor_throws{}} ); + CHECK_THROWS( std::vector{constructor_throws{}, constructor_throws{}} ); + REQUIRE_NOTHROW( std::vector{1, 2, 3} == std::vector{1, 2, 3} ); + CHECK_NOTHROW( std::vector{1, 2, 3} == std::vector{1, 2, 3} ); + + REQUIRE(std::vector{1, 2} == std::vector{1, 2}); + CHECK( std::vector{1, 2} == std::vector{1, 2} ); + REQUIRE_FALSE(std::vector{1, 2} == std::vector{1, 2, 3}); + CHECK_FALSE( std::vector{1, 2} == std::vector{1, 2, 3} ); + + CHECK_NOFAIL( std::vector{1, 2} == std::vector{1, 2} ); + CHECKED_IF( std::vector{1, 2} == std::vector{1, 2} ) { + REQUIRE(true); + } CHECKED_ELSE( std::vector{1, 2} == std::vector{1, 2} ) { + CHECK(true); + } +} + +TEST_CASE( "non-copyable objects", "[.][failing]" ) { + // Thanks to Agustin Bergé (@k-ballo on the cpplang Slack) for raising this + std::type_info const& ti = typeid(int); + CHECK( ti == typeid(int) ); +} + +TEST_CASE("#1514: stderr/stdout is not captured in tests aborted by an exception", "[output-capture][regression][.]") { + std::cout << "This would not be caught previously\n" << std::flush; + std::clog << "Nor would this\n" << std::flush; + // FAIL aborts the test by throwing a Catch exception + FAIL("1514"); +} + + +TEST_CASE( "#2025: -c shouldn't cause infinite loop", "[sections][generators][regression][.approvals]" ) { + SECTION( "Check cursor from buffer offset" ) { + auto bufPos = GENERATE_REF( range( 0, 44 ) ); + WHEN( "Buffer position is " << bufPos ) { REQUIRE( 1 == 1 ); } + } +} + +TEST_CASE("#2025: original repro", "[sections][generators][regression][.approvals]") { + auto fov = GENERATE(true, false); + DYNAMIC_SECTION("fov_" << fov) { + std::cout << "inside with fov: " << fov << '\n'; + } +} + +TEST_CASE("#2025: same-level sections", "[sections][generators][regression][.approvals]") { + SECTION("A") { + SUCCEED(); + } + auto i = GENERATE(1, 2, 3); + SECTION("B") { + REQUIRE(i < 4); + } +} diff --git a/tests/SelfTest/UsageTests/VariadicMacros.tests.cpp b/tests/SelfTest/UsageTests/VariadicMacros.tests.cpp new file mode 100644 index 0000000..92048a0 --- /dev/null +++ b/tests/SelfTest/UsageTests/VariadicMacros.tests.cpp @@ -0,0 +1,29 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include + + +TEST_CASE() +{ + SUCCEED( "anonymous test case" ); +} + +TEST_CASE( "Test case with one argument" ) +{ + SUCCEED( "no assertions" ); +} + +TEST_CASE( "Variadic macros", "[variadic][sections]" ) +{ + SECTION( "Section with one argument" ) + { + SUCCEED( "no assertions" ); + } +} + diff --git a/tests/SelfTest/helpers/parse_test_spec.cpp b/tests/SelfTest/helpers/parse_test_spec.cpp new file mode 100644 index 0000000..aa64404 --- /dev/null +++ b/tests/SelfTest/helpers/parse_test_spec.cpp @@ -0,0 +1,22 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include + +#include +#include + +namespace Catch { + + TestSpec parseTestSpec( std::string const& arg ) { + return TestSpecParser( ITagAliasRegistry::get() ) + .parse( arg ) + .testSpec(); + } + +} // namespace Catch diff --git a/tests/SelfTest/helpers/parse_test_spec.hpp b/tests/SelfTest/helpers/parse_test_spec.hpp new file mode 100644 index 0000000..39ee071 --- /dev/null +++ b/tests/SelfTest/helpers/parse_test_spec.hpp @@ -0,0 +1,20 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#ifndef CATCH_TEST_HELPERS_PARSE_TEST_SPEC_HPP_INCLUDED +#define CATCH_TEST_HELPERS_PARSE_TEST_SPEC_HPP_INCLUDED + +#include + +#include + +namespace Catch { + TestSpec parseTestSpec( std::string const& arg ); +} + +#endif // CATCH_TEST_HELPERS_PARSE_TEST_SPEC_HPP_INCLUDED diff --git a/tests/SelfTest/helpers/range_test_helpers.hpp b/tests/SelfTest/helpers/range_test_helpers.hpp new file mode 100644 index 0000000..22c2c3c --- /dev/null +++ b/tests/SelfTest/helpers/range_test_helpers.hpp @@ -0,0 +1,210 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#ifndef CATCH_TEST_HELPERS_RANGE_TEST_HELPERS_HPP_INCLUDED +#define CATCH_TEST_HELPERS_RANGE_TEST_HELPERS_HPP_INCLUDED + +#include + +#include +#include +#include +#include + +namespace unrelated { + template + class needs_ADL_begin { + std::vector m_elements; + + public: + using iterator = typename std::vector::iterator; + using const_iterator = typename std::vector::const_iterator; + + needs_ADL_begin( std::initializer_list init ): m_elements( init ) {} + + const_iterator Begin() const { return m_elements.begin(); } + const_iterator End() const { return m_elements.end(); } + + friend const_iterator begin( needs_ADL_begin const& lhs ) { + return lhs.Begin(); + } + friend const_iterator end( needs_ADL_begin const& rhs ) { + return rhs.End(); + } + }; + + struct ADL_empty { + bool Empty() const { return true; } + + friend bool empty( ADL_empty e ) { return e.Empty(); } + }; + + struct ADL_size { + size_t sz() const { return 12; } + friend size_t size( ADL_size s ) { return s.sz(); } + }; + +} // namespace unrelated + +#if defined( __clang__ ) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wunused-function" +#endif + +template +class has_different_begin_end_types { + // Using std::vector leads to annoying issues when T is bool + // so we just use list because the perf is not critical and ugh. + std::list m_elements; + + // Different type for the "end" iterator + struct iterator_end {}; + // Fake-ish forward iterator that only compares to a different type + class iterator { + using underlying_iter = typename std::list::const_iterator; + underlying_iter m_start; + underlying_iter m_end; + + public: + iterator( underlying_iter start, underlying_iter end ): + m_start( start ), m_end( end ) {} + + using iterator_category = std::forward_iterator_tag; + using difference_type = std::ptrdiff_t; + using value_type = T; + using const_reference = T const&; + using pointer = T const*; + + friend bool operator==( iterator iter, iterator_end ) { + return iter.m_start == iter.m_end; + } + friend bool operator==(iterator lhs, iterator rhs) { + return lhs.m_start == rhs.m_start && lhs.m_end == rhs.m_end; + } + friend bool operator!=( iterator iter, iterator_end ) { + return iter.m_start != iter.m_end; + } + friend bool operator!=( iterator lhs, iterator rhs ) { + return !( lhs == rhs ); + } + iterator& operator++() { + ++m_start; + return *this; + } + iterator operator++( int ) { + auto tmp( *this ); + ++m_start; + return tmp; + } + const_reference operator*() const { return *m_start; } + pointer operator->() const { return m_start; } + }; + +public: + explicit has_different_begin_end_types( std::initializer_list init ): + m_elements( init ) {} + + iterator begin() const { return { m_elements.begin(), m_elements.end() }; } + + iterator_end end() const { return {}; } +}; + +#if defined( __clang__ ) +# pragma clang diagnostic pop +#endif + +template +struct with_mocked_iterator_access { + std::vector m_elements; + + // use plain arrays to have nicer printouts with CHECK(...) + mutable std::unique_ptr m_derefed; + + // We want to check which elements were dereferenced when iterating, so + // we can check whether iterator-using code traverses range correctly + template + class basic_iterator { + template + using constify_t = std::conditional_t, U>; + + constify_t* m_origin; + size_t m_origin_idx; + + public: + using iterator_category = std::forward_iterator_tag; + using difference_type = std::ptrdiff_t; + using value_type = constify_t; + using const_reference = typename std::vector::const_reference; + using reference = typename std::vector::reference; + using pointer = typename std::vector::pointer; + + basic_iterator( constify_t* origin, + std::size_t origin_idx ): + m_origin{ origin }, m_origin_idx{ origin_idx } {} + + friend bool operator==( basic_iterator lhs, basic_iterator rhs ) { + return lhs.m_origin == rhs.m_origin && + lhs.m_origin_idx == rhs.m_origin_idx; + } + friend bool operator!=( basic_iterator lhs, basic_iterator rhs ) { + return !( lhs == rhs ); + } + basic_iterator& operator++() { + ++m_origin_idx; + return *this; + } + basic_iterator operator++( int ) { + auto tmp( *this ); + ++( *this ); + return tmp; + } + const_reference operator*() const { + assert( m_origin_idx < m_origin->m_elements.size() && + "Attempted to deref invalid position" ); + m_origin->m_derefed[m_origin_idx] = true; + return m_origin->m_elements[m_origin_idx]; + } + pointer operator->() const { + assert( m_origin_idx < m_origin->m_elements.size() && + "Attempted to deref invalid position" ); + return &m_origin->m_elements[m_origin_idx]; + } + }; + + using iterator = basic_iterator; + using const_iterator = basic_iterator; + + with_mocked_iterator_access( std::initializer_list init ): + m_elements( init ), + m_derefed( std::make_unique( m_elements.size() ) ) {} + + const_iterator begin() const { return { this, 0 }; } + const_iterator end() const { return { this, m_elements.size() }; } + iterator begin() { return { this, 0 }; } + iterator end() { return { this, m_elements.size() }; } +}; + + +namespace Catch { + // make sure with_mocked_iterator_access is not considered a range by Catch, + // so that below StringMaker is used instead of the default one for ranges + template + struct is_range> : std::false_type {}; + + template + struct StringMaker> { + static std::string + convert( with_mocked_iterator_access const& access ) { + // We have to avoid the type's iterators, because we check + // their use in tests + return ::Catch::Detail::stringify( access.m_elements ); + } + }; +} // namespace Catch + +#endif // CATCH_TEST_HELPERS_RANGE_TEST_HELPERS_HPP_INCLUDED diff --git a/tests/SelfTest/helpers/type_with_lit_0_comparisons.hpp b/tests/SelfTest/helpers/type_with_lit_0_comparisons.hpp new file mode 100644 index 0000000..a8e517c --- /dev/null +++ b/tests/SelfTest/helpers/type_with_lit_0_comparisons.hpp @@ -0,0 +1,55 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#ifndef CATCH_TEST_HELPERS_TYPE_WITH_LIT_0_COMPARISONS_HPP_INCLUDED +#define CATCH_TEST_HELPERS_TYPE_WITH_LIT_0_COMPARISONS_HPP_INCLUDED + +#include + +// Should only be constructible from literal 0. +// Based on the constructor from pointer trick, used by libstdc++ and libc++ +// (formerly also MSVC, but they've moved to consteval int constructor). +// Used by `TypeWithLit0Comparisons` for testing comparison +// ops that only work with literal zero, the way std::*orderings do +struct ZeroLiteralAsPointer { + constexpr ZeroLiteralAsPointer( ZeroLiteralAsPointer* ) noexcept {} + + template ::value>> + constexpr ZeroLiteralAsPointer( T ) = delete; +}; + + +struct TypeWithLit0Comparisons { +#define DEFINE_COMP_OP( op ) \ + constexpr friend bool operator op( TypeWithLit0Comparisons, \ + ZeroLiteralAsPointer ) { \ + return true; \ + } \ + constexpr friend bool operator op( ZeroLiteralAsPointer, \ + TypeWithLit0Comparisons ) { \ + return false; \ + } \ + /* std::orderings only have these for ==, but we add them for all \ + operators so we can test all overloads for decomposer */ \ + constexpr friend bool operator op( TypeWithLit0Comparisons, \ + TypeWithLit0Comparisons ) { \ + return true; \ + } + + DEFINE_COMP_OP( < ) + DEFINE_COMP_OP( <= ) + DEFINE_COMP_OP( > ) + DEFINE_COMP_OP( >= ) + DEFINE_COMP_OP( == ) + DEFINE_COMP_OP( != ) + +#undef DEFINE_COMP_OP +}; + +#endif // CATCH_TEST_HELPERS_TYPE_WITH_LIT_0_COMPARISONS_HPP_INCLUDED -- cgit v1.2.3