1 #ifndef SQUID_SRC_TESTS_TESTHTTP1PARSER_H
2 #define SQUID_SRC_TESTS_TESTHTTP1PARSER_H
4 #include <cppunit/extensions/HelperMacros.h>
6 class testHttp1Parser
: public CPPUNIT_NS::TestFixture
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();
19 void globalSetup(); // MemPools init etc.
21 void testParserConstruct(); // whether the constructor works
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
30 void testDripFeed(); // test incremental parse works