MCPcopy
hub / github.com/minio/minio-go / TestIntSetIntersection

Function TestIntSetIntersection

pkg/set/set_test.go:84–93  ·  view source on GitHub ↗

Test Intersection()

(t *testing.T)

Source from the content-addressed store, hash-verified

82
83// Test Intersection()
84func 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()
96func TestIntSetDifference(t *testing.T) {

Callers

nothing calls this directly

Calls 3

CreateFunction · 0.85
IntersectionMethod · 0.45
EqualsMethod · 0.45

Tested by

no test coverage detected