MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / TestIsWildIP

Function TestIsWildIP

internal/utils/ip_test.go:45–56  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

43}
44
45func TestIsWildIP(t *testing.T) {
46 var a = assert.NewAssertion(t)
47 a.IsTrue(utils.IsWildIP("192.168.1.100"))
48 a.IsTrue(utils.IsWildIP("::1"))
49 a.IsTrue(utils.IsWildIP("2001:0db8:85a3:0000:0000:8a2e:0370:7334"))
50 a.IsTrue(utils.IsWildIP("[2001:0db8:85a3:0000:0000:8a2e:0370:7334]"))
51 a.IsFalse(utils.IsWildIP(""))
52 a.IsFalse(utils.IsWildIP("[]"))
53 a.IsFalse(utils.IsWildIP("[1]"))
54 a.IsFalse(utils.IsWildIP("192.168.2.256"))
55 a.IsFalse(utils.IsWildIP("192.168.2"))
56}

Callers

nothing calls this directly

Calls 1

IsWildIPFunction · 0.92

Tested by

no test coverage detected