summaryrefslogtreecommitdiff
path: root/set/set_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'set/set_test.go')
-rw-r--r--set/set_test.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/set/set_test.go b/set/set_test.go
index 16d3e8c..cd44e24 100644
--- a/set/set_test.go
+++ b/set/set_test.go
@@ -11,17 +11,25 @@ const factor int = 10
const minLength int = 1
const maxLength int = 10
-func TestSet(t *testing.T) {
+func TestElementary(t *testing.T) {
s := NewElementary()
for i := minLength; i <= maxLength; i *= factor {
test(s, i, t)
}
}
+func TestBST(t *testing.T) {
+ s := NewBST()
+ for i := minLength; i <= maxLength; i *= factor {
+ test(s, i, t)
+ }
+}
+
func test(s Set, l int, t *testing.T) {
cb := func(t *testing.T) {
list := ds.NewRandomArrayList(l, -1)
for i, a := range list {
+ t.Log("Inserting", a, i, s)
s.Set(a, i)
}
for i, a := range list {