basedOpinionated utility library |
git clone git://git.dimitrijedobrota.com/based.git |
Log | Files | Refs | README | LICENSE | HACKING | CONTRIBUTING | CODE_OF_CONDUCT | BUILDING |
remove_pointer_test.cpp (743B)
0 #define CATCH_CONFIG_RUNTIME_STATIC_REQUIRE
2 #include <catch2/catch_test_macros.hpp>
4 #include "based/concepts/is/same.hpp"
5 #include "based/trait/remove/pointer.hpp"
7 using based::SameAs;
9 TEST_CASE("remove_pointer", "[trait/remove_pointer]")
10 {
11 // NOLINTBEGIN(*array*)
12 // clang-format off
13 STATIC_REQUIRE(SameAs<based::remove_pointer_t<int>, int>);
14 STATIC_REQUIRE(SameAs<based::remove_pointer_t<int*>, int>);
15 STATIC_REQUIRE(SameAs<based::remove_pointer_t<int**>, int*>);
16 STATIC_REQUIRE(SameAs<based::remove_pointer_t<int* const>, int>);
17 STATIC_REQUIRE(SameAs<based::remove_pointer_t<int* volatile>, int>);
18 STATIC_REQUIRE(SameAs<based::remove_pointer_t<int* const volatile>, int>);
19 // clang-format on
20 // NOLINTEND(*array*)
21 }