]>
git.saurik.com Git - apple/xnu.git/blob - tests/bounded_array_ref_src/compare.equal.nullptr.cpp
3 // template <typename T, typename P>
4 // bool operator==(bounded_array_ref<T, P> const& x, std::nullptr_t);
6 // template <typename T, typename P>
7 // bool operator!=(bounded_array_ref<T, P> const& x, std::nullptr_t);
9 // template <typename T, typename P>
10 // bool operator==(std::nullptr_t, bounded_array_ref<T, P> const& x);
12 // template <typename T, typename P>
13 // bool operator!=(std::nullptr_t, bounded_array_ref<T, P> const& x);
16 #include <libkern/c++/bounded_array_ref.h>
17 #include "test_policy.h"
18 #include <darwintest.h>
19 #include <darwintest_utils.h>
28 T array
[5] = {T
{0}, T
{1}, T
{2}, T
{3}, T
{4}};
29 test_bounded_array_ref
<T
> view(array
);
30 CHECK(!(view
== nullptr));
31 CHECK(!(nullptr == view
));
32 CHECK(view
!= nullptr);
33 CHECK(nullptr != view
);
36 test_bounded_array_ref
<T
> view
;
37 CHECK(view
== nullptr);
38 CHECK(nullptr == view
);
39 CHECK(!(view
!= nullptr));
40 CHECK(!(nullptr != view
));
44 T_DECL(compare_equal_nullptr
, "bounded_array_ref.compare.equal.nullptr") {