ReactOS 0.4.15-dev-7942-gd23573b
BvectorTest Class Reference
Inheritance diagram for BvectorTest:
Collaboration diagram for BvectorTest:

Protected Member Functions

void bvec1 ()
 

Private Member Functions

 CPPUNIT_TEST_SUITE (BvectorTest)
 
 CPPUNIT_TEST (bvec1)
 
 CPPUNIT_TEST_SUITE_END ()
 

Private Attributes

 CPPUNIT_IGNORE
 

Detailed Description

Definition at line 12 of file bvector_test.cpp.

Member Function Documentation

◆ bvec1()

void BvectorTest::bvec1 ( )
protected

Definition at line 30 of file bvector_test.cpp.

31{
32#if defined (STLPORT) && !defined (_STLP_NO_EXTENSIONS)
33 bool ii[3]= {1,0,1};
34 bit_vector b(3);
35
36 CPPUNIT_ASSERT(b[0]==0);
37 CPPUNIT_ASSERT(b[1]==0);
38 CPPUNIT_ASSERT(b[2]==0);
39
40 b[0] = b[2] = 1;
41
42 CPPUNIT_ASSERT(b[0]==1);
43 CPPUNIT_ASSERT(b[1]==0);
44 CPPUNIT_ASSERT(b[2]==1);
45
46 b.insert(b.begin(),(bool*)ii, ii+2);
47
48 CPPUNIT_ASSERT(b[0]==1);
49 CPPUNIT_ASSERT(b[1]==0);
50 CPPUNIT_ASSERT(b[2]==1);
51 CPPUNIT_ASSERT(b[3]==0);
52 CPPUNIT_ASSERT(b[4]==1);
53
54 bit_vector bb = b;
55 if (bb != b)
56 exit(1);
57
58 b[0] |= 0;
59 b[1] |= 0;
60 b[2] |= 1;
61 b[3] |= 1;
62 CPPUNIT_ASSERT(!((b[0] != 1) || (b[1] != 0) || (b[2] != 1) || (b[3] != 1)));
63
64
65 bb[0] &= 0;
66 bb[1] &= 0;
67 bb[2] &= 1;
68 bb[3] &= 1;
69 CPPUNIT_ASSERT(!((bb[0] != 0) || (bb[1] != 0) || (bb[2] != 1) || (bb[3] != 0)));
70#endif
71}
_STLP_END_NAMESPACE _STLP_BEGIN_NAMESPACE typedef vector< bool, allocator< bool > > bit_vector
Definition: _vector.h:744
#define CPPUNIT_ASSERT(X)
Definition: cppunit_mini.h:200
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define b
Definition: ke_i.h:79
#define exit(n)
Definition: config.h:202

◆ CPPUNIT_TEST()

BvectorTest::CPPUNIT_TEST ( bvec1  )
private

◆ CPPUNIT_TEST_SUITE()

BvectorTest::CPPUNIT_TEST_SUITE ( BvectorTest  )
private

◆ CPPUNIT_TEST_SUITE_END()

BvectorTest::CPPUNIT_TEST_SUITE_END ( )
private

Member Data Documentation

◆ CPPUNIT_IGNORE

BvectorTest::CPPUNIT_IGNORE
private

Definition at line 16 of file bvector_test.cpp.


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