Commits

Anonymous committed 30e8508

Tests now all PASS

  • Participants
  • Parent commits 36150f3

Comments (0)

Files changed (1)

 
 import (
 	"fmt"
-//	"rand"
-	"container/set"
+	"rand"
 	"testing"
 )
 
 	fmt.Printf("this works!\n")
 }
 
-func TestEasy (t *testing.T) {
-	var s *set.IntTreap = new(set.IntTreap)
-//	s := set.Init([]int{})
-	s.Display()
+func TestSuit (test *testing.T) {
+	s := Init([]int{})
+	t := Init([]int{})
+	fmt.Printf("\n")
+	for i := 0; i < 4; i++ {
+		x := rand.Int()
+		y := rand.Int()
+		s = s.Add(x)
+		fmt.Printf("s: ")
+		s.Display()
+		fmt.Printf("\n")
+		t = t.Add(y)
+		fmt.Printf("t: ")
+		t.Display()
+		fmt.Printf("\n")
+	}
+	u := s.Union(t)
+	fmt.Printf("u: ")
+	u.Display()
+	fmt.Printf("\n")
 }