Home
last modified time | relevance | path

Searched refs:ia (Results 1 – 25 of 123) sorted by relevance

12345

/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.nonmodifying/alg.is_permutation/
Dis_permutation.pass.cpp29 const int ia[] = {0}; in main() local
31 const unsigned sa = sizeof(ia)/sizeof(ia[0]); in main()
32 assert(std::is_permutation(forward_iterator<const int*>(ia), in main()
33 forward_iterator<const int*>(ia + 0), in main()
36 assert(std::is_permutation(forward_iterator<const int*>(ia), in main()
37 forward_iterator<const int*>(ia + 0), in main()
41 assert(std::is_permutation(forward_iterator<const int*>(ia), in main()
42 forward_iterator<const int*>(ia + sa), in main()
45 assert(std::is_permutation(forward_iterator<const int*>(ia), in main()
46 forward_iterator<const int*>(ia + sa), in main()
[all …]
Dis_permutation_pred.pass.cpp38 const int ia[] = {0}; in main() local
40 const unsigned sa = sizeof(ia)/sizeof(ia[0]); in main()
41 assert(std::is_permutation(forward_iterator<const int*>(ia), in main()
42 forward_iterator<const int*>(ia + 0), in main()
45 assert(std::is_permutation(forward_iterator<const int*>(ia), in main()
46 forward_iterator<const int*>(ia + sa), in main()
50 assert(std::is_permutation(forward_iterator<const int*>(ia), in main()
51 forward_iterator<const int*>(ia + sa), in main()
55 assert(std::is_permutation(forward_iterator<const int*>(ia), in main()
56 forward_iterator<const int*>(ia + sa), in main()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.nonmodifying/alg.search/
Dsearch.pass.cpp26 int ia[] = {0, 1, 2, 3, 4, 5}; in test() local
27 const unsigned sa = sizeof(ia)/sizeof(ia[0]); in test()
28 assert(std::search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia)) == Iter1(ia)); in test()
29 assert(std::search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+1)) == Iter1(ia)); in test()
30 assert(std::search(Iter1(ia), Iter1(ia+sa), Iter2(ia+1), Iter2(ia+2)) == Iter1(ia+1)); in test()
31 assert(std::search(Iter1(ia), Iter1(ia+sa), Iter2(ia+2), Iter2(ia+2)) == Iter1(ia)); in test()
32 assert(std::search(Iter1(ia), Iter1(ia+sa), Iter2(ia+2), Iter2(ia+3)) == Iter1(ia+2)); in test()
33 assert(std::search(Iter1(ia), Iter1(ia+sa), Iter2(ia+2), Iter2(ia+3)) == Iter1(ia+2)); in test()
34 assert(std::search(Iter1(ia), Iter1(ia), Iter2(ia+2), Iter2(ia+3)) == Iter1(ia)); in test()
35 assert(std::search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-1), Iter2(ia+sa)) == Iter1(ia+sa-1)); in test()
[all …]
Dsearch_pred.pass.cpp36 int ia[] = {0, 1, 2, 3, 4, 5}; in test() local
37 const unsigned sa = sizeof(ia)/sizeof(ia[0]); in test()
39 assert(std::search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia), count_equal()) == Iter1(ia)); in test()
42 … assert(std::search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+1), count_equal()) == Iter1(ia)); in test()
45 …assert(std::search(Iter1(ia), Iter1(ia+sa), Iter2(ia+1), Iter2(ia+2), count_equal()) == Iter1(ia+1… in test()
48 …assert(std::search(Iter1(ia), Iter1(ia+sa), Iter2(ia+2), Iter2(ia+2), count_equal()) == Iter1(ia)); in test()
51 …assert(std::search(Iter1(ia), Iter1(ia+sa), Iter2(ia+2), Iter2(ia+3), count_equal()) == Iter1(ia+2… in test()
54 …assert(std::search(Iter1(ia), Iter1(ia+sa), Iter2(ia+2), Iter2(ia+3), count_equal()) == Iter1(ia+2… in test()
57 assert(std::search(Iter1(ia), Iter1(ia), Iter2(ia+2), Iter2(ia+3), count_equal()) == Iter1(ia)); in test()
60 …assert(std::search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-1), Iter2(ia+sa), count_equal()) == Iter1( in test()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.modifying.operations/alg.remove/
Dremove_if.pass.cpp31 int ia[] = {0, 1, 2, 3, 4, 2, 3, 4, 2}; in test() local
32 const unsigned sa = sizeof(ia)/sizeof(ia[0]); in test()
33 int* r = std::remove_if(ia, ia+sa, std::bind2nd(std::equal_to<int>(), 2)); in test()
34 assert(r == ia + sa-3); in test()
35 assert(ia[0] == 0); in test()
36 assert(ia[1] == 1); in test()
37 assert(ia[2] == 3); in test()
38 assert(ia[3] == 4); in test()
39 assert(ia[4] == 3); in test()
40 assert(ia[5] == 4); in test()
[all …]
Dremove.pass.cpp30 int ia[] = {0, 1, 2, 3, 4, 2, 3, 4, 2}; in test() local
31 const unsigned sa = sizeof(ia)/sizeof(ia[0]); in test()
32 Iter r = std::remove(Iter(ia), Iter(ia+sa), 2); in test()
33 assert(base(r) == ia + sa-3); in test()
34 assert(ia[0] == 0); in test()
35 assert(ia[1] == 1); in test()
36 assert(ia[2] == 3); in test()
37 assert(ia[3] == 4); in test()
38 assert(ia[4] == 3); in test()
39 assert(ia[5] == 4); in test()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.modifying.operations/alg.partitions/
Dpartition_point.pass.cpp29 const int ia[] = {2, 4, 6, 8, 10}; in main() local
30 assert(std::partition_point(forward_iterator<const int*>(std::begin(ia)), in main()
31 forward_iterator<const int*>(std::end(ia)), in main()
32 is_odd()) == forward_iterator<const int*>(ia)); in main()
35 const int ia[] = {1, 2, 4, 6, 8}; in main() local
36 assert(std::partition_point(forward_iterator<const int*>(std::begin(ia)), in main()
37 forward_iterator<const int*>(std::end(ia)), in main()
38 is_odd()) == forward_iterator<const int*>(ia + 1)); in main()
41 const int ia[] = {1, 3, 2, 4, 6}; in main() local
42 assert(std::partition_point(forward_iterator<const int*>(std::begin(ia)), in main()
[all …]
Dpartition.pass.cpp36 int ia[] = {1, 2, 3, 4, 5, 6, 7, 8 ,9}; in test() local
37 const unsigned sa = sizeof(ia)/sizeof(ia[0]); in test()
38 Iter r = std::partition(Iter(ia), Iter(ia + sa), is_odd()); in test()
39 assert(base(r) == ia + 5); in test()
40 for (int* i = ia; i < base(r); ++i) in test()
42 for (int* i = base(r); i < ia+sa; ++i) in test()
45 r = std::partition(Iter(ia), Iter(ia), is_odd()); in test()
46 assert(base(r) == ia); in test()
49 ia[i] = 2*i; in test()
50 r = std::partition(Iter(ia), Iter(ia+sa), is_odd()); in test()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/localization/locale.categories/category.collate/locale.collate/locale.collate.members/
Dcompare.pass.cpp24 const char ia[] = "1234"; in main() local
25 const unsigned sa = sizeof(ia)/sizeof(ia[0]); in main()
28 assert(f.compare(ia, ia+sa, ib, ib+2) == 1); in main()
29 assert(f.compare(ib, ib+2, ia, ia+sa) == -1); in main()
30 assert(f.compare(ia, ia+sa, ib, ib+3) == 1); in main()
31 assert(f.compare(ib, ib+3, ia, ia+sa) == -1); in main()
32 assert(f.compare(ia, ia+sa, ib+1, ib+3) == -1); in main()
33 assert(f.compare(ib+1, ib+3, ia, ia+sa) == 1); in main()
34 assert(f.compare(ia, ia+3, ib, ib+3) == 0); in main()
37 const wchar_t ia[] = L"1234"; in main() local
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.nonmodifying/alg.equal/
Dequal.pass.cpp28 int ia[] = {0, 1, 2, 3, 4, 5}; in main() local
29 const unsigned s = sizeof(ia)/sizeof(ia[0]); in main()
31 assert(std::equal(input_iterator<const int*>(ia), in main()
32 input_iterator<const int*>(ia+s), in main()
33 input_iterator<const int*>(ia))); in main()
35 assert(std::equal(input_iterator<const int*>(ia), in main()
36 input_iterator<const int*>(ia+s), in main()
37 input_iterator<const int*>(ia), in main()
38 input_iterator<const int*>(ia+s))); in main()
39 assert(std::equal(random_access_iterator<const int*>(ia), in main()
[all …]
Dequal_pred.pass.cpp37 int ia[] = {0, 1, 2, 3, 4, 5}; in main() local
38 const unsigned s = sizeof(ia)/sizeof(ia[0]); in main()
40 assert(std::equal(input_iterator<const int*>(ia), in main()
41 input_iterator<const int*>(ia+s), in main()
42 input_iterator<const int*>(ia), in main()
45 assert(std::equal(input_iterator<const int*>(ia), in main()
46 input_iterator<const int*>(ia+s), in main()
47 input_iterator<const int*>(ia), in main()
48 input_iterator<const int*>(ia+s), in main()
50 assert(std::equal(random_access_iterator<const int*>(ia), in main()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.nonmodifying/alg.any_of/
Dany_of.pass.cpp32 int ia[] = {2, 4, 6, 8}; in main() local
33 const unsigned sa = sizeof(ia)/sizeof(ia[0]); in main()
34 assert(std::any_of(input_iterator<const int*>(ia), in main()
35 input_iterator<const int*>(ia + sa), test1()) == true); in main()
36 assert(std::any_of(input_iterator<const int*>(ia), in main()
37 input_iterator<const int*>(ia), test1()) == false); in main()
40 const int ia[] = {2, 4, 5, 8}; in main() local
41 const unsigned sa = sizeof(ia)/sizeof(ia[0]); in main()
42 assert(std::any_of(input_iterator<const int*>(ia), in main()
43 input_iterator<const int*>(ia + sa), test1()) == true); in main()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.nonmodifying/alg.none_of/
Dnone_of.pass.cpp32 int ia[] = {2, 4, 6, 8}; in main() local
33 const unsigned sa = sizeof(ia)/sizeof(ia[0]); in main()
34 assert(std::none_of(input_iterator<const int*>(ia), in main()
35 input_iterator<const int*>(ia + sa), test1()) == false); in main()
36 assert(std::none_of(input_iterator<const int*>(ia), in main()
37 input_iterator<const int*>(ia), test1()) == true); in main()
40 const int ia[] = {2, 4, 5, 8}; in main() local
41 const unsigned sa = sizeof(ia)/sizeof(ia[0]); in main()
42 assert(std::none_of(input_iterator<const int*>(ia), in main()
43 input_iterator<const int*>(ia + sa), test1()) == false); in main()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.heap.operations/pop.heap/
Dpop_heap_comp.pass.cpp34 int* ia = new int [N]; in test() local
36 ia[i] = i; in test()
37 std::random_shuffle(ia, ia+N); in test()
38 std::make_heap(ia, ia+N, std::greater<int>()); in test()
41 std::pop_heap(ia, ia+i, std::greater<int>()); in test()
42 assert(std::is_heap(ia, ia+i-1, std::greater<int>())); in test()
44 std::pop_heap(ia, ia, std::greater<int>()); in test()
45 delete [] ia; in test()
55 std::unique_ptr<int>* ia = new std::unique_ptr<int> [N]; in main() local
57 ia[i].reset(new int(i)); in main()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.merge/
Dinplace_merge_comp.pass.cpp40 int* ia = new int[N]; in test_one() local
42 ia[i] = i; in test_one()
43 std::random_shuffle(ia, ia+N); in test_one()
44 std::sort(ia, ia+M, std::greater<int>()); in test_one()
45 std::sort(ia+M, ia+N, std::greater<int>()); in test_one()
46 std::inplace_merge(Iter(ia), Iter(ia+M), Iter(ia+N), std::greater<int>()); in test_one()
49 assert(ia[0] == N-1); in test_one()
50 assert(ia[N-1] == 0); in test_one()
51 assert(std::is_sorted(ia, ia+N, std::greater<int>())); in test_one()
53 delete [] ia; in test_one()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.nonmodifying/alg.find.end/
Dfind_end.pass.cpp26 int ia[] = {0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 0, 1, 2, 3, 0, 1, 2, 0, 1, 0}; in test() local
27 const unsigned sa = sizeof(ia)/sizeof(ia[0]); in test()
29 assert(std::find_end(Iter1(ia), Iter1(ia+sa), Iter2(b), Iter2(b+1)) == Iter1(ia+sa-1)); in test()
31 assert(std::find_end(Iter1(ia), Iter1(ia+sa), Iter2(c), Iter2(c+2)) == Iter1(ia+18)); in test()
33 assert(std::find_end(Iter1(ia), Iter1(ia+sa), Iter2(d), Iter2(d+3)) == Iter1(ia+15)); in test()
35 assert(std::find_end(Iter1(ia), Iter1(ia+sa), Iter2(e), Iter2(e+4)) == Iter1(ia+11)); in test()
37 assert(std::find_end(Iter1(ia), Iter1(ia+sa), Iter2(f), Iter2(f+5)) == Iter1(ia+6)); in test()
39 assert(std::find_end(Iter1(ia), Iter1(ia+sa), Iter2(g), Iter2(g+6)) == Iter1(ia)); in test()
41 assert(std::find_end(Iter1(ia), Iter1(ia+sa), Iter2(h), Iter2(h+7)) == Iter1(ia+sa)); in test()
42 assert(std::find_end(Iter1(ia), Iter1(ia+sa), Iter2(b), Iter2(b)) == Iter1(ia+sa)); in test()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.heap.operations/sort.heap/
Dsort_heap_comp.pass.cpp34 int* ia = new int [N]; in test() local
36 ia[i] = i; in test()
37 std::random_shuffle(ia, ia+N); in test()
38 std::make_heap(ia, ia+N, std::greater<int>()); in test()
39 std::sort_heap(ia, ia+N, std::greater<int>()); in test()
40 assert(std::is_sorted(ia, ia+N, std::greater<int>())); in test()
41 delete [] ia; in test()
56 std::unique_ptr<int>* ia = new std::unique_ptr<int> [N]; in main() local
58 ia[i].reset(new int(i)); in main()
59 std::random_shuffle(ia, ia+N); in main()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.modifying.operations/alg.rotate/
Drotate_copy.pass.cpp25 int ia[] = {0, 1, 2, 3}; in test() local
26 const unsigned sa = sizeof(ia)/sizeof(ia[0]); in test()
29 OutIter r = std::rotate_copy(InIter(ia), InIter(ia), InIter(ia), OutIter(ib)); in test()
32 r = std::rotate_copy(InIter(ia), InIter(ia), InIter(ia+1), OutIter(ib)); in test()
36 r = std::rotate_copy(InIter(ia), InIter(ia+1), InIter(ia+1), OutIter(ib)); in test()
40 r = std::rotate_copy(InIter(ia), InIter(ia), InIter(ia+2), OutIter(ib)); in test()
45 r = std::rotate_copy(InIter(ia), InIter(ia+1), InIter(ia+2), OutIter(ib)); in test()
50 r = std::rotate_copy(InIter(ia), InIter(ia+2), InIter(ia+2), OutIter(ib)); in test()
55 r = std::rotate_copy(InIter(ia), InIter(ia), InIter(ia+3), OutIter(ib)); in test()
61 r = std::rotate_copy(InIter(ia), InIter(ia+1), InIter(ia+3), OutIter(ib)); in test()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/numeric.ops/accumulate/
Daccumulate.pass.cpp34 int ia[] = {1, 2, 3, 4, 5, 6}; in test() local
35 unsigned sa = sizeof(ia) / sizeof(ia[0]); in test()
36 test(Iter(ia), Iter(ia), 0, 0); in test()
37 test(Iter(ia), Iter(ia), 10, 10); in test()
38 test(Iter(ia), Iter(ia+1), 0, 1); in test()
39 test(Iter(ia), Iter(ia+1), 10, 11); in test()
40 test(Iter(ia), Iter(ia+2), 0, 3); in test()
41 test(Iter(ia), Iter(ia+2), 10, 13); in test()
42 test(Iter(ia), Iter(ia+sa), 0, 21); in test()
43 test(Iter(ia), Iter(ia+sa), 10, 31); in test()
Daccumulate_op.pass.cpp36 int ia[] = {1, 2, 3, 4, 5, 6}; in test() local
37 unsigned sa = sizeof(ia) / sizeof(ia[0]); in test()
38 test(Iter(ia), Iter(ia), 1, 1); in test()
39 test(Iter(ia), Iter(ia), 10, 10); in test()
40 test(Iter(ia), Iter(ia+1), 1, 1); in test()
41 test(Iter(ia), Iter(ia+1), 10, 10); in test()
42 test(Iter(ia), Iter(ia+2), 1, 2); in test()
43 test(Iter(ia), Iter(ia+2), 10, 20); in test()
44 test(Iter(ia), Iter(ia+sa), 1, 720); in test()
45 test(Iter(ia), Iter(ia+sa), 10, 7200); in test()
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.heap.operations/make.heap/
Dmake_heap_comp.pass.cpp34 int* ia = new int [N]; in test() local
36 ia[i] = i; in test()
37 std::random_shuffle(ia, ia+N); in test()
38 std::make_heap(ia, ia+N, std::greater<int>()); in test()
39 assert(std::is_heap(ia, ia+N, std::greater<int>())); in test()
40 delete [] ia; in test()
55 std::unique_ptr<int>* ia = new std::unique_ptr<int> [N]; in main() local
57 ia[i].reset(new int(i)); in main()
58 std::random_shuffle(ia, ia+N); in main()
59 std::make_heap(ia, ia+N, indirect_less()); in main()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.heap.operations/push.heap/
Dpush_heap_comp.pass.cpp35 int* ia = new int [N]; in test() local
37 ia[i] = i; in test()
38 std::random_shuffle(ia, ia+N); in test()
41 std::push_heap(ia, ia+i, std::greater<int>()); in test()
42 assert(std::is_heap(ia, ia+i, std::greater<int>())); in test()
44 delete [] ia; in test()
54 std::unique_ptr<int>* ia = new std::unique_ptr<int> [N]; in main() local
56 ia[i].reset(new int(i)); in main()
57 std::random_shuffle(ia, ia+N); in main()
60 std::push_heap(ia, ia+i, indirect_less()); in main()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.nonmodifying/mismatch/
Dmismatch_pred.pass.cpp31 int ia[] = {0, 1, 2, 2, 0, 1, 2, 3}; in main() local
32 const unsigned sa = sizeof(ia)/sizeof(ia[0]); in main()
34 assert(std::mismatch(input_iterator<const int*>(ia), in main()
35 input_iterator<const int*>(ia + sa), in main()
40 input_iterator<const int*>(ia+3), in main()
43 assert(std::mismatch(input_iterator<const int*>(ia), in main()
44 input_iterator<const int*>(ia + sa), in main()
50 input_iterator<const int*>(ia+3), in main()
54 assert(std::mismatch(ia, ia + sa, ib, std::equal_to<int>()) == in main()
55 (std::pair<int*,int*>(ia+3,ib+3))); in main()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.nonmodifying/alg.all_of/
Dall_of.pass.cpp32 int ia[] = {2, 4, 6, 8}; in main() local
33 const unsigned sa = sizeof(ia)/sizeof(ia[0]); in main()
34 assert(std::all_of(input_iterator<const int*>(ia), in main()
35 input_iterator<const int*>(ia + sa), test1()) == true); in main()
36 assert(std::all_of(input_iterator<const int*>(ia), in main()
37 input_iterator<const int*>(ia), test1()) == true); in main()
40 const int ia[] = {2, 4, 5, 8}; in main() local
41 const unsigned sa = sizeof(ia)/sizeof(ia[0]); in main()
42 assert(std::all_of(input_iterator<const int*>(ia), in main()
43 input_iterator<const int*>(ia + sa), test1()) == false); in main()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.sorting/alg.set.operations/includes/
Dincludes.pass.cpp27 int ia[] = {1, 2, 2, 3, 3, 3, 4, 4, 4, 4}; in test() local
28 const unsigned sa = sizeof(ia)/sizeof(ia[0]); in test()
36 assert(std::includes(Iter1(ia), Iter1(ia), Iter2(ib), Iter2(ib))); in test()
37 assert(!std::includes(Iter1(ia), Iter1(ia), Iter2(ib), Iter2(ib+1))); in test()
38 assert(std::includes(Iter1(ia), Iter1(ia+1), Iter2(ib), Iter2(ib))); in test()
39 assert(std::includes(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa))); in test()
41 assert(std::includes(Iter1(ia), Iter1(ia+sa), Iter2(ib), Iter2(ib+sb))); in test()
42 assert(!std::includes(Iter1(ib), Iter1(ib+sb), Iter2(ia), Iter2(ia+sa))); in test()
44 assert(std::includes(Iter1(ia), Iter1(ia+2), Iter2(ic), Iter2(ic+2))); in test()
45 assert(!std::includes(Iter1(ia), Iter1(ia+2), Iter2(ib), Iter2(ib+2))); in test()
[all …]

12345