Home | Info | Community | Development | myReactOS | Contact Us
[protected]
Definition at line 76 of file partial_test.cpp.
{ // 8 8 5 3 7 6 5 3 2 4 // 2 3 3 4 5 8 8 7 6 5 int numbers[10] ={ 8, 8, 5, 3, 7, 6, 5, 3, 2, 4 }; vector <int> v1(numbers, numbers+10); partial_sort(v1.begin(), v1.begin() + v1.size() / 2, v1.end()); CPPUNIT_ASSERT(v1[0]==2); CPPUNIT_ASSERT(v1[1]==3); CPPUNIT_ASSERT(v1[2]==3); CPPUNIT_ASSERT(v1[3]==4); CPPUNIT_ASSERT(v1[4]==5); CPPUNIT_ASSERT(v1[5]==8); CPPUNIT_ASSERT(v1[6]==8); CPPUNIT_ASSERT(v1[7]==7); CPPUNIT_ASSERT(v1[8]==6); CPPUNIT_ASSERT(v1[9]==5); }