Merge remote-tracking branch 'refs/remotes/origin/master' into gui
This commit is contained in:
@@ -17,8 +17,8 @@ SCENARIO("IpAddress", "[NETWORK][IPADDRESS]")
|
||||
|
||||
THEN("It's the loop back")
|
||||
{
|
||||
REQUIRE(ipAddressV4.IsLoopback());
|
||||
REQUIRE(ipAddressV6.IsLoopback());
|
||||
CHECK(ipAddressV4.IsLoopback());
|
||||
CHECK(ipAddressV6.IsLoopback());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ SCENARIO("IpAddress", "[NETWORK][IPADDRESS]")
|
||||
|
||||
THEN("Result is not null")
|
||||
{
|
||||
REQUIRE(!hostnameInfos.empty());
|
||||
CHECK_FALSE(hostnameInfos.empty());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ SCENARIO("IpAddress", "[NETWORK][IPADDRESS]")
|
||||
Nz::IpAddress google(8, 8, 8, 8);
|
||||
THEN("Google (DNS) is 8.8.8.8")
|
||||
{
|
||||
REQUIRE(Nz::IpAddress::ResolveAddress(google) == "google-public-dns-a.google.com");
|
||||
CHECK(Nz::IpAddress::ResolveAddress(google) == "google-public-dns-a.google.com");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ SCENARIO("SocketPoller", "[NETWORK][SOCKETPOLLER]")
|
||||
{
|
||||
Nz::SocketState state = clientToServer.Connect(serverIP);
|
||||
|
||||
REQUIRE(state != Nz::SocketState_NotConnected);
|
||||
CHECK(state != Nz::SocketState_NotConnected);
|
||||
|
||||
AND_THEN("We wait on our selector, it should return true")
|
||||
{
|
||||
@@ -65,15 +65,15 @@ SCENARIO("SocketPoller", "[NETWORK][SOCKETPOLLER]")
|
||||
|
||||
REQUIRE(serverPoller.Wait(1000));
|
||||
|
||||
REQUIRE(serverPoller.IsReady(serverToClient));
|
||||
CHECK(serverPoller.IsReady(serverToClient));
|
||||
|
||||
REQUIRE(serverToClient.Read(buffer.data(), buffer.size()) == sent);
|
||||
CHECK(serverToClient.Read(buffer.data(), buffer.size()) == sent);
|
||||
|
||||
AND_THEN("Our selector should report no socket ready")
|
||||
{
|
||||
REQUIRE(!serverPoller.Wait(100));
|
||||
REQUIRE_FALSE(serverPoller.Wait(100));
|
||||
|
||||
REQUIRE(!serverPoller.IsReady(serverToClient));
|
||||
REQUIRE_FALSE(serverPoller.IsReady(serverToClient));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ SCENARIO("TCP", "[NETWORK][TCP]")
|
||||
REQUIRE(client.Connect(serverIP) == Nz::SocketState_Connecting);
|
||||
|
||||
Nz::IpAddress clientIP = client.GetRemoteAddress();
|
||||
REQUIRE(clientIP.IsValid());
|
||||
CHECK(clientIP.IsValid());
|
||||
|
||||
Nz::Thread::Sleep(100);
|
||||
|
||||
@@ -45,9 +45,11 @@ SCENARIO("TCP", "[NETWORK][TCP]")
|
||||
{
|
||||
Nz::NetPacket resultPacket;
|
||||
REQUIRE(serverToClient.ReceivePacket(&resultPacket));
|
||||
|
||||
Nz::Vector3f result;
|
||||
resultPacket >> result;
|
||||
REQUIRE(result == vector123);
|
||||
|
||||
CHECK(result == vector123);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user