1 #ifndef SQUID_SRC_TEST_TESTSBUF_H
2 #define SQUID_SRC_TEST_TESTSBUF_H
4 #include <cppunit/extensions/HelperMacros.h>
6 #if 0 // guideline violation: only #include into .h when used by the .h
8 #include "SBufExceptions.h"
12 #include "OutOfBoundsException.h"
15 * test the SBuf functionalities
18 class testSBuf
: public CPPUNIT_NS::TestFixture
20 CPPUNIT_TEST_SUITE( testSBuf
);
21 CPPUNIT_TEST( testSBufConstructDestruct
);
22 CPPUNIT_TEST( testSBufConstructDestructAfterMemInit
);
23 CPPUNIT_TEST( testSBufLength
);
24 CPPUNIT_TEST( testEqualityTest
);
25 CPPUNIT_TEST( testStartsWith
);
26 CPPUNIT_TEST( testAppendSBuf
);
27 CPPUNIT_TEST( testAppendCString
);
28 CPPUNIT_TEST( testAppendStdString
);
29 CPPUNIT_TEST( testAppendf
);
30 CPPUNIT_TEST( testSubscriptOp
);
31 CPPUNIT_TEST_EXCEPTION( testSubscriptOpFail
, OutOfBoundsException
);
32 CPPUNIT_TEST( testComparisons
);
33 CPPUNIT_TEST( testConsume
);
34 CPPUNIT_TEST( testRawContent
);
35 //CPPUNIT_TEST( testRawSpace );
36 CPPUNIT_TEST( testChop
);
37 CPPUNIT_TEST( testChomp
);
38 CPPUNIT_TEST( testSubstr
);
39 CPPUNIT_TEST( testFindChar
);
40 CPPUNIT_TEST( testFindSBuf
);
41 CPPUNIT_TEST( testRFindChar
);
42 CPPUNIT_TEST( testRFindSBuf
);
43 CPPUNIT_TEST( testFindFirstOf
);
44 CPPUNIT_TEST( testPrintf
);
45 CPPUNIT_TEST( testScanf
);
46 CPPUNIT_TEST( testCopy
);
47 CPPUNIT_TEST( testSBufTokenizer
);
48 CPPUNIT_TEST( testStringOps
);
49 CPPUNIT_TEST( testGrow
);
50 CPPUNIT_TEST( testSBufList
);
51 CPPUNIT_TEST( testBaseName
);
52 CPPUNIT_TEST( testSBufStream
);
53 CPPUNIT_TEST( testAutoFind
);
55 // CPPUNIT_TEST( testDumpStats ); //fake test, to print alloc stats
57 CPPUNIT_TEST_SUITE_END();
60 void testSBufConstructDestruct();
61 void testSBufConstructDestructAfterMemInit();
62 void testEqualityTest();
63 void testAppendSBuf();
64 void testAppendCString();
65 void testAppendStdString();
69 void testSubscriptOp();
70 void testSubscriptOpFail();
72 void testComparisons();
74 void testRawContent();
80 void testSBufLength();
85 void testSearchFail();
87 void testSBufTokenizer();
90 void testStartsWith();
93 void testSBufStream();
94 void testFindFirstOf();