20 lines
255 B
Go
20 lines
255 B
Go
package extypes
|
|
|
|
import "testing"
|
|
|
|
func TestSet(t *testing.T) {
|
|
s1 := make(Set[int], 0)
|
|
s2 := make(Set[int], 0)
|
|
|
|
s1 = s1.Add(1)
|
|
s1 = s1.Add(2)
|
|
s1 = s1.Add(2)
|
|
|
|
s2 = s2.Add(1)
|
|
s2 = s2.Add(2)
|
|
|
|
if !s1.Equal(s2) {
|
|
t.Error("s1 and s2 not equal")
|
|
}
|
|
}
|