mirror of
https://github.com/pocoproject/poco.git
synced 2025-05-02 15:41:36 +02:00
- ifdef'd IPv6 tests
- fixed const-ness of stream() member functions to MemoryReader/Writer
This commit is contained in:
parent
d1a1d54f58
commit
672d4758c3
@ -200,7 +200,12 @@ public:
|
||||
return _data;
|
||||
}
|
||||
|
||||
MemoryInputStream& stream() const
|
||||
const MemoryInputStream& stream() const
|
||||
{
|
||||
return _istr;
|
||||
}
|
||||
|
||||
MemoryInputStream& stream()
|
||||
{
|
||||
return _istr;
|
||||
}
|
||||
|
@ -215,7 +215,12 @@ public:
|
||||
return _data;
|
||||
}
|
||||
|
||||
MemoryOutputStream& stream() const
|
||||
const MemoryOutputStream& stream() const
|
||||
{
|
||||
return _ostr;
|
||||
}
|
||||
|
||||
MemoryOutputStream& stream()
|
||||
{
|
||||
return _ostr;
|
||||
}
|
||||
|
@ -551,10 +551,12 @@ void IPAddressTest::testBroadcast()
|
||||
void IPAddressTest::testPrefixCons()
|
||||
{
|
||||
IPAddress ia1(15, IPAddress::IPv4);
|
||||
IPAddress ia2(62, IPAddress::IPv6);
|
||||
|
||||
assert(ia1.toString() == "255.254.0.0");
|
||||
|
||||
#ifdef POCO_HAVE_IPv6
|
||||
IPAddress ia2(62, IPAddress::IPv6);
|
||||
assert(ia2.toString() == "ffff:ffff:ffff:fffc::");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -575,6 +577,7 @@ void IPAddressTest::testPrefixLen()
|
||||
IPAddress ia5(25, IPAddress::IPv4);
|
||||
assert(ia5.prefixLength() == 25);
|
||||
|
||||
#ifdef POCO_HAVE_IPv6
|
||||
IPAddress ia6(62, IPAddress::IPv6);
|
||||
assert(ia6.prefixLength() == 62);
|
||||
|
||||
@ -586,6 +589,7 @@ void IPAddressTest::testPrefixLen()
|
||||
|
||||
IPAddress ia9(65, IPAddress::IPv6);
|
||||
assert(ia9.prefixLength() == 65);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user