Tidy up test sources:

Test support classes are moved to beast/extras/test.
This commit is contained in:
Vinnie Falco
2016-05-07 07:08:21 -04:00
parent 24612eba4c
commit 036c3098f3
16 changed files with 173 additions and 151 deletions

View File

@@ -0,0 +1,33 @@
# Part of Beast
GroupSources(extras/beast beast)
GroupSources(include/beast beast)
GroupSources(test/websocket "/")
add_executable (websocket-tests
${BEAST_INCLUDES}
../../extras/beast/unit_test/main.cpp
websocket_async_echo_peer.hpp
websocket_sync_echo_peer.hpp
error.cpp
option.cpp
rfc6455.cpp
stream.cpp
teardown.cpp
utf8_checker.cpp
)
if (NOT WIN32)
target_link_libraries(websocket-tests ${Boost_LIBRARIES})
endif()
add_executable (websocket-echo
${BEAST_INCLUDES}
websocket_async_echo_peer.hpp
websocket_sync_echo_peer.hpp
websocket_echo.cpp
)
if (NOT WIN32)
target_link_libraries(websocket-echo ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
endif()

View File

@@ -8,15 +8,14 @@
// Test that header file is self-contained.
#include <beast/websocket/stream.hpp>
#include "../fail_stream.hpp"
#include "../string_stream.hpp"
#include "../yield_to.hpp"
#include "websocket_async_echo_peer.hpp"
#include "websocket_sync_echo_peer.hpp"
#include <beast/streambuf.hpp>
#include <beast/to_string.hpp>
#include <beast/test/fail_stream.hpp>
#include <beast/test/string_stream.hpp>
#include <beast/test/yield_to.hpp>
#include <beast/unit_test/suite.hpp>
#include <boost/asio.hpp>
#include <boost/asio/spawn.hpp>

View File

@@ -19,7 +19,7 @@
#include "websocket_async_echo_peer.hpp"
#include "websocket_sync_echo_peer.hpp"
#include "../sig_wait.hpp"
#include <beast/test/sig_wait.hpp>
int main()
{
@@ -32,5 +32,5 @@ int main()
beast::websocket::sync_echo_peer s2(true, endpoint_type{
address_type::from_string("127.0.0.1"), 6001 });
sig_wait();
beast::test::sig_wait();
}