ReactOS  0.4.15-dev-5112-g22d8c0f
IncludesTest Class Reference
Inheritance diagram for IncludesTest:
Collaboration diagram for IncludesTest:

Protected Member Functions

void incl0 ()
 
void incl1 ()
 
void incl2 ()
 

Static Protected Member Functions

static bool compare_strings (const char *s1_, const char *s2_)
 

Private Member Functions

 CPPUNIT_TEST_SUITE (IncludesTest)
 
 CPPUNIT_TEST (incl0)
 
 CPPUNIT_TEST (incl1)
 
 CPPUNIT_TEST (incl2)
 
 CPPUNIT_TEST_SUITE_END ()
 

Detailed Description

Definition at line 14 of file includes_test.cpp.

Member Function Documentation

◆ compare_strings()

static bool IncludesTest::compare_strings ( const char s1_,
const char s2_ 
)
inlinestaticprotected

Definition at line 27 of file includes_test.cpp.

28  {
29  return strcmp(s1_, s2_) < 0 ? 1 : 0;
30  }
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469

◆ CPPUNIT_TEST() [1/3]

IncludesTest::CPPUNIT_TEST ( incl0  )
private

◆ CPPUNIT_TEST() [2/3]

IncludesTest::CPPUNIT_TEST ( incl1  )
private

◆ CPPUNIT_TEST() [3/3]

IncludesTest::CPPUNIT_TEST ( incl2  )
private

◆ CPPUNIT_TEST_SUITE()

IncludesTest::CPPUNIT_TEST_SUITE ( IncludesTest  )
private

◆ CPPUNIT_TEST_SUITE_END()

IncludesTest::CPPUNIT_TEST_SUITE_END ( )
private

◆ incl0()

void IncludesTest::incl0 ( )
protected

Definition at line 38 of file includes_test.cpp.

39 {
40  int numbers1[5] = { 1, 2, 3, 4, 5 };
41  //int numbers2[5] = { 1, 2, 4, 8, 16 };
42  int numbers3[2] = { 4, 8 };
43  bool r1=includes(numbers1, numbers1 + 5, numbers3, numbers3 + 2);
45 }
static DNS_RECORDW r1
Definition: record.c:37
static struct loaded_include * includes
Definition: compiler.c:53
#define CPPUNIT_ASSERT(X)
Definition: cppunit_mini.h:200

◆ incl1()

void IncludesTest::incl1 ( )
protected

Definition at line 46 of file includes_test.cpp.

47 {
48  vector<int> v1(10);
49  vector<int> v2(3);
50  int i;
51  for (i = 0; (size_t)i < v1.size(); ++i) {
52  v1[i] = i;
53  }
54 
55  bool r1=includes(v1.begin(), v1.end(), v2.begin(), v2.end());
57 
58  for (i = 0; (size_t)i < v2.size(); ++i)
59  v2[i] = i + 3;
60 
61  bool r2=includes(v1.begin(), v1.end(), v2.begin(), v2.end());
63 }
static DNS_RECORDW r1
Definition: record.c:37
static struct loaded_include * includes
Definition: compiler.c:53
__kernel_size_t size_t
Definition: linux.h:237
static DNS_RECORDW r2
Definition: record.c:38
#define CPPUNIT_ASSERT(X)
Definition: cppunit_mini.h:200
GLfloat GLfloat GLfloat v2
Definition: glext.h:6063
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
GLfloat GLfloat v1
Definition: glext.h:6062

◆ incl2()

void IncludesTest::incl2 ( )
protected

Definition at line 64 of file includes_test.cpp.

65 {
66  char const* names[] = { "Todd", "Mike", "Graham", "Jack", "Brett"};
67 
68  const unsigned nameSize = sizeof(names)/sizeof(names[0]);
69  vector <char const*> v1(nameSize);
70  for (int i = 0; (size_t)i < v1.size(); ++i) {
71  v1[i] = names[i];
72  }
73  vector <char const*> v2(2);
74 
75  v2[0] = "foo";
76  v2[1] = "bar";
77  sort(v1.begin(), v1.end(), compare_strings);
78  sort(v2.begin(), v2.end(), compare_strings);
79 
80  bool r1 = includes(v1.begin(), v1.end(), v2.begin(), v2.end(), compare_strings);
82 
83  v2[0] = "Brett";
84  v2[1] = "Todd";
85  bool r2 = includes(v1.begin(), v1.end(), v2.begin(), v2.end(), compare_strings);
87 }
_STLP_MOVE_TO_STD_NAMESPACE void sort(_RandomAccessIter __first, _RandomAccessIter __last)
Definition: _algo.c:993
static DNS_RECORDW r1
Definition: record.c:37
GLuint GLuint * names
Definition: glext.h:11545
static struct loaded_include * includes
Definition: compiler.c:53
__kernel_size_t size_t
Definition: linux.h:237
static DNS_RECORDW r2
Definition: record.c:38
#define CPPUNIT_ASSERT(X)
Definition: cppunit_mini.h:200
GLfloat GLfloat GLfloat v2
Definition: glext.h:6063
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
GLfloat GLfloat v1
Definition: glext.h:6062
static bool compare_strings(const char *s1_, const char *s2_)

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