1 #ifndef STRINGTOOLSTEST_H
2 #define STRINGTOOLSTEST_H
3 
4 #include <cppunit/extensions/HelperMacros.h>
5 #include <cppunit/tools/StringTools.h>
6 
7 
8 /// Unit tests for StringToolsTest
9 class StringToolsTest : public CPPUNIT_NS::TestCase
10 {
11   CPPUNIT_TEST_SUITE( StringToolsTest );
12   CPPUNIT_TEST( testToStringInt );
13   CPPUNIT_TEST( testToStringDouble );
14   CPPUNIT_TEST( testSplitEmptyString );
15   CPPUNIT_TEST( testSplitOneItem );
16   CPPUNIT_TEST( testSplitItemEmpty );
17   CPPUNIT_TEST( testSplitTwoItem );
18   CPPUNIT_TEST( testSplitEmptyTwoItem );
19   CPPUNIT_TEST( testSplitEmptyItemEmpty );
20   CPPUNIT_TEST( testSplitEmptyItemEmptyEmptyItem );
21   CPPUNIT_TEST( testWrapEmpty );
22   CPPUNIT_TEST( testWrapNotNeeded );
23   CPPUNIT_TEST( testWrapLimitNotNeeded );
24   CPPUNIT_TEST( testWrapOneNeeded );
25   CPPUNIT_TEST( testWrapTwoNeeded );
26   CPPUNIT_TEST( testWrapLimitTwoNeeded );
27   CPPUNIT_TEST( testWrapOneNeededTwoNeeded );
28   CPPUNIT_TEST( testWrapNotNeededEmptyLinesOneNeeded );
29   CPPUNIT_TEST_SUITE_END();
30 
31 public:
32   /*! Constructs a StringToolsTest object.
33    */
34   StringToolsTest();
35 
36   /// Destructor.
37   virtual ~StringToolsTest();
38 
39   void setUp();
40   void tearDown();
41 
42   void testToStringInt();
43   void testToStringDouble();
44 
45   void testSplitEmptyString();
46   void testSplitOneItem();
47   void testSplitItemEmpty();
48   void testSplitTwoItem();
49   void testSplitEmptyTwoItem();
50   void testSplitEmptyItemEmpty();
51   void testSplitEmptyItemEmptyEmptyItem();
52 
53   void testWrapEmpty();
54   void testWrapNotNeeded();
55   void testWrapLimitNotNeeded();
56   void testWrapOneNeeded();
57   void testWrapTwoNeeded();
58   void testWrapLimitTwoNeeded();
59   void testWrapOneNeededTwoNeeded();
60   void testWrapNotNeededEmptyLinesOneNeeded();
61 
62 private:
63   /// Prevents the use of the copy constructor.
64   StringToolsTest( const StringToolsTest &other );
65 
66   /// Prevents the use of the copy operator.
67   void operator =( const StringToolsTest &other );
68 
69 private:
70 };
71 
72 
73 
74 #endif  // STRINGTOOLSTEST_H
75