diff options
| author | Martin Hořeňovský | 2026-04-24 11:21:04 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2026-04-24 11:21:04 +0200 |
| commit | 11a96e186af8b2779d93e550217e9c95d3f89371 (patch) | |
| tree | 0f478d0761c8a951c9c238f5504fa020929ae7fa /tests/SelfTest/UsageTests/ToStringTuple.tests.cpp | |
| parent | 10f62484bff73e3a58a411e2e10b4e1c13cfba9f (diff) | |
| download | catch3-11a96e186af8b2779d93e550217e9c95d3f89371.tar.gz | |
Cleanups from static analysis
Diffstat (limited to 'tests/SelfTest/UsageTests/ToStringTuple.tests.cpp')
| -rw-r--r-- | tests/SelfTest/UsageTests/ToStringTuple.tests.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/SelfTest/UsageTests/ToStringTuple.tests.cpp b/tests/SelfTest/UsageTests/ToStringTuple.tests.cpp index 9d1d2c46..34000cf0 100644 --- a/tests/SelfTest/UsageTests/ToStringTuple.tests.cpp +++ b/tests/SelfTest/UsageTests/ToStringTuple.tests.cpp @@ -13,7 +13,7 @@ TEST_CASE( "tuple<>", "[toString][tuple]" ) { - typedef std::tuple<> type; + using type = std::tuple<>; CHECK( "{ }" == ::Catch::Detail::stringify(type{}) ); type value {}; CHECK( "{ }" == ::Catch::Detail::stringify(value) ); @@ -21,33 +21,33 @@ TEST_CASE( "tuple<>", "[toString][tuple]" ) TEST_CASE( "tuple<int>", "[toString][tuple]" ) { - typedef std::tuple<int> type; + using type = std::tuple<int>; CHECK( "{ 0 }" == ::Catch::Detail::stringify(type{0}) ); } TEST_CASE( "tuple<float,int>", "[toString][tuple]" ) { - typedef std::tuple<float,int> type; + using type = std::tuple<float,int>; CHECK( "1.5f" == ::Catch::Detail::stringify(float(1.5)) ); CHECK( "{ 1.5f, 0 }" == ::Catch::Detail::stringify(type{1.5f,0}) ); } TEST_CASE( "tuple<string,string>", "[toString][tuple]" ) { - typedef std::tuple<std::string,std::string> type; + using type = std::tuple<std::string,std::string>; CHECK( "{ \"hello\", \"world\" }" == ::Catch::Detail::stringify(type{"hello","world"}) ); } TEST_CASE( "tuple<tuple<int>,tuple<>,float>", "[toString][tuple]" ) { - typedef std::tuple<std::tuple<int>,std::tuple<>,float> type; + using type = std::tuple<std::tuple<int>,std::tuple<>,float>; type value { std::tuple<int>{42}, {}, 1.5f }; CHECK( "{ { 42 }, { }, 1.5f }" == ::Catch::Detail::stringify(value) ); } TEST_CASE( "tuple<nullptr,int,const char *>", "[approvals][toString][tuple]" ) { - typedef std::tuple<std::nullptr_t,int,const char *> type; + using type = std::tuple<std::nullptr_t,int,const char *>; type value { nullptr, 42, "Catch me" }; CHECK( "{ nullptr, 42, \"Catch me\" }" == ::Catch::Detail::stringify(value) ); } |