Skip to content

Commit 047d89c

Browse files
committed
Added a first test in order to start refactoring the HTTP request/response types.
1 parent 0187ec1 commit 047d89c

File tree

7 files changed

+31
-106
lines changed

7 files changed

+31
-106
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright 2016 Glyn Matthews.
2+
// Distributed under the Boost Software License, Version 1.0.
3+
// (See accompanying file LICENSE_1_0.txt or copy at
4+
// http://www.boost.org/LICENSE_1_0.txt)
5+
6+
#include <boost/network/protocol/http/impl/request.hpp>
7+
8+
namespace boost {
9+
namespace network {
10+
namespace http {
11+
using client_request = basic_request<tags::http_async_8bit_tcp_resolve>;
12+
} // namespace http
13+
} // namespace network
14+
} // namespace boost

libs/network/test/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ add_subdirectory(uri)
1010
add_subdirectory(http)
1111

1212
if (Boost_FOUND)
13-
set(TESTS message_test message_transform_test utils_thread_pool
13+
set(TESTS utils_thread_pool
1414
# utils_base64_test -- turn on when ready.
1515
)
1616
foreach (test ${TESTS})

libs/network/test/http/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ if (Boost_FOUND)
3333
${CPP-NETLIB_BINARY_DIR}/tests/cpp-netlib-http-${test})
3434
endforeach (test)
3535
set(TESTS
36+
http_client_request_test
3637
client_constructor_test
3738
client_get_test
3839
client_get_different_port_test

libs/network/test/http/client_constructor_test.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// Migrated from using Boost.Test to using googletest intead.
99
#include <gtest/gtest.h>
1010

11-
#include <boost/network/include/http/client.hpp>
11+
#include <boost/network/protocol/http/client.hpp>
1212
#include "client_types.hpp"
1313

1414
namespace http = boost::network::http;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright 2016 Glyn Matthews.
2+
// Distributed under the Boost Software License, Version 1.0.
3+
// (See accompanying file LICENSE_1_0.txt or copy at
4+
// http://www.boost.org/LICENSE_1_0.txt)
5+
6+
#include <gtest/gtest.h>
7+
#include <boost/network/protocol/http/client/client_request.hpp>
8+
9+
namespace http = boost::network::http;
10+
11+
TEST(http_client_request_test, default_construct)
12+
{
13+
ASSERT_NO_THROW(http::client_request{});
14+
}

libs/network/test/message_test.cpp

-63
This file was deleted.

libs/network/test/message_transform_test.cpp

-41
This file was deleted.

0 commit comments

Comments
 (0)