/ndk/tests/device/test-gnustl-full/unit/ |
D | perm_test.cpp | 44 int v1[3] = { 0, 1, 2 }; in prevprm0() local 45 prev_permutation(v1, v1 + 3); in prevprm0() 47 CPPUNIT_ASSERT(v1[0]==2); in prevprm0() 48 CPPUNIT_ASSERT(v1[1]==1); in prevprm0() 49 CPPUNIT_ASSERT(v1[2]==0); in prevprm0() 53 vector <int> v1(3); in prevprm1() local 54 __iota(v1.begin(), v1.end(), 0); in prevprm1() 56 prev_permutation(v1.begin(), v1.end()); in prevprm1() 57 CPPUNIT_ASSERT(v1[0]==2); in prevprm1() 58 CPPUNIT_ASSERT(v1[1]==1); in prevprm1() [all …]
|
D | rotate_test.cpp | 50 vector <int> v1(10); in rotate1() local 51 __iota(v1.begin(), v1.end(), 0); in rotate1() 53 rotate(v1.begin(), v1.begin()+1, v1.end()); in rotate1() 54 CPPUNIT_ASSERT(v1[0]==1); in rotate1() 55 CPPUNIT_ASSERT(v1[1]==2); in rotate1() 56 CPPUNIT_ASSERT(v1[2]==3); in rotate1() 57 CPPUNIT_ASSERT(v1[3]==4); in rotate1() 58 CPPUNIT_ASSERT(v1[4]==5); in rotate1() 59 CPPUNIT_ASSERT(v1[5]==6); in rotate1() 60 CPPUNIT_ASSERT(v1[6]==7); in rotate1() [all …]
|
D | nthelm_test.cpp | 51 vector <int> v1(numbers, numbers+10); in nthelem1() local 52 nth_element(v1.begin(), v1.begin() + v1.size() / 2, v1.end()); in nthelem1() 54 CPPUNIT_ASSERT(v1[0]==1); in nthelem1() 55 CPPUNIT_ASSERT(v1[1]==1); in nthelem1() 56 CPPUNIT_ASSERT(v1[2]==4); in nthelem1() 57 CPPUNIT_ASSERT(v1[3]==2); in nthelem1() 58 CPPUNIT_ASSERT(v1[4]==5); in nthelem1() 59 CPPUNIT_ASSERT(v1[5]==5); in nthelem1() 60 CPPUNIT_ASSERT(v1[6]==6); in nthelem1() 61 CPPUNIT_ASSERT(v1[7]==7); in nthelem1() [all …]
|
D | partial_test.cpp | 82 vector <int> v1(numbers, numbers+10); in parsrt1() local 83 partial_sort(v1.begin(), v1.begin() + v1.size() / 2, v1.end()); in parsrt1() 85 CPPUNIT_ASSERT(v1[0]==2); in parsrt1() 86 CPPUNIT_ASSERT(v1[1]==3); in parsrt1() 87 CPPUNIT_ASSERT(v1[2]==3); in parsrt1() 88 CPPUNIT_ASSERT(v1[3]==4); in parsrt1() 89 CPPUNIT_ASSERT(v1[4]==5); in parsrt1() 90 CPPUNIT_ASSERT(v1[5]==8); in parsrt1() 91 CPPUNIT_ASSERT(v1[6]==8); in parsrt1() 92 CPPUNIT_ASSERT(v1[7]==7); in parsrt1() [all …]
|
D | generator_test.cpp | 51 vector <int> v1(10); in gener2() local 53 generate(v1.begin(), v1.end(), generator); in gener2() 55 CPPUNIT_ASSERT(v1[0]==1); in gener2() 56 CPPUNIT_ASSERT(v1[1]==1); in gener2() 57 CPPUNIT_ASSERT(v1[2]==2); in gener2() 58 CPPUNIT_ASSERT(v1[3]==3); in gener2() 59 CPPUNIT_ASSERT(v1[4]==5); in gener2() 60 CPPUNIT_ASSERT(v1[5]==8); in gener2() 61 CPPUNIT_ASSERT(v1[6]==13); in gener2() 62 CPPUNIT_ASSERT(v1[7]==21); in gener2() [all …]
|
D | rm_cp_test.cpp | 84 vector <int> v1(10); in replif1() local 85 for (int i = 0; (size_t)i < v1.size(); ++i) in replif1() 86 v1[i] = i % 5; in replif1() 88 replace_if(v1.begin(), v1.end(), odd, 42); in replif1() 91 CPPUNIT_ASSERT(v1[0]==0); in replif1() 92 CPPUNIT_ASSERT(v1[1]==42); in replif1() 93 CPPUNIT_ASSERT(v1[2]==2); in replif1() 94 CPPUNIT_ASSERT(v1[3]==42); in replif1() 95 CPPUNIT_ASSERT(v1[4]==4); in replif1() 96 CPPUNIT_ASSERT(v1[5]==0); in replif1() [all …]
|
D | partition_test.cpp | 76 vector <int> v1(numbers, numbers+10); in stblptn1() local 79 stable_partition(v1.begin(), v1.end(), less_n(11, nb_pred_calls)); in stblptn1() 81 CPPUNIT_ASSERT(v1[0]==5); in stblptn1() 82 CPPUNIT_ASSERT(v1[1]==5); in stblptn1() 83 CPPUNIT_ASSERT(v1[2]==2); in stblptn1() 84 CPPUNIT_ASSERT(v1[3]==10); in stblptn1() 85 CPPUNIT_ASSERT(v1[4]==0); in stblptn1() 86 CPPUNIT_ASSERT(v1[5]==5); in stblptn1() 87 CPPUNIT_ASSERT(v1[6]==0); in stblptn1() 88 CPPUNIT_ASSERT(v1[7]==0); in stblptn1() [all …]
|
D | rndshf_test.cpp | 55 vector <int> v1(10); in rndshuf2() local 56 __iota(v1.begin(), v1.end(), 0); in rndshuf2() 61 random_shuffle(v1.begin(), v1.end(), r); in rndshuf2() 62 CPPUNIT_ASSERT(count(v1.begin(), v1.end(), 0)==1); in rndshuf2() 63 CPPUNIT_ASSERT(count(v1.begin(), v1.end(), 1)==1); in rndshuf2() 64 CPPUNIT_ASSERT(count(v1.begin(), v1.end(), 2)==1); in rndshuf2() 65 CPPUNIT_ASSERT(count(v1.begin(), v1.end(), 3)==1); in rndshuf2() 66 CPPUNIT_ASSERT(count(v1.begin(), v1.end(), 4)==1); in rndshuf2() 67 CPPUNIT_ASSERT(count(v1.begin(), v1.end(), 5)==1); in rndshuf2() 68 CPPUNIT_ASSERT(count(v1.begin(), v1.end(), 6)==1); in rndshuf2() [all …]
|
D | inplace_test.cpp | 45 vector<size_t> v1(10); in inplmrg2() local 46 for(size_t i = 0; i < v1.size(); ++i) in inplmrg2() 47 v1[i] =(v1.size() - i - 1) % 5; in inplmrg2() 49 inplace_merge(v1.begin(), v1.begin() + 5, v1.end(), greater<size_t>()); in inplmrg2() 51 CPPUNIT_ASSERT(v1[0]==4); in inplmrg2() 52 CPPUNIT_ASSERT(v1[1]==4); in inplmrg2() 53 CPPUNIT_ASSERT(v1[2]==3); in inplmrg2() 54 CPPUNIT_ASSERT(v1[3]==3); in inplmrg2() 55 CPPUNIT_ASSERT(v1[4]==2); in inplmrg2() 56 CPPUNIT_ASSERT(v1[5]==2); in inplmrg2() [all …]
|
D | swap_test.cpp | 90 queue<Obj> v1; in swap_container_non_spec() local 93 v1.push( Obj() ); in swap_container_non_spec() 94 v1.back().v = -1; in swap_container_non_spec() 95 v1.push( Obj() ); in swap_container_non_spec() 96 v1.back().v = -2; in swap_container_non_spec() 105 CPPUNIT_CHECK( v1.size() == 2 ); in swap_container_non_spec() 108 swap( v1, v2 ); // this shouldn't try make it as v1.swap( v2 ), no queue::swap method! in swap_container_non_spec() 110 CPPUNIT_CHECK( v1.size() == 3 ); in swap_container_non_spec() 114 CPPUNIT_CHECK( v1.front().v == 1 || v1.front().v == 2 ); in swap_container_non_spec() 115 CPPUNIT_CHECK( v1.back().v == 1 || v1.back().v == 2 ); in swap_container_non_spec() [all …]
|
D | foreach_test.cpp | 58 vector<int> v1(10); in foreach1() local 59 for (int i = 0; (size_t)i < v1.size(); ++i) in foreach1() 60 v1[i] = i; in foreach1() 61 for_each(v1.begin(), v1.end(), ptr_fun(sqr) ); in foreach1() 63 CPPUNIT_ASSERT(v1[0]==0); in foreach1() 64 CPPUNIT_ASSERT(v1[1]==1); in foreach1() 65 CPPUNIT_ASSERT(v1[2]==4); in foreach1() 66 CPPUNIT_ASSERT(v1[3]==9); in foreach1() 67 CPPUNIT_ASSERT(v1[4]==16); in foreach1() 68 CPPUNIT_ASSERT(v1[5]==25); in foreach1() [all …]
|
D | copy_test.cpp | 86 vector<int> v1(10); in copy_vector() local 87 for (int i = 0; (size_t)i < v1.size(); ++i) in copy_vector() 88 v1[i] = i; in copy_vector() 90 vector<int> v2(v1.size()); in copy_vector() 91 copy(v1.begin(), v1.end(), v2.begin()); in copy_vector() 93 CPPUNIT_ASSERT( v2 == v1 ); in copy_vector() 97 vector<int> v1(10); in copy_insert() local 98 for (int loc = 0; (size_t)loc < v1.size(); ++loc) in copy_insert() 99 v1[loc] = loc; in copy_insert() 102 copy(v1.begin(), v1.end(), i); in copy_insert() [all …]
|
D | includes_test.cpp | 48 vector<int> v1(10); in incl1() local 51 for (i = 0; (size_t)i < v1.size(); ++i) { in incl1() 52 v1[i] = i; in incl1() 55 bool r1=includes(v1.begin(), v1.end(), v2.begin(), v2.end()); in incl1() 61 bool r2=includes(v1.begin(), v1.end(), v2.begin(), v2.end()); in incl1() 69 vector <char const*> v1(nameSize); in incl2() local 70 for (int i = 0; (size_t)i < v1.size(); ++i) { in incl2() 71 v1[i] = names[i]; in incl2() 77 sort(v1.begin(), v1.end(), compare_strings); in incl2() 80 bool r1 = includes(v1.begin(), v1.end(), v2.begin(), v2.end(), compare_strings); in incl2() [all …]
|
/ndk/tests/device/test-stlport/unit/ |
D | perm_test.cpp | 44 int v1[3] = { 0, 1, 2 }; in prevprm0() local 45 prev_permutation(v1, v1 + 3); in prevprm0() 47 CPPUNIT_ASSERT(v1[0]==2); in prevprm0() 48 CPPUNIT_ASSERT(v1[1]==1); in prevprm0() 49 CPPUNIT_ASSERT(v1[2]==0); in prevprm0() 53 vector <int> v1(3); in prevprm1() local 54 __iota(v1.begin(), v1.end(), 0); in prevprm1() 56 prev_permutation(v1.begin(), v1.end()); in prevprm1() 57 CPPUNIT_ASSERT(v1[0]==2); in prevprm1() 58 CPPUNIT_ASSERT(v1[1]==1); in prevprm1() [all …]
|
D | rotate_test.cpp | 50 vector <int> v1(10); in rotate1() local 51 __iota(v1.begin(), v1.end(), 0); in rotate1() 53 rotate(v1.begin(), v1.begin()+1, v1.end()); in rotate1() 54 CPPUNIT_ASSERT(v1[0]==1); in rotate1() 55 CPPUNIT_ASSERT(v1[1]==2); in rotate1() 56 CPPUNIT_ASSERT(v1[2]==3); in rotate1() 57 CPPUNIT_ASSERT(v1[3]==4); in rotate1() 58 CPPUNIT_ASSERT(v1[4]==5); in rotate1() 59 CPPUNIT_ASSERT(v1[5]==6); in rotate1() 60 CPPUNIT_ASSERT(v1[6]==7); in rotate1() [all …]
|
D | nthelm_test.cpp | 51 vector <int> v1(numbers, numbers+10); in nthelem1() local 52 nth_element(v1.begin(), v1.begin() + v1.size() / 2, v1.end()); in nthelem1() 54 CPPUNIT_ASSERT(v1[0]==1); in nthelem1() 55 CPPUNIT_ASSERT(v1[1]==1); in nthelem1() 56 CPPUNIT_ASSERT(v1[2]==4); in nthelem1() 57 CPPUNIT_ASSERT(v1[3]==2); in nthelem1() 58 CPPUNIT_ASSERT(v1[4]==5); in nthelem1() 59 CPPUNIT_ASSERT(v1[5]==5); in nthelem1() 60 CPPUNIT_ASSERT(v1[6]==6); in nthelem1() 61 CPPUNIT_ASSERT(v1[7]==7); in nthelem1() [all …]
|
D | partial_test.cpp | 82 vector <int> v1(numbers, numbers+10); in parsrt1() local 83 partial_sort(v1.begin(), v1.begin() + v1.size() / 2, v1.end()); in parsrt1() 85 CPPUNIT_ASSERT(v1[0]==2); in parsrt1() 86 CPPUNIT_ASSERT(v1[1]==3); in parsrt1() 87 CPPUNIT_ASSERT(v1[2]==3); in parsrt1() 88 CPPUNIT_ASSERT(v1[3]==4); in parsrt1() 89 CPPUNIT_ASSERT(v1[4]==5); in parsrt1() 90 CPPUNIT_ASSERT(v1[5]==8); in parsrt1() 91 CPPUNIT_ASSERT(v1[6]==8); in parsrt1() 92 CPPUNIT_ASSERT(v1[7]==7); in parsrt1() [all …]
|
D | generator_test.cpp | 51 vector <int> v1(10); in gener2() local 53 generate(v1.begin(), v1.end(), generator); in gener2() 55 CPPUNIT_ASSERT(v1[0]==1); in gener2() 56 CPPUNIT_ASSERT(v1[1]==1); in gener2() 57 CPPUNIT_ASSERT(v1[2]==2); in gener2() 58 CPPUNIT_ASSERT(v1[3]==3); in gener2() 59 CPPUNIT_ASSERT(v1[4]==5); in gener2() 60 CPPUNIT_ASSERT(v1[5]==8); in gener2() 61 CPPUNIT_ASSERT(v1[6]==13); in gener2() 62 CPPUNIT_ASSERT(v1[7]==21); in gener2() [all …]
|
D | rm_cp_test.cpp | 84 vector <int> v1(10); in replif1() local 85 for (int i = 0; (size_t)i < v1.size(); ++i) in replif1() 86 v1[i] = i % 5; in replif1() 88 replace_if(v1.begin(), v1.end(), odd, 42); in replif1() 91 CPPUNIT_ASSERT(v1[0]==0); in replif1() 92 CPPUNIT_ASSERT(v1[1]==42); in replif1() 93 CPPUNIT_ASSERT(v1[2]==2); in replif1() 94 CPPUNIT_ASSERT(v1[3]==42); in replif1() 95 CPPUNIT_ASSERT(v1[4]==4); in replif1() 96 CPPUNIT_ASSERT(v1[5]==0); in replif1() [all …]
|
D | partition_test.cpp | 76 vector <int> v1(numbers, numbers+10); in stblptn1() local 79 stable_partition(v1.begin(), v1.end(), less_n(11, nb_pred_calls)); in stblptn1() 81 CPPUNIT_ASSERT(v1[0]==5); in stblptn1() 82 CPPUNIT_ASSERT(v1[1]==5); in stblptn1() 83 CPPUNIT_ASSERT(v1[2]==2); in stblptn1() 84 CPPUNIT_ASSERT(v1[3]==10); in stblptn1() 85 CPPUNIT_ASSERT(v1[4]==0); in stblptn1() 86 CPPUNIT_ASSERT(v1[5]==5); in stblptn1() 87 CPPUNIT_ASSERT(v1[6]==0); in stblptn1() 88 CPPUNIT_ASSERT(v1[7]==0); in stblptn1() [all …]
|
D | rndshf_test.cpp | 55 vector <int> v1(10); in rndshuf2() local 56 __iota(v1.begin(), v1.end(), 0); in rndshuf2() 61 random_shuffle(v1.begin(), v1.end(), r); in rndshuf2() 62 CPPUNIT_ASSERT(count(v1.begin(), v1.end(), 0)==1); in rndshuf2() 63 CPPUNIT_ASSERT(count(v1.begin(), v1.end(), 1)==1); in rndshuf2() 64 CPPUNIT_ASSERT(count(v1.begin(), v1.end(), 2)==1); in rndshuf2() 65 CPPUNIT_ASSERT(count(v1.begin(), v1.end(), 3)==1); in rndshuf2() 66 CPPUNIT_ASSERT(count(v1.begin(), v1.end(), 4)==1); in rndshuf2() 67 CPPUNIT_ASSERT(count(v1.begin(), v1.end(), 5)==1); in rndshuf2() 68 CPPUNIT_ASSERT(count(v1.begin(), v1.end(), 6)==1); in rndshuf2() [all …]
|
D | inplace_test.cpp | 45 vector<size_t> v1(10); in inplmrg2() local 46 for(size_t i = 0; i < v1.size(); ++i) in inplmrg2() 47 v1[i] =(v1.size() - i - 1) % 5; in inplmrg2() 49 inplace_merge(v1.begin(), v1.begin() + 5, v1.end(), greater<size_t>()); in inplmrg2() 51 CPPUNIT_ASSERT(v1[0]==4); in inplmrg2() 52 CPPUNIT_ASSERT(v1[1]==4); in inplmrg2() 53 CPPUNIT_ASSERT(v1[2]==3); in inplmrg2() 54 CPPUNIT_ASSERT(v1[3]==3); in inplmrg2() 55 CPPUNIT_ASSERT(v1[4]==2); in inplmrg2() 56 CPPUNIT_ASSERT(v1[5]==2); in inplmrg2() [all …]
|
D | swap_test.cpp | 90 queue<Obj> v1; in swap_container_non_spec() local 93 v1.push( Obj() ); in swap_container_non_spec() 94 v1.back().v = -1; in swap_container_non_spec() 95 v1.push( Obj() ); in swap_container_non_spec() 96 v1.back().v = -2; in swap_container_non_spec() 105 CPPUNIT_CHECK( v1.size() == 2 ); in swap_container_non_spec() 108 swap( v1, v2 ); // this shouldn't try make it as v1.swap( v2 ), no queue::swap method! in swap_container_non_spec() 110 CPPUNIT_CHECK( v1.size() == 3 ); in swap_container_non_spec() 114 CPPUNIT_CHECK( v1.front().v == 1 || v1.front().v == 2 ); in swap_container_non_spec() 115 CPPUNIT_CHECK( v1.back().v == 1 || v1.back().v == 2 ); in swap_container_non_spec() [all …]
|
D | foreach_test.cpp | 58 vector<int> v1(10); in foreach1() local 59 for (int i = 0; (size_t)i < v1.size(); ++i) in foreach1() 60 v1[i] = i; in foreach1() 61 for_each(v1.begin(), v1.end(), ptr_fun(sqr) ); in foreach1() 63 CPPUNIT_ASSERT(v1[0]==0); in foreach1() 64 CPPUNIT_ASSERT(v1[1]==1); in foreach1() 65 CPPUNIT_ASSERT(v1[2]==4); in foreach1() 66 CPPUNIT_ASSERT(v1[3]==9); in foreach1() 67 CPPUNIT_ASSERT(v1[4]==16); in foreach1() 68 CPPUNIT_ASSERT(v1[5]==25); in foreach1() [all …]
|
D | copy_test.cpp | 86 vector<int> v1(10); in copy_vector() local 87 for (int i = 0; (size_t)i < v1.size(); ++i) in copy_vector() 88 v1[i] = i; in copy_vector() 90 vector<int> v2(v1.size()); in copy_vector() 91 copy(v1.begin(), v1.end(), v2.begin()); in copy_vector() 93 CPPUNIT_ASSERT( v2 == v1 ); in copy_vector() 97 vector<int> v1(10); in copy_insert() local 98 for (int loc = 0; (size_t)loc < v1.size(); ++loc) in copy_insert() 99 v1[loc] = loc; in copy_insert() 102 copy(v1.begin(), v1.end(), i); in copy_insert() [all …]
|