1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

Add Utils::route6_entries

This commit is contained in:
Matias Fontanini
2016-03-06 19:18:33 -08:00
parent c082dfad67
commit 4dcef0f15d
8 changed files with 161 additions and 17 deletions

View File

@@ -100,3 +100,9 @@ TEST(IPv6AddressTest, IsMulticast) {
EXPECT_FALSE(IPv6Address("feaa::dead").is_multicast());
}
TEST(IPv6AddressTest, FromPrefixLength) {
EXPECT_EQ(IPv6Address("ffff:fe00::"), IPv6Address::from_prefix_length(23));
EXPECT_EQ(IPv6Address("ffff::"), IPv6Address::from_prefix_length(16));
EXPECT_EQ(IPv6Address("ffff:ffff::"), IPv6Address::from_prefix_length(32));
}