fix: align slice/set equality and harden queue API
This commit is contained in:
12
set_test.go
12
set_test.go
@@ -17,3 +17,15 @@ func TestSet(t *testing.T) {
|
||||
t.Error("s1 and s2 not equal")
|
||||
}
|
||||
}
|
||||
|
||||
func TestSet_EqualIgnoresCapacity(t *testing.T) {
|
||||
s1 := make(Set[int], 2, 2)
|
||||
s2 := make(Set[int], 2, 4)
|
||||
|
||||
s1[0], s1[1] = 1, 2
|
||||
s2[0], s2[1] = 1, 2
|
||||
|
||||
if !s1.Equal(s2) {
|
||||
t.Error("s1 and s2 not equal")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user