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