1*5e3eaea3SApple OSS Distributions #ifndef TESTS_BOUNDED_PTR_TEST_UTILS_H 2*5e3eaea3SApple OSS Distributions #define TESTS_BOUNDED_PTR_TEST_UTILS_H 3*5e3eaea3SApple OSS Distributions 4*5e3eaea3SApple OSS Distributions #include <cassert> 5*5e3eaea3SApple OSS Distributions #include <libkern/c++/bounded_ptr.h> 6*5e3eaea3SApple OSS Distributions 7*5e3eaea3SApple OSS Distributions namespace { 8*5e3eaea3SApple OSS Distributions struct test_policy { 9*5e3eaea3SApple OSS Distributions static void traptest_policy10*5e3eaea3SApple OSS Distributions trap(char const*) 11*5e3eaea3SApple OSS Distributions { 12*5e3eaea3SApple OSS Distributions assert(false); 13*5e3eaea3SApple OSS Distributions } 14*5e3eaea3SApple OSS Distributions }; 15*5e3eaea3SApple OSS Distributions 16*5e3eaea3SApple OSS Distributions template <typename T> 17*5e3eaea3SApple OSS Distributions using test_bounded_ptr = libkern::bounded_ptr<T, test_policy>; 18*5e3eaea3SApple OSS Distributions } // end anonymous namespace 19*5e3eaea3SApple OSS Distributions 20*5e3eaea3SApple OSS Distributions #endif // !TESTS_BOUNDED_PTR_TEST_UTILS_H 21