MCPcopy
hub / github.com/OJ/gobuster / TestSetAddRangeDouble

Function TestSetAddRangeDouble

libgobuster/helpers_test.go:72–85  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

70}
71
72func TestSetAddRangeDouble(t *testing.T) {
73 t.Parallel()
74 x := NewSet[string]()
75 x.AddRange([]string{"string1", "string2", "string1", "string2"})
76 if len(x.Set) != 2 {
77 t.Fatalf("Unexpected string size. Should be 2 (unique) Got %v", len(x.Set))
78 }
79
80 y := NewSet[int]()
81 y.AddRange([]int{1, 2, 1, 2})
82 if len(y.Set) != 2 {
83 t.Fatalf("Unexpected int size. Should be 2 (unique) Got %v", len(y.Set))
84 }
85}
86
87func TestSetContains(t *testing.T) {
88 t.Parallel()

Callers

nothing calls this directly

Calls 2

AddRangeMethod · 0.80
FatalfMethod · 0.80

Tested by

no test coverage detected