Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Commit 288d7ae

Browse files
author
Dean Michael Berris
committed
Including warning disable for tests, requires the patch associated with https://svn.boost.org/trac/boost/ticket/3774.
1 parent 6add11d commit 288d7ae

11 files changed

+31
-22
lines changed

README.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ This is a collection of network related routines/implementations
44
geared towards providing a robust cross-platform networking library.
55
This offers the following implementations:
66

7-
o Common Message Type -- A generic message type which can be used
7+
* Common Message Type -- A generic message type which can be used
88
to encapsulate and store message related information, used by all
99
network implementations as the primary means of data exchange.
10-
o Network protocol message parsers -- A collection of parsers which
10+
* Network protocol message parsers -- A collection of parsers which
1111
generate message objects from strings.
12-
o Adapters and Wrappers -- A collection of Adapters and wrappers aimed
12+
* Adapters and Wrappers -- A collection of Adapters and wrappers aimed
1313
towards making the message type STL friendly.
14-
o Network protocol client and server implementations -- A collection
14+
* Network protocol client and server implementations -- A collection
1515
of network protocol implementations that include embeddable client
1616
and server types.
1717

libs/network/test/CMakeLists.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,24 @@ if (Boost_FOUND)
99
add_executable(cpp-netlib-http_1_1_test http_1_1_test.cpp)
1010
add_executable(cpp-netlib-localhost_tests localhost_tests.cpp)
1111
add_executable(cpp-netlib-message_test message_test.cpp)
12+
add_executable(cpp-netlib-http_message_test http_message_test.cpp)
1213
add_executable(cpp-netlib-message_transform_test message_transform_test.cpp)
1314
add_executable(cpp-netlib-url_test url_test.cpp)
1415
target_link_libraries(cpp-netlib-hello_world ${Boost_SYSTEM_LIBRARY} ${Boost_REGEX_LIBRARY} ${Boost_DATE_TIME_LIBRARY} ${Boost_THREAD_LIBRARY} pthread)
1516
target_link_libraries(cpp-netlib-http_1_0_test ${Boost_LIBRARIES} pthread ssl)
1617
target_link_libraries(cpp-netlib-http_1_1_test ${Boost_LIBRARIES} pthread ssl)
18+
target_link_libraries(cpp-netlib-http_message_test ${Boost_LIBRARIES} pthread ssl)
1719
target_link_libraries(cpp-netlib-message_test ${Boost_LIBRARIES} pthread ssl)
1820
target_link_libraries(cpp-netlib-message_transform_test ${Boost_LIBRARIES} pthread ssl)
1921
target_link_libraries(cpp-netlib-localhost_tests ${Boost_LIBRARIES} pthread ssl)
2022
target_link_libraries(cpp-netlib-url_test ${Boost_LIBRARIES} pthread ssl)
21-
set_target_properties(cpp-netlib-hello_world cpp-netlib-http_1_0_test cpp-netlib-http_1_1_test cpp-netlib-message_test cpp-netlib-message_transform_test cpp-netlib-localhost_tests cpp-netlib-url_test PROPERTIES RUNTIME_OUTPUT_DIRECTORY ../../../build/tests)
23+
set_target_properties(cpp-netlib-hello_world cpp-netlib-http_1_0_test cpp-netlib-http_1_1_test cpp-netlib-message_test cpp-netlib-http_message_test cpp-netlib-message_transform_test cpp-netlib-localhost_tests cpp-netlib-url_test PROPERTIES RUNTIME_OUTPUT_DIRECTORY ../../../build/tests)
2224
add_test(cpp-netlib-hello_world python httplib_acceptance.py ../../../build/tests/cpp-netlib-hello_world ../../../build/tests/cpp-netlib-hello_world.passed)
2325
add_test(cpp-netlib-http_1_0_test ../../../build/tests/cpp-netlib-http_1_0_test)
2426
add_test(cpp-netlib-http_1_1_test ../../../build/tests/cpp-netlib-http_1_1_test)
2527
add_test(cpp-netlib-localhost_tests ../../../build/tests/cpp-netlib-localhost_tests)
2628
add_test(cpp-netlib-message_test ../../../build/tests/cpp-netlib-message_test)
29+
add_test(cpp-netlib-http_message_test ../../../build/tests/cpp-netlib-http_message_test)
2730
add_test(cpp-netlib-url_test ../../../build/tests/cpp-netlib-url_test)
2831
endif()
2932

libs/network/test/Jamfile.v2

+1-3
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ unit-test url_test : url_test.cpp ;
4848

4949
exe hello_world : hello_world.cpp ;
5050

51-
exe spike : spike.cpp ;
52-
53-
make htpplib_acceptance.passed : httplib_acceptance.py hello_world : @python_runner ;
51+
make httplib_acceptance.passed : httplib_acceptance.py hello_world : @python_runner ;
5452
actions python_runner {
5553
python $(>) $(<)
5654
}

libs/network/test/hello_world.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// http://www.boost.org/LICENSE_1_0.txt)
66
//
77

8+
#include <boost/config/warning_disable.hpp>
89
#include <boost/network/protocol/http/server.hpp>
910
#include <boost/assign/list_of.hpp>
1011
#include <boost/lexical_cast.hpp>

libs/network/test/http_1_0_test.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// http://www.boost.org/LICENSE_1_0.txt)
66

77
#define BOOST_TEST_MODULE http 1.0 test
8+
#include <boost/config/warning_disable.hpp>
89
#include <boost/test/unit_test.hpp>
910
#include <boost/network.hpp>
1011
#include <iostream>

libs/network/test/http_1_1_test.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// http://www.boost.org/LICENSE_1_0.txt)
66

77
#define BOOST_TEST_MODULE http 1.1 test
8+
#include <boost/config/warning_disable.hpp>
89
#include <boost/test/unit_test.hpp>
910
#include <boost/network.hpp>
1011
#include <iostream>

libs/network/test/http_message_test.cpp

+15-14
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// http://www.boost.org/LICENSE_1_0.txt)
66

77
#define BOOST_TEST_MODULE HTTP message test
8+
#include <boost/config/warning_disable.hpp>
89
#include <boost/test/unit_test.hpp>
910
#include <boost/network/protocol/http.hpp>
1011
// #include <boost/network/protocol/http/traits.hpp>
@@ -18,30 +19,30 @@ struct fixtures {
1819
BOOST_FIXTURE_TEST_SUITE(http_message_test_suite, fixtures)
1920

2021
BOOST_AUTO_TEST_CASE(request_constructor_test) {
21-
http::request request("http://boost.org");
22+
http::client::request request("http://boost.org");
2223
BOOST_CHECK_EQUAL ( request.host() , "boost.org" );
2324
BOOST_CHECK_EQUAL ( request.port() , 80u );
2425
BOOST_CHECK_EQUAL ( request.path() , "/" );
2526
}
2627

2728
BOOST_AUTO_TEST_CASE(request_copy_constructor_test) {
28-
http::request request("http://boost.org/handler.php");
29+
http::client::request request("http://boost.org/handler.php");
2930
request << header("Content-Type", "text/plain")
3031
<< body("Hello, World!")
3132
;
32-
http::request copy(request);
33+
http::client::request copy(request);
3334
BOOST_CHECK_EQUAL ( copy.host(), request.host() );
3435
BOOST_CHECK_EQUAL ( copy.port(), request.port() );
3536
BOOST_CHECK_EQUAL ( request.path(), request.path() );
3637
BOOST_CHECK_EQUAL ( body(request), body(copy) );
3738
}
3839

3940
BOOST_AUTO_TEST_CASE(request_assignment_test) {
40-
http::request request("http://boost.org/handler.php");
41+
http::client::request request("http://boost.org/handler.php");
4142
request << header("Content-Type", "text/plain")
4243
<< body("Hello, World!")
4344
;
44-
http::request copy;
45+
http::client::request copy;
4546
copy = request;
4647
BOOST_CHECK_EQUAL ( copy.host(), request.host() );
4748
BOOST_CHECK_EQUAL ( copy.port(), request.port() );
@@ -50,8 +51,8 @@ BOOST_AUTO_TEST_CASE(request_assignment_test) {
5051
}
5152

5253
BOOST_AUTO_TEST_CASE(request_swap_test) {
53-
boost::network::http::request request("http://boost.org/");
54-
boost::network::http::request other;
54+
boost::network::http::client::request request("http://boost.org/");
55+
boost::network::http::client::request other;
5556
swap(other, request); // ADL
5657
BOOST_CHECK_EQUAL ( request.host(), "" );
5758
BOOST_CHECK_EQUAL ( request.port(), 80u );
@@ -62,30 +63,30 @@ BOOST_AUTO_TEST_CASE(request_swap_test) {
6263
}
6364

6465
BOOST_AUTO_TEST_CASE(response_constructor_test) {
65-
http::response response;
66+
http::client::response response;
6667
BOOST_CHECK_EQUAL ( body(response), std::string() );
6768
}
6869

6970
BOOST_AUTO_TEST_CASE(response_copy_construct_test) {
70-
http::response response;
71+
http::client::response response;
7172
response.version() = "HTTP/1.1";
7273
response.status() = 200;
7374
response.status_message() = "OK";
7475
response << body("The quick brown fox jumps over the lazy dog");
75-
http::response copy(response);
76+
http::client::response copy(response);
7677
BOOST_CHECK_EQUAL ( response.version(), copy.version() );
7778
BOOST_CHECK_EQUAL ( response.status(), copy.status() );
7879
BOOST_CHECK_EQUAL ( response.status_message(), copy.status_message() );
7980
BOOST_CHECK_EQUAL ( body(response), body(copy) );
8081
}
8182

8283
BOOST_AUTO_TEST_CASE(response_assignment_construct_test) {
83-
http::response response;
84+
http::client::response response;
8485
response.version() = "HTTP/1.1";
8586
response.status() = 200;
8687
response.status_message() = "OK";
8788
response << body("The quick brown fox jumps over the lazy dog");
88-
http::response copy;
89+
http::client::response copy;
8990
copy = response;
9091
BOOST_CHECK_EQUAL ( response.version(), copy.version() );
9192
BOOST_CHECK_EQUAL ( response.status(), copy.status() );
@@ -94,12 +95,12 @@ BOOST_AUTO_TEST_CASE(response_assignment_construct_test) {
9495
}
9596

9697
BOOST_AUTO_TEST_CASE(response_swap_test) {
97-
http::response response;
98+
http::client::response response;
9899
response.version() = "HTTP/1.1";
99100
response.status() = 200;
100101
response.status_message() = "OK";
101102
response << boost::network::body("RESPONSE");
102-
boost::network::http::response swapped;
103+
boost::network::http::client::response swapped;
103104
BOOST_REQUIRE_NO_THROW(swap(response, swapped));
104105
BOOST_CHECK_EQUAL ( response.version(), std::string() );
105106
BOOST_CHECK_EQUAL ( response.status(), 0u );

libs/network/test/localhost_tests.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#define BOOST_TEST_MODULE http 1.0 localhost tests
1111

12+
#include <boost/config/warning_disable.hpp>
1213
#include <boost/config.hpp>
1314
#include <boost/test/unit_test.hpp>
1415
#include <boost/network.hpp>

libs/network/test/message_test.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// http://www.boost.org/LICENSE_1_0.txt)
66

77
#define BOOST_TEST_MODULE message test
8+
#include <boost/config/warning_disable.hpp>
89
#include <boost/test/unit_test.hpp>
910
#include <boost/network.hpp>
1011
#include <algorithm>

libs/network/test/message_transform_test.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// http://www.boost.org/LICENSE_1_0.txt)
66

77
#define BOOST_TEST_MODULE message test
8+
#include <boost/config/warning_disable.hpp>
89
#include <boost/test/unit_test.hpp>
910
#include <boost/network.hpp>
1011
#include <algorithm>

libs/network/test/url_test.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// http://www.boost.org/LICENSE_1_0.txt)
66

77
#define BOOST_TEST_MODULE URL Test
8+
#include <boost/config/warning_disable.hpp>
89
#include <boost/test/unit_test.hpp>
910
#include <boost/network/uri.hpp>
1011
#include <algorithm>

0 commit comments

Comments
 (0)