mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-05 16:57:53 +00:00
Tidy up test sources:
Test support classes are moved to beast/extras/test.
This commit is contained in:
33
test/websocket/CMakeLists.txt
Normal file
33
test/websocket/CMakeLists.txt
Normal 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()
|
||||
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user