Home
last modified time | relevance | path

Searched refs:numbers (Results 1 – 25 of 56) sorted by relevance

123

/ndk/tests/device/test-stlport/unit/
Dheap_test.cpp37 int numbers[6] = { 5, 10, 4, 13, 11, 19 }; in mkheap0() local
39 make_heap(numbers, numbers + 6); in mkheap0()
40 CPPUNIT_ASSERT(numbers[0]==19) in mkheap0()
41 pop_heap(numbers, numbers + 6); in mkheap0()
42 CPPUNIT_ASSERT(numbers[0]==13) in mkheap0()
43 pop_heap(numbers, numbers + 5); in mkheap0()
44 CPPUNIT_ASSERT(numbers[0]==11) in mkheap0()
45 pop_heap(numbers, numbers + 4); in mkheap0()
46 CPPUNIT_ASSERT(numbers[0]==10) in mkheap0()
47 pop_heap(numbers, numbers + 3); in mkheap0()
[all …]
Drm_cp_test.cpp56 int numbers[6] = { 0, 1, 2, 3, 4, 5 }; in reverse1() local
58 reverse(numbers, numbers + 6); in reverse1()
59 CPPUNIT_ASSERT(numbers[0]==5); in reverse1()
60 CPPUNIT_ASSERT(numbers[1]==4); in reverse1()
61 CPPUNIT_ASSERT(numbers[2]==3); in reverse1()
62 CPPUNIT_ASSERT(numbers[3]==2); in reverse1()
63 CPPUNIT_ASSERT(numbers[4]==1); in reverse1()
64 CPPUNIT_ASSERT(numbers[5]==0); in reverse1()
69 int numbers[6] = { 0, 1, 2, 3, 4, 5 }; in revcopy1() local
72 reverse_copy((int*)numbers, (int*)numbers + 6, (int*)result); in revcopy1()
[all …]
Dsort_test.cpp56 int numbers[6] = { 1, 50, -10, 11, 42, 19 }; in stblsrt1() local
57 stable_sort(numbers, numbers + 6); in stblsrt1()
59 CPPUNIT_ASSERT(numbers[0]==-10); in stblsrt1()
60 CPPUNIT_ASSERT(numbers[1]==1); in stblsrt1()
61 CPPUNIT_ASSERT(numbers[2]==11); in stblsrt1()
62 CPPUNIT_ASSERT(numbers[3]==19); in stblsrt1()
63 CPPUNIT_ASSERT(numbers[4]==42); in stblsrt1()
64 CPPUNIT_ASSERT(numbers[5]==50); in stblsrt1()
115 int numbers[6] = { 1, 50, -10, 11, 42, 19 }; in sort1() local
117 sort(numbers, numbers + 6); in sort1()
[all …]
Dpartition_test.cpp56 int numbers[6] = { 10, 5, 11, 20, 6, -2 }; in stblptn0() local
59 stable_partition((int*)numbers, (int*)numbers + 6, less_n(10, nb_pred_calls)); in stblptn0()
61 CPPUNIT_ASSERT(numbers[0]==5); in stblptn0()
62 CPPUNIT_ASSERT(numbers[1]==6); in stblptn0()
63 CPPUNIT_ASSERT(numbers[2]==-2); in stblptn0()
64 CPPUNIT_ASSERT(numbers[3]==10); in stblptn0()
65 CPPUNIT_ASSERT(numbers[4]==11); in stblptn0()
66 CPPUNIT_ASSERT(numbers[5]==20); in stblptn0()
69 CPPUNIT_ASSERT( nb_pred_calls == sizeof(numbers) / sizeof(numbers[0]) ); in stblptn0()
75 int numbers[] = { 5, 5, 2, 10, 0, 12, 5, 0, 0, 19 }; in stblptn1() local
[all …]
Diota_test.cpp34 int numbers[10]; in iota1() local
35 iota(numbers, numbers + 10, 42); in iota1()
36 CPPUNIT_ASSERT(numbers[0]==42); in iota1()
37 CPPUNIT_ASSERT(numbers[1]==43); in iota1()
38 CPPUNIT_ASSERT(numbers[2]==44); in iota1()
39 CPPUNIT_ASSERT(numbers[3]==45); in iota1()
40 CPPUNIT_ASSERT(numbers[4]==46); in iota1()
41 CPPUNIT_ASSERT(numbers[5]==47); in iota1()
42 CPPUNIT_ASSERT(numbers[6]==48); in iota1()
43 CPPUNIT_ASSERT(numbers[7]==49); in iota1()
[all …]
Dcount_test.cpp34 int numbers[10] = { 1, 2, 4, 1, 2, 4, 1, 2, 4, 1 }; in count0() local
36 int result = count(numbers, numbers + 10, 1); in count0()
40 count(numbers, numbers + 10, 1, result); in count0()
46 vector <int> numbers(100); in count1() local
48 numbers[i] = i % 3; in count1()
49 int elements = count(numbers.begin(), numbers.end(), 2); in count1()
53 count(numbers.begin(), numbers.end(), 2, elements); in count1()
59 vector <int> numbers(100); in countif1() local
61 numbers[i] = i % 3; in countif1()
62 int elements = count_if(numbers.begin(), numbers.end(), odd); in countif1()
[all …]
Dnthelm_test.cpp35 int numbers[7] = { 5, 2, 4, 1, 0, 3 ,77}; in nthelem0() local
36 nth_element(numbers, numbers + 3, numbers + 6); in nthelem0()
38 CPPUNIT_ASSERT(numbers[0]==1); in nthelem0()
39 CPPUNIT_ASSERT(numbers[1]==0); in nthelem0()
40 CPPUNIT_ASSERT(numbers[2]==2); in nthelem0()
41 CPPUNIT_ASSERT(numbers[3]==3); in nthelem0()
42 CPPUNIT_ASSERT(numbers[4]==4); in nthelem0()
43 CPPUNIT_ASSERT(numbers[5]==5); in nthelem0()
49 int numbers[10] = { 6, 8, 5, 1, 7, 4, 1, 5, 2, 6 }; in nthelem1() local
51 vector <int> v1(numbers, numbers+10); in nthelem1()
[all …]
Dforeach_test.cpp37 int numbers[10] = { 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 }; in foreach0() local
39 for_each(numbers, numbers + 10, ptr_fun(increase)); in foreach0()
41 CPPUNIT_ASSERT(numbers[0]==2); in foreach0()
42 CPPUNIT_ASSERT(numbers[1]==2); in foreach0()
43 CPPUNIT_ASSERT(numbers[2]==3); in foreach0()
44 CPPUNIT_ASSERT(numbers[3]==4); in foreach0()
45 CPPUNIT_ASSERT(numbers[4]==6); in foreach0()
46 CPPUNIT_ASSERT(numbers[5]==9); in foreach0()
47 CPPUNIT_ASSERT(numbers[6]==14); in foreach0()
48 CPPUNIT_ASSERT(numbers[7]==22); in foreach0()
[all …]
Drndshf_test.cpp42 int numbers[6] = { 1, 2, 3, 4, 5, 6 }; in rndshuf0() local
44 random_shuffle(numbers, numbers + 6); in rndshuf0()
46 CPPUNIT_ASSERT(count(numbers, numbers+6, 1)==1); in rndshuf0()
47 CPPUNIT_ASSERT(count(numbers, numbers+6, 2)==1); in rndshuf0()
48 CPPUNIT_ASSERT(count(numbers, numbers+6, 3)==1); in rndshuf0()
49 CPPUNIT_ASSERT(count(numbers, numbers+6, 4)==1); in rndshuf0()
50 CPPUNIT_ASSERT(count(numbers, numbers+6, 5)==1); in rndshuf0()
51 CPPUNIT_ASSERT(count(numbers, numbers+6, 6)==1); in rndshuf0()
Dpartial_test.cpp63 int numbers[6] = { 5, 2, 4, 3, 1, 6 }; in parsrt0() local
65 partial_sort((int*)numbers, (int*)numbers + 3, (int*)numbers + 6); in parsrt0()
68 CPPUNIT_ASSERT(numbers[0]==1); in parsrt0()
69 CPPUNIT_ASSERT(numbers[1]==2); in parsrt0()
70 CPPUNIT_ASSERT(numbers[2]==3); in parsrt0()
71 CPPUNIT_ASSERT(numbers[3]==5); in parsrt0()
72 CPPUNIT_ASSERT(numbers[4]==4); in parsrt0()
73 CPPUNIT_ASSERT(numbers[5]==6); in parsrt0()
80 int numbers[10] ={ 8, 8, 5, 3, 7, 6, 5, 3, 2, 4 }; in parsrt1() local
82 vector <int> v1(numbers, numbers+10); in parsrt1()
[all …]
Dunique_test.cpp37 int numbers[8] = { 0, 1, 1, 2, 2, 2, 3, 4 }; in unique1() local
38 unique((int*)numbers, (int*)numbers + 8); in unique1()
40 CPPUNIT_ASSERT(numbers[0]==0); in unique1()
41 CPPUNIT_ASSERT(numbers[1]==1); in unique1()
42 CPPUNIT_ASSERT(numbers[2]==2); in unique1()
43 CPPUNIT_ASSERT(numbers[3]==3); in unique1()
44 CPPUNIT_ASSERT(numbers[4]==4); in unique1()
45 CPPUNIT_ASSERT(numbers[5]==2); in unique1()
46 CPPUNIT_ASSERT(numbers[6]==3); in unique1()
47 CPPUNIT_ASSERT(numbers[7]==4); in unique1()
[all …]
Dinplace_test.cpp33 int numbers[6] = { 1, 10, 42, 3, 16, 32 }; in inplmrg1() local
34 inplace_merge(numbers, numbers + 3, numbers + 6); in inplmrg1()
36 CPPUNIT_ASSERT(numbers[0]==1); in inplmrg1()
37 CPPUNIT_ASSERT(numbers[1]==3); in inplmrg1()
38 CPPUNIT_ASSERT(numbers[2]==10); in inplmrg1()
39 CPPUNIT_ASSERT(numbers[3]==16); in inplmrg1()
40 CPPUNIT_ASSERT(numbers[4]==32); in inplmrg1()
41 CPPUNIT_ASSERT(numbers[5]==42); in inplmrg1()
/ndk/tests/device/test-gnustl-full/unit/
Dheap_test.cpp37 int numbers[6] = { 5, 10, 4, 13, 11, 19 }; in mkheap0() local
39 make_heap(numbers, numbers + 6); in mkheap0()
40 CPPUNIT_ASSERT(numbers[0]==19) in mkheap0()
41 pop_heap(numbers, numbers + 6); in mkheap0()
42 CPPUNIT_ASSERT(numbers[0]==13) in mkheap0()
43 pop_heap(numbers, numbers + 5); in mkheap0()
44 CPPUNIT_ASSERT(numbers[0]==11) in mkheap0()
45 pop_heap(numbers, numbers + 4); in mkheap0()
46 CPPUNIT_ASSERT(numbers[0]==10) in mkheap0()
47 pop_heap(numbers, numbers + 3); in mkheap0()
[all …]
Drm_cp_test.cpp56 int numbers[6] = { 0, 1, 2, 3, 4, 5 }; in reverse1() local
58 reverse(numbers, numbers + 6); in reverse1()
59 CPPUNIT_ASSERT(numbers[0]==5); in reverse1()
60 CPPUNIT_ASSERT(numbers[1]==4); in reverse1()
61 CPPUNIT_ASSERT(numbers[2]==3); in reverse1()
62 CPPUNIT_ASSERT(numbers[3]==2); in reverse1()
63 CPPUNIT_ASSERT(numbers[4]==1); in reverse1()
64 CPPUNIT_ASSERT(numbers[5]==0); in reverse1()
69 int numbers[6] = { 0, 1, 2, 3, 4, 5 }; in revcopy1() local
72 reverse_copy((int*)numbers, (int*)numbers + 6, (int*)result); in revcopy1()
[all …]
Dsort_test.cpp56 int numbers[6] = { 1, 50, -10, 11, 42, 19 }; in stblsrt1() local
57 stable_sort(numbers, numbers + 6); in stblsrt1()
59 CPPUNIT_ASSERT(numbers[0]==-10); in stblsrt1()
60 CPPUNIT_ASSERT(numbers[1]==1); in stblsrt1()
61 CPPUNIT_ASSERT(numbers[2]==11); in stblsrt1()
62 CPPUNIT_ASSERT(numbers[3]==19); in stblsrt1()
63 CPPUNIT_ASSERT(numbers[4]==42); in stblsrt1()
64 CPPUNIT_ASSERT(numbers[5]==50); in stblsrt1()
115 int numbers[6] = { 1, 50, -10, 11, 42, 19 }; in sort1() local
117 sort(numbers, numbers + 6); in sort1()
[all …]
Dpartition_test.cpp56 int numbers[6] = { 10, 5, 11, 20, 6, -2 }; in stblptn0() local
59 stable_partition((int*)numbers, (int*)numbers + 6, less_n(10, nb_pred_calls)); in stblptn0()
61 CPPUNIT_ASSERT(numbers[0]==5); in stblptn0()
62 CPPUNIT_ASSERT(numbers[1]==6); in stblptn0()
63 CPPUNIT_ASSERT(numbers[2]==-2); in stblptn0()
64 CPPUNIT_ASSERT(numbers[3]==10); in stblptn0()
65 CPPUNIT_ASSERT(numbers[4]==11); in stblptn0()
66 CPPUNIT_ASSERT(numbers[5]==20); in stblptn0()
69 CPPUNIT_ASSERT( nb_pred_calls == sizeof(numbers) / sizeof(numbers[0]) ); in stblptn0()
75 int numbers[] = { 5, 5, 2, 10, 0, 12, 5, 0, 0, 19 }; in stblptn1() local
[all …]
Diota_test.cpp34 int numbers[10]; in iota1() local
35 iota(numbers, numbers + 10, 42); in iota1()
36 CPPUNIT_ASSERT(numbers[0]==42); in iota1()
37 CPPUNIT_ASSERT(numbers[1]==43); in iota1()
38 CPPUNIT_ASSERT(numbers[2]==44); in iota1()
39 CPPUNIT_ASSERT(numbers[3]==45); in iota1()
40 CPPUNIT_ASSERT(numbers[4]==46); in iota1()
41 CPPUNIT_ASSERT(numbers[5]==47); in iota1()
42 CPPUNIT_ASSERT(numbers[6]==48); in iota1()
43 CPPUNIT_ASSERT(numbers[7]==49); in iota1()
[all …]
Dcount_test.cpp34 int numbers[10] = { 1, 2, 4, 1, 2, 4, 1, 2, 4, 1 }; in count0() local
36 int result = count(numbers, numbers + 10, 1); in count0()
40 count(numbers, numbers + 10, 1, result); in count0()
46 vector <int> numbers(100); in count1() local
48 numbers[i] = i % 3; in count1()
49 int elements = count(numbers.begin(), numbers.end(), 2); in count1()
53 count(numbers.begin(), numbers.end(), 2, elements); in count1()
59 vector <int> numbers(100); in countif1() local
61 numbers[i] = i % 3; in countif1()
62 int elements = count_if(numbers.begin(), numbers.end(), odd); in countif1()
[all …]
Dnthelm_test.cpp35 int numbers[7] = { 5, 2, 4, 1, 0, 3 ,77}; in nthelem0() local
36 nth_element(numbers, numbers + 3, numbers + 6); in nthelem0()
38 CPPUNIT_ASSERT(numbers[0]==1); in nthelem0()
39 CPPUNIT_ASSERT(numbers[1]==0); in nthelem0()
40 CPPUNIT_ASSERT(numbers[2]==2); in nthelem0()
41 CPPUNIT_ASSERT(numbers[3]==3); in nthelem0()
42 CPPUNIT_ASSERT(numbers[4]==4); in nthelem0()
43 CPPUNIT_ASSERT(numbers[5]==5); in nthelem0()
49 int numbers[10] = { 6, 8, 5, 1, 7, 4, 1, 5, 2, 6 }; in nthelem1() local
51 vector <int> v1(numbers, numbers+10); in nthelem1()
[all …]
Dforeach_test.cpp37 int numbers[10] = { 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 }; in foreach0() local
39 for_each(numbers, numbers + 10, ptr_fun(increase)); in foreach0()
41 CPPUNIT_ASSERT(numbers[0]==2); in foreach0()
42 CPPUNIT_ASSERT(numbers[1]==2); in foreach0()
43 CPPUNIT_ASSERT(numbers[2]==3); in foreach0()
44 CPPUNIT_ASSERT(numbers[3]==4); in foreach0()
45 CPPUNIT_ASSERT(numbers[4]==6); in foreach0()
46 CPPUNIT_ASSERT(numbers[5]==9); in foreach0()
47 CPPUNIT_ASSERT(numbers[6]==14); in foreach0()
48 CPPUNIT_ASSERT(numbers[7]==22); in foreach0()
[all …]
Drndshf_test.cpp42 int numbers[6] = { 1, 2, 3, 4, 5, 6 }; in rndshuf0() local
44 random_shuffle(numbers, numbers + 6); in rndshuf0()
46 CPPUNIT_ASSERT(count(numbers, numbers+6, 1)==1); in rndshuf0()
47 CPPUNIT_ASSERT(count(numbers, numbers+6, 2)==1); in rndshuf0()
48 CPPUNIT_ASSERT(count(numbers, numbers+6, 3)==1); in rndshuf0()
49 CPPUNIT_ASSERT(count(numbers, numbers+6, 4)==1); in rndshuf0()
50 CPPUNIT_ASSERT(count(numbers, numbers+6, 5)==1); in rndshuf0()
51 CPPUNIT_ASSERT(count(numbers, numbers+6, 6)==1); in rndshuf0()
Dpartial_test.cpp63 int numbers[6] = { 5, 2, 4, 3, 1, 6 }; in parsrt0() local
65 partial_sort((int*)numbers, (int*)numbers + 3, (int*)numbers + 6); in parsrt0()
68 CPPUNIT_ASSERT(numbers[0]==1); in parsrt0()
69 CPPUNIT_ASSERT(numbers[1]==2); in parsrt0()
70 CPPUNIT_ASSERT(numbers[2]==3); in parsrt0()
71 CPPUNIT_ASSERT(numbers[3]==5); in parsrt0()
72 CPPUNIT_ASSERT(numbers[4]==4); in parsrt0()
73 CPPUNIT_ASSERT(numbers[5]==6); in parsrt0()
80 int numbers[10] ={ 8, 8, 5, 3, 7, 6, 5, 3, 2, 4 }; in parsrt1() local
82 vector <int> v1(numbers, numbers+10); in parsrt1()
[all …]
Dunique_test.cpp37 int numbers[8] = { 0, 1, 1, 2, 2, 2, 3, 4 }; in unique1() local
38 unique((int*)numbers, (int*)numbers + 8); in unique1()
40 CPPUNIT_ASSERT(numbers[0]==0); in unique1()
41 CPPUNIT_ASSERT(numbers[1]==1); in unique1()
42 CPPUNIT_ASSERT(numbers[2]==2); in unique1()
43 CPPUNIT_ASSERT(numbers[3]==3); in unique1()
44 CPPUNIT_ASSERT(numbers[4]==4); in unique1()
45 CPPUNIT_ASSERT(numbers[5]==2); in unique1()
46 CPPUNIT_ASSERT(numbers[6]==3); in unique1()
47 CPPUNIT_ASSERT(numbers[7]==4); in unique1()
[all …]
Dinplace_test.cpp33 int numbers[6] = { 1, 10, 42, 3, 16, 32 }; in inplmrg1() local
34 inplace_merge(numbers, numbers + 3, numbers + 6); in inplmrg1()
36 CPPUNIT_ASSERT(numbers[0]==1); in inplmrg1()
37 CPPUNIT_ASSERT(numbers[1]==3); in inplmrg1()
38 CPPUNIT_ASSERT(numbers[2]==10); in inplmrg1()
39 CPPUNIT_ASSERT(numbers[3]==16); in inplmrg1()
40 CPPUNIT_ASSERT(numbers[4]==32); in inplmrg1()
41 CPPUNIT_ASSERT(numbers[5]==42); in inplmrg1()
Drotate_test.cpp38 int numbers[6] = { 0, 1, 2, 3, 4, 5 }; in rotate0() local
40 rotate((int*)numbers, numbers + 3, numbers + 6); in rotate0()
41 CPPUNIT_ASSERT(numbers[0]==3); in rotate0()
42 CPPUNIT_ASSERT(numbers[1]==4); in rotate0()
43 CPPUNIT_ASSERT(numbers[2]==5); in rotate0()
44 CPPUNIT_ASSERT(numbers[3]==0); in rotate0()
45 CPPUNIT_ASSERT(numbers[4]==1); in rotate0()
46 CPPUNIT_ASSERT(numbers[5]==2); in rotate0()
92 int numbers[6] = { 0, 1, 2, 3, 4, 5 }; in rotcopy0() local
95 rotate_copy((int*)numbers, (int*)numbers + 3, (int*)numbers + 6, (int*)result); in rotcopy0()

123