mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Allow the test suite to run offline
Allow host resolving to fail, but still check its results if it succeeds.
This commit is contained in:
parent
846b569a86
commit
b502e678dc
|
@ -84,8 +84,10 @@ TEST_F(Jobs, LookupHost)
|
||||||
|
|
||||||
EXPECT_STREQ(pJob->m_aHostname, HOST);
|
EXPECT_STREQ(pJob->m_aHostname, HOST);
|
||||||
EXPECT_EQ(pJob->m_Nettype, NETTYPE);
|
EXPECT_EQ(pJob->m_Nettype, NETTYPE);
|
||||||
ASSERT_EQ(pJob->m_Result, 0);
|
if(pJob->m_Result == 0)
|
||||||
EXPECT_EQ(pJob->m_Addr.type & NETTYPE, pJob->m_Addr.type);
|
{
|
||||||
|
EXPECT_EQ(pJob->m_Addr.type & NETTYPE, pJob->m_Addr.type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(Jobs, LookupHostWebsocket)
|
TEST_F(Jobs, LookupHostWebsocket)
|
||||||
|
@ -106,8 +108,10 @@ TEST_F(Jobs, LookupHostWebsocket)
|
||||||
|
|
||||||
EXPECT_STREQ(pJob->m_aHostname, HOST);
|
EXPECT_STREQ(pJob->m_aHostname, HOST);
|
||||||
EXPECT_EQ(pJob->m_Nettype, NETTYPE);
|
EXPECT_EQ(pJob->m_Nettype, NETTYPE);
|
||||||
ASSERT_EQ(pJob->m_Result, 0);
|
if(pJob->m_Result == 0)
|
||||||
EXPECT_EQ(pJob->m_Addr.type & NETTYPE_WEBSOCKET_IPV4, pJob->m_Addr.type);
|
{
|
||||||
|
EXPECT_EQ(pJob->m_Addr.type & NETTYPE_WEBSOCKET_IPV4, pJob->m_Addr.type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(Jobs, Many)
|
TEST_F(Jobs, Many)
|
||||||
|
|
Loading…
Reference in a new issue