mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-29 04:17:55 +01:00
Poco 1.9.1 assert true (#2255)
* Rename assert by assertTrue * Update submodules * Missing assertTrue * Rename poco_assertTrue to poco_assert * Rename poco_assertTrue to poco_assert
This commit is contained in:
committed by
Aleksandar Fabijanic
parent
5a1bf5eb4a
commit
960ecb38f0
@@ -45,23 +45,23 @@ ICMPClientTest::~ICMPClientTest()
|
||||
|
||||
void ICMPClientTest::testPing()
|
||||
{
|
||||
assert(ICMPClient::pingIPv4("127.0.0.1") > 0);
|
||||
assertTrue (ICMPClient::pingIPv4("127.0.0.1") > 0);
|
||||
|
||||
Poco::Net::ICMPClient icmpClient(IPAddress::IPv4);
|
||||
|
||||
registerDelegates(icmpClient);
|
||||
|
||||
assert(icmpClient.ping("127.0.0.1") > 0);
|
||||
assertTrue (icmpClient.ping("127.0.0.1") > 0);
|
||||
#if POCO_OS == POCO_OS_ANDROID
|
||||
assert(icmpClient.ping("10.0.2.15", 4) > 0);
|
||||
assert(icmpClient.ping("10.0.2.2", 4) > 0);
|
||||
assertTrue (icmpClient.ping("10.0.2.15", 4) > 0);
|
||||
assertTrue (icmpClient.ping("10.0.2.2", 4) > 0);
|
||||
#else
|
||||
assert(icmpClient.ping("www.appinf.com", 4) > 0);
|
||||
assertTrue (icmpClient.ping("www.appinf.com", 4) > 0);
|
||||
|
||||
// warning: may fail depending on the existence of the addresses at test site
|
||||
// if so, adjust accordingly (i.e. specify non-existent or unreachable IP addresses)
|
||||
assert(0 == icmpClient.ping("192.168.243.1"));
|
||||
assert(0 == icmpClient.ping("10.11.12.13"));
|
||||
assertTrue (0 == icmpClient.ping("192.168.243.1"));
|
||||
assertTrue (0 == icmpClient.ping("10.11.12.13"));
|
||||
#endif
|
||||
|
||||
unregisterDelegates(icmpClient);
|
||||
@@ -70,23 +70,23 @@ void ICMPClientTest::testPing()
|
||||
|
||||
void ICMPClientTest::testBigPing()
|
||||
{
|
||||
assert(ICMPClient::pingIPv4("127.0.0.1", 1, 96) > 0);
|
||||
assertTrue (ICMPClient::pingIPv4("127.0.0.1", 1, 96) > 0);
|
||||
|
||||
Poco::Net::ICMPClient icmpClient(IPAddress::IPv4, 96);
|
||||
|
||||
registerDelegates(icmpClient);
|
||||
|
||||
assert(icmpClient.ping("127.0.0.1", 1) > 0);
|
||||
assertTrue (icmpClient.ping("127.0.0.1", 1) > 0);
|
||||
#if POCO_OS == POCO_OS_ANDROID
|
||||
assert(icmpClient.ping("10.0.2.15", 4) > 0);
|
||||
assert(icmpClient.ping("10.0.2.2", 4) > 0);
|
||||
assertTrue (icmpClient.ping("10.0.2.15", 4) > 0);
|
||||
assertTrue (icmpClient.ping("10.0.2.2", 4) > 0);
|
||||
#else
|
||||
assert(icmpClient.ping("www.appinf.com", 4) > 0);
|
||||
assertTrue (icmpClient.ping("www.appinf.com", 4) > 0);
|
||||
|
||||
// warning: may fail depending on the existence of the addresses at test site
|
||||
// if so, adjust accordingly (i.e. specify non-existent or unreachable IP addresses)
|
||||
assert(0 == icmpClient.ping("192.168.243.1"));
|
||||
assert(0 == icmpClient.ping("10.11.12.13"));
|
||||
assertTrue (0 == icmpClient.ping("192.168.243.1"));
|
||||
assertTrue (0 == icmpClient.ping("10.11.12.13"));
|
||||
#endif
|
||||
|
||||
unregisterDelegates(icmpClient);
|
||||
|
||||
Reference in New Issue
Block a user