Lines Matching refs:ptr
40 test_bounded_ptr<QualT> ptr(array.end(), array.begin(), array.end()); in tests() local
41 auto& ref = ptr -= 0; in tests()
42 _assert(&ref == &ptr); in tests()
43 _assert(ptr == array.end()); in tests()
46 test_bounded_ptr<QualT> ptr(array.end(), array.begin(), array.end()); in tests() local
47 auto& ref = ptr -= 1; in tests()
48 _assert(&ref == &ptr); in tests()
49 _assert(&*ptr == &array[4]); in tests()
52 test_bounded_ptr<QualT> ptr(array.end(), array.begin(), array.end()); in tests() local
53 auto& ref = ptr -= 2; in tests()
54 _assert(&ref == &ptr); in tests()
55 _assert(&*ptr == &array[3]); in tests()
58 test_bounded_ptr<QualT> ptr(array.end(), array.begin(), array.end()); in tests() local
59 auto& ref = ptr -= 3; in tests()
60 _assert(&ref == &ptr); in tests()
61 _assert(&*ptr == &array[2]); in tests()
64 test_bounded_ptr<QualT> ptr(array.end(), array.begin(), array.end()); in tests() local
65 auto& ref = ptr -= 4; in tests()
66 _assert(&ref == &ptr); in tests()
67 _assert(&*ptr == &array[1]); in tests()
70 test_bounded_ptr<QualT> ptr(array.end(), array.begin(), array.end()); in tests() local
71 auto& ref = ptr -= 5; in tests()
72 _assert(&ref == &ptr); in tests()
73 _assert(&*ptr == &array[0]); in tests()
82 test_bounded_ptr<QualT> ptr(array.begin(), array.begin(), array.end()); in tests() local
83 auto& ref = ptr -= 0; in tests()
84 _assert(&ref == &ptr); in tests()
85 _assert(&*ptr == &array[0]); in tests()
88 test_bounded_ptr<QualT> ptr(array.begin(), array.begin(), array.end()); in tests() local
89 auto& ref = ptr -= -1; in tests()
90 _assert(&ref == &ptr); in tests()
91 _assert(&*ptr == &array[1]); in tests()
94 test_bounded_ptr<QualT> ptr(array.begin(), array.begin(), array.end()); in tests() local
95 auto& ref = ptr -= -2; in tests()
96 _assert(&ref == &ptr); in tests()
97 _assert(&*ptr == &array[2]); in tests()
100 test_bounded_ptr<QualT> ptr(array.begin(), array.begin(), array.end()); in tests() local
101 auto& ref = ptr -= -3; in tests()
102 _assert(&ref == &ptr); in tests()
103 _assert(&*ptr == &array[3]); in tests()
106 test_bounded_ptr<QualT> ptr(array.begin(), array.begin(), array.end()); in tests() local
107 auto& ref = ptr -= -4; in tests()
108 _assert(&ref == &ptr); in tests()
109 _assert(&*ptr == &array[4]); in tests()
112 test_bounded_ptr<QualT> ptr(array.begin(), array.begin(), array.end()); in tests() local
113 auto& ref = ptr -= -5; in tests()
114 _assert(&ref == &ptr); in tests()
115 _assert(ptr == array.end()); in tests()
130 libkern::bounded_ptr<QualT, tracking_policy> ptr(array.begin(), array.begin(), array.end()); in tests() local
132 ptr -= max_n + 1; in tests()
138 libkern::bounded_ptr<QualT, tracking_policy> ptr(array.begin(), array.begin(), array.end()); in tests() local
140 ptr -= min_n - 1; in tests()
164 libkern::bounded_ptr<QualT, tracking_policy> ptr(array.begin(), array.begin(), array.end()); in tests() local
166 ptr -= static_cast<ptrdiff_t>(-min_n / 2); in tests()
168 ptr -= static_cast<ptrdiff_t>(-min_n / 2); in tests()
170 ptr -= (-min_n % 2); in tests()
172 ptr -= 1; in tests()
178 libkern::bounded_ptr<QualT, tracking_policy> ptr(array.begin(), array.begin(), array.end()); in tests() local
180 ptr -= static_cast<ptrdiff_t>(-max_n / 2); in tests()
182 ptr -= static_cast<ptrdiff_t>(-max_n / 2); in tests()
184 ptr -= (-max_n % 2); in tests()
186 ptr -= -1; in tests()