MCPcopy
hub / github.com/crowdsecurity/crowdsec / TestRange2Int

Function TestRange2Int

pkg/types/ip_test.go:19–26  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

17}
18
19func TestRange2Int(t *testing.T) {
20 tEmpty := net.IPNet{}
21 // empty item
22 _, _, _, _, _, err := Range2Ints(tEmpty)
23 if !strings.Contains(err.Error(), "converting first ip in range") {
24 t.Fatalf("unexpected: %s", err)
25 }
26}
27
28func TestAdd2Int(t *testing.T) {
29 tests := []struct {

Callers

nothing calls this directly

Calls 2

Range2IntsFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…