From c18b88f7e3101ffd9f247ee44738697a0af238f0 Mon Sep 17 00:00:00 2001 From: Chris Sarbora Date: Wed, 29 Nov 2023 21:33:01 -0800 Subject: [PATCH] Enable configuration of Catch2 test naming Catch2 produces tests names with spaces by default when using type-parametric macros like `TEMPLATE_TEST_CASE` and `TEMPLATE_PRODUCT_TEST_CASE`. For some test-runners that are incompatible with spaces in test names, this presents a significant problem: It's possible to define a test that's impossible to run. This adds a `CATCH_CONFIG_NAME_SEPARATOR` configuration value that can be used to override the separator string used during test naming. --- BUILD.bazel | 1 + src/catch2/catch_user_config.hpp.in | 1 + .../internal/catch_template_test_registry.hpp | 18 +- tests/CMakeLists.txt | 1 + .../Baselines/automake.sw.approved.txt | 17 ++ .../Baselines/automake.sw.multi.approved.txt | 17 ++ .../Baselines/compact.sw.approved.txt | 21 +- .../Baselines/compact.sw.multi.approved.txt | 21 +- .../Baselines/console.std.approved.txt | 4 +- .../Baselines/console.sw.approved.txt | 202 +++++++++++++++++- .../Baselines/console.sw.multi.approved.txt | 202 +++++++++++++++++- .../SelfTest/Baselines/junit.sw.approved.txt | 19 +- .../Baselines/junit.sw.multi.approved.txt | 19 +- .../Baselines/sonarqube.sw.approved.txt | 19 ++ .../Baselines/sonarqube.sw.multi.approved.txt | 19 ++ tests/SelfTest/Baselines/tap.sw.approved.txt | 36 +++- .../Baselines/tap.sw.multi.approved.txt | 36 +++- .../Baselines/teamcity.sw.approved.txt | 34 +++ .../Baselines/teamcity.sw.multi.approved.txt | 34 +++ tests/SelfTest/Baselines/xml.sw.approved.txt | 191 ++++++++++++++++- .../Baselines/xml.sw.multi.approved.txt | 191 ++++++++++++++++- .../UsageTests/CustomNaming.tests.cpp | 69 ++++++ 22 files changed, 1148 insertions(+), 24 deletions(-) create mode 100644 tests/SelfTest/UsageTests/CustomNaming.tests.cpp diff --git a/BUILD.bazel b/BUILD.bazel index c51bf57e..4803b25c 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 10d61937..c4e17912 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 0ea354bc..7abc684d 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 ) = [](){ \ @@ -181,7 +187,7 @@ void reg_tests() { \ 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 + std::to_string(index), Tags } ), index++)... };/* NOLINT */\ } \ };\ static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \ @@ -217,7 +223,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 +273,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 ) = [](){\ @@ -316,7 +322,7 @@ void reg_tests(){\ 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 + std::to_string(index), Tags } ), index++)... };/* NOLINT */ \ }\ };\ static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\ diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d3ab14a7..a38aeecf 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 88c23e17..c6fbbcfe 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 @@ -248,6 +262,9 @@ Message from section two :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 a37b1a2b..9a6f177b 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 @@ -241,6 +255,9 @@ :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 0669fdbb..12a4370f 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 @@ -1737,6 +1751,9 @@ Tag.tests.cpp:: passed: testCase.tags, VectorContains( Tag( "tag wi 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 +2706,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: 434 | 329 passed | 85 failed | 6 skipped | 14 failed as expected +assertions: 2277 | 2096 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 214fef74..ee122051 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 @@ -1730,6 +1744,9 @@ Tag.tests.cpp:: passed: testCase.tags, VectorContains( Tag( "tag wi 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 +2695,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: 434 | 329 passed | 85 failed | 6 skipped | 14 failed as expected +assertions: 2277 | 2096 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 25426256..b01d7f9c 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: 434 | 343 passed | 70 failed | 7 skipped | 14 failed as expected +assertions: 2260 | 2096 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 077b7bf7..4ed468e0 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 ------------------------------------------------------------------------------- @@ -11667,6 +11829,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 +18949,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: 434 | 329 passed | 85 failed | 6 skipped | 14 failed as expected +assertions: 2277 | 2096 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 5d204990..83c26ef2 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 ------------------------------------------------------------------------------- @@ -11660,6 +11822,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 +18938,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: 434 | 329 passed | 85 failed | 6 skipped | 14 failed as expected +assertions: 2277 | 2096 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 48eccfc3..4b89953e 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: @@ -1326,6 +1340,9 @@ 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 d270c88f..16cadca4 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: @@ -1325,6 +1339,9 @@ at Misc.tests.cpp: + + + diff --git a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt index 36b05e54..3e20b756 100644 --- a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt +++ b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt @@ -890,6 +890,25 @@ 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 c9d3d205..59da2153 100644 --- a/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt @@ -889,6 +889,25 @@ at Condition.tests.cpp: + + + + + + + + + + + + + + + + + + + diff --git a/tests/SelfTest/Baselines/tap.sw.approved.txt b/tests/SelfTest/Baselines/tap.sw.approved.txt index a02dbd95..2f3ae361 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 @@ -2811,6 +2839,12 @@ ok {test-number} - Template_Fixture::m_a == 1 for: 1 == 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 +4583,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0 ok {test-number} - # xmlentitycheck ok {test-number} - -1..2272 +1..2289 diff --git a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt index 13449bd4..d47f7005 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 @@ -2804,6 +2832,12 @@ ok {test-number} - Template_Fixture::m_a == 1 for: 1 == 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 +4572,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0 ok {test-number} - # xmlentitycheck ok {test-number} - -1..2272 +1..2289 diff --git a/tests/SelfTest/Baselines/teamcity.sw.approved.txt b/tests/SelfTest/Baselines/teamcity.sw.approved.txt index 2a2c40cf..8ea9af1b 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}"] @@ -605,6 +633,12 @@ ##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 24ed5d98..64282871 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}"] @@ -605,6 +633,12 @@ ##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 be57798b..2d218926 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 + + + + @@ -13589,6 +13743,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 +21894,6 @@ b1! - - + + diff --git a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt index 08ff6c43..5b827f13 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 + + + + @@ -13589,6 +13743,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 +21893,6 @@ b1! - - + + diff --git a/tests/SelfTest/UsageTests/CustomNaming.tests.cpp b/tests/SelfTest/UsageTests/CustomNaming.tests.cpp new file mode 100644 index 00000000..3f7e1581 --- /dev/null +++ b/tests/SelfTest/UsageTests/CustomNaming.tests.cpp @@ -0,0 +1,69 @@ + +// 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 ); +}