1 |
#ifndef __LS_POOLTEST_H__ |
2 |
#define __LS_POOLTEST_H__ |
3 |
|
4 |
#include <cppunit/TestFixture.h> |
5 |
#include <cppunit/extensions/HelperMacros.h> |
6 |
|
7 |
// set options for Pool.h |
8 |
#define DEVMODE 1 |
9 |
#define USE_EXCEPTIONS 1 |
10 |
|
11 |
#include "../common/Pool.h" |
12 |
|
13 |
class PoolTest : public CppUnit::TestFixture { |
14 |
|
15 |
CPPUNIT_TEST_SUITE(PoolTest); |
16 |
CPPUNIT_TEST(printTestSuiteName); |
17 |
CPPUNIT_TEST(testAllocPool); |
18 |
CPPUNIT_TEST(testAllocAppendElements); |
19 |
CPPUNIT_TEST(testIterateForward); |
20 |
CPPUNIT_TEST(testIterateBackward); |
21 |
CPPUNIT_TEST(testFreeElements); |
22 |
CPPUNIT_TEST(testAllocPrependElements); |
23 |
CPPUNIT_TEST(testIterateForward); |
24 |
CPPUNIT_TEST(testIterateBackward); |
25 |
CPPUNIT_TEST(testClear); |
26 |
CPPUNIT_TEST(testAllocList); |
27 |
CPPUNIT_TEST(testAllocElementsOnList); |
28 |
CPPUNIT_TEST(testIterateForwardOnList); |
29 |
CPPUNIT_TEST(testIterateBackwardOnList); |
30 |
CPPUNIT_TEST(testClearList); |
31 |
CPPUNIT_TEST(testMoveToEnd); |
32 |
CPPUNIT_TEST(testMoveToBegin); |
33 |
CPPUNIT_TEST(testFreeList); |
34 |
CPPUNIT_TEST(testFreePool); |
35 |
CPPUNIT_TEST(testAccessElements); |
36 |
CPPUNIT_TEST(testInvalidIterators); |
37 |
CPPUNIT_TEST_SUITE_END(); |
38 |
|
39 |
public: |
40 |
void printTestSuiteName(); |
41 |
void testAllocPool(); |
42 |
void testAllocAppendElements(); |
43 |
void testIterateForward(); |
44 |
void testIterateBackward(); |
45 |
void testFreeElements(); |
46 |
void testAllocPrependElements(); |
47 |
void testClear(); |
48 |
void testAllocList(); |
49 |
void testAllocElementsOnList(); |
50 |
void testIterateForwardOnList(); |
51 |
void testIterateBackwardOnList(); |
52 |
void testClearList(); |
53 |
void testMoveToEnd(); |
54 |
void testMoveToBegin(); |
55 |
void testFreeList(); |
56 |
void testFreePool(); |
57 |
void testAccessElements(); |
58 |
void testInvalidIterators(); |
59 |
}; |
60 |
|
61 |
#endif // __LS_POOLTEST_H__ |