basedOpinionated utility library |
git clone git://git.dimitrijedobrota.com/based.git |
Log | Files | Refs | README | LICENSE | HACKING | CONTRIBUTING | CODE_OF_CONDUCT | BUILDING |
is_null_pointer_test.cpp (770B)
0 #define CATCH_CONFIG_RUNTIME_STATIC_REQUIRE
2 #include <catch2/catch_test_macros.hpp>
4 #include "based/trait/is/null_pointer.hpp"
6 TEST_CASE("is_null_pointer", "[trait/is_null_pointer]")
7 {
8 double test = 0;
10 // NOLINTBEGIN(*array*)
11 // clang-format off
12 STATIC_REQUIRE(based::is_null_pointer_v<decltype(nullptr)>);
13 STATIC_REQUIRE(!based::is_null_pointer_v<void>);
14 STATIC_REQUIRE(!based::is_null_pointer_v<const void>);
15 STATIC_REQUIRE(!based::is_null_pointer_v<volatile void>);
16 STATIC_REQUIRE(!based::is_null_pointer_v<void*>);
17 STATIC_REQUIRE(!based::is_null_pointer_v<int>);
18 STATIC_REQUIRE(!based::is_null_pointer_v<decltype(test)>);
19 STATIC_REQUIRE(!based::is_null_pointer_v<std::is_null_pointer<void>>);
20 // clang-format on
21 // NOLINTEND(*array*)
22 }