Fail test on nil tree
This commit is contained in:
parent
8d46188f6c
commit
aec266a82e
@ -7,6 +7,12 @@ import "testing"
|
|||||||
|
|
||||||
func checkTree (modulePath string, correct string, test *testing.T) {
|
func checkTree (modulePath string, correct string, test *testing.T) {
|
||||||
tree, err := Parse(modulePath)
|
tree, err := Parse(modulePath)
|
||||||
|
if tree == nil {
|
||||||
|
test.Log("TREE IS NIL!")
|
||||||
|
test.Fail()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
treeString := tree.ToString(0)
|
treeString := tree.ToString(0)
|
||||||
treeRunes := []rune(treeString)
|
treeRunes := []rune(treeString)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user