NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Namespaces Files Functions Variables Macros Pages
BasicIteratorTest.h
1 
2 #ifndef BASICITERATORTEST_H
3 #define BASICITERATORTEST_H
4 
5 #include <iostream>
6 #include <stdint.h>
7 #include <cppunit/extensions/HelperMacros.h>
8 
9 #ifndef TEST
10 #define TEST
11 #define private public
12 #endif
13 
14 #include "Trace.hpp"
15 
16 #include "TraceDefs.h"
17 
18 #ifndef USING_TRANAL_NAMESPACE
19 using namespace TrAnal;
20 #define USING_TRANAL_NAMESPACE
21 #endif
22 
23 
24 class BasicIteratorTest : public CppUnit::TestFixture
25 {
26 
27  private:
28  TraceS null_tr;
29  TraceS simple_tr;
30  TraceS step_tr;
31  TraceS linear_tr;
32 
33  public:
34  // Define the test suite
35  CPPUNIT_TEST_SUITE( BasicIteratorTest );
36 
37  CPPUNIT_TEST ( testConstructor );
38  CPPUNIT_TEST ( testCopyConstructor );
39  CPPUNIT_TEST ( testAssignment );
40  CPPUNIT_TEST ( testEquality );
41  CPPUNIT_TEST ( testComparisons );
42  CPPUNIT_TEST ( testIncrements );
43  CPPUNIT_TEST ( testRandomAccess );
44  CPPUNIT_TEST ( testIsDoneOnNullTrace );
45  CPPUNIT_TEST ( testMoveToInBounds );
46  CPPUNIT_TEST ( testMoveToOutOfBounds );
47  CPPUNIT_TEST ( testIncrementInBounds );
48  CPPUNIT_TEST ( testIncrementOutOfBounds );
49  CPPUNIT_TEST ( testIteratorSubtraction );
50 
51  CPPUNIT_TEST_SUITE_END();
52 
53  public:
54  // Begin the standard methods
55  void setUp();
56  void tearDown();
57 
58  // Begin tests
59  void testConstructor();
60  void testCopyConstructor();
61  void testAssignment();
62  void testEquality();
63  void testIncrements();
64  void testRandomAccess();
65  void testComparisons();
66  void testIsDoneOnNullTrace();
67  void testMoveToInBounds();
68  void testMoveToOutOfBounds();
69 
70  void testIncrementInBounds();
71  void testIncrementOutOfBounds();
72 
73  void testIteratorSubtraction();
74 };
75 
76 #endif
Definition: Trace.hpp:40
Definition: BasicIteratorTest.h:24
Definition: AlgoIterator.hpp:12