diff --git a/tests/base/typename_test.cpp b/tests/base/typename_test.cpp index 38291d6..a91299b 100644 --- a/tests/base/typename_test.cpp +++ b/tests/base/typename_test.cpp @@ -49,9 +49,10 @@ SCENARIO("Check struct in a namespace typename") { } } -// This shows how to customize the typename for a type where compilers have different display names -// std::string could be something like basic_string, allocator> -// and this is nothing you want to see (except for debug purposes) +// This shows how to customize the typename for a type where compilers have +// different display names std::string could be something like +// basic_string, allocator> and this is nothing +// you want to see (except for debug purposes) namespace a4z { template <> constexpr auto type_name() { @@ -62,7 +63,8 @@ namespace a4z { // std::string is always a bit special , basic_string blab bla bla SCENARIO("Check specialized typename") { GIVEN("the typename of std::string") { - auto tn = a4z::type_name(); + constexpr auto tn = a4z::type_name(); + static_assert(a4z::equal("std::string", tn.c_str())); // real compile time WHEN("expecting the according typename") { std::string expected = "std::string"; THEN("the typename matches the expected one") {