MCPcopy Index your code
hub / github.com/TheAlgorithms/Go / TestIsProperSubsetOf

Function TestIsProperSubsetOf

structure/set/set_test.go:85–93  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

83}
84
85func TestIsProperSubsetOf(t *testing.T) {
86 s1, s2 := New(1, 2, 3), New(1, 2, 3, 4)
87 if !s1.IsProperSubsetOf(s2) {
88 t.Errorf("expecting %v to be a proper subset of %v", s1, s2)
89 }
90 if s3 := New(3, 2, 1); s1.IsProperSubsetOf(s3) {
91 t.Errorf("expecting %v not to be a proper subset of %v", s1, s3)
92 }
93}
94
95func TestIsSupersetOf(t *testing.T) {
96 s1, s2 := New(1, 2, 3), New(1, 2, 3, 4)

Callers

nothing calls this directly

Calls 2

NewFunction · 0.70
IsProperSubsetOfMethod · 0.65

Tested by

no test coverage detected