Test logs error even if tree is nil

This commit is contained in:
Sasha Koshka 2022-09-01 21:37:15 -04:00
parent d9e58cee0c
commit 8ccfc935ab

View File

@ -9,6 +9,10 @@ func checkTree (modulePath string, correct string, test *testing.T) {
tree, err := Parse(modulePath)
if tree == nil {
test.Log("TREE IS NIL!")
if err != io.EOF && err != nil {
test.Log("returned error:")
test.Log(err)
}
test.Fail()
return
}