/ndk/sources/cxx-stl/llvm-libc++/test/algorithms/alg.sorting/alg.nth.element/ |
D | nth_element.pass.cpp | 22 test_one(unsigned N, unsigned M) in test_one() argument 24 assert(N != 0); in test_one() 25 assert(M < N); in test_one() 26 int* array = new int[N]; in test_one() 27 for (int i = 0; i < N; ++i) in test_one() 29 std::random_shuffle(array, array+N); in test_one() 30 std::nth_element(array, array+M, array+N); in test_one() 36 test(unsigned N) in test() argument 38 test_one(N, 0); in test() 39 test_one(N, 1); in test() [all …]
|
D | nth_element_comp.pass.cpp | 35 test_one(unsigned N, unsigned M) in test_one() argument 37 assert(N != 0); in test_one() 38 assert(M < N); in test_one() 39 int* array = new int[N]; in test_one() 40 for (int i = 0; i < N; ++i) in test_one() 42 std::random_shuffle(array, array+N); in test_one() 43 std::nth_element(array, array+M, array+N, std::greater<int>()); in test_one() 44 assert(array[M] == N-M-1); in test_one() 49 test(unsigned N) in test() argument 51 test_one(N, 0); in test() [all …]
|
/ndk/sources/cxx-stl/llvm-libc++/test/algorithms/alg.sorting/alg.sort/partial.sort/ |
D | partial_sort.pass.cpp | 22 test_larger_sorts(unsigned N, unsigned M) in test_larger_sorts() argument 24 assert(N != 0); in test_larger_sorts() 25 int* array = new int[N]; in test_larger_sorts() 26 for (int i = 0; i < N; ++i) in test_larger_sorts() 28 std::random_shuffle(array, array+N); in test_larger_sorts() 29 std::partial_sort(array, array+M, array+N); in test_larger_sorts() 36 test_larger_sorts(unsigned N) in test_larger_sorts() argument 38 test_larger_sorts(N, 0); in test_larger_sorts() 39 test_larger_sorts(N, 1); in test_larger_sorts() 40 test_larger_sorts(N, 2); in test_larger_sorts() [all …]
|
D | partial_sort_comp.pass.cpp | 35 test_larger_sorts(unsigned N, unsigned M) in test_larger_sorts() argument 37 assert(N != 0); in test_larger_sorts() 38 int* array = new int[N]; in test_larger_sorts() 39 for (int i = 0; i < N; ++i) in test_larger_sorts() 41 std::random_shuffle(array, array+N); in test_larger_sorts() 42 std::partial_sort(array, array+M, array+N, std::greater<int>()); in test_larger_sorts() 44 assert(array[i] == N-i-1); in test_larger_sorts() 49 test_larger_sorts(unsigned N) in test_larger_sorts() argument 51 test_larger_sorts(N, 0); in test_larger_sorts() 52 test_larger_sorts(N, 1); in test_larger_sorts() [all …]
|
/ndk/sources/cxx-stl/llvm-libc++/test/utilities/template.bitset/bitset.members/ |
D | to_string.pass.cpp | 31 template <std::size_t N> 32 std::bitset<N> 35 std::bitset<N> v; in make_bitset() 36 for (std::size_t i = 0; i < N; ++i) in make_bitset() 41 template <std::size_t N> 45 std::bitset<N> v = make_bitset<N>(); in test_to_string() 48 for (std::size_t i = 0; i < N; ++i) in test_to_string() 50 assert(s[N - 1 - i] == '1'); in test_to_string() 52 assert(s[N - 1 - i] == '0'); in test_to_string() 56 for (std::size_t i = 0; i < N; ++i) in test_to_string() [all …]
|
D | index.pass.cpp | 18 template <std::size_t N> 19 std::bitset<N> 22 std::bitset<N> v; in make_bitset() 23 for (std::size_t i = 0; i < N; ++i) in make_bitset() 28 template <std::size_t N> 31 std::bitset<N> v1 = make_bitset<N>(); in test_index_const() 32 if (N > 0) in test_index_const() 34 assert(v1[N/2] == v1.test(N/2)); in test_index_const() 35 typename std::bitset<N>::reference r = v1[N/2]; in test_index_const() 36 assert(r == v1.test(N/2)); in test_index_const() [all …]
|
D | index_const.pass.cpp | 18 template <std::size_t N> 19 std::bitset<N> 22 std::bitset<N> v; in make_bitset() 23 for (std::size_t i = 0; i < N; ++i) in make_bitset() 28 template <std::size_t N> 31 const std::bitset<N> v1 = make_bitset<N>(); in test_index_const() 32 if (N > 0) in test_index_const() 34 assert(v1[N/2] == v1.test(N/2)); in test_index_const()
|
D | op_xor_eq.pass.cpp | 18 template <std::size_t N> 19 std::bitset<N> 22 std::bitset<N> v; in make_bitset() 23 for (std::size_t i = 0; i < N; ++i) in make_bitset() 28 template <std::size_t N> 31 std::bitset<N> v1 = make_bitset<N>(); in test_op_xor_eq() 32 std::bitset<N> v2 = make_bitset<N>(); in test_op_xor_eq() 33 std::bitset<N> v3 = v1; in test_op_xor_eq() 35 for (std::size_t i = 0; i < N; ++i) in test_op_xor_eq()
|
D | op_and_eq.pass.cpp | 18 template <std::size_t N> 19 std::bitset<N> 22 std::bitset<N> v; in make_bitset() 23 for (std::size_t i = 0; i < N; ++i) in make_bitset() 28 template <std::size_t N> 31 std::bitset<N> v1 = make_bitset<N>(); in test_op_and_eq() 32 std::bitset<N> v2 = make_bitset<N>(); in test_op_and_eq() 33 std::bitset<N> v3 = v1; in test_op_and_eq() 35 for (std::size_t i = 0; i < N; ++i) in test_op_and_eq()
|
D | op_or_eq.pass.cpp | 18 template <std::size_t N> 19 std::bitset<N> 22 std::bitset<N> v; in make_bitset() 23 for (std::size_t i = 0; i < N; ++i) in make_bitset() 28 template <std::size_t N> 31 std::bitset<N> v1 = make_bitset<N>(); in test_op_or_eq() 32 std::bitset<N> v2 = make_bitset<N>(); in test_op_or_eq() 33 std::bitset<N> v3 = v1; in test_op_or_eq() 35 for (std::size_t i = 0; i < N; ++i) in test_op_or_eq()
|
D | right_shift_eq.pass.cpp | 18 template <std::size_t N> 19 std::bitset<N> 22 std::bitset<N> v; in make_bitset() 23 for (std::size_t i = 0; i < N; ++i) in make_bitset() 28 template <std::size_t N> 31 for (std::size_t s = 0; s <= N+1; ++s) in test_right_shift() 33 std::bitset<N> v1 = make_bitset<N>(); in test_right_shift() 34 std::bitset<N> v2 = v1; in test_right_shift() 36 for (std::size_t i = 0; i < N; ++i) in test_right_shift() 37 if (i + s < N) in test_right_shift()
|
D | op_eq_eq.pass.cpp | 21 template <std::size_t N> 22 std::bitset<N> 25 std::bitset<N> v; in make_bitset() 26 for (std::size_t i = 0; i < N; ++i) in make_bitset() 31 template <std::size_t N> 34 const std::bitset<N> v1 = make_bitset<N>(); in test_equality() 35 std::bitset<N> v2 = v1; in test_equality() 37 if (N > 0) in test_equality() 39 v2[N/2].flip(); in test_equality()
|
/ndk/sources/cxx-stl/llvm-libc++/test/algorithms/alg.sorting/alg.sort/stable.sort/ |
D | stable_sort.pass.cpp | 75 test_larger_sorts(unsigned N, unsigned M) in test_larger_sorts() argument 77 assert(N != 0); in test_larger_sorts() 80 int* array = new int[N]; in test_larger_sorts() 82 for (int i = 0; i < N; ++i) in test_larger_sorts() 89 std::stable_sort(array, array+N); in test_larger_sorts() 90 assert(std::is_sorted(array, array+N)); in test_larger_sorts() 92 std::random_shuffle(array, array+N); in test_larger_sorts() 93 std::stable_sort(array, array+N); in test_larger_sorts() 94 assert(std::is_sorted(array, array+N)); in test_larger_sorts() 96 std::stable_sort(array, array+N); in test_larger_sorts() [all …]
|
/ndk/sources/cxx-stl/llvm-libc++/test/algorithms/alg.sorting/alg.sort/sort/ |
D | sort.pass.cpp | 75 test_larger_sorts(unsigned N, unsigned M) in test_larger_sorts() argument 77 assert(N != 0); in test_larger_sorts() 80 int* array = new int[N]; in test_larger_sorts() 82 for (int i = 0; i < N; ++i) in test_larger_sorts() 89 std::sort(array, array+N); in test_larger_sorts() 90 assert(std::is_sorted(array, array+N)); in test_larger_sorts() 92 std::random_shuffle(array, array+N); in test_larger_sorts() 93 std::sort(array, array+N); in test_larger_sorts() 94 assert(std::is_sorted(array, array+N)); in test_larger_sorts() 96 std::sort(array, array+N); in test_larger_sorts() [all …]
|
/ndk/sources/cxx-stl/llvm-libc++/test/algorithms/alg.sorting/alg.sort/partial.sort.copy/ |
D | partial_sort_copy_comp.pass.cpp | 30 test_larger_sorts(unsigned N, unsigned M) in test_larger_sorts() argument 32 int* input = new int[N]; in test_larger_sorts() 34 for (int i = 0; i < N; ++i) in test_larger_sorts() 36 std::random_shuffle(input, input+N); in test_larger_sorts() 37 int* r = std::partial_sort_copy(Iter(input), Iter(input+N), output, output+M, in test_larger_sorts() 39 int* e = output + std::min(N, M); in test_larger_sorts() 43 assert(*x == N-i-1); in test_larger_sorts() 50 test_larger_sorts(unsigned N) in test_larger_sorts() argument 52 test_larger_sorts<Iter>(N, 0); in test_larger_sorts() 53 test_larger_sorts<Iter>(N, 1); in test_larger_sorts() [all …]
|
D | partial_sort_copy.pass.cpp | 27 test_larger_sorts(unsigned N, unsigned M) in test_larger_sorts() argument 29 int* input = new int[N]; in test_larger_sorts() 31 for (int i = 0; i < N; ++i) in test_larger_sorts() 33 std::random_shuffle(input, input+N); in test_larger_sorts() 34 int* r = std::partial_sort_copy(Iter(input), Iter(input+N), output, output+M); in test_larger_sorts() 35 int* e = output + std::min(N, M); in test_larger_sorts() 46 test_larger_sorts(unsigned N) in test_larger_sorts() argument 48 test_larger_sorts<Iter>(N, 0); in test_larger_sorts() 49 test_larger_sorts<Iter>(N, 1); in test_larger_sorts() 50 test_larger_sorts<Iter>(N, 2); in test_larger_sorts() [all …]
|
/ndk/sources/cxx-stl/llvm-libc++/test/algorithms/alg.sorting/alg.merge/ |
D | inplace_merge_comp.pass.cpp | 37 test_one(unsigned N, unsigned M) in test_one() argument 39 assert(M <= N); in test_one() 40 int* ia = new int[N]; in test_one() 41 for (unsigned i = 0; i < N; ++i) in test_one() 43 std::random_shuffle(ia, ia+N); 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() 47 if(N > 0) in test_one() 49 assert(ia[0] == N-1); in test_one() 50 assert(ia[N-1] == 0); in test_one() [all …]
|
D | inplace_merge.pass.cpp | 25 test_one(unsigned N, unsigned M) in test_one() argument 27 assert(M <= N); in test_one() 28 int* ia = new int[N]; in test_one() 29 for (unsigned i = 0; i < N; ++i) in test_one() 31 std::random_shuffle(ia, ia+N); in test_one() 33 std::sort(ia+M, ia+N); in test_one() 34 std::inplace_merge(Iter(ia), Iter(ia+M), Iter(ia+N)); in test_one() 35 if(N > 0) in test_one() 38 assert(ia[N-1] == N-1); in test_one() 39 assert(std::is_sorted(ia, ia+N)); in test_one() [all …]
|
/ndk/sources/cxx-stl/llvm-libc++/test/utilities/memory/ptr.align/ |
D | align.pass.cpp | 20 const unsigned N = 20; in main() local 21 char buf[N]; in main() 24 std::size_t s = N; in main() 28 assert(s == N); in main() 31 s = N; in main() 35 assert(s == N-3); in main() 38 s = N; in main() 42 assert(s == N-2); in main() 45 s = N; in main() 49 assert(s == N-1); in main() [all …]
|
/ndk/sources/cxx-stl/llvm-libc++/test/algorithms/alg.sorting/alg.heap.operations/sort.heap/ |
D | sort_heap_comp.pass.cpp | 32 void test(unsigned N) in test() argument 34 int* ia = new int [N]; in test() 35 for (int i = 0; i < N; ++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() 55 const int N = 1000; in main() local 56 std::unique_ptr<int>* ia = new std::unique_ptr<int> [N]; in main() 57 for (int i = 0; i < N; ++i) in main() [all …]
|
/ndk/sources/cxx-stl/llvm-libc++/test/containers/sequences/deque/deque.modifiers/ |
D | insert_iter_iter.pass.cpp | 65 testN(int start, int N, int M) in testN() argument 72 if (0 <= i && i <= N) in testN() 74 C c1 = make(N, start); in testN() 81 if (0 <= i && i <= N) in testN() 83 C c1 = make(N, start); in testN() 88 for (int i = N/2-1; i <= N/2+1; ++i) in testN() 90 if (0 <= i && i <= N) in testN() 92 C c1 = make(N, start); in testN() 97 for (int i = N - M - 1; i <= N - M + 1; ++i) in testN() 99 if (0 <= i && i <= N) in testN() [all …]
|
/ndk/sources/cxx-stl/llvm-libc++/test/algorithms/alg.sorting/alg.heap.operations/make.heap/ |
D | make_heap_comp.pass.cpp | 32 void test(unsigned N) in test() argument 34 int* ia = new int [N]; in test() 35 for (int i = 0; i < N; ++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() 54 const int N = 1000; in main() local 55 std::unique_ptr<int>* ia = new std::unique_ptr<int> [N]; in main() 56 for (int i = 0; i < N; ++i) in main() 58 std::random_shuffle(ia, ia+N); in main() [all …]
|
/ndk/sources/cxx-stl/llvm-libc++/test/utilities/template.bitset/bitset.operators/ |
D | op_or.pass.cpp | 18 template <std::size_t N> 19 std::bitset<N> 22 std::bitset<N> v; in make_bitset() 23 for (std::size_t i = 0; i < N; ++i) in make_bitset() 28 template <std::size_t N> 31 std::bitset<N> v1 = make_bitset<N>(); in test_op_or() 32 std::bitset<N> v2 = make_bitset<N>(); in test_op_or() 33 std::bitset<N> v3 = v1; in test_op_or()
|
D | op_and.pass.cpp | 18 template <std::size_t N> 19 std::bitset<N> 22 std::bitset<N> v; in make_bitset() 23 for (std::size_t i = 0; i < N; ++i) in make_bitset() 28 template <std::size_t N> 31 std::bitset<N> v1 = make_bitset<N>(); in test_op_and() 32 std::bitset<N> v2 = make_bitset<N>(); in test_op_and() 33 std::bitset<N> v3 = v1; in test_op_and()
|
D | op_not.pass.cpp | 18 template <std::size_t N> 19 std::bitset<N> 22 std::bitset<N> v; in make_bitset() 23 for (std::size_t i = 0; i < N; ++i) in make_bitset() 28 template <std::size_t N> 31 std::bitset<N> v1 = make_bitset<N>(); in test_op_not() 32 std::bitset<N> v2 = make_bitset<N>(); in test_op_not() 33 std::bitset<N> v3 = v1; in test_op_not()
|