Don't handle lack of IPv6 as fatal in unit tests

master
sapier 2014-06-20 22:35:50 +02:00
parent c86b78c9b7
commit 2b9beead38
1 changed files with 20 additions and 13 deletions

View File

@ -1517,6 +1517,8 @@ struct TestSocket: public TestBase
const char sendbuffer[] = "hello world!";
IPv6AddressBytes bytes;
bytes.bytes[15] = 1;
try {
socket6.Send(Address(&bytes, port), sendbuffer, sizeof(sendbuffer));
sleep_ms(50);
@ -1534,6 +1536,11 @@ struct TestSocket: public TestBase
UASSERT(strncmp(sendbuffer, rcvbuffer, sizeof(sendbuffer))==0);
UASSERT(memcmp(sender.getAddress6().sin6_addr.s6_addr, Address(&bytes, 0).getAddress6().sin6_addr.s6_addr, 16) == 0);
}
catch (SendFailedException e) {
errorstream << "IPv6 support enabled but not available!" << std::endl;
}
}
// IPv4 socket test
{