File tree Expand file tree Collapse file tree 4 files changed +73
-1
lines changed Expand file tree Collapse file tree 4 files changed +73
-1
lines changed Original file line number Diff line number Diff line change
1
+ // Copyright 2013 (c) Google, Inc.
2
+ // Copyright 2013 (c) Dean Michael Berris <dberris@google.com>
3
+ // Distributed under the Boost Software License, Version 1.0.
4
+ // (See accompanying file LICENSE_1_0.txt or copy at
5
+ // http://www.boost.org/LICENSE_1_0.txt)
6
+
7
+ #ifndef NETWORK_HTTP_SERVER_DYNAMIC_DISPATCHER_HPP_20130327
8
+ #define NETWORK_HTTP_SERVER_DYNAMIC_DISPATCHER_HPP_20130327
9
+
10
+ namespace network {
11
+ namespace http {
12
+
13
+ struct dynamic_dispatcher {};
14
+
15
+ } // namespace http
16
+ } // namespace network
17
+
18
+ #endif /* end of include guard: NETWORK_HTTP_SERVER_DYNAMIC_DISPATCHER_HPP_20130327 */
19
+
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ if (CPP-NETLIB_BUILD_TESTS)
86
86
add_test (cpp-netlib-http-client_test
87
87
${CPP-NETLIB_BINARY_DIR}/tests/cpp-netlib-http-${test} )
88
88
89
- set (SERVER_TESTS server_simple_sessions_test )
89
+ set (SERVER_TESTS server_simple_sessions_test server_dynamic_dispatcher_test )
90
90
foreach (test ${SERVER_TESTS} )
91
91
add_executable (cpp-netlib-http-${test} ${test} .cpp )
92
92
add_dependencies (cpp-netlib-http-${test} cppnetlib-http-server )
Original file line number Diff line number Diff line change
1
+ // Copyright 2013 (c) Google, Inc.
2
+ // Copyright 2013 (c) Dean Michael Berris <dberris@google.com>
3
+ // Distributed under the Boost Software License, Version 1.0.
4
+ // (See accompanying file LICENSE_1_0.txt or copy at
5
+ // http://www.boost.org/LICENSE_1_0.txt)
6
+
7
+ #include < gtest/gtest.h>
8
+ #include < network/http/server/dynamic_dispatcher.hpp>
9
+
10
+ namespace http = ::network::http;
11
+
12
+ TEST (server_dynamic_dispatcher, constructor) {
13
+ http::dynamic_dispatcher dispatcher;
14
+ (void )dispatcher;
15
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright 2013 (c) Google, Inc.
2
+ // Copyright 2013 (c) Dean Michael Berris <dberris@google.com>
3
+ // Distributed under the Boost Software License, Version 1.0.
4
+ // (See accompanying file LICENSE_1_0.txt or copy at
5
+ // http://www.boost.org/LICENSE_1_0.txt)
6
+
7
+ #include < gtest/gtest.h>
8
+ #include < http/server/simple_sessions.hpp>
9
+
10
+ namespace http = network::http;
11
+ namespace net = network;
12
+
13
+ namespace {
14
+
15
+ TEST (simple_sessions_test, constructor) {
16
+ http::simple_sessions simple_sessions;
17
+ (void ) simple_sessions;
18
+ }
19
+
20
+ TEST (simple_sessions_test, lookup) {
21
+ http::simple_sessions simple_sessions;
22
+ http::session &session = simple_sessions.lookup (" sessionid" );
23
+ (void ) session;
24
+ }
25
+
26
+ TEST (simple_sessions_test, update) {
27
+ http::simple_sessions simple_sessions;
28
+ {
29
+ http::session &session = simple_sessions.lookup (" sessionid" );
30
+ session.set (" user" , " some-user" );
31
+ }
32
+ {
33
+ http::session &session = simple_sessions.lookup (" sessionid" );
34
+ EXPECT_EQ (" some-user" , session[" user" ]);
35
+ }
36
+ }
37
+
38
+ } // namespace
You can’t perform that action at this time.
0 commit comments