basedOpinionated utility library |
git clone git://git.dimitrijedobrota.com/based.git |
Log | Files | Refs | README | LICENSE | HACKING | CONTRIBUTING | CODE_OF_CONDUCT | BUILDING |
is_lvalue_reference_test.cpp (1598B)
0 #define CATCH_CONFIG_RUNTIME_STATIC_REQUIRE
2 #include "based/concept/is_lvalue_reference.hpp"
4 #include <catch2/catch_test_macros.hpp>
6 TEST_CASE("IsLValueReference", "[concept/IsLValueReference]")
7 {
8 // clang-format off
9 // NOLINTBEGIN(*array*)
10 STATIC_REQUIRE(based::trait::IsLValueRef<const int&>);
11 STATIC_REQUIRE(based::trait::IsLValueRef<const int(&)[2]>);
12 STATIC_REQUIRE(based::trait::IsLValueRef<const volatile int&>);
13 STATIC_REQUIRE(based::trait::IsLValueRef<const volatile int(&)[2]>);
14 STATIC_REQUIRE(based::trait::IsLValueRef<int&>);
15 STATIC_REQUIRE(based::trait::IsLValueRef<int(&)[2]>);
16 STATIC_REQUIRE(based::trait::IsLValueRef<volatile int&>);
17 STATIC_REQUIRE(based::trait::IsLValueRef<volatile int(&)[2]>);
18 STATIC_REQUIRE(not based::trait::IsLValueRef<const int>);
19 STATIC_REQUIRE(not based::trait::IsLValueRef<const int[2]>);
20 STATIC_REQUIRE(not based::trait::IsLValueRef<const volatile int>);
21 STATIC_REQUIRE(not based::trait::IsLValueRef<const volatile int[2]>);
22 STATIC_REQUIRE(not based::trait::IsLValueRef<int&&>);
23 STATIC_REQUIRE(not based::trait::IsLValueRef<int>);
24 STATIC_REQUIRE(not based::trait::IsLValueRef<int(&&)[2]>);
25 STATIC_REQUIRE(not based::trait::IsLValueRef<int[2]>);
26 STATIC_REQUIRE(not based::trait::IsLValueRef<int(int)>);
27 STATIC_REQUIRE(not based::trait::IsLValueRef<volatile int&&>);
28 STATIC_REQUIRE(not based::trait::IsLValueRef<volatile int>);
29 STATIC_REQUIRE(not based::trait::IsLValueRef<volatile int(&&)[2]>);
30 STATIC_REQUIRE(not based::trait::IsLValueRef<volatile int[2]>);
31 // NOLINTEND(*array*)
32 // clang-format on
33 }