Test Remove()
(t *testing.T)
| 56 | |
| 57 | // Test Remove() |
| 58 | func TestIntSetRemove(t *testing.T) { |
| 59 | s := Create(1, 2, 3) |
| 60 | s.Remove(2) |
| 61 | if s.Contains(2) { |
| 62 | t.Fatalf("expected set not to contain 2 after removal") |
| 63 | } |
| 64 | if !s.Contains(1) || !s.Contains(3) { |
| 65 | t.Fatalf("expected set to still contain 1 and 3") |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | // Test Equals() |
| 70 | func TestIntSetEquals(t *testing.T) { |