diff options
Diffstat (limited to '')
-rw-r--r-- | tests/HTTP/CMakeLists.txt | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/tests/HTTP/CMakeLists.txt b/tests/HTTP/CMakeLists.txt index c11c601d9..233e5c0cb 100644 --- a/tests/HTTP/CMakeLists.txt +++ b/tests/HTTP/CMakeLists.txt @@ -11,7 +11,7 @@ add_definitions(-DTEST_GLOBALS=1) set (HTTP_SRCS ${CMAKE_SOURCE_DIR}/src/HTTP/EnvelopeParser.cpp ${CMAKE_SOURCE_DIR}/src/HTTP/HTTPMessage.cpp - ${CMAKE_SOURCE_DIR}/src/HTTP/HTTPResponseParser.cpp + ${CMAKE_SOURCE_DIR}/src/HTTP/HTTPMessageParser.cpp ${CMAKE_SOURCE_DIR}/src/HTTP/TransferEncodingParser.cpp ${CMAKE_SOURCE_DIR}/src/StringUtils.cpp ) @@ -19,7 +19,7 @@ set (HTTP_SRCS set (HTTP_HDRS ${CMAKE_SOURCE_DIR}/src/HTTP/EnvelopeParser.h ${CMAKE_SOURCE_DIR}/src/HTTP/HTTPMessage.h - ${CMAKE_SOURCE_DIR}/src/HTTP/HTTPResponseParser.h + ${CMAKE_SOURCE_DIR}/src/HTTP/HTTPMessageParser.h ${CMAKE_SOURCE_DIR}/src/HTTP/TransferEncodingParser.h ${CMAKE_SOURCE_DIR}/src/StringUtils.h ) @@ -39,15 +39,22 @@ endif() # Define individual tests: -# HTTPResponseParser_file: Feed file contents into a cHTTPResponseParser and print the callbacks as they're called: -add_executable(HTTPResponseParser_file-exe HTTPResponseParser_file.cpp) -target_link_libraries(HTTPResponseParser_file-exe HTTP) +# HTTPMessageParser_file: Feed file contents into a cHTTPResponseParser and print the callbacks as they're called: +add_executable(HTTPMessageParser_file-exe HTTPMessageParser_file.cpp) +target_link_libraries(HTTPMessageParser_file-exe HTTP) -# Test parsing the file in 2-byte chunks (should go from response line parsing through headers parsing to body parsing, each within a different step): -add_test(NAME HTTPResponseParser_file-test1-2 COMMAND HTTPResponseParser_file-exe HTTPResponse1.data 2) +# Test parsing the response file in 2-byte chunks (should go from response line parsing through headers parsing to body parsing, each within a different step): +add_test(NAME HTTPMessageParser_file-test1-2 COMMAND HTTPMessageParser_file-exe HTTPResponse1.data 2) -# Test parsing the file in 128-byte chunks (should parse response line and part of headers in one step, the rest in another step): -add_test(NAME HTTPResponseParser_file-test1-128 COMMAND HTTPResponseParser_file-exe HTTPResponse1.data 128) +# Test parsing the response file in 128-byte chunks (should parse response line and part of headers in one step, the rest in another step): +add_test(NAME HTTPMessageParser_file-test1-128 COMMAND HTTPMessageParser_file-exe HTTPResponse1.data 128) + +# Test parsing a chunked-encoding response: +add_test(NAME HTTPMessageParser_file-test2 COMMAND HTTPMessageParser_file-exe HTTPResponse2.data) + +# Test parsing the request file in 2-byte chunks (should go from request line parsing through headers parsing to body parsing, each within a different step): +add_test(NAME HTTPMessageParser_file-test3-2 COMMAND HTTPMessageParser_file-exe HTTPRequest1.data 2) + +# Test parsing the request file in 512-byte chunks (should process everything in a single call): +add_test(NAME HTTPMessageParser_file-test4-512 COMMAND HTTPMessageParser_file-exe HTTPRequest1.data 512) -# Test parsing a chunked-encoding content: -add_test(NAME HTTPResponseParser_file-test2 COMMAND HTTPResponseParser_file-exe HTTPResponse2.data) |