]> git.ipfire.org Git - thirdparty/squid.git/blob - src/tests/testHttp1Parser.h
Merged from trunk rev.13445
[thirdparty/squid.git] / src / tests / testHttp1Parser.h
1 #ifndef SQUID_SRC_TESTS_TESTHTTP1PARSER_H
2 #define SQUID_SRC_TESTS_TESTHTTP1PARSER_H
3
4 #include <cppunit/extensions/HelperMacros.h>
5
6 class testHttp1Parser : public CPPUNIT_NS::TestFixture
7 {
8 CPPUNIT_TEST_SUITE( testHttp1Parser );
9 CPPUNIT_TEST( testParserConstruct );
10 CPPUNIT_TEST( testParseRequestLineTerminators );
11 CPPUNIT_TEST( testParseRequestLineMethods );
12 CPPUNIT_TEST( testParseRequestLineProtocols );
13 CPPUNIT_TEST( testParseRequestLineStrange );
14 CPPUNIT_TEST( testParseRequestLineInvalid );
15 CPPUNIT_TEST( testDripFeed );
16 CPPUNIT_TEST_SUITE_END();
17
18 protected:
19 void globalSetup(); // MemPools init etc.
20
21 void testParserConstruct(); // whether the constructor works
22
23 // request-line unit tests
24 void testParseRequestLineTerminators(); // terminator detection correct
25 void testParseRequestLineMethods(); // methoid detection correct
26 void testParseRequestLineProtocols(); // protocol tokens handled correctly
27 void testParseRequestLineStrange(); // strange but valid lines accepted
28 void testParseRequestLineInvalid(); // rejection of invalid lines happens
29
30 void testDripFeed(); // test incremental parse works
31 };
32
33 #endif