ReactOS 0.4.15-dev-7674-gc0b4db1
AccumTest Class Reference
Inheritance diagram for AccumTest:
Collaboration diagram for AccumTest:

Protected Member Functions

void accum1 ()
 
void accum2 ()
 

Static Protected Member Functions

static int mult (int initial_, int element_)
 

Private Member Functions

 CPPUNIT_TEST_SUITE (AccumTest)
 
 CPPUNIT_TEST (accum1)
 
 CPPUNIT_TEST (accum2)
 
 CPPUNIT_TEST_SUITE_END ()
 

Detailed Description

Definition at line 13 of file accum_test.cpp.

Member Function Documentation

◆ accum1()

void AccumTest::accum1 ( )
protected

Definition at line 31 of file accum_test.cpp.

32{
33 vector<int> v(5);
34 for(int i = 0; (size_t)i < v.size(); ++i)
35 v[i] = i + 1;
36 int sum = accumulate(v.begin(), v.end(), 0);
38}
_STLP_BEGIN_NAMESPACE _STLP_INLINE_LOOP _Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp _Init)
Definition: _numeric.h:42
#define CPPUNIT_ASSERT(X)
Definition: cppunit_mini.h:200
__kernel_size_t size_t
Definition: linux.h:237
const GLdouble * v
Definition: gl.h:2040
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
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35

◆ accum2()

void AccumTest::accum2 ( )
protected

Definition at line 39 of file accum_test.cpp.

40{
41 vector<int> v(5);
42 for(int i = 0; (size_t)i < v.size(); ++i)
43 v[i] = i + 1;
44 int prod = accumulate(v.begin(), v.end(), 1, mult);
45 CPPUNIT_ASSERT(prod==120);
46}
static int mult(int initial_, int element_)
Definition: accum_test.cpp:47

◆ CPPUNIT_TEST() [1/2]

AccumTest::CPPUNIT_TEST ( accum1  )
private

◆ CPPUNIT_TEST() [2/2]

AccumTest::CPPUNIT_TEST ( accum2  )
private

◆ CPPUNIT_TEST_SUITE()

AccumTest::CPPUNIT_TEST_SUITE ( AccumTest  )
private

◆ CPPUNIT_TEST_SUITE_END()

AccumTest::CPPUNIT_TEST_SUITE_END ( )
private

◆ mult()

int AccumTest::mult ( int  initial_,
int  element_ 
)
staticprotected

Definition at line 47 of file accum_test.cpp.

48{
49 return initial_ * element_;
50}

Referenced by accum2().


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