Definition at line 16 of file partition_test.cpp.
◆ CPPUNIT_TEST() [1/4]
PartitionTest::CPPUNIT_TEST |
( |
ptition0 |
| ) |
|
|
private |
◆ CPPUNIT_TEST() [2/4]
PartitionTest::CPPUNIT_TEST |
( |
ptition1 |
| ) |
|
|
private |
◆ CPPUNIT_TEST() [3/4]
PartitionTest::CPPUNIT_TEST |
( |
stblptn0 |
| ) |
|
|
private |
◆ CPPUNIT_TEST() [4/4]
PartitionTest::CPPUNIT_TEST |
( |
stblptn1 |
| ) |
|
|
private |
◆ CPPUNIT_TEST_SUITE()
◆ CPPUNIT_TEST_SUITE_END()
PartitionTest::CPPUNIT_TEST_SUITE_END |
( |
| ) |
|
|
private |
◆ ptition0()
void PartitionTest::ptition0 |
( |
| ) |
|
|
protected |
Definition at line 93 of file partition_test.cpp.
94{
95 int numbers[6] = { 6, 12, 3, 10, 1, 20 };
96 size_t nb_pred_calls = 0;
97
98 partition((
int*)numbers, (
int*)numbers + 6, less_n(10, nb_pred_calls));
105
106 CPPUNIT_ASSERT( nb_pred_calls ==
sizeof(numbers) /
sizeof(numbers[0]) );
107}
static INT partition(list_t &list, INT i, INT j, const CStringW &x)
#define CPPUNIT_ASSERT(X)
◆ ptition1()
void PartitionTest::ptition1 |
( |
| ) |
|
|
protected |
Definition at line 108 of file partition_test.cpp.
109{
110
111
112
113 int numbers[10] ={ 19, 3, 11, 14, 10, 19, 8, 17, 9, 6 };
114
115 vector <int>
v1(numbers, numbers+10);
116 size_t nb_pred_calls = 0;
118
130}
◆ stblptn0()
void PartitionTest::stblptn0 |
( |
| ) |
|
|
protected |
Definition at line 54 of file partition_test.cpp.
55{
56 int numbers[6] = { 10, 5, 11, 20, 6, -2 };
57
58 size_t nb_pred_calls = 0;
59 stable_partition((
int*)numbers, (
int*)numbers + 6, less_n(10, nb_pred_calls));
60
67
68
69 CPPUNIT_ASSERT( nb_pred_calls ==
sizeof(numbers) /
sizeof(numbers[0]) );
70}
_STLP_MOVE_TO_STD_NAMESPACE _ForwardIter stable_partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred)
◆ stblptn1()
void PartitionTest::stblptn1 |
( |
| ) |
|
|
protected |
Definition at line 71 of file partition_test.cpp.
72{
73
74
75 int numbers[] = { 5, 5, 2, 10, 0, 12, 5, 0, 0, 19 };
76 vector <int>
v1(numbers, numbers+10);
77
78 size_t nb_pred_calls = 0;
80
92}
The documentation for this class was generated from the following file: