(t *testing.T)
| 753 | } |
| 754 | |
| 755 | func TestInt_FromSlice(t *testing.T) { |
| 756 | slice := []int{0, 1, 2, 3, 4} |
| 757 | set := IntFromSlice(slice) |
| 758 | |
| 759 | if len(set) != len(slice) { |
| 760 | t.Fatalf("length mismatch: expected %d, got %d", len(slice), len(set)) |
| 761 | } |
| 762 | |
| 763 | for _, v := range slice { |
| 764 | if _, ok := set[v]; !ok { |
| 765 | t.Fatalf("missing key: %v", v) |
| 766 | } |
| 767 | } |
| 768 | } |
| 769 | |
| 770 | func TestInt_NilHandling(t *testing.T) { |
| 771 | var nilSet Int |
nothing calls this directly
no test coverage detected
searching dependent graphs…