diff options
| author | Martin Hořeňovský | 2025-07-15 11:49:39 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2025-07-15 11:49:39 +0200 |
| commit | b9c018b38a98f7f9d15e4f6b9e60ec90cd393b7b (patch) | |
| tree | 5f558e3de00fb057e1887b0931853182efea06aa /tests/SelfTest/IntrospectiveTests/Clara.tests.cpp | |
| parent | 050e14dce05b93965ecf60ec524fa4cb3f91bb70 (diff) | |
| download | catch3-b9c018b38a98f7f9d15e4f6b9e60ec90cd393b7b.tar.gz | |
Use template variables for our trait-likes in Clara
Diffstat (limited to 'tests/SelfTest/IntrospectiveTests/Clara.tests.cpp')
| -rw-r--r-- | tests/SelfTest/IntrospectiveTests/Clara.tests.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/SelfTest/IntrospectiveTests/Clara.tests.cpp b/tests/SelfTest/IntrospectiveTests/Clara.tests.cpp index 53023b50..0fadad6d 100644 --- a/tests/SelfTest/IntrospectiveTests/Clara.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/Clara.tests.cpp @@ -25,19 +25,19 @@ TEST_CASE("is_unary_function", "[clara][compilation]") { auto nullary1 = []() {}; auto nullary2 = []() {return 42;}; - STATIC_REQUIRE(Catch::Clara::Detail::is_unary_function<decltype(unary1)>::value); - STATIC_REQUIRE(Catch::Clara::Detail::is_unary_function<decltype(unary2)>::value); - STATIC_REQUIRE(Catch::Clara::Detail::is_unary_function<decltype(unary3)>::value); - STATIC_REQUIRE(Catch::Clara::Detail::is_unary_function<decltype(unary4)>::value); - STATIC_REQUIRE(Catch::Clara::Detail::is_unary_function<decltype(unary5)>::value); - STATIC_REQUIRE(Catch::Clara::Detail::is_unary_function<decltype(unary6)>::value); - - STATIC_REQUIRE_FALSE(Catch::Clara::Detail::is_unary_function<decltype(binary1)>::value); - STATIC_REQUIRE_FALSE(Catch::Clara::Detail::is_unary_function<decltype(binary2)>::value); - STATIC_REQUIRE_FALSE(Catch::Clara::Detail::is_unary_function<decltype(nullary1)>::value); - STATIC_REQUIRE_FALSE(Catch::Clara::Detail::is_unary_function<decltype(nullary2)>::value); - STATIC_REQUIRE_FALSE(Catch::Clara::Detail::is_unary_function<int>::value); - STATIC_REQUIRE_FALSE(Catch::Clara::Detail::is_unary_function<std::string const&>::value); + STATIC_REQUIRE(Catch::Clara::Detail::is_unary_function_v<decltype(unary1)>); + STATIC_REQUIRE(Catch::Clara::Detail::is_unary_function_v<decltype(unary2)>); + STATIC_REQUIRE(Catch::Clara::Detail::is_unary_function_v<decltype(unary3)>); + STATIC_REQUIRE(Catch::Clara::Detail::is_unary_function_v<decltype(unary4)>); + STATIC_REQUIRE(Catch::Clara::Detail::is_unary_function_v<decltype(unary5)>); + STATIC_REQUIRE(Catch::Clara::Detail::is_unary_function_v<decltype(unary6)>); + + STATIC_REQUIRE_FALSE(Catch::Clara::Detail::is_unary_function_v<decltype(binary1)>); + STATIC_REQUIRE_FALSE(Catch::Clara::Detail::is_unary_function_v<decltype(binary2)>); + STATIC_REQUIRE_FALSE(Catch::Clara::Detail::is_unary_function_v<decltype(nullary1)>); + STATIC_REQUIRE_FALSE(Catch::Clara::Detail::is_unary_function_v<decltype(nullary2)>); + STATIC_REQUIRE_FALSE(Catch::Clara::Detail::is_unary_function_v<int>); + STATIC_REQUIRE_FALSE(Catch::Clara::Detail::is_unary_function_v<std::string const&>); } |