1 #ifndef SQUID_SRC_TEST_TESTSBUF_H
2 #define SQUID_SRC_TEST_TESTSBUF_H
4 #include <cppunit/extensions/HelperMacros.h>
6 #include "OutOfBoundsException.h"
9 * test the SBuf functionalities
12 class testSBuf
: public CPPUNIT_NS::TestFixture
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();
50 void testSBufConstructDestruct();
51 void testSBufConstructDestructAfterMemInit();
52 void testEqualityTest();
53 void testAppendSBuf();
54 void testAppendCString();
55 void testAppendStdString();
59 void testSubscriptOp();
60 void testSubscriptOpFail();
62 void testComparisons();
64 void testRawContent();
70 void testSBufLength();
75 void testSearchFail();
79 void testStartsWith();
80 void testSBufStream();
81 void testFindFirstOf();
83 void testStdStringOps();