moved walk/same into a package, and added a true test file

This commit is contained in:
Stephen M. McQuay
2012-09-03 21:34:18 -06:00
parent 0566ee594f
commit a89d5d52ec
3 changed files with 60 additions and 36 deletions
+18
View File
@@ -0,0 +1,18 @@
package ebt
import (
"code.google.com/p/go-tour/tree"
"testing"
)
func TestSameTrees(t *testing.T) {
if !Same(tree.New(1), tree.New(1)) {
t.Error("Trees should have been the same ...")
}
}
func TestDifferentTrees(t *testing.T) {
if Same(tree.New(1), tree.New(2)) {
t.Error("Trees should have been the different ...")
}
}