Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Update include guard in tests to allow testing in c++14.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrhemstad committed Oct 22, 2020
1 parent e5a26a6 commit 2f8a182
Show file tree
Hide file tree
Showing 71 changed files with 146 additions and 146 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

int main(int, char**)
{
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
typedef cuda::std::bool_constant<true> _t;
static_assert(_t::value, "");
static_assert((cuda::std::is_same<_t::value_type, bool>::value), "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void test_is_base_of()
static_assert((cuda::std::is_base_of<const T, U>::value), "");
static_assert((cuda::std::is_base_of<T, const U>::value), "");
static_assert((cuda::std::is_base_of<const T, const U>::value), "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert((cuda::std::is_base_of_v<T, U>), "");
static_assert((cuda::std::is_base_of_v<const T, U>), "");
static_assert((cuda::std::is_base_of_v<T, const U>), "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void test_is_base_of()
static_assert((cuda::std::is_base_of<const T, U>::value), "");
static_assert((cuda::std::is_base_of<T, const U>::value), "");
static_assert((cuda::std::is_base_of<const T, const U>::value), "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert((cuda::std::is_base_of_v<T, U>), "");
static_assert((cuda::std::is_base_of_v<const T, U>), "");
static_assert((cuda::std::is_base_of_v<T, const U>), "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void test_is_convertible()
static_assert((cuda::std::is_convertible<const T, U>::value), "");
static_assert((cuda::std::is_convertible<T, const U>::value), "");
static_assert((cuda::std::is_convertible<const T, const U>::value), "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert((cuda::std::is_convertible_v<T, U>), "");
static_assert((cuda::std::is_convertible_v<const T, U>), "");
static_assert((cuda::std::is_convertible_v<T, const U>), "");
Expand All @@ -37,7 +37,7 @@ void test_is_not_convertible()
static_assert((!cuda::std::is_convertible<const T, U>::value), "");
static_assert((!cuda::std::is_convertible<T, const U>::value), "");
static_assert((!cuda::std::is_convertible<const T, const U>::value), "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert((!cuda::std::is_convertible_v<T, U>), "");
static_assert((!cuda::std::is_convertible_v<const T, U>), "");
static_assert((!cuda::std::is_convertible_v<T, const U>), "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void test_is_same()
static_assert((!cuda::std::is_same<const T, U>::value), "");
static_assert((!cuda::std::is_same<T, const U>::value), "");
static_assert(( cuda::std::is_same<const T, const U>::value), "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert(( cuda::std::is_same_v<T, U>), "");
static_assert((!cuda::std::is_same_v<const T, U>), "");
static_assert((!cuda::std::is_same_v<T, const U>), "");
Expand All @@ -38,7 +38,7 @@ void test_is_same_ref()
static_assert((cuda::std::is_same<const T, U>::value), "");
static_assert((cuda::std::is_same<T, const U>::value), "");
static_assert((cuda::std::is_same<const T, const U>::value), "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert((cuda::std::is_same_v<T, U>), "");
static_assert((cuda::std::is_same_v<const T, U>), "");
static_assert((cuda::std::is_same_v<T, const U>), "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct HasType : cuda::std::false_type {};
template <class T>
struct HasType<T, typename Voider<typename T::type>::type> : cuda::std::true_type {};

#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
template <typename T, typename U>
struct test_invoke_result;

Expand All @@ -68,12 +68,12 @@ __host__ __device__
void test_result_of()
{
ASSERT_SAME_TYPE(U, typename cuda::std::result_of<T>::type);
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
test_invoke_result<T, U>::call();
#endif
}

#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
template <typename T>
struct test_invoke_no_result;

Expand All @@ -96,7 +96,7 @@ void test_no_result()
#if TEST_STD_VER >= 11
static_assert((!HasType<cuda::std::result_of<T> >::value), "");
#endif
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
test_invoke_no_result<T>::call();
#endif
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct wat
struct F {};
struct FD : public F {};

#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
template <typename T, typename U>
struct test_invoke_result;

Expand All @@ -57,7 +57,7 @@ void test_result_of_imp()
#if TEST_STD_VER > 11
ASSERT_SAME_TYPE(U, cuda::std::result_of_t<T>);
#endif
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
test_invoke_result<T, U>::call();
#endif
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void test_alignment_of()
static_assert( cuda::std::alignment_of<const T>::value == A, "");
static_assert( cuda::std::alignment_of<volatile T>::value == A, "");
static_assert( cuda::std::alignment_of<const volatile T>::value == A, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert( cuda::std::alignment_of_v<T> == A, "");
static_assert( cuda::std::alignment_of_v<const T> == A, "");
static_assert( cuda::std::alignment_of_v<volatile T> == A, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void test_extent()
static_assert((cuda::std::extent<const T>::value == A), "");
static_assert((cuda::std::extent<volatile T>::value == A), "");
static_assert((cuda::std::extent<const volatile T>::value == A), "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert((cuda::std::extent_v<T> == A), "");
static_assert((cuda::std::extent_v<const T> == A), "");
static_assert((cuda::std::extent_v<volatile T> == A), "");
Expand All @@ -38,7 +38,7 @@ void test_extent1()
static_assert((cuda::std::extent<const T, 1>::value == A), "");
static_assert((cuda::std::extent<volatile T, 1>::value == A), "");
static_assert((cuda::std::extent<const volatile T, 1>::value == A), "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert((cuda::std::extent_v<T, 1> == A), "");
static_assert((cuda::std::extent_v<const T, 1> == A), "");
static_assert((cuda::std::extent_v<volatile T, 1> == A), "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void test_rank()
static_assert( cuda::std::rank<const T>::value == A, "");
static_assert( cuda::std::rank<volatile T>::value == A, "");
static_assert( cuda::std::rank<const volatile T>::value == A, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert( cuda::std::rank_v<T> == A, "");
static_assert( cuda::std::rank_v<const T> == A, "");
static_assert( cuda::std::rank_v<volatile T> == A, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void test_is_array()
static_assert( cuda::std::is_array<const T>::value, "");
static_assert( cuda::std::is_array<volatile T>::value, "");
static_assert( cuda::std::is_array<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert( cuda::std::is_array_v<T>, "");
static_assert( cuda::std::is_array_v<const T>, "");
static_assert( cuda::std::is_array_v<volatile T>, "");
Expand All @@ -38,7 +38,7 @@ void test_is_not_array()
static_assert(!cuda::std::is_array<const T>::value, "");
static_assert(!cuda::std::is_array<volatile T>::value, "");
static_assert(!cuda::std::is_array<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert(!cuda::std::is_array_v<T>, "");
static_assert(!cuda::std::is_array_v<const T>, "");
static_assert(!cuda::std::is_array_v<volatile T>, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void test_is_class()
static_assert( cuda::std::is_class<const T>::value, "");
static_assert( cuda::std::is_class<volatile T>::value, "");
static_assert( cuda::std::is_class<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert( cuda::std::is_class_v<T>, "");
static_assert( cuda::std::is_class_v<const T>, "");
static_assert( cuda::std::is_class_v<volatile T>, "");
Expand All @@ -38,7 +38,7 @@ void test_is_not_class()
static_assert(!cuda::std::is_class<const T>::value, "");
static_assert(!cuda::std::is_class<volatile T>::value, "");
static_assert(!cuda::std::is_class<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert(!cuda::std::is_class_v<T>, "");
static_assert(!cuda::std::is_class_v<const T>, "");
static_assert(!cuda::std::is_class_v<volatile T>, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void test_is_enum()
static_assert( cuda::std::is_enum<const T>::value, "");
static_assert( cuda::std::is_enum<volatile T>::value, "");
static_assert( cuda::std::is_enum<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert( cuda::std::is_enum_v<T>, "");
static_assert( cuda::std::is_enum_v<const T>, "");
static_assert( cuda::std::is_enum_v<volatile T>, "");
Expand All @@ -38,7 +38,7 @@ void test_is_not_enum()
static_assert(!cuda::std::is_enum<const T>::value, "");
static_assert(!cuda::std::is_enum<volatile T>::value, "");
static_assert(!cuda::std::is_enum<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert(!cuda::std::is_enum_v<T>, "");
static_assert(!cuda::std::is_enum_v<const T>, "");
static_assert(!cuda::std::is_enum_v<volatile T>, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void test_is_floating_point()
static_assert( cuda::std::is_floating_point<const T>::value, "");
static_assert( cuda::std::is_floating_point<volatile T>::value, "");
static_assert( cuda::std::is_floating_point<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert( cuda::std::is_floating_point_v<T>, "");
static_assert( cuda::std::is_floating_point_v<const T>, "");
static_assert( cuda::std::is_floating_point_v<volatile T>, "");
Expand All @@ -40,7 +40,7 @@ void test_is_not_floating_point()
static_assert(!cuda::std::is_floating_point<const T>::value, "");
static_assert(!cuda::std::is_floating_point<volatile T>::value, "");
static_assert(!cuda::std::is_floating_point<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert(!cuda::std::is_floating_point_v<T>, "");
static_assert(!cuda::std::is_floating_point_v<const T>, "");
static_assert(!cuda::std::is_floating_point_v<volatile T>, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct test_is_function {
static_assert( cuda::std::is_function<const T>::value, "");
static_assert( cuda::std::is_function<volatile T>::value, "");
static_assert( cuda::std::is_function<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert( cuda::std::is_function_v<T>, "");
static_assert( cuda::std::is_function_v<const T>, "");
static_assert( cuda::std::is_function_v<volatile T>, "");
Expand All @@ -40,7 +40,7 @@ struct test_is_not_function {
static_assert(!cuda::std::is_function<const T>::value, "");
static_assert(!cuda::std::is_function<volatile T>::value, "");
static_assert(!cuda::std::is_function<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert(!cuda::std::is_function_v<T>, "");
static_assert(!cuda::std::is_function_v<const T>, "");
static_assert(!cuda::std::is_function_v<volatile T>, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void test_is_integral()
static_assert( cuda::std::is_integral<const T>::value, "");
static_assert( cuda::std::is_integral<volatile T>::value, "");
static_assert( cuda::std::is_integral<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert( cuda::std::is_integral_v<T>, "");
static_assert( cuda::std::is_integral_v<const T>, "");
static_assert( cuda::std::is_integral_v<volatile T>, "");
Expand All @@ -38,7 +38,7 @@ void test_is_not_integral()
static_assert(!cuda::std::is_integral<const T>::value, "");
static_assert(!cuda::std::is_integral<volatile T>::value, "");
static_assert(!cuda::std::is_integral<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert(!cuda::std::is_integral_v<T>, "");
static_assert(!cuda::std::is_integral_v<const T>, "");
static_assert(!cuda::std::is_integral_v<volatile T>, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void test_is_lvalue_reference()
static_assert( cuda::std::is_lvalue_reference<const T>::value, "");
static_assert( cuda::std::is_lvalue_reference<volatile T>::value, "");
static_assert( cuda::std::is_lvalue_reference<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert( cuda::std::is_lvalue_reference_v<T>, "");
static_assert( cuda::std::is_lvalue_reference_v<const T>, "");
static_assert( cuda::std::is_lvalue_reference_v<volatile T>, "");
Expand All @@ -38,7 +38,7 @@ void test_is_not_lvalue_reference()
static_assert(!cuda::std::is_lvalue_reference<const T>::value, "");
static_assert(!cuda::std::is_lvalue_reference<volatile T>::value, "");
static_assert(!cuda::std::is_lvalue_reference<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert(!cuda::std::is_lvalue_reference_v<T>, "");
static_assert(!cuda::std::is_lvalue_reference_v<const T>, "");
static_assert(!cuda::std::is_lvalue_reference_v<volatile T>, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void test_is_member_object_pointer()
static_assert( cuda::std::is_member_object_pointer<const T>::value, "");
static_assert( cuda::std::is_member_object_pointer<volatile T>::value, "");
static_assert( cuda::std::is_member_object_pointer<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert( cuda::std::is_member_object_pointer_v<T>, "");
static_assert( cuda::std::is_member_object_pointer_v<const T>, "");
static_assert( cuda::std::is_member_object_pointer_v<volatile T>, "");
Expand All @@ -38,7 +38,7 @@ void test_is_not_member_object_pointer()
static_assert(!cuda::std::is_member_object_pointer<const T>::value, "");
static_assert(!cuda::std::is_member_object_pointer<volatile T>::value, "");
static_assert(!cuda::std::is_member_object_pointer<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert(!cuda::std::is_member_object_pointer_v<T>, "");
static_assert(!cuda::std::is_member_object_pointer_v<const T>, "");
static_assert(!cuda::std::is_member_object_pointer_v<volatile T>, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void test_is_member_pointer()
static_assert( cuda::std::is_member_pointer<const T>::value, "");
static_assert( cuda::std::is_member_pointer<volatile T>::value, "");
static_assert( cuda::std::is_member_pointer<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert( cuda::std::is_member_pointer_v<T>, "");
static_assert( cuda::std::is_member_pointer_v<const T>, "");
static_assert( cuda::std::is_member_pointer_v<volatile T>, "");
Expand All @@ -38,7 +38,7 @@ void test_is_not_member_pointer()
static_assert(!cuda::std::is_member_pointer<const T>::value, "");
static_assert(!cuda::std::is_member_pointer<volatile T>::value, "");
static_assert(!cuda::std::is_member_pointer<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert(!cuda::std::is_member_pointer_v<T>, "");
static_assert(!cuda::std::is_member_pointer_v<const T>, "");
static_assert(!cuda::std::is_member_pointer_v<volatile T>, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void test_is_null_pointer()
static_assert( cuda::std::is_null_pointer<const T>::value, "");
static_assert( cuda::std::is_null_pointer<volatile T>::value, "");
static_assert( cuda::std::is_null_pointer<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert( cuda::std::is_null_pointer_v<T>, "");
static_assert( cuda::std::is_null_pointer_v<const T>, "");
static_assert( cuda::std::is_null_pointer_v<volatile T>, "");
Expand All @@ -40,7 +40,7 @@ void test_is_not_null_pointer()
static_assert(!cuda::std::is_null_pointer<const T>::value, "");
static_assert(!cuda::std::is_null_pointer<volatile T>::value, "");
static_assert(!cuda::std::is_null_pointer<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert(!cuda::std::is_null_pointer_v<T>, "");
static_assert(!cuda::std::is_null_pointer_v<const T>, "");
static_assert(!cuda::std::is_null_pointer_v<volatile T>, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void test_is_pointer()
static_assert( cuda::std::is_pointer<const T>::value, "");
static_assert( cuda::std::is_pointer<volatile T>::value, "");
static_assert( cuda::std::is_pointer<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert( cuda::std::is_pointer_v<T>, "");
static_assert( cuda::std::is_pointer_v<const T>, "");
static_assert( cuda::std::is_pointer_v<volatile T>, "");
Expand All @@ -38,7 +38,7 @@ void test_is_not_pointer()
static_assert(!cuda::std::is_pointer<const T>::value, "");
static_assert(!cuda::std::is_pointer<volatile T>::value, "");
static_assert(!cuda::std::is_pointer<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert(!cuda::std::is_pointer_v<T>, "");
static_assert(!cuda::std::is_pointer_v<const T>, "");
static_assert(!cuda::std::is_pointer_v<volatile T>, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void test_is_rvalue_reference()
static_assert( cuda::std::is_rvalue_reference<const T>::value, "");
static_assert( cuda::std::is_rvalue_reference<volatile T>::value, "");
static_assert( cuda::std::is_rvalue_reference<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert( cuda::std::is_rvalue_reference_v<T>, "");
static_assert( cuda::std::is_rvalue_reference_v<const T>, "");
static_assert( cuda::std::is_rvalue_reference_v<volatile T>, "");
Expand All @@ -38,7 +38,7 @@ void test_is_not_rvalue_reference()
static_assert(!cuda::std::is_rvalue_reference<const T>::value, "");
static_assert(!cuda::std::is_rvalue_reference<volatile T>::value, "");
static_assert(!cuda::std::is_rvalue_reference<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert(!cuda::std::is_rvalue_reference_v<T>, "");
static_assert(!cuda::std::is_rvalue_reference_v<const T>, "");
static_assert(!cuda::std::is_rvalue_reference_v<volatile T>, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void test_is_union()
static_assert( cuda::std::is_union<const T>::value, "");
static_assert( cuda::std::is_union<volatile T>::value, "");
static_assert( cuda::std::is_union<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert( cuda::std::is_union_v<T>, "");
static_assert( cuda::std::is_union_v<const T>, "");
static_assert( cuda::std::is_union_v<volatile T>, "");
Expand All @@ -38,7 +38,7 @@ void test_is_not_union()
static_assert(!cuda::std::is_union<const T>::value, "");
static_assert(!cuda::std::is_union<volatile T>::value, "");
static_assert(!cuda::std::is_union<const volatile T>::value, "");
#if TEST_STD_VER > 14
#if TEST_STD_VER > 11
static_assert(!cuda::std::is_union_v<T>, "");
static_assert(!cuda::std::is_union_v<const T>, "");
static_assert(!cuda::std::is_union_v<volatile T>, "");
Expand Down
Loading

0 comments on commit 2f8a182

Please sign in to comment.