(t *testing.T)
| 286 | } |
| 287 | |
| 288 | func TestStringSorted_FromSlice(t *testing.T) { |
| 289 | slice := []string{"val0", "val1", "val2", "val3", "val4"} |
| 290 | set := StringSortedFromSlice(slice) |
| 291 | |
| 292 | if len(set) != len(slice) { |
| 293 | t.Fatalf("length mismatch: expected %d, got %d", len(slice), len(set)) |
| 294 | } |
| 295 | |
| 296 | for _, v := range slice { |
| 297 | if _, ok := set[v]; !ok { |
| 298 | t.Fatalf("missing key: %v", v) |
| 299 | } |
| 300 | } |
| 301 | } |
| 302 | |
| 303 | func TestStringSorted_NilHandling(t *testing.T) { |
| 304 | var nilSet StringSorted |
nothing calls this directly
no test coverage detected
searching dependent graphs…