ReactOS  0.4.14-dev-1256-g2125fec
finsert_test.cpp
Go to the documentation of this file.
1 #include <vector>
2 #include <algorithm>
3 #include <deque>
4 
6 
7 #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES)
8 using namespace std;
9 #endif
10 
11 //
12 // TestCase class
13 //
14 class FinsertTest : public CPPUNIT_NS::TestCase
15 {
17  CPPUNIT_TEST(finsert1);
18  CPPUNIT_TEST(finsert2);
20 
21 protected:
22  void finsert1();
23  void finsert2();
24 };
25 
27 
28 //
29 // tests implementation
30 //
32 {
33  char const* array [] = { "laurie", "jennifer", "leisa" };
37 
38  CPPUNIT_ASSERT(names[0]==array[2]);
39  CPPUNIT_ASSERT(names[1]==array[1]);
40  CPPUNIT_ASSERT(names[2]==array[0]);
41 
42  copy(array, array + 3, fit);
43  CPPUNIT_ASSERT(names[3]==array[2]);
44  CPPUNIT_ASSERT(names[4]==array[1]);
45  CPPUNIT_ASSERT(names[5]==array[0]);
46 }
47 
49 {
50  char const* array [] = { "laurie", "jennifer", "leisa" };
51 
54 
55  CPPUNIT_ASSERT(names[0]==array[2]);
56  CPPUNIT_ASSERT(names[1]==array[1]);
57  CPPUNIT_ASSERT(names[2]==array[0]);
58 }
CPPUNIT_TEST_SUITE_REGISTRATION(FinsertTest)
#define CPPUNIT_TEST_SUITE(X)
Definition: cppunit_mini.h:142
#define CPPUNIT_TEST(X)
Definition: cppunit_mini.h:182
Definition: features.h:417
void finsert2()
GLuint GLuint * names
Definition: glext.h:11545
#define CPPUNIT_TEST_SUITE_END()
Definition: cppunit_mini.h:191
front_insert_iterator< _Container > _STLP_CALL front_inserter(_Container &__x)
Definition: _iterator.h:216
Definition: _deque.h:400
#define CPPUNIT_ASSERT(X)
Definition: cppunit_mini.h:200
void finsert1()
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
Definition: copy.c:51