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

Function TestIsSupersetOf

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

Source from the content-addressed store, hash-verified

93}
94
95func TestIsSupersetOf(t *testing.T) {
96 s1, s2 := New(1, 2, 3), New(1, 2, 3, 4)
97 if !s2.IsSupersetOf(s1) {
98 t.Errorf("expecting %v to be a superset of %v", s2, s1)
99 }
100 if s1.IsSupersetOf(s2) {
101 t.Errorf("expecting %v not to be a superset of %v", s1, s2)
102 }
103 if s3 := New(1, 2, 5); s2.IsSupersetOf(s3) {
104 t.Errorf("expecting %v not to be a superset of %v", s2, s3)
105 }
106}
107
108func TestIsProperSupersetOf(t *testing.T) {
109 s1, s2 := New(1, 2, 3), New(1, 2, 3, 4)

Callers

nothing calls this directly

Calls 2

NewFunction · 0.70
IsSupersetOfMethod · 0.65

Tested by

no test coverage detected