2 * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
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.
9 #ifndef SQUID_SRC_TESTS_TESTHTTP1PARSER_H
10 #define SQUID_SRC_TESTS_TESTHTTP1PARSER_H
12 #include <cppunit/extensions/HelperMacros.h>
14 class testHttp1Parser
: public CPPUNIT_NS::TestFixture
16 CPPUNIT_TEST_SUITE( testHttp1Parser
);
17 CPPUNIT_TEST( testParserConstruct
);
19 #if __cplusplus >= 201103L
20 CPPUNIT_TEST( testParseRequestLineTerminators
);
21 CPPUNIT_TEST( testParseRequestLineMethods
);
22 CPPUNIT_TEST( testParseRequestLineProtocols
);
23 CPPUNIT_TEST( testParseRequestLineStrange
);
24 CPPUNIT_TEST( testParseRequestLineInvalid
);
25 CPPUNIT_TEST( testDripFeed
);
27 CPPUNIT_TEST_SUITE_END();
30 void globalSetup(); // MemPools init etc.
32 void testParserConstruct(); // whether the constructor works
34 #if __cplusplus >= 201103L
35 // request-line unit tests
36 void testParseRequestLineTerminators(); // terminator detection correct
37 void testParseRequestLineMethods(); // methoid detection correct
38 void testParseRequestLineProtocols(); // protocol tokens handled correctly
39 void testParseRequestLineStrange(); // strange but valid lines accepted
40 void testParseRequestLineInvalid(); // rejection of invalid lines happens
42 void testDripFeed(); // test incremental parse works