Home | History | Annotate | Download | only in alg.rotate

Lines Matching defs:ic

55     int ic[] = {0, 1, 2};
56 const unsigned sc = sizeof(ic)/sizeof(ic[0]);
57 r = std::rotate(Iter(ic), Iter(ic), Iter(ic+sc));
58 assert(base(r) == ic+sc);
59 assert(ic[0] == 0);
60 assert(ic[1] == 1);
61 assert(ic[2] == 2);
62 r = std::rotate(Iter(ic), Iter(ic+1), Iter(ic+sc));
63 assert(base(r) == ic+2);
64 assert(ic[0] == 1);
65 assert(ic[1] == 2);
66 assert(ic[2] == 0);
67 r = std::rotate(Iter(ic), Iter(ic+2), Iter(ic+sc));
68 assert(base(r) == ic+1);
69 assert(ic[0] == 0);
70 assert(ic[1] == 1);
71 assert(ic[2] == 2);
72 r = std::rotate(Iter(ic), Iter(ic+sc), Iter(ic+sc));
73 assert(base(r) == ic);
74 assert(ic[0] == 0);
75 assert(ic[1] == 1);
76 assert(ic[2] == 2);
253 std::unique_ptr<int> ic[3];
254 const unsigned sc = sizeof(ic)/sizeof(ic[0]);
256 ic[i].reset(new int(i));
257 r = std::rotate(Iter(ic), Iter(ic), Iter(ic+sc));
258 assert(base(r) == ic+sc);
259 assert(*ic[0] == 0);
260 assert(*ic[1] == 1);
261 assert(*ic[2] == 2);
262 r = std::rotate(Iter(ic), Iter(ic+1), Iter(ic+sc));
263 assert(base(r) == ic+2);
264 assert(*ic[0] == 1);
265 assert(*ic[1] == 2);
266 assert(*ic[2] == 0);
267 r = std::rotate(Iter(ic), Iter(ic+2), Iter(ic+sc));
268 assert(base(r) == ic+1);
269 assert(*ic[0] == 0);
270 assert(*ic[1] == 1);
271 assert(*ic[2] == 2);
272 r = std::rotate(Iter(ic), Iter(ic+sc), Iter(ic+sc));
273 assert(base(r) == ic);
274 assert(*ic[0] == 0);
275 assert(*ic[1] == 1);
276 assert(*ic[2] == 2);