From 53daaf1beaa332cd809c91480a2d7d633af96ea0 Mon Sep 17 00:00:00 2001 From: Johan Lindh Date: Wed, 25 Oct 2023 10:37:53 +0200 Subject: [PATCH] netip.Addr tests --- jaws_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jaws_test.go b/jaws_test.go index 8fc3870..8218502 100644 --- a/jaws_test.go +++ b/jaws_test.go @@ -25,6 +25,11 @@ func TestJaws_parseIP(t *testing.T) { is.True(parseIP("127.0.0.1").Compare(netip.MustParseAddr("127.0.0.1")) == 0) is.True(parseIP("::1").Compare(netip.IPv6Loopback()) == 0) is.True(equalIP(parseIP("127.0.0.1"), parseIP("::1"))) + is.Equal(equalIP(parseIP("127.0.0.1"), netip.Addr{}), false) + is.Equal(equalIP(netip.IPv4Unspecified(), netip.Addr{}), false) + is.Equal(equalIP(netip.IPv6Unspecified(), netip.Addr{}), false) + is.Equal(equalIP(netip.IPv6Loopback(), netip.Addr{}), false) + is.Equal(equalIP(netip.Addr{}, netip.Addr{}), true) } func TestJaws_getCookieSessionsIds(t *testing.T) {