Lines Matching refs:prefix
175 IPPrefix prefix; in TEST() local
177 EXPECT_FALSE(IPPrefix::forString("", &prefix)); in TEST()
178 EXPECT_FALSE(IPPrefix::forString("invalid", &prefix)); in TEST()
179 EXPECT_FALSE(IPPrefix::forString("192.0.2.0", &prefix)); in TEST()
180 EXPECT_FALSE(IPPrefix::forString("2001::db8::", &prefix)); in TEST()
182 EXPECT_FALSE(IPPrefix::forString("2001:db8::/", &prefix)); in TEST()
183 EXPECT_FALSE(IPPrefix::forString("2001:db8:://32", &prefix)); in TEST()
184 EXPECT_FALSE(IPPrefix::forString("2001:db8::/32z", &prefix)); in TEST()
185 EXPECT_FALSE(IPPrefix::forString("2001:db8::/32/", &prefix)); in TEST()
186 EXPECT_FALSE(IPPrefix::forString("2001:db8::/0x20", &prefix)); in TEST()
187 EXPECT_FALSE(IPPrefix::forString("2001:db8:: /32", &prefix)); in TEST()
188 EXPECT_FALSE(IPPrefix::forString("2001:db8::/ 32", &prefix)); in TEST()
189 EXPECT_FALSE(IPPrefix::forString(" 2001:db8::/32", &prefix)); in TEST()
190 EXPECT_FALSE(IPPrefix::forString("2001:db8::/32 ", &prefix)); in TEST()
191 EXPECT_FALSE(IPPrefix::forString("2001:db8::/+32", &prefix)); in TEST()
193 EXPECT_FALSE(IPPrefix::forString("192.0.2.0/33", &prefix)); in TEST()
194 EXPECT_FALSE(IPPrefix::forString("2001:db8::/129", &prefix)); in TEST()
195 EXPECT_FALSE(IPPrefix::forString("192.0.2.0/-1", &prefix)); in TEST()
196 EXPECT_FALSE(IPPrefix::forString("2001:db8::/-1", &prefix)); in TEST()
198 EXPECT_TRUE(IPPrefix::forString("2001:db8::/32", &prefix)); in TEST()
199 EXPECT_EQ("2001:db8::/32", prefix.toString()); in TEST()
200 EXPECT_EQ(IPPrefix(IPAddress::forString("2001:db8::"), 32), prefix); in TEST()
432 IPPrefix prefix(ip, expectation.cidrLen); in TEST() local
434 EXPECT_EQ(expectation.cidrLen, prefix.length()) in TEST()
436 EXPECT_EQ(ipTruncated, prefix.ip()) in TEST()
437 << "Unexpected IP truncation: " << prefix.ip() << ", expected: " << ipTruncated; in TEST()