Revert "tests add to namespace sls (#464)" (#465)

This reverts commit f5745fcf18.
This commit is contained in:
Dhanya Thattil
2022-05-20 15:43:48 +02:00
committed by GitHub
parent f5745fcf18
commit 8656eeec25
44 changed files with 228 additions and 350 deletions

View File

@ -8,11 +8,9 @@
#include <iostream>
#include <thread>
namespace sls {
std::vector<char> server() {
std::cout << "starting server\n";
auto server = ServerSocket(1950);
auto server = sls::ServerSocket(1950);
auto s = server.accept();
std::vector<char> buffer(100, '\0');
s.Receive(buffer.data(), buffer.size());
@ -35,7 +33,7 @@ TEST_CASE("The server recive the same message as we send", "[support]") {
auto s = std::async(std::launch::async, server);
std::this_thread::sleep_for(std::chrono::milliseconds(100));
auto client = DetectorSocket("localhost", 1950);
auto client = sls::DetectorSocket("localhost", 1950);
client.Send(sent_message.data(), sent_message.size());
client.Receive(received_message.data(), received_message.size());
client.close();
@ -47,7 +45,5 @@ TEST_CASE("The server recive the same message as we send", "[support]") {
}
TEST_CASE("throws on no server", "[support]") {
CHECK_THROWS(DetectorSocket("localhost", 1950));
}
} // namespace sls
CHECK_THROWS(sls::DetectorSocket("localhost", 1950));
}