(t *testing.T)
| 93 | } |
| 94 | |
| 95 | func TestString_FromSlice(t *testing.T) { |
| 96 | slice := []string{"val0", "val1", "val2", "val3", "val4"} |
| 97 | set := StringFromSlice(slice) |
| 98 | |
| 99 | if len(set) != len(slice) { |
| 100 | t.Fatalf("length mismatch: expected %d, got %d", len(slice), len(set)) |
| 101 | } |
| 102 | |
| 103 | for _, v := range slice { |
| 104 | if _, ok := set[v]; !ok { |
| 105 | t.Fatalf("missing key: %v", v) |
| 106 | } |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | func TestString_NilHandling(t *testing.T) { |
| 111 | var nilSet String |
nothing calls this directly
no test coverage detected
searching dependent graphs…