]> git.ipfire.org Git - thirdparty/squid.git/blob - src/tests/testSBuf.h
Merge SBuf.
[thirdparty/squid.git] / src / tests / testSBuf.h
1 #ifndef SQUID_SRC_TEST_TESTSBUF_H
2 #define SQUID_SRC_TEST_TESTSBUF_H
3
4 #include <cppunit/extensions/HelperMacros.h>
5
6 #include "OutOfBoundsException.h"
7
8 /*
9 * test the SBuf functionalities
10 */
11
12 class testSBuf : public CPPUNIT_NS::TestFixture
13 {
14 CPPUNIT_TEST_SUITE( testSBuf );
15 CPPUNIT_TEST( testSBufConstructDestruct );
16 CPPUNIT_TEST( testSBufConstructDestructAfterMemInit );
17 CPPUNIT_TEST( testSBufLength );
18 CPPUNIT_TEST( testEqualityTest );
19 CPPUNIT_TEST( testStartsWith );
20 CPPUNIT_TEST( testAppendSBuf );
21 CPPUNIT_TEST( testAppendCString );
22 CPPUNIT_TEST( testAppendStdString );
23 CPPUNIT_TEST( testAppendf );
24 CPPUNIT_TEST( testSubscriptOp );
25 CPPUNIT_TEST_EXCEPTION( testSubscriptOpFail , OutOfBoundsException );
26 CPPUNIT_TEST( testComparisons );
27 CPPUNIT_TEST( testConsume );
28 CPPUNIT_TEST( testRawContent );
29 CPPUNIT_TEST( testRawSpace );
30 CPPUNIT_TEST( testChop );
31 CPPUNIT_TEST( testChomp );
32 CPPUNIT_TEST( testSubstr );
33 CPPUNIT_TEST( testFindChar );
34 CPPUNIT_TEST( testFindSBuf );
35 CPPUNIT_TEST( testRFindChar );
36 CPPUNIT_TEST( testRFindSBuf );
37 CPPUNIT_TEST( testFindFirstOf );
38 CPPUNIT_TEST( testPrintf );
39 CPPUNIT_TEST( testScanf );
40 CPPUNIT_TEST( testCopy );
41 CPPUNIT_TEST( testStringOps );
42 CPPUNIT_TEST( testGrow );
43 CPPUNIT_TEST( testSBufStream );
44 CPPUNIT_TEST( testAutoFind );
45 CPPUNIT_TEST( testStdStringOps );
46 // CPPUNIT_TEST( testDumpStats ); //fake test, to print alloc stats
47 CPPUNIT_TEST_SUITE_END();
48 protected:
49 void commonInit();
50 void testSBufConstructDestruct();
51 void testSBufConstructDestructAfterMemInit();
52 void testEqualityTest();
53 void testAppendSBuf();
54 void testAppendCString();
55 void testAppendStdString();
56 void testAppendf();
57 void testPrintf();
58 void testScanf();
59 void testSubscriptOp();
60 void testSubscriptOpFail();
61 void testDumpStats();
62 void testComparisons();
63 void testConsume();
64 void testRawContent();
65 void testRawSpace();
66 void testChop();
67 void testChomp();
68 void testSubstr();
69 void testTailCopy();
70 void testSBufLength();
71 void testFindChar();
72 void testFindSBuf();
73 void testRFindChar();
74 void testRFindSBuf();
75 void testSearchFail();
76 void testCopy();
77 void testStringOps();
78 void testGrow();
79 void testStartsWith();
80 void testSBufStream();
81 void testFindFirstOf();
82 void testAutoFind();
83 void testStdStringOps();
84 };
85
86 #endif