]> git.ipfire.org Git - thirdparty/squid.git/blob - src/tests/testSBuf.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / tests / testSBuf.h
1 /*
2 * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 #ifndef SQUID_SRC_TEST_TESTSBUF_H
10 #define SQUID_SRC_TEST_TESTSBUF_H
11
12 #include <cppunit/extensions/HelperMacros.h>
13
14 #include "sbuf/OutOfBoundsException.h"
15
16 /*
17 * test the SBuf functionalities
18 */
19
20 class testSBuf : public CPPUNIT_NS::TestFixture
21 {
22 CPPUNIT_TEST_SUITE( testSBuf );
23 CPPUNIT_TEST( testSBufConstructDestruct );
24 CPPUNIT_TEST( testSBufConstructDestructAfterMemInit );
25 CPPUNIT_TEST( testSBufLength );
26 CPPUNIT_TEST( testEqualityTest );
27 CPPUNIT_TEST( testStartsWith );
28 CPPUNIT_TEST( testAppendSBuf );
29 CPPUNIT_TEST( testAppendCString );
30 CPPUNIT_TEST( testAppendStdString );
31 CPPUNIT_TEST( testAppendf );
32 CPPUNIT_TEST( testSubscriptOp );
33 CPPUNIT_TEST_EXCEPTION( testSubscriptOpFail , OutOfBoundsException );
34 CPPUNIT_TEST( testComparisons );
35 CPPUNIT_TEST( testConsume );
36 CPPUNIT_TEST( testRawContent );
37 CPPUNIT_TEST( testRawSpace );
38 CPPUNIT_TEST( testChop );
39 CPPUNIT_TEST( testChomp );
40 CPPUNIT_TEST( testSubstr );
41 CPPUNIT_TEST( testFindChar );
42 CPPUNIT_TEST( testFindSBuf );
43 CPPUNIT_TEST( testRFindChar );
44 CPPUNIT_TEST( testRFindSBuf );
45 CPPUNIT_TEST( testFindFirstOf );
46 CPPUNIT_TEST( testFindFirstNotOf );
47 CPPUNIT_TEST( testPrintf );
48 CPPUNIT_TEST( testCopy );
49 CPPUNIT_TEST( testStringOps );
50 CPPUNIT_TEST( testGrow );
51 CPPUNIT_TEST( testReserve );
52 CPPUNIT_TEST( testSBufStream );
53 CPPUNIT_TEST( testAutoFind );
54 CPPUNIT_TEST( testStdStringOps );
55 CPPUNIT_TEST( testIterators );
56 CPPUNIT_TEST( testSBufHash );
57 // CPPUNIT_TEST( testDumpStats ); //fake test, to print alloc stats
58 CPPUNIT_TEST_SUITE_END();
59 protected:
60 void commonInit();
61 void testSBufConstructDestruct();
62 void testSBufConstructDestructAfterMemInit();
63 void testEqualityTest();
64 void testAppendSBuf();
65 void testAppendCString();
66 void testAppendStdString();
67 void testAppendf();
68 void testPrintf();
69 void testSubscriptOp();
70 void testSubscriptOpFail();
71 void testDumpStats();
72 void testComparisons();
73 void testConsume();
74 void testRawContent();
75 void testRawSpace();
76 void testChop();
77 void testChomp();
78 void testSubstr();
79 void testTailCopy();
80 void testSBufLength();
81 void testFindChar();
82 void testFindSBuf();
83 void testRFindChar();
84 void testRFindSBuf();
85 void testSearchFail();
86 void testCopy();
87 void testStringOps();
88 void testGrow();
89 void testReserve();
90 void testStartsWith();
91 void testSBufStream();
92 void testFindFirstOf();
93 void testFindFirstNotOf();
94 void testAutoFind();
95 void testStdStringOps();
96 void testIterators();
97 void testSBufHash();
98 };
99
100 #endif
101