aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/ipmath/ipmath_ut.cpp
diff options
context:
space:
mode:
authorzheglov <zheglov@yandex-team.com>2022-07-07 19:33:56 +0300
committerzheglov <zheglov@yandex-team.com>2022-07-07 19:33:56 +0300
commit95d4076addb1b5489601ccf87d38119b3a651260 (patch)
treeb10bd9322917c65c960df93364d0024c53d660b2 /library/cpp/ipmath/ipmath_ut.cpp
parent1ebea3a426fe7f05306ac0daeb294623e3f9db6a (diff)
downloadydb-95d4076addb1b5489601ccf87d38119b3a651260.tar.gz
reworked ip_filter to ipmath
Diffstat (limited to 'library/cpp/ipmath/ipmath_ut.cpp')
-rw-r--r--library/cpp/ipmath/ipmath_ut.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/library/cpp/ipmath/ipmath_ut.cpp b/library/cpp/ipmath/ipmath_ut.cpp
index 5fe459ecc8..179f232503 100644
--- a/library/cpp/ipmath/ipmath_ut.cpp
+++ b/library/cpp/ipmath/ipmath_ut.cpp
@@ -188,6 +188,14 @@ public:
ASSERT_THAT(range.Size(), Eq(256));
}
+ void IpRangeFromIpv4BuilderFromTIpv6Address() {
+ const auto s = TIpv6Address::FromString("192.168.0.0");
+ const auto e = TIpv6Address::FromString("192.168.0.255");
+ auto range = TIpAddressRange::From(s).To(e).Build();
+
+ ASSERT_THAT(range.Size(), Eq(256));
+ }
+
void IpRangeFromInvalidIpv4() {
auto build = [] (auto from, auto to) {
return TIpAddressRange::From(from).To(to).Build();