]>
git.saurik.com Git - apple/xnu.git/blob - tests/bounded_array_ref_src/test_policy.h
1 #ifndef TESTS_BOUNDED_ARRAY_REF_SRC_TEST_POLICY_H
2 #define TESTS_BOUNDED_ARRAY_REF_SRC_TEST_POLICY_H
5 #include <darwintest_utils.h>
6 #include <libkern/c++/bounded_array.h>
7 #include <libkern/c++/bounded_array_ref.h>
8 #include <libkern/c++/bounded_ptr.h>
21 struct tracking_policy
{
23 static std::string message
;
37 bool tracking_policy::did_trap
= false;
38 std::string
tracking_policy::message
= "";
42 using test_bounded_array_ref
= libkern::bounded_array_ref
<T
, test_policy
>;
44 template <typename T
, size_t N
>
45 using test_bounded_array
= libkern::bounded_array
<T
, N
, test_policy
>;
48 using test_bounded_ptr
= libkern::bounded_ptr
<T
, test_policy
>;
50 #define CHECK(...) T_ASSERT_TRUE((__VA_ARGS__), # __VA_ARGS__)
52 #endif // !TESTS_BOUNDED_ARRAY_REF_SRC_TEST_POLICY_H