issue #8: update tests

This commit is contained in:
z7zmey
2018-04-10 15:23:13 +03:00
parent 343896d019
commit 6f7834eb6b
76 changed files with 1596 additions and 534 deletions

View File

@@ -414,6 +414,7 @@ CAD;
`
for n := 0; n < b.N; n++ {
php5.Parse(bytes.NewBufferString(src), "test.php")
php5parser := php5.NewParser(bytes.NewBufferString(src), "test.php")
php5parser.Parse()
}
}

View File

@@ -3615,7 +3615,9 @@ func TestPhp5(t *testing.T) {
},
}
actual, _, _, _ := php5.Parse(bytes.NewBufferString(src), "test.php")
php5parser := php5.NewParser(bytes.NewBufferString(src), "test.php")
php5parser.Parse()
actual := php5parser.GetRootNode()
assertEqual(t, expected, actual)
}
@@ -3652,7 +3654,9 @@ func TestPhp5Strings(t *testing.T) {
},
}
actual, _, _, _ := php5.Parse(bytes.NewBufferString(src), "test.php")
php5parser := php5.NewParser(bytes.NewBufferString(src), "test.php")
php5parser.Parse()
actual := php5parser.GetRootNode()
assertEqual(t, expected, actual)
}
@@ -3718,6 +3722,8 @@ CAD;
},
}
actual, _, _, _ := php5.Parse(bytes.NewBufferString(src), "test.php")
php5parser := php5.NewParser(bytes.NewBufferString(src), "test.php")
php5parser.Parse()
actual := php5parser.GetRootNode()
assertEqual(t, expected, actual)
}