aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/ast/parser_test.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-03-17 08:05:11 +0100
committerDmitry Vyukov <dvyukov@google.com>2020-03-17 21:19:13 +0100
commit8bec3911ad478b6fef8df96e4dc89f8080229133 (patch)
treef7219cc336de08b708b776722588e090e745130a /pkg/ast/parser_test.go
parent924f7606047a430a9b313c135b782e1e8f852bec (diff)
pkg/compiler: add tests for generation phase
Add errors3.txt with tests for errors that are produced during generation phase. Refactor tests to reduce duplication. Tidy struct/union size errors: better locations and make testable.
Diffstat (limited to 'pkg/ast/parser_test.go')
-rw-r--r--pkg/ast/parser_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/ast/parser_test.go b/pkg/ast/parser_test.go
index f1458e3e7..edbabf3d3 100644
--- a/pkg/ast/parser_test.go
+++ b/pkg/ast/parser_test.go
@@ -108,13 +108,13 @@ func TestErrors(t *testing.T) {
em := NewErrorMatcher(t, filepath.Join("testdata", name))
desc := Parse(em.Data, name, em.ErrorHandler)
if desc != nil && em.Count() != 0 {
- em.DumpErrors(t)
+ em.DumpErrors()
t.Fatalf("parsing succeed, but got errors")
}
if desc == nil && em.Count() == 0 {
t.Fatalf("parsing failed, but got no errors")
}
- em.Check(t)
+ em.Check()
})
}
}