moved walk/same into a package, and added a true test file
This commit is contained in:
@@ -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 ...")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user