Lines Matching defs:ig
156 int ig[] = {0, 1, 2, 3, 4, 5};
157 const unsigned sg = sizeof(ig)/sizeof(ig[0]);
158 r = std::rotate(Iter(ig), Iter(ig), Iter(ig+sg));
159 assert(base(r) == ig+sg);
160 assert(ig[0] == 0);
161 assert(ig[1] == 1);
162 assert(ig[2] == 2);
163 assert(ig[3] == 3);
164 assert(ig[4] == 4);
165 assert(ig[5] == 5);
166 r = std::rotate(Iter(ig), Iter(ig+1), Iter(ig+sg));
167 assert(base(r) == ig+5);
168 assert(ig[0] == 1);
169 assert(ig[1] == 2);
170 assert(ig[2] == 3);
171 assert(ig[3] == 4);
172 assert(ig[4] == 5);
173 assert(ig[5] == 0);
174 r = std::rotate(Iter(ig), Iter(ig+2), Iter(ig+sg));
175 assert(base(r) == ig+4);
176 assert(ig[0] == 3);
177 assert(ig[1] == 4);
178 assert(ig[2] == 5);
179 assert(ig[3] == 0);
180 assert(ig[4] == 1);
181 assert(ig[5] == 2);
182 r = std::rotate(Iter(ig), Iter(ig+3), Iter(ig+sg));
183 assert(base(r) == ig+3);
184 assert(ig[0] == 0);
185 assert(ig[1] == 1);
186 assert(ig[2] == 2);
187 assert(ig[3] == 3);
188 assert(ig[4] == 4);
189 assert(ig[5] == 5);
190 r = std::rotate(Iter(ig), Iter(ig+4), Iter(ig+sg));
191 assert(base(r) == ig+2);
192 assert(ig[0] == 4);
193 assert(ig[1] == 5);
194 assert(ig[2] == 0);
195 assert(ig[3] == 1);
196 assert(ig[4] == 2);
197 assert(ig[5] == 3);
198 r = std::rotate(Iter(ig), Iter(ig+5), Iter(ig+sg));
199 assert(base(r) == ig+1);
200 assert(ig[0] == 3);
201 assert(ig[1] == 4);
202 assert(ig[2] == 5);
203 assert(ig[3] == 0);
204 assert(ig[4] == 1);
205 assert(ig[5] == 2);
206 r = std::rotate(Iter(ig), Iter(ig+sg), Iter(ig+sg));
207 assert(base(r) == ig);
208 assert(ig[0] == 3);
209 assert(ig[1] == 4);
210 assert(ig[2] == 5);
211 assert(ig[3] == 0);
212 assert(ig[4] == 1);
213 assert(ig[5] == 2);
360 std::unique_ptr<int> ig[6];
361 const unsigned sg = sizeof(ig)/sizeof(ig[0]);
363 ig[i].reset(new int(i));
364 r = std::rotate(Iter(ig), Iter(ig), Iter(ig+sg));
365 assert(base(r) == ig+sg);
366 assert(*ig[0] == 0);
367 assert(*ig[1] == 1);
368 assert(*ig[2] == 2);
369 assert(*ig[3] == 3);
370 assert(*ig[4] == 4);
371 assert(*ig[5] == 5);
372 r = std::rotate(Iter(ig), Iter(ig+1), Iter(ig+sg));
373 assert(base(r) == ig+5);
374 assert(*ig[0] == 1);
375 assert(*ig[1] == 2);
376 assert(*ig[2] == 3);
377 assert(*ig[3] == 4);
378 assert(*ig[4] == 5);
379 assert(*ig[5] == 0);
380 r = std::rotate(Iter(ig), Iter(ig+2), Iter(ig+sg));
381 assert(base(r) == ig+4);
382 assert(*ig[0] == 3);
383 assert(*ig[1] == 4);
384 assert(*ig[2] == 5);
385 assert(*ig[3] == 0);
386 assert(*ig[4] == 1);
387 assert(*ig[5] == 2);
388 r = std::rotate(Iter(ig), Iter(ig+3), Iter(ig+sg));
389 assert(base(r) == ig+3);
390 assert(*ig[0] == 0);
391 assert(*ig[1] == 1);
392 assert(*ig[2] == 2);
393 assert(*ig[3] == 3);
394 assert(*ig[4] == 4);
395 assert(*ig[5] == 5);
396 r = std::rotate(Iter(ig), Iter(ig+4), Iter(ig+sg));
397 assert(base(r) == ig+2);
398 assert(*ig[0] == 4);
399 assert(*ig[1] == 5);
400 assert(*ig[2] == 0);
401 assert(*ig[3] == 1);
402 assert(*ig[4] == 2);
403 assert(*ig[5] == 3);
404 r = std::rotate(Iter(ig), Iter(ig+5), Iter(ig+sg));
405 assert(base(r) == ig+1);
406 assert(*ig[0] == 3);
407 assert(*ig[1] == 4);
408 assert(*ig[2] == 5);
409 assert(*ig[3] == 0);
410 assert(*ig[4] == 1);
411 assert(*ig[5] == 2);
412 r = std::rotate(Iter(ig), Iter(ig+sg), Iter(ig+sg));
413 assert(base(r) == ig);
414 assert(*ig[0] == 3);
415 assert(*ig[1] == 4);
416 assert(*ig[2] == 5);
417 assert(*ig[3] == 0);
418 assert(*ig[4] == 1);
419 assert(*ig[5] == 2);