ReactOS  0.4.14-dev-41-g31d7680
rawriter_test.cpp
Go to the documentation of this file.
1 #include <algorithm>
2 #include <iterator>
3 #include <memory>
4 
6 
7 #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES)
8 using namespace std;
9 #endif
10 
11 class X
12 {
13  public:
14  X(int i_ = 0) : i(i_) {}
15  ~X() {}
16  operator int() const { return i; }
17 
18  private:
19  int i;
20 };
21 
22 
23 //
24 // TestCase class
25 //
26 class RawriterTest : public CPPUNIT_NS::TestCase
27 {
29  CPPUNIT_TEST(rawiter1);
31 
32 protected:
33  void rawiter1();
34 };
35 
37 
38 //
39 // tests implementation
40 //
42 {
44  typedef X* x_pointer;
45  x_pointer save_p, p;
46  p = a.allocate(5);
47  save_p=p;
49  int i;
50  for(i = 0; i < 5; i++)
51  *r++ = X(i);
52 
53  CPPUNIT_ASSERT(*p++ == 0);
54  CPPUNIT_ASSERT(*p++ == 1);
55  CPPUNIT_ASSERT(*p++ == 2);
56  CPPUNIT_ASSERT(*p++ == 3);
57  CPPUNIT_ASSERT(*p++ == 4);
58 
59 //#if defined (STLPORT) || defined (__GNUC__)
60  a.deallocate(save_p, 5);
61 /*
62 #else
63  a.deallocate(save_p);
64 #endif
65 */
66 }
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define CPPUNIT_TEST_SUITE(X)
Definition: cppunit_mini.h:142
#define CPPUNIT_TEST(X)
Definition: cppunit_mini.h:182
Definition: features.h:417
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 a
Definition: ke_i.h:78
X(int i_=0)
#define CPPUNIT_TEST_SUITE_END()
Definition: cppunit_mini.h:191
#define CPPUNIT_ASSERT(X)
Definition: cppunit_mini.h:200
int i
CPPUNIT_TEST_SUITE_REGISTRATION(RawriterTest)
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
GLfloat GLfloat p
Definition: glext.h:8902
#define X(b, s)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31