Skip to content

Commit

Permalink
Format file
Browse files Browse the repository at this point in the history
  • Loading branch information
a4z committed May 10, 2024
1 parent 01fda18 commit 70d1f70
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/base/typename_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<char, char_traits<char>, allocator<char>>
// 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<char, char_traits<char>, allocator<char>> and this is nothing
// you want to see (except for debug purposes)
namespace a4z {
template <>
constexpr auto type_name<std::string>() {
Expand All @@ -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<std::string>();
constexpr auto tn = a4z::type_name<std::string>();
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") {
Expand Down

0 comments on commit 70d1f70

Please sign in to comment.