Lines Matching refs:ptr

43 		test_bounded_ptr<QualT> ptr(array.begin(), array.begin(), array.end());  in tests()  local
44 auto& ref = ptr += 0; in tests()
45 _assert(&ref == &ptr); in tests()
46 _assert(&*ptr == &array[0]); in tests()
49 test_bounded_ptr<QualT> ptr(array.begin(), array.begin(), array.end()); in tests() local
50 auto& ref = ptr += 1; in tests()
51 _assert(&ref == &ptr); in tests()
52 _assert(&*ptr == &array[1]); in tests()
55 test_bounded_ptr<QualT> ptr(array.begin(), array.begin(), array.end()); in tests() local
56 auto& ref = ptr += 2; in tests()
57 _assert(&ref == &ptr); in tests()
58 _assert(&*ptr == &array[2]); in tests()
61 test_bounded_ptr<QualT> ptr(array.begin(), array.begin(), array.end()); in tests() local
62 auto& ref = ptr += 3; in tests()
63 _assert(&ref == &ptr); in tests()
64 _assert(&*ptr == &array[3]); in tests()
67 test_bounded_ptr<QualT> ptr(array.begin(), array.begin(), array.end()); in tests() local
68 auto& ref = ptr += 4; in tests()
69 _assert(&ref == &ptr); in tests()
70 _assert(&*ptr == &array[4]); in tests()
73 test_bounded_ptr<QualT> ptr(array.begin(), array.begin(), array.end()); in tests() local
74 auto& ref = ptr += 5; in tests()
75 _assert(&ref == &ptr); in tests()
76 _assert(ptr == array.end()); in tests()
85 test_bounded_ptr<QualT> ptr(array.end(), array.begin(), array.end()); in tests() local
86 auto& ref = ptr += 0; in tests()
87 _assert(&ref == &ptr); in tests()
88 _assert(ptr == array.end()); in tests()
91 test_bounded_ptr<QualT> ptr(array.end(), array.begin(), array.end()); in tests() local
92 auto& ref = ptr += -1; in tests()
93 _assert(&ref == &ptr); in tests()
94 _assert(&*ptr == &array[4]); in tests()
97 test_bounded_ptr<QualT> ptr(array.end(), array.begin(), array.end()); in tests() local
98 auto& ref = ptr += -2; in tests()
99 _assert(&ref == &ptr); in tests()
100 _assert(&*ptr == &array[3]); in tests()
103 test_bounded_ptr<QualT> ptr(array.end(), array.begin(), array.end()); in tests() local
104 auto& ref = ptr += -3; in tests()
105 _assert(&ref == &ptr); in tests()
106 _assert(&*ptr == &array[2]); in tests()
109 test_bounded_ptr<QualT> ptr(array.end(), array.begin(), array.end()); in tests() local
110 auto& ref = ptr += -4; in tests()
111 _assert(&ref == &ptr); in tests()
112 _assert(&*ptr == &array[1]); in tests()
115 test_bounded_ptr<QualT> ptr(array.end(), array.begin(), array.end()); in tests() local
116 auto& ref = ptr += -5; in tests()
117 _assert(&ref == &ptr); in tests()
118 _assert(&*ptr == &array[0]); in tests()
133 libkern::bounded_ptr<QualT, tracking_policy> ptr(array.begin(), array.begin(), array.end()); in tests() local
135 ptr += max_n + 1; in tests()
141 libkern::bounded_ptr<QualT, tracking_policy> ptr(array.begin(), array.begin(), array.end()); in tests() local
143 ptr += min_n - 1; in tests()
167 libkern::bounded_ptr<QualT, tracking_policy> ptr(array.begin(), array.begin(), array.end()); in tests() local
169 ptr += static_cast<ptrdiff_t>(max_n / 2); in tests()
171 ptr += static_cast<ptrdiff_t>(max_n / 2); in tests()
173 ptr += (max_n % 2); in tests()
175 ptr += 1; in tests()
181 libkern::bounded_ptr<QualT, tracking_policy> ptr(array.begin(), array.begin(), array.end()); in tests() local
183 ptr += static_cast<ptrdiff_t>(min_n / 2); in tests()
185 ptr += static_cast<ptrdiff_t>(min_n / 2); in tests()
187 ptr += (min_n % 2); in tests()
189 ptr += -1; in tests()