* Disconnect package godoc comment from imported file

* Add missing newline in toml.abnf

* Tag testing helper funcs
This commit is contained in:
Cameron Moore
2021-04-15 15:49:19 -05:00
committed by GitHub
parent 24b62ebe61
commit a7b50eb8f1
4 changed files with 23 additions and 11 deletions
+10 -6
View File
@@ -155,12 +155,14 @@ func TestParser_AST_Numbers(t *testing.T) {
}
}
type astRoot []astNode
type astNode struct {
Kind ast.Kind
Data []byte
Children []astNode
}
type (
astRoot []astNode
astNode struct {
Kind ast.Kind
Data []byte
Children []astNode
}
)
func compareAST(t *testing.T, expected astRoot, actual *ast.Root) {
it := actual.Iterator()
@@ -168,6 +170,7 @@ func compareAST(t *testing.T, expected astRoot, actual *ast.Root) {
}
func compareNode(t *testing.T, e astNode, n ast.Node) {
t.Helper()
require.Equal(t, e.Kind, n.Kind)
require.Equal(t, e.Data, n.Data)
@@ -175,6 +178,7 @@ func compareNode(t *testing.T, e astNode, n ast.Node) {
}
func compareIterator(t *testing.T, expected []astNode, actual ast.Iterator) {
t.Helper()
idx := 0
for actual.Next() {