ReactOS  0.4.14-dev-390-g34947ad
InplaceTest Class Reference
Inheritance diagram for InplaceTest:
Collaboration diagram for InplaceTest:

Protected Member Functions

void inplmrg1 ()
 
void inplmrg2 ()
 

Private Member Functions

 CPPUNIT_TEST_SUITE (InplaceTest)
 
 CPPUNIT_TEST (inplmrg1)
 
 CPPUNIT_TEST (inplmrg2)
 
 CPPUNIT_TEST_SUITE_END ()
 

Detailed Description

Definition at line 14 of file inplace_test.cpp.

Member Function Documentation

◆ CPPUNIT_TEST() [1/2]

InplaceTest::CPPUNIT_TEST ( inplmrg1  )
private

◆ CPPUNIT_TEST() [2/2]

InplaceTest::CPPUNIT_TEST ( inplmrg2  )
private

◆ CPPUNIT_TEST_SUITE()

InplaceTest::CPPUNIT_TEST_SUITE ( InplaceTest  )
private

◆ CPPUNIT_TEST_SUITE_END()

InplaceTest::CPPUNIT_TEST_SUITE_END ( )
private

◆ inplmrg1()

void InplaceTest::inplmrg1 ( )
protected

Definition at line 31 of file inplace_test.cpp.

32 {
33  int numbers[6] = { 1, 10, 42, 3, 16, 32 };
34  inplace_merge(numbers, numbers + 3, numbers + 6);
35 
36  CPPUNIT_ASSERT(numbers[0]==1);
37  CPPUNIT_ASSERT(numbers[1]==3);
38  CPPUNIT_ASSERT(numbers[2]==10);
39  CPPUNIT_ASSERT(numbers[3]==16);
40  CPPUNIT_ASSERT(numbers[4]==32);
41  CPPUNIT_ASSERT(numbers[5]==42);
42 }
_STLP_MOVE_TO_STD_NAMESPACE void inplace_merge(_BidirectionalIter __first, _BidirectionalIter __middle, _BidirectionalIter __last)
Definition: _algo.c:1553
#define CPPUNIT_ASSERT(X)
Definition: cppunit_mini.h:200

◆ inplmrg2()

void InplaceTest::inplmrg2 ( )
protected

Definition at line 43 of file inplace_test.cpp.

44 {
45  vector<size_t> v1(10);
46  for(size_t i = 0; i < v1.size(); ++i)
47  v1[i] =(v1.size() - i - 1) % 5;
48 
49  inplace_merge(v1.begin(), v1.begin() + 5, v1.end(), greater<size_t>());
50 
51  CPPUNIT_ASSERT(v1[0]==4);
52  CPPUNIT_ASSERT(v1[1]==4);
53  CPPUNIT_ASSERT(v1[2]==3);
54  CPPUNIT_ASSERT(v1[3]==3);
55  CPPUNIT_ASSERT(v1[4]==2);
56  CPPUNIT_ASSERT(v1[5]==2);
57  CPPUNIT_ASSERT(v1[6]==1);
58  CPPUNIT_ASSERT(v1[7]==1);
59  CPPUNIT_ASSERT(v1[8]==0);
60  CPPUNIT_ASSERT(v1[9]==0);
61 }
_STLP_MOVE_TO_STD_NAMESPACE void inplace_merge(_BidirectionalIter __first, _BidirectionalIter __middle, _BidirectionalIter __last)
Definition: _algo.c:1553
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define CPPUNIT_ASSERT(X)
Definition: cppunit_mini.h:200
GLfloat GLfloat v1
Definition: glext.h:6062

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