File tree Expand file tree Collapse file tree 6 files changed +79
-57
lines changed Expand file tree Collapse file tree 6 files changed +79
-57
lines changed Original file line number Diff line number Diff line change 5
5
6
6
set (CPP-NETLIB_CLIENT_TESTS
7
7
async_resolver_test
8
+ normal_connection_test
9
+ client_test
8
10
)
9
11
12
+ if (OPENSSL_FOUND )
13
+ list (APPEND CPP-NETLIB_CLIENT_TESTS ssl_connection_test )
14
+ endif ()
15
+
10
16
foreach (test ${CPP-NETLIB_CLIENT_TESTS} )
11
17
if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU )
12
18
set_source_files_properties (${test} .cpp
@@ -28,3 +34,7 @@ foreach(test ${CPP-NETLIB_CLIENT_TESTS})
28
34
${CPP-NETLIB_BINARY_DIR}/tests/cpp-netlib-http-v2-${test} )
29
35
30
36
endforeach (test )
37
+
38
+ if (OPENSSL_FOUND )
39
+ target_link_libraries (cpp-netlib-http-v2-ssl_connection_test ${OPENSSL_LIBRARIES} )
40
+ endif ()
Original file line number Diff line number Diff line change
1
+ // Copyright (C) 2013 by 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 < igloo/igloo_alt.h>
7
+ #include " network/http/v2/client.hpp"
8
+
9
+ using namespace igloo ;
10
+ namespace http = network::http::v2;
11
+
12
+ Describe (http_client) {
13
+
14
+ It (gets_a_response) {
15
+ auto response = client_.get (http::request (network::uri (" http://127.0.0.1/" )));
16
+ }
17
+
18
+ http::client client_;
19
+
20
+ };
21
+
22
+ // TEST(client_test, get) {
23
+ // http::client client;
24
+ // auto response = client.get(http::request(network::uri("http://127.0.0.1/")));
25
+ // FAIL();
26
+ // }
27
+ //
28
+ // TEST(client_test, post) {
29
+ // http::client client;
30
+ // auto response = client.post(http::request(network::uri("http://127.0.0.1/")));
31
+ // FAIL();
32
+ // }
33
+ //
34
+ // TEST(client_test, put) {
35
+ // http::client client;
36
+ // auto response = client.put(http::request(network::uri("http://127.0.0.1/")));
37
+ // FAIL();
38
+ // }
39
+ //
40
+ // TEST(client_test, delete) {
41
+ // http::client client;
42
+ // auto response = client.delete_(http::request(network::uri("http://127.0.0.1/")));
43
+ // FAIL();
44
+ // }
45
+ //
46
+ // TEST(client_test, head) {
47
+ // http::client client;
48
+ // auto response = client.head(http::request(network::uri("http://127.0.0.1/")));
49
+ // FAIL();
50
+ // }
51
+
52
+ int
53
+ main (int argc, char *argv[]) {
54
+ return TestRunner::RunAllTests (argc, const_cast <const char **>(argv));
55
+ }
Original file line number Diff line number Diff line change 3
3
// (See accompanying file LICENSE_1_0.txt or copy at
4
4
// http://www.boost.org/LICENSE_1_0.txt)
5
5
6
- #include < gtest/gtest .h>
6
+ #include < igloo/igloo_alt .h>
7
7
#include < boost/asio.hpp>
8
8
#include " network/http/v2/client/connection/normal_connection_delegate.hpp"
9
- #include < iostream>
10
9
10
+ using namespace igloo ;
11
11
using boost::asio::ip::tcp;
12
12
namespace http = network::http::v2;
13
13
14
+ int
15
+ main (int argc, char *argv[]) {
16
+ return TestRunner::RunAllTests (argc, const_cast <const char **>(argv));
17
+ }
Original file line number Diff line number Diff line change 3
3
// (See accompanying file LICENSE_1_0.txt or copy at
4
4
// http://www.boost.org/LICENSE_1_0.txt)
5
5
6
- #include < gtest/gtest .h>
6
+ #include < igloo/igloo .h>
7
7
#include < boost/asio.hpp>
8
8
#include " network/http/v2/client/connection/ssl_connection_delegate.hpp"
9
- #include < iostream>
10
9
10
+ using namespace igloo ;
11
+ using boost::asio::ip::tcp;
11
12
namespace http = network::http::v2;
13
+
14
+ int
15
+ main (int argc, char *argv[]) {
16
+ return TestRunner::RunAllTests (argc, const_cast <const char **>(argv));
17
+ }
Original file line number Diff line number Diff line change @@ -9,14 +9,8 @@ set(CPP-NETLIB_CLIENT_TESTS
9
9
byte_source_test
10
10
response_test
11
11
request_test
12
- normal_connection_test
13
- client_test
14
12
)
15
13
16
- if (OPENSSL_FOUND )
17
- list (APPEND CPP-NETLIB_CLIENT_TESTS ssl_connection_test )
18
- endif ()
19
-
20
14
foreach (test ${CPP-NETLIB_CLIENT_TESTS} )
21
15
if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU )
22
16
set_source_files_properties (${test} .cpp
@@ -39,7 +33,3 @@ foreach(test ${CPP-NETLIB_CLIENT_TESTS})
39
33
${CPP-NETLIB_BINARY_DIR}/tests/cpp-netlib-http-v2-${test} )
40
34
41
35
endforeach (test )
42
-
43
- if (OPENSSL_FOUND )
44
- target_link_libraries (cpp-netlib-http-v2-ssl_connection_test ${OPENSSL_LIBRARIES} )
45
- endif ()
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments