ReactOS  0.4.14-dev-358-gbef841c
FuncTest Class Reference
Inheritance diagram for FuncTest:
Collaboration diagram for FuncTest:

Protected Member Functions

void func1 ()
 
void func2 ()
 
void func3 ()
 

Static Protected Member Functions

static bool bigger (int i_)
 
static bool bigger_than (int x_, int y_)
 

Private Member Functions

 CPPUNIT_TEST_SUITE (FuncTest)
 
 CPPUNIT_TEST (func1)
 
 CPPUNIT_TEST (func2)
 
 CPPUNIT_TEST (func3)
 
 CPPUNIT_TEST_SUITE_END ()
 

Detailed Description

Definition at line 14 of file func_test.cpp.

Member Function Documentation

◆ bigger()

bool FuncTest::bigger ( int  i_)
staticprotected

Definition at line 35 of file func_test.cpp.

36 {
37  return i_ > 3;
38 }

◆ bigger_than()

bool FuncTest::bigger_than ( int  x_,
int  y_ 
)
staticprotected

Definition at line 39 of file func_test.cpp.

40 {
41  return x_ > y_;
42 }

◆ CPPUNIT_TEST() [1/3]

FuncTest::CPPUNIT_TEST ( func1  )
private

◆ CPPUNIT_TEST() [2/3]

FuncTest::CPPUNIT_TEST ( func2  )
private

◆ CPPUNIT_TEST() [3/3]

FuncTest::CPPUNIT_TEST ( func3  )
private

◆ CPPUNIT_TEST_SUITE()

FuncTest::CPPUNIT_TEST_SUITE ( FuncTest  )
private

◆ CPPUNIT_TEST_SUITE_END()

FuncTest::CPPUNIT_TEST_SUITE_END ( )
private

◆ func1()

void FuncTest::func1 ( )
protected

Definition at line 43 of file func_test.cpp.

44 {
45  vector<int>v;
46  v.push_back(4);
47  v.push_back(1);
48  v.push_back(5);
49  int n = count_if(v.begin(), v.end(), bigger);
50  CPPUNIT_ASSERT( n == 2 )
51 }
static bool bigger(int i_)
Definition: func_test.cpp:35
_STLP_INLINE_LOOP void count_if(_InputIter __first, _InputIter __last, _Predicate __pred, _Size &__n)
Definition: _algo.h:115
GLdouble n
Definition: glext.h:7729
#define CPPUNIT_ASSERT(X)
Definition: cppunit_mini.h:200
const GLdouble * v
Definition: gl.h:2040

◆ func2()

void FuncTest::func2 ( )
protected

Definition at line 53 of file func_test.cpp.

54 {
55  vector<int> v;
56  v.push_back(4);
57  v.push_back(1);
58  v.push_back(5);
59  sort(v.begin(), v.end(), bigger_than);
60 
61  CPPUNIT_ASSERT( v[0] == 5 );
62  CPPUNIT_ASSERT( v[1] == 4 );
63  CPPUNIT_ASSERT( v[2] == 1 );
64 }
static bool bigger_than(int x_, int y_)
Definition: func_test.cpp:39
_STLP_MOVE_TO_STD_NAMESPACE void sort(_RandomAccessIter __first, _RandomAccessIter __last)
Definition: _algo.c:993
#define CPPUNIT_ASSERT(X)
Definition: cppunit_mini.h:200
const GLdouble * v
Definition: gl.h:2040

◆ func3()

void FuncTest::func3 ( )
protected

Definition at line 65 of file func_test.cpp.

66 {
67  vector<int> v;
68  v.push_back(4);
69  v.push_back(1);
70  v.push_back(5);
71  sort(v.begin(), v.end(), greater<int>());
72 
73  CPPUNIT_ASSERT( v[0] == 5 );
74  CPPUNIT_ASSERT( v[1] == 4 );
75  CPPUNIT_ASSERT( v[2] == 1 );
76 }
_STLP_MOVE_TO_STD_NAMESPACE void sort(_RandomAccessIter __first, _RandomAccessIter __last)
Definition: _algo.c:993
#define CPPUNIT_ASSERT(X)
Definition: cppunit_mini.h:200
const GLdouble * v
Definition: gl.h:2040

The documentation for this class was generated from the following file: