diff --git a/BUILD.bazel b/BUILD.bazel index c51bf57e70..4803b25ce7 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -30,6 +30,7 @@ expand_template( "#cmakedefine CATCH_CONFIG_FAST_COMPILE": "", "#cmakedefine CATCH_CONFIG_GETENV": "", "#cmakedefine CATCH_CONFIG_GLOBAL_NEXTAFTER": "", + "#cmakedefine CATCH_CONFIG_NAME_SEPARATOR": "", "#cmakedefine CATCH_CONFIG_NO_ANDROID_LOGWRITE": "", "#cmakedefine CATCH_CONFIG_NO_COLOUR_WIN32": "", "#cmakedefine CATCH_CONFIG_NO_COUNTER": "", diff --git a/src/catch2/catch_user_config.hpp.in b/src/catch2/catch_user_config.hpp.in index 10d61937f1..c4e17912c7 100644 --- a/src/catch2/catch_user_config.hpp.in +++ b/src/catch2/catch_user_config.hpp.in @@ -210,6 +210,7 @@ #define CATCH_CONFIG_DEFAULT_REPORTER "@CATCH_CONFIG_DEFAULT_REPORTER@" #define CATCH_CONFIG_CONSOLE_WIDTH @CATCH_CONFIG_CONSOLE_WIDTH@ +#cmakedefine CATCH_CONFIG_NAME_SEPARATOR // Unlike the macros above, CATCH_CONFIG_FALLBACK_STRINGIFIER does not // have a good default value, so we cannot always define it, and cannot diff --git a/src/catch2/internal/catch_template_test_registry.hpp b/src/catch2/internal/catch_template_test_registry.hpp index 0ea354bc60..cf8d888998 100644 --- a/src/catch2/internal/catch_template_test_registry.hpp +++ b/src/catch2/internal/catch_template_test_registry.hpp @@ -22,6 +22,12 @@ #pragma GCC diagnostic ignored "-Wunused-variable" #endif +#ifdef CATCH_CONFIG_NAME_SEPARATOR +#define INTERNAL_CATCH_CONFIG_NAME_SEPARATOR CATCH_CONFIG_NAME_SEPARATOR +#else +#define INTERNAL_CATCH_CONFIG_NAME_SEPARATOR " - " +#endif + #if defined(CATCH_CONFIG_DISABLE) #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( TestName, TestFunc, Name, Tags, Signature, ... ) \ INTERNAL_CATCH_DEFINE_SIG_TEST(TestFunc, INTERNAL_CATCH_REMOVE_PARENS(Signature)) @@ -87,7 +93,7 @@ size_t index = 0; \ constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, __VA_ARGS__)}; /* NOLINT(cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays,hicpp-avoid-c-arrays) */\ using expander = size_t[]; /* NOLINT(cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays,hicpp-avoid-c-arrays) */\ - (void)expander{(reg_test(Types{}, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]), Tags } ), index++)... };/* NOLINT */ \ + (void)expander{(reg_test(Types{}, Catch::NameAndTags{ Name INTERNAL_CATCH_CONFIG_NAME_SEPARATOR + std::string(tmpl_types[index]), Tags } ), index++)... };/* NOLINT */ \ }\ };\ static const int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\ @@ -135,7 +141,7 @@ constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\ constexpr char const* types_list[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TypesList))};\ constexpr auto num_types = sizeof(types_list) / sizeof(types_list[0]);\ - (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFuncName ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index / num_types]) + '<' + std::string(types_list[index % num_types]) + '>', Tags } ), index++)... };/* NOLINT */\ + (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFuncName ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name INTERNAL_CATCH_CONFIG_NAME_SEPARATOR + std::string(tmpl_types[index / num_types]) + '<' + std::string(types_list[index % num_types]) + '>', Tags } ), index++)... };/* NOLINT */\ } \ }; \ static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \ @@ -179,9 +185,10 @@ template \ struct TestName { \ void reg_tests() { \ + using Catch::IndexedTestTypeName; \ size_t index = 0; \ using expander = size_t[]; \ - (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " INTERNAL_CATCH_STRINGIZE(TmplList) " - " + std::to_string(index), Tags } ), index++)... };/* NOLINT */\ + (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name INTERNAL_CATCH_CONFIG_NAME_SEPARATOR INTERNAL_CATCH_STRINGIZE(TmplList) INTERNAL_CATCH_CONFIG_NAME_SEPARATOR + IndexedTestTypeName{}(index), Tags } ), index++)... };/* NOLINT */\ } \ };\ static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \ @@ -217,7 +224,7 @@ size_t index = 0; \ constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, __VA_ARGS__)};\ using expander = size_t[];\ - (void)expander{(reg_test(Types{}, #ClassName, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]), Tags } ), index++)... };/* NOLINT */ \ + (void)expander{(reg_test(Types{}, #ClassName, Catch::NameAndTags{ Name INTERNAL_CATCH_CONFIG_NAME_SEPARATOR + std::string(tmpl_types[index]), Tags } ), index++)... };/* NOLINT */ \ }\ };\ static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\ @@ -267,7 +274,7 @@ constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\ constexpr char const* types_list[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TypesList))};\ constexpr auto num_types = sizeof(types_list) / sizeof(types_list[0]);\ - (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index / num_types]) + '<' + std::string(types_list[index % num_types]) + '>', Tags } ), index++)... };/* NOLINT */ \ + (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name INTERNAL_CATCH_CONFIG_NAME_SEPARATOR + std::string(tmpl_types[index / num_types]) + '<' + std::string(types_list[index % num_types]) + '>', Tags } ), index++)... };/* NOLINT */ \ }\ };\ static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\ @@ -314,9 +321,10 @@ template\ struct TestNameClass{\ void reg_tests(){\ + using Catch::IndexedTestTypeName;\ size_t index = 0;\ using expander = size_t[];\ - (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName::test ), CATCH_INTERNAL_LINEINFO, #ClassName##_catch_sr, Catch::NameAndTags{ Name " - " INTERNAL_CATCH_STRINGIZE(TmplList) " - " + std::to_string(index), Tags } ), index++)... };/* NOLINT */ \ + (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName::test ), CATCH_INTERNAL_LINEINFO, #ClassName##_catch_sr, Catch::NameAndTags{ Name INTERNAL_CATCH_CONFIG_NAME_SEPARATOR INTERNAL_CATCH_STRINGIZE(TmplList) INTERNAL_CATCH_CONFIG_NAME_SEPARATOR + IndexedTestTypeName{}(index), Tags } ), index++)... };/* NOLINT */ \ }\ };\ static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\ @@ -333,5 +341,13 @@ #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD(ClassName, Name, Tags, TmplList) \ INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( CATCH2_INTERNAL_TEMPLATE_TEST_ ), INTERNAL_CATCH_UNIQUE_NAME( CATCH2_INTERNAL_TEMPLATE_TEST_ ), ClassName, Name, Tags, TmplList ) +namespace Catch { + template + struct IndexedTestTypeName { + std::string operator()(size_t index) const { + return std::to_string(index); + } + }; +} #endif // CATCH_TEMPLATE_TEST_REGISTRY_HPP_INCLUDED diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d3ab14a7f6..a38aeecf98 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -114,6 +114,7 @@ set(TEST_SOURCES ${SELF_TEST_DIR}/UsageTests/Class.tests.cpp ${SELF_TEST_DIR}/UsageTests/Compilation.tests.cpp ${SELF_TEST_DIR}/UsageTests/Condition.tests.cpp + ${SELF_TEST_DIR}/UsageTests/CustomNaming.tests.cpp ${SELF_TEST_DIR}/UsageTests/Decomposition.tests.cpp ${SELF_TEST_DIR}/UsageTests/EnumToString.tests.cpp ${SELF_TEST_DIR}/UsageTests/Exception.tests.cpp diff --git a/tests/SelfTest/Baselines/automake.sw.approved.txt b/tests/SelfTest/Baselines/automake.sw.approved.txt index 88c23e1737..f013ccb0f2 100644 --- a/tests/SelfTest/Baselines/automake.sw.approved.txt +++ b/tests/SelfTest/Baselines/automake.sw.approved.txt @@ -46,6 +46,10 @@ Nor would this :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: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--Template_Foo +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--Template_Foo +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--std::vector +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--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 @@ -54,18 +58,28 @@ Nor would this :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: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--Template_Foo_2 +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--Template_Foo_2 +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--std::array +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--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: PASS A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--double +:test-result: PASS A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--float +:test-result: PASS A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--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: PASS A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--1 +:test-result: PASS A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--3 +:test-result: PASS A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--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: PASS A Template product test case - Foo @@ -245,9 +259,15 @@ Message from section two :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 list test case with specialized IndexedTestTypeName--NamedTypes--A +:test-result: PASS Template list test case with specialized IndexedTestTypeName--NamedTypes--B +:test-result: PASS Template list test case with specialized IndexedTestTypeName--NamedTypes--C :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 method with test types specified inside std::tuple with a custom separator--MyTypes--0 +:test-result: PASS Template test case method with test types specified inside std::tuple with a custom separator--MyTypes--1 +:test-result: PASS Template test case method with test types specified inside std::tuple with a custom separator--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 diff --git a/tests/SelfTest/Baselines/automake.sw.multi.approved.txt b/tests/SelfTest/Baselines/automake.sw.multi.approved.txt index a37b1a2b5d..34cbeca792 100644 --- a/tests/SelfTest/Baselines/automake.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/automake.sw.multi.approved.txt @@ -44,6 +44,10 @@ :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: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--Template_Foo +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--Template_Foo +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--std::vector +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--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 @@ -52,18 +56,28 @@ :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: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--Template_Foo_2 +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--Template_Foo_2 +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--std::array +:test-result: PASS A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--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: PASS A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--double +:test-result: PASS A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--float +:test-result: PASS A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--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: PASS A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--1 +:test-result: PASS A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--3 +:test-result: PASS A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--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: PASS A Template product test case - Foo @@ -238,9 +252,15 @@ :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 list test case with specialized IndexedTestTypeName--NamedTypes--A +:test-result: PASS Template list test case with specialized IndexedTestTypeName--NamedTypes--B +:test-result: PASS Template list test case with specialized IndexedTestTypeName--NamedTypes--C :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 method with test types specified inside std::tuple with a custom separator--MyTypes--0 +:test-result: PASS Template test case method with test types specified inside std::tuple with a custom separator--MyTypes--1 +:test-result: PASS Template test case method with test types specified inside std::tuple with a custom separator--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 diff --git a/tests/SelfTest/Baselines/compact.sw.approved.txt b/tests/SelfTest/Baselines/compact.sw.approved.txt index 0669fdbbbe..890b490f7a 100644 --- a/tests/SelfTest/Baselines/compact.sw.approved.txt +++ b/tests/SelfTest/Baselines/compact.sw.approved.txt @@ -219,6 +219,10 @@ Class.tests.cpp:: passed: Template_Fixture_2::m_a.size() 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 +CustomNaming.tests.cpp:: passed: Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +CustomNaming.tests.cpp:: passed: Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +CustomNaming.tests.cpp:: passed: Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +CustomNaming.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 @@ -227,18 +231,28 @@ Class.tests.cpp:: passed: Template_Fixture_2{}.m_a.size() 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 +CustomNaming.tests.cpp:: passed: Template_Fixture_2{}.m_a.size() >= 2 for: 6 >= 2 +CustomNaming.tests.cpp:: passed: Template_Fixture_2{}.m_a.size() >= 2 for: 2 >= 2 +CustomNaming.tests.cpp:: passed: Template_Fixture_2{}.m_a.size() >= 2 for: 6 >= 2 +CustomNaming.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 +CustomNaming.tests.cpp:: passed: Template_Fixture::m_a == 1 for: 1.0 == 1 +CustomNaming.tests.cpp:: passed: Template_Fixture::m_a == 1 for: 1.0f == 1 +CustomNaming.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 +CustomNaming.tests.cpp:: passed: Nttp_Fixture::value > 0 for: 1 > 0 +CustomNaming.tests.cpp:: passed: Nttp_Fixture::value > 0 for: 3 > 0 +CustomNaming.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 Misc.tests.cpp:: passed: x.size() == 0 for: 0 == 0 @@ -1734,9 +1748,15 @@ Tag.tests.cpp:: passed: registry.add( "@no square bracket at start] 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: {?} ) +CustomNaming.tests.cpp:: passed: Template_Foo{}.size() == 0 for: 0 == 0 +CustomNaming.tests.cpp:: passed: Template_Foo{}.size() == 0 for: 0 == 0 +CustomNaming.tests.cpp:: passed: Template_Foo{}.size() == 0 for: 0 == 0 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 +CustomNaming.tests.cpp:: passed: Template_Fixture::m_a == 1 for: 1 == 1 +CustomNaming.tests.cpp:: passed: Template_Fixture::m_a == 1 for: 1 == 1 +CustomNaming.tests.cpp:: passed: Template_Fixture::m_a == 1 for: 1.0 == 1 Misc.tests.cpp:: passed: sizeof(TestType) > 0 for: 1 > 0 Misc.tests.cpp:: passed: sizeof(TestType) > 0 for: 4 > 0 Misc.tests.cpp:: passed: sizeof(TestType) > 0 for: 1 > 0 @@ -2689,7 +2709,7 @@ 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: 417 | 312 passed | 85 failed | 6 skipped | 14 failed as expected -assertions: 2260 | 2079 passed | 146 failed | 35 failed as expected +test cases: 437 | 332 passed | 85 failed | 6 skipped | 14 failed as expected +assertions: 2280 | 2099 passed | 146 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 index 214fef74b8..6d3ac741cd 100644 --- a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt @@ -217,6 +217,10 @@ Class.tests.cpp:: passed: Template_Fixture_2::m_a.size() 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 +CustomNaming.tests.cpp:: passed: Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +CustomNaming.tests.cpp:: passed: Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +CustomNaming.tests.cpp:: passed: Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +CustomNaming.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 @@ -225,18 +229,28 @@ Class.tests.cpp:: passed: Template_Fixture_2{}.m_a.size() 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 +CustomNaming.tests.cpp:: passed: Template_Fixture_2{}.m_a.size() >= 2 for: 6 >= 2 +CustomNaming.tests.cpp:: passed: Template_Fixture_2{}.m_a.size() >= 2 for: 2 >= 2 +CustomNaming.tests.cpp:: passed: Template_Fixture_2{}.m_a.size() >= 2 for: 6 >= 2 +CustomNaming.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 +CustomNaming.tests.cpp:: passed: Template_Fixture::m_a == 1 for: 1.0 == 1 +CustomNaming.tests.cpp:: passed: Template_Fixture::m_a == 1 for: 1.0f == 1 +CustomNaming.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 +CustomNaming.tests.cpp:: passed: Nttp_Fixture::value > 0 for: 1 > 0 +CustomNaming.tests.cpp:: passed: Nttp_Fixture::value > 0 for: 3 > 0 +CustomNaming.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 Misc.tests.cpp:: passed: x.size() == 0 for: 0 == 0 @@ -1727,9 +1741,15 @@ Tag.tests.cpp:: passed: registry.add( "@no square bracket at start] 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: {?} ) +CustomNaming.tests.cpp:: passed: Template_Foo{}.size() == 0 for: 0 == 0 +CustomNaming.tests.cpp:: passed: Template_Foo{}.size() == 0 for: 0 == 0 +CustomNaming.tests.cpp:: passed: Template_Foo{}.size() == 0 for: 0 == 0 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 +CustomNaming.tests.cpp:: passed: Template_Fixture::m_a == 1 for: 1 == 1 +CustomNaming.tests.cpp:: passed: Template_Fixture::m_a == 1 for: 1 == 1 +CustomNaming.tests.cpp:: passed: Template_Fixture::m_a == 1 for: 1.0 == 1 Misc.tests.cpp:: passed: sizeof(TestType) > 0 for: 1 > 0 Misc.tests.cpp:: passed: sizeof(TestType) > 0 for: 4 > 0 Misc.tests.cpp:: passed: sizeof(TestType) > 0 for: 1 > 0 @@ -2678,7 +2698,7 @@ 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: 417 | 312 passed | 85 failed | 6 skipped | 14 failed as expected -assertions: 2260 | 2079 passed | 146 failed | 35 failed as expected +test cases: 437 | 332 passed | 85 failed | 6 skipped | 14 failed as expected +assertions: 2280 | 2099 passed | 146 failed | 35 failed as expected diff --git a/tests/SelfTest/Baselines/console.std.approved.txt b/tests/SelfTest/Baselines/console.std.approved.txt index 2542625656..2f9170c2a8 100644 --- a/tests/SelfTest/Baselines/console.std.approved.txt +++ b/tests/SelfTest/Baselines/console.std.approved.txt @@ -1588,6 +1588,6 @@ due to unexpected exception with message: Why would you throw a std::string? =============================================================================== -test cases: 417 | 326 passed | 70 failed | 7 skipped | 14 failed as expected -assertions: 2243 | 2079 passed | 129 failed | 35 failed as expected +test cases: 437 | 346 passed | 70 failed | 7 skipped | 14 failed as expected +assertions: 2263 | 2099 passed | 129 failed | 35 failed as expected diff --git a/tests/SelfTest/Baselines/console.sw.approved.txt b/tests/SelfTest/Baselines/console.sw.approved.txt index 077b7bf750..3f56d0d138 100644 --- a/tests/SelfTest/Baselines/console.sw.approved.txt +++ b/tests/SelfTest/Baselines/console.sw.approved.txt @@ -1778,6 +1778,54 @@ Class.tests.cpp:: PASSED: with expansion: 0 == 0 +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator-- +Template_Foo +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2::m_a.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator-- +Template_Foo +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2::m_a.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--std:: +vector +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2::m_a.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--std:: +vector +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.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 @@ -1874,6 +1922,54 @@ Class.tests.cpp:: PASSED: with expansion: 2 >= 2 +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator-- +Template_Foo_2 +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2{}.m_a.size() >= 2 ) +with expansion: + 6 >= 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator-- +Template_Foo_2 +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2{}.m_a.size() >= 2 ) +with expansion: + 2 >= 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator-- +std::array +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2{}.m_a.size() >= 2 ) +with expansion: + 6 >= 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator-- +std::array +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.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 ------------------------------------------------------------------------------- @@ -1940,6 +2036,39 @@ Class.tests.cpp:: PASSED: with expansion: 1 == 1 +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--double +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Fixture::m_a == 1 ) +with expansion: + 1.0 == 1 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--float +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Fixture::m_a == 1 ) +with expansion: + 1.0f == 1 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--int +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.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 ------------------------------------------------------------------------------- @@ -2006,6 +2135,39 @@ Class.tests.cpp:: PASSED: with expansion: 6 > 0 +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--1 +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Nttp_Fixture::value > 0 ) +with expansion: + 1 > 0 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--3 +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Nttp_Fixture::value > 0 ) +with expansion: + 3 > 0 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--6 +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Nttp_Fixture::value > 0 ) +with expansion: + 6 > 0 + ------------------------------------------------------------------------------- A TEST_CASE_METHOD based test run that fails ------------------------------------------------------------------------------- @@ -11631,6 +11793,39 @@ Tag.tests.cpp:: PASSED: with expansion: { {?}, {?} } ( Contains: {?} and Contains: {?} ) +------------------------------------------------------------------------------- +Template list test case with specialized IndexedTestTypeName--NamedTypes--A +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Foo{}.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Template list test case with specialized IndexedTestTypeName--NamedTypes--B +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Foo{}.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Template list test case with specialized IndexedTestTypeName--NamedTypes--C +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Foo{}.size() == 0 ) +with expansion: + 0 == 0 + ------------------------------------------------------------------------------- Template test case method with test types specified inside std::tuple - MyTypes - 0 @@ -11667,6 +11862,42 @@ Class.tests.cpp:: PASSED: with expansion: 1.0 == 1 +------------------------------------------------------------------------------- +Template test case method with test types specified inside std::tuple with a +custom separator--MyTypes--0 +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Fixture::m_a == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Template test case method with test types specified inside std::tuple with a +custom separator--MyTypes--1 +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Fixture::m_a == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Template test case method with test types specified inside std::tuple with a +custom separator--MyTypes--2 +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.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 @@ -18751,6 +18982,6 @@ Misc.tests.cpp: Misc.tests.cpp:: PASSED: =============================================================================== -test cases: 417 | 312 passed | 85 failed | 6 skipped | 14 failed as expected -assertions: 2260 | 2079 passed | 146 failed | 35 failed as expected +test cases: 437 | 332 passed | 85 failed | 6 skipped | 14 failed as expected +assertions: 2280 | 2099 passed | 146 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 index 5d204990c6..0480274b82 100644 --- a/tests/SelfTest/Baselines/console.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/console.sw.multi.approved.txt @@ -1776,6 +1776,54 @@ Class.tests.cpp:: PASSED: with expansion: 0 == 0 +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator-- +Template_Foo +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2::m_a.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator-- +Template_Foo +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2::m_a.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--std:: +vector +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2::m_a.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--std:: +vector +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.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 @@ -1872,6 +1920,54 @@ Class.tests.cpp:: PASSED: with expansion: 2 >= 2 +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator-- +Template_Foo_2 +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2{}.m_a.size() >= 2 ) +with expansion: + 6 >= 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator-- +Template_Foo_2 +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2{}.m_a.size() >= 2 ) +with expansion: + 2 >= 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator-- +std::array +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Fixture_2{}.m_a.size() >= 2 ) +with expansion: + 6 >= 2 + +------------------------------------------------------------------------------- +A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator-- +std::array +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.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 ------------------------------------------------------------------------------- @@ -1938,6 +2034,39 @@ Class.tests.cpp:: PASSED: with expansion: 1 == 1 +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--double +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Fixture::m_a == 1 ) +with expansion: + 1.0 == 1 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--float +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Fixture::m_a == 1 ) +with expansion: + 1.0f == 1 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--int +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.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 ------------------------------------------------------------------------------- @@ -2004,6 +2133,39 @@ Class.tests.cpp:: PASSED: with expansion: 6 > 0 +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--1 +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Nttp_Fixture::value > 0 ) +with expansion: + 1 > 0 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--3 +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Nttp_Fixture::value > 0 ) +with expansion: + 3 > 0 + +------------------------------------------------------------------------------- +A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--6 +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Nttp_Fixture::value > 0 ) +with expansion: + 6 > 0 + ------------------------------------------------------------------------------- A TEST_CASE_METHOD based test run that fails ------------------------------------------------------------------------------- @@ -11624,6 +11786,39 @@ Tag.tests.cpp:: PASSED: with expansion: { {?}, {?} } ( Contains: {?} and Contains: {?} ) +------------------------------------------------------------------------------- +Template list test case with specialized IndexedTestTypeName--NamedTypes--A +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Foo{}.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Template list test case with specialized IndexedTestTypeName--NamedTypes--B +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Foo{}.size() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Template list test case with specialized IndexedTestTypeName--NamedTypes--C +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Foo{}.size() == 0 ) +with expansion: + 0 == 0 + ------------------------------------------------------------------------------- Template test case method with test types specified inside std::tuple - MyTypes - 0 @@ -11660,6 +11855,42 @@ Class.tests.cpp:: PASSED: with expansion: 1.0 == 1 +------------------------------------------------------------------------------- +Template test case method with test types specified inside std::tuple with a +custom separator--MyTypes--0 +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Fixture::m_a == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Template test case method with test types specified inside std::tuple with a +custom separator--MyTypes--1 +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.tests.cpp:: PASSED: + REQUIRE( Template_Fixture::m_a == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Template test case method with test types specified inside std::tuple with a +custom separator--MyTypes--2 +------------------------------------------------------------------------------- +CustomNaming.tests.cpp: +............................................................................... + +CustomNaming.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 @@ -18740,6 +18971,6 @@ Misc.tests.cpp: Misc.tests.cpp:: PASSED: =============================================================================== -test cases: 417 | 312 passed | 85 failed | 6 skipped | 14 failed as expected -assertions: 2260 | 2079 passed | 146 failed | 35 failed as expected +test cases: 437 | 332 passed | 85 failed | 6 skipped | 14 failed as expected +assertions: 2280 | 2099 passed | 146 failed | 35 failed as expected diff --git a/tests/SelfTest/Baselines/junit.sw.approved.txt b/tests/SelfTest/Baselines/junit.sw.approved.txt index 48eccfc3d1..6f1a994971 100644 --- a/tests/SelfTest/Baselines/junit.sw.approved.txt +++ b/tests/SelfTest/Baselines/junit.sw.approved.txt @@ -1,7 +1,7 @@ - + @@ -203,6 +203,10 @@ at Class.tests.cpp: + + + + FAILED: @@ -243,6 +247,10 @@ at Class.tests.cpp: + + + + FAILED: @@ -273,6 +281,9 @@ at Class.tests.cpp: + + + FAILED: @@ -303,6 +314,9 @@ at Class.tests.cpp: + + + FAILED: @@ -1323,9 +1337,15 @@ at Misc.tests.cpp: + + + + + + diff --git a/tests/SelfTest/Baselines/junit.sw.multi.approved.txt b/tests/SelfTest/Baselines/junit.sw.multi.approved.txt index d270c88fb6..9c23536b9a 100644 --- a/tests/SelfTest/Baselines/junit.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/junit.sw.multi.approved.txt @@ -1,6 +1,6 @@ - + @@ -202,6 +202,10 @@ at Class.tests.cpp: + + + + FAILED: @@ -242,6 +246,10 @@ at Class.tests.cpp: + + + + FAILED: @@ -272,6 +280,9 @@ at Class.tests.cpp: + + + FAILED: @@ -302,6 +313,9 @@ at Class.tests.cpp: + + + FAILED: @@ -1322,9 +1336,15 @@ at Misc.tests.cpp: + + + + + + diff --git a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt index 36b05e54dc..8d2b50ea01 100644 --- a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt +++ b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt @@ -890,6 +890,28 @@ at Condition.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt b/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt index c9d3d205bb..083110fae8 100644 --- a/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt @@ -889,6 +889,28 @@ at Condition.tests.cpp: + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/SelfTest/Baselines/tap.sw.approved.txt b/tests/SelfTest/Baselines/tap.sw.approved.txt index a02dbd9543..1b098e3042 100644 --- a/tests/SelfTest/Baselines/tap.sw.approved.txt +++ b/tests/SelfTest/Baselines/tap.sw.approved.txt @@ -434,6 +434,14 @@ ok {test-number} - Template_Fixture_2::m_a.size() == 0 for: 0 == 0 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 with a custom separator--Template_Foo +ok {test-number} - Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--Template_Foo +ok {test-number} - Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--std::vector +ok {test-number} - Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--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 @@ -450,6 +458,14 @@ ok {test-number} - Template_Fixture_2{}.m_a.size() >= 2 for: 2 >= 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 - std::array ok {test-number} - Template_Fixture_2{}.m_a.size() >= 2 for: 2 >= 2 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--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 with a custom separator--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 with a custom separator--std::array +ok {test-number} - Template_Fixture_2{}.m_a.size() >= 2 for: 6 >= 2 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--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 @@ -462,6 +478,12 @@ ok {test-number} - Template_Fixture::m_a == 1 for: 1.0 == 1 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 based test with a custom separator--double +ok {test-number} - Template_Fixture::m_a == 1 for: 1.0 == 1 +# A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--float +ok {test-number} - Template_Fixture::m_a == 1 for: 1.0f == 1 +# A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--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 @@ -474,6 +496,12 @@ ok {test-number} - Nttp_Fixture::value > 0 for: 1 > 0 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 TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--1 +ok {test-number} - Nttp_Fixture::value > 0 for: 1 > 0 +# A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--3 +ok {test-number} - Nttp_Fixture::value > 0 for: 3 > 0 +# A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--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 @@ -2805,12 +2833,24 @@ ok {test-number} - registry.add( "[@no square bracket at end", "", Catch::Source 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 list test case with specialized IndexedTestTypeName--NamedTypes--A +ok {test-number} - Template_Foo{}.size() == 0 for: 0 == 0 +# Template list test case with specialized IndexedTestTypeName--NamedTypes--B +ok {test-number} - Template_Foo{}.size() == 0 for: 0 == 0 +# Template list test case with specialized IndexedTestTypeName--NamedTypes--C +ok {test-number} - Template_Foo{}.size() == 0 for: 0 == 0 # 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 method with test types specified inside std::tuple with a custom separator--MyTypes--0 +ok {test-number} - Template_Fixture::m_a == 1 for: 1 == 1 +# Template test case method with test types specified inside std::tuple with a custom separator--MyTypes--1 +ok {test-number} - Template_Fixture::m_a == 1 for: 1 == 1 +# Template test case method with test types specified inside std::tuple with a custom separator--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} - sizeof(TestType) > 0 for: 1 > 0 # Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 1 @@ -4549,5 +4589,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0 ok {test-number} - # xmlentitycheck ok {test-number} - -1..2272 +1..2292 diff --git a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt index 13449bd40b..872ef5791d 100644 --- a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt @@ -432,6 +432,14 @@ ok {test-number} - Template_Fixture_2::m_a.size() == 0 for: 0 == 0 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 with a custom separator--Template_Foo +ok {test-number} - Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--Template_Foo +ok {test-number} - Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--std::vector +ok {test-number} - Template_Fixture_2::m_a.size() == 0 for: 0 == 0 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--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 @@ -448,6 +456,14 @@ ok {test-number} - Template_Fixture_2{}.m_a.size() >= 2 for: 2 >= 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 - std::array ok {test-number} - Template_Fixture_2{}.m_a.size() >= 2 for: 2 >= 2 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--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 with a custom separator--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 with a custom separator--std::array +ok {test-number} - Template_Fixture_2{}.m_a.size() >= 2 for: 6 >= 2 +# A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--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 @@ -460,6 +476,12 @@ ok {test-number} - Template_Fixture::m_a == 1 for: 1.0 == 1 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 based test with a custom separator--double +ok {test-number} - Template_Fixture::m_a == 1 for: 1.0 == 1 +# A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--float +ok {test-number} - Template_Fixture::m_a == 1 for: 1.0f == 1 +# A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--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 @@ -472,6 +494,12 @@ ok {test-number} - Nttp_Fixture::value > 0 for: 1 > 0 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 TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--1 +ok {test-number} - Nttp_Fixture::value > 0 for: 1 > 0 +# A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--3 +ok {test-number} - Nttp_Fixture::value > 0 for: 3 > 0 +# A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--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 @@ -2798,12 +2826,24 @@ ok {test-number} - registry.add( "[@no square bracket at end", "", Catch::Source 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 list test case with specialized IndexedTestTypeName--NamedTypes--A +ok {test-number} - Template_Foo{}.size() == 0 for: 0 == 0 +# Template list test case with specialized IndexedTestTypeName--NamedTypes--B +ok {test-number} - Template_Foo{}.size() == 0 for: 0 == 0 +# Template list test case with specialized IndexedTestTypeName--NamedTypes--C +ok {test-number} - Template_Foo{}.size() == 0 for: 0 == 0 # 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 method with test types specified inside std::tuple with a custom separator--MyTypes--0 +ok {test-number} - Template_Fixture::m_a == 1 for: 1 == 1 +# Template test case method with test types specified inside std::tuple with a custom separator--MyTypes--1 +ok {test-number} - Template_Fixture::m_a == 1 for: 1 == 1 +# Template test case method with test types specified inside std::tuple with a custom separator--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} - sizeof(TestType) > 0 for: 1 > 0 # Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 1 @@ -4538,5 +4578,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0 ok {test-number} - # xmlentitycheck ok {test-number} - -1..2272 +1..2292 diff --git a/tests/SelfTest/Baselines/teamcity.sw.approved.txt b/tests/SelfTest/Baselines/teamcity.sw.approved.txt index 2a2c40cfc8..3c0a77df6f 100644 --- a/tests/SelfTest/Baselines/teamcity.sw.approved.txt +++ b/tests/SelfTest/Baselines/teamcity.sw.approved.txt @@ -111,6 +111,14 @@ ##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 based test with a custom separator--Template_Foo'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--Template_Foo' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--Template_Foo'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--Template_Foo' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--std::vector'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--std::vector' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--std::vector'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--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}"] @@ -131,6 +139,14 @@ ##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_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--Template_Foo_2'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--Template_Foo_2' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--Template_Foo_2'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--Template_Foo_2' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--std::array'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--std::array' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--std::array'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--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}"] @@ -146,6 +162,12 @@ ##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 based test with a custom separator--double'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--double' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--float'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--float' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--int'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--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}"] @@ -161,6 +183,12 @@ ##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 TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--1'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--1' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--3'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--3' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--6'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--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}"] @@ -599,12 +627,24 @@ ##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 list test case with specialized IndexedTestTypeName--NamedTypes--A'] +##teamcity[testFinished name='Template list test case with specialized IndexedTestTypeName--NamedTypes--A' duration="{duration}"] +##teamcity[testStarted name='Template list test case with specialized IndexedTestTypeName--NamedTypes--B'] +##teamcity[testFinished name='Template list test case with specialized IndexedTestTypeName--NamedTypes--B' duration="{duration}"] +##teamcity[testStarted name='Template list test case with specialized IndexedTestTypeName--NamedTypes--C'] +##teamcity[testFinished name='Template list test case with specialized IndexedTestTypeName--NamedTypes--C' 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 method with test types specified inside std::tuple with a custom separator--MyTypes--0'] +##teamcity[testFinished name='Template test case method with test types specified inside std::tuple with a custom separator--MyTypes--0' duration="{duration}"] +##teamcity[testStarted name='Template test case method with test types specified inside std::tuple with a custom separator--MyTypes--1'] +##teamcity[testFinished name='Template test case method with test types specified inside std::tuple with a custom separator--MyTypes--1' duration="{duration}"] +##teamcity[testStarted name='Template test case method with test types specified inside std::tuple with a custom separator--MyTypes--2'] +##teamcity[testFinished name='Template test case method with test types specified inside std::tuple with a custom separator--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'] diff --git a/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt b/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt index 24ed5d9887..e63200a7c0 100644 --- a/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt @@ -111,6 +111,14 @@ ##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 based test with a custom separator--Template_Foo'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--Template_Foo' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--Template_Foo'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--Template_Foo' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--std::vector'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--std::vector' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--std::vector'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test with a custom separator--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}"] @@ -131,6 +139,14 @@ ##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_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--Template_Foo_2'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--Template_Foo_2' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--Template_Foo_2'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--Template_Foo_2' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--std::array'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--std::array' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--std::array'] +##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test with a custom separator--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}"] @@ -146,6 +162,12 @@ ##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 based test with a custom separator--double'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--double' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--float'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--float' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--int'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test with a custom separator--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}"] @@ -161,6 +183,12 @@ ##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 TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--1'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--1' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--3'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--3' duration="{duration}"] +##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--6'] +##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator--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}"] @@ -599,12 +627,24 @@ ##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 list test case with specialized IndexedTestTypeName--NamedTypes--A'] +##teamcity[testFinished name='Template list test case with specialized IndexedTestTypeName--NamedTypes--A' duration="{duration}"] +##teamcity[testStarted name='Template list test case with specialized IndexedTestTypeName--NamedTypes--B'] +##teamcity[testFinished name='Template list test case with specialized IndexedTestTypeName--NamedTypes--B' duration="{duration}"] +##teamcity[testStarted name='Template list test case with specialized IndexedTestTypeName--NamedTypes--C'] +##teamcity[testFinished name='Template list test case with specialized IndexedTestTypeName--NamedTypes--C' 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 method with test types specified inside std::tuple with a custom separator--MyTypes--0'] +##teamcity[testFinished name='Template test case method with test types specified inside std::tuple with a custom separator--MyTypes--0' duration="{duration}"] +##teamcity[testStarted name='Template test case method with test types specified inside std::tuple with a custom separator--MyTypes--1'] +##teamcity[testFinished name='Template test case method with test types specified inside std::tuple with a custom separator--MyTypes--1' duration="{duration}"] +##teamcity[testStarted name='Template test case method with test types specified inside std::tuple with a custom separator--MyTypes--2'] +##teamcity[testFinished name='Template test case method with test types specified inside std::tuple with a custom separator--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'] diff --git a/tests/SelfTest/Baselines/xml.sw.approved.txt b/tests/SelfTest/Baselines/xml.sw.approved.txt index be57798bf7..67777b2f4a 100644 --- a/tests/SelfTest/Baselines/xml.sw.approved.txt +++ b/tests/SelfTest/Baselines/xml.sw.approved.txt @@ -1814,6 +1814,50 @@ Nor would this + + + + 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 + + + + @@ -1902,6 +1946,50 @@ Nor would this + + + + 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 + + + + @@ -1968,6 +2056,39 @@ Nor would this + + + + 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 + + + + @@ -2034,6 +2155,39 @@ Nor would this + + + + Nttp_Fixture<V>::value > 0 + + + 1 > 0 + + + + + + + + Nttp_Fixture<V>::value > 0 + + + 3 > 0 + + + + + + + + Nttp_Fixture<V>::value > 0 + + + 6 > 0 + + + + @@ -13556,6 +13710,39 @@ Message from section two + + + + Template_Foo<TestType>{}.size() == 0 + + + 0 == 0 + + + + + + + + Template_Foo<TestType>{}.size() == 0 + + + 0 == 0 + + + + + + + + Template_Foo<TestType>{}.size() == 0 + + + 0 == 0 + + + + @@ -13589,6 +13776,39 @@ Message from section two + + + + 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 + + + + @@ -21707,6 +21927,6 @@ b1! - - + + diff --git a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt index 08ff6c4370..e4b8f19bed 100644 --- a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt @@ -1814,6 +1814,50 @@ Nor would this + + + + 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 + + + + @@ -1902,6 +1946,50 @@ Nor would this + + + + 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 + + + + @@ -1968,6 +2056,39 @@ Nor would this + + + + 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 + + + + @@ -2034,6 +2155,39 @@ Nor would this + + + + Nttp_Fixture<V>::value > 0 + + + 1 > 0 + + + + + + + + Nttp_Fixture<V>::value > 0 + + + 3 > 0 + + + + + + + + Nttp_Fixture<V>::value > 0 + + + 6 > 0 + + + + @@ -13556,6 +13710,39 @@ Message from section two + + + + Template_Foo<TestType>{}.size() == 0 + + + 0 == 0 + + + + + + + + Template_Foo<TestType>{}.size() == 0 + + + 0 == 0 + + + + + + + + Template_Foo<TestType>{}.size() == 0 + + + 0 == 0 + + + + @@ -13589,6 +13776,39 @@ Message from section two + + + + 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 + + + + @@ -21706,6 +21926,6 @@ b1! - - + + diff --git a/tests/SelfTest/UsageTests/CustomNaming.tests.cpp b/tests/SelfTest/UsageTests/CustomNaming.tests.cpp new file mode 100644 index 0000000000..f2a5f3fa79 --- /dev/null +++ b/tests/SelfTest/UsageTests/CustomNaming.tests.cpp @@ -0,0 +1,86 @@ + +// 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 + +// `CATCH_CONFIG_NAME_SEPARATOR` should control how parameterized tests are named. +// It must be defined before the macro header is included. +#define CATCH_CONFIG_NAME_SEPARATOR "--" + +#include +#include +#include + +namespace { + + template struct Template_Fixture { + Template_Fixture(): m_a( 1 ) {} + + T m_a; + }; + + template struct Template_Fixture_2 { + Template_Fixture_2() {} + + 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 + +TEMPLATE_TEST_CASE_METHOD(Template_Fixture, "A TEMPLATE_TEST_CASE_METHOD based test with a custom separator", "[class][template][custom_separator]", int, float, double) { + REQUIRE( Template_Fixture::m_a == 1 ); +} + +TEMPLATE_TEST_CASE_METHOD_SIG(Nttp_Fixture, "A TEMPLATE_TEST_CASE_METHOD_SIG based test with a custom separator", "[class][template][nttp][custom_separator]",((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 with a custom separator","[class][template][product][custom_separator]",(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 with a custom separator", "[class][template][product][nttp][custom_separator]", ((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 with a custom separator", "[class][template][list][custom_separator]", MyTypes) +{ + REQUIRE( Template_Fixture::m_a == 1 ); +} + + +// Creating an IndextTestTypeName specialization should alter how template list tests are named. +template struct NamedType {}; +namespace Catch { + template + struct IndexedTestTypeName> { + std::string operator()(size_t) const { + return {C}; + } + }; +} +using NamedTypes = std::tuple, NamedType<'B'>, NamedType<'C'>>; +TEMPLATE_LIST_TEST_CASE_METHOD(Template_Foo, "Template list test case with specialized IndexedTestTypeName", "[class][template][list][indexedtesttypename]", NamedTypes) +{ + REQUIRE( Template_Foo{}.size() == 0 ); +}