fix: align slice/set equality and harden queue API

This commit is contained in:
2026-03-17 14:37:35 +03:00
parent 4232591fcc
commit 156fa3153c
6 changed files with 153 additions and 29 deletions

View File

@@ -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")
}
}