/external/libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/ |
H A D | fill.pass.cpp | 25 int ia[] = {0, 1, 2, 3, 4}; local 27 std::fill(std::begin(ia), std::end(ia), 5); 29 return std::all_of(std::begin(ia), std::end(ia), [](int a) {return a == 5; }) 52 int ia[n] = {0}; 53 std::fill(Iter(ia), Iter(ia+n), 1); 54 assert(ia[0] == 1); 55 assert(ia[ [all...] |
/external/libcxx/test/std/numerics/numarray/template.indirect.array/ |
H A D | default.fail.cpp | 21 std::indirect_array<int> ia; local
|
/external/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ |
H A D | remove.pass.cpp | 27 int ia[] = {1, 3, 5, 2, 5, 6}; local 29 auto it = std::remove(std::begin(ia), std::end(ia), 5); 31 return (std::begin(ia) + std::size(ia) - 2) == it // we removed two elements 32 && std::none_of(std::begin(ia), it, [](int a) {return a == 5; }) 41 int ia[] = {0, 1, 2, 3, 4, 2, 3, 4, 2}; 42 const unsigned sa = sizeof(ia)/sizeof(ia[0]); 43 Iter r = std::remove(Iter(ia), Ite [all...] |
H A D | remove_copy.pass.cpp | 25 int ia[] = {1, 3, 5, 2, 5, 6}; local 26 int ib[std::size(ia)] = {0}; 28 auto it = std::remove_copy(std::begin(ia), std::end(ia), std::begin(ib), 5); 30 return std::distance(std::begin(ib), it) == (std::size(ia) - 2) // we removed two elements 41 int ia[] = {0, 1, 2, 3, 4, 2, 3, 4, 2}; 42 const unsigned sa = sizeof(ia)/sizeof(ia[0]); 44 OutIter r = std::remove_copy(InIter(ia), InIter(ia [all...] |
/external/libcxx/test/std/iterators/stream.iterators/iterator.range/ |
H A D | begin_array.pass.cpp | 19 int ia[] = {1, 2, 3}; local 20 int* i = std::begin(ia); 23 assert(ia[0] == 2);
|
H A D | begin_const.pass.cpp | 19 int ia[] = {1, 2, 3}; local 20 const std::vector<int> v(ia, ia + sizeof(ia)/sizeof(ia[0]));
|
H A D | begin_non_const.pass.cpp | 19 int ia[] = {1, 2, 3}; local 20 std::vector<int> v(ia, ia + sizeof(ia)/sizeof(ia[0]));
|
H A D | end_array.pass.cpp | 19 int ia[] = {1, 2, 3}; local 20 int* i = std::begin(ia); 21 int* e = std::end(ia); 22 assert(e == ia + 3);
|
H A D | end_const.pass.cpp | 19 int ia[] = {1, 2, 3}; local 20 const std::vector<int> v(ia, ia + sizeof(ia)/sizeof(ia[0]));
|
H A D | end_non_const.pass.cpp | 19 int ia[] = {1, 2, 3}; local 20 std::vector<int> v(ia, ia + sizeof(ia)/sizeof(ia[0]));
|
/external/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/ |
H A D | generate.pass.cpp | 32 int ia[] = {0, 1, 2, 3, 4}; local 34 std::generate(std::begin(ia), std::end(ia), gen_test()); 36 return std::all_of(std::begin(ia), std::end(ia), [](int x) { return x == 1; }) 47 int ia[n] = {0}; 48 std::generate(Iter(ia), Iter(ia+n), gen_test()); 49 assert(ia[0] == 1); 50 assert(ia[ [all...] |
/external/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/ |
H A D | random_shuffle.pass.cpp | 25 int ia[] = {1, 2, 3, 4}; local 28 const unsigned sa = sizeof(ia)/sizeof(ia[0]); 29 std::random_shuffle(ia, ia+sa); 30 LIBCPP_ASSERT(std::equal(ia, ia+sa, ia1)); 31 assert(std::is_permutation(ia, ia+sa, ia1)); 32 std::random_shuffle(ia, i [all...] |
/external/libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find/ |
H A D | adjacent_find.pass.cpp | 25 int ia[] = {0, 1, 2, 2, 0, 1, 2, 3}; local 28 return (std::adjacent_find(std::begin(ia), std::end(ia)) == ia+2) 36 int ia[] = {0, 1, 2, 2, 0, 1, 2, 3}; local 37 const unsigned sa = sizeof(ia)/sizeof(ia[0]); 38 assert(std::adjacent_find(forward_iterator<const int*>(ia), 39 forward_iterator<const int*>(ia + sa)) == 40 forward_iterator<const int*>(ia [all...] |
/external/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/ |
H A D | count.pass.cpp | 25 int ia[] = {0, 1, 2, 2, 0, 1, 2, 3}; local 27 return (std::count(std::begin(ia), std::end(ia), 2) == 3) 35 int ia[] = {0, 1, 2, 2, 0, 1, 2, 3}; local 36 const unsigned sa = sizeof(ia)/sizeof(ia[0]); 37 assert(std::count(input_iterator<const int*>(ia), 38 input_iterator<const int*>(ia + sa), 2) == 3); 39 assert(std::count(input_iterator<const int*>(ia), 40 input_iterator<const int*>(ia [all...] |
/external/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/ |
H A D | make_heap.pass.cpp | 25 int* ia = new int [N]; local 27 ia[i] = i; 28 std::shuffle(ia, ia+N, randomness); 29 std::make_heap(ia, ia+N); 30 assert(std::is_heap(ia, ia+N)); 31 delete [] ia;
|
/external/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/ |
H A D | pop_heap.pass.cpp | 25 int* ia = new int [N]; local 27 ia[i] = i; 28 std::shuffle(ia, ia+N, randomness); 29 std::make_heap(ia, ia+N); 32 std::pop_heap(ia, ia+i); 33 assert(std::is_heap(ia, ia [all...] |
/external/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/ |
H A D | push_heap.pass.cpp | 26 int* ia = new int [N]; local 28 ia[i] = i; 29 std::shuffle(ia, ia+N, randomness); 32 std::push_heap(ia, ia+i); 33 assert(std::is_heap(ia, ia+i)); 35 delete [] ia;
|
/external/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/ |
H A D | sort_heap.pass.cpp | 25 int* ia = new int [N]; local 27 ia[i] = i; 28 std::shuffle(ia, ia+N, randomness); 29 std::make_heap(ia, ia+N); 30 std::sort_heap(ia, ia+N); 31 assert(std::is_sorted(ia, ia [all...] |
/external/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.intersection/ |
H A D | set_intersection.pass.cpp | 29 const int ia[] = {1, 2, 2, 3, 3, 3, 4, 4, 4, 4}; local 31 int results[std::size(ia)] = {0}; 33 auto it = std::set_intersection(std::begin(ia), std::end(ia), 36 return std::includes(std::begin(ia), std::end(ia), std::begin(results), it) 49 int ia[] = {1, 2, 2, 3, 3, 3, 4, 4, 4, 4}; 50 const int sa = sizeof(ia)/sizeof(ia[0]); 56 OutIter ce = std::set_intersection(Iter1(ia), Iter [all...] |
/external/libcxx/test/std/numerics/numeric.ops/numeric.iota/ |
H A D | iota.pass.cpp | 24 int ia[] = {1, 2, 3, 4, 5}; local 26 const unsigned s = sizeof(ia) / sizeof(ia[0]); 27 std::iota(InIter(ia), InIter(ia+s), 5); 29 assert(ia[i] == ir[i]);
|
/external/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ |
H A D | copy.pass.cpp | 24 // int ia[] = {1, 2, 3, 4, 5}; 27 // auto p = std::copy(std::begin(ia), std::end(ia), std::begin(ic)); 28 // return std::equal(std::begin(ia), std::end(ia), std::begin(ic), p) 39 int ia[N]; local 41 ia[i] = i; 44 OutIter r = std::copy(InIter(ia), InIter(ia+N), OutIter(ib)); 47 assert(ia[ [all...] |
H A D | copy_backward.pass.cpp | 26 // int ia[] = {1, 2, 3, 4, 5}; 29 // size_t N = std::size(ia); 30 // auto p = std::copy_backward(std::begin(ia), std::end(ia), std::begin(ic) + N); 31 // return std::equal(std::begin(ic), p, std::begin(ia)) 42 int ia[N]; local 44 ia[i] = i; 47 OutIter r = std::copy_backward(InIter(ia), InIter(ia+N), OutIter(ib+N)); 50 assert(ia[ [all...] |
H A D | copy_n.pass.cpp | 25 // int ia[] = {1, 2, 3, 4, 5}; 28 // auto p = std::copy_n(std::begin(ia), 4, std::begin(ic)); 29 // return std::equal(std::begin(ic), p, std::begin(ia)) 42 int ia[N]; local 44 ia[i] = i; 47 OutIter r = std::copy_n(InIter(ia), UDI(N/2), OutIter(ib)); 50 assert(ia[i] == ib[i]);
|
/external/libcxx/test/std/algorithms/alg.modifying.operations/alg.move/ |
H A D | move.pass.cpp | 29 int ia[N]; local 31 ia[i] = i; 34 OutIter r = std::move(InIter(ia), InIter(ia+N), OutIter(ib)); 37 assert(ia[i] == ib[i]); 46 std::unique_ptr<int> ia[N]; local 48 ia[i].reset(new int(i)); 51 OutIter r = std::move(InIter(ia), InIter(ia+N), OutIter(ib));
|
H A D | move_backward.pass.cpp | 29 int ia[N]; local 31 ia[i] = i; 34 OutIter r = std::move_backward(InIter(ia), InIter(ia+N), OutIter(ib+N)); 37 assert(ia[i] == ib[i]); 46 std::unique_ptr<int> ia[N]; local 48 ia[i].reset(new int(i)); 51 OutIter r = std::move_backward(InIter(ia), InIter(ia+N), OutIter(ib+N));
|