Test Intersection()
(t *testing.T)
| 82 | |
| 83 | // Test Intersection() |
| 84 | func TestIntSetIntersection(t *testing.T) { |
| 85 | s1 := Create(1, 2, 3, 4) |
| 86 | s2 := Create(3, 4, 5, 6) |
| 87 | result := s1.Intersection(s2) |
| 88 | |
| 89 | expected := Create(3, 4) |
| 90 | if !result.Equals(expected) { |
| 91 | t.Fatalf("expected intersection {3, 4}, got: %v", result) |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | // Test Difference() |
| 96 | func TestIntSetDifference(t *testing.T) { |
nothing calls this directly
no test coverage detected