From 8bec3911ad478b6fef8df96e4dc89f8080229133 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 17 Mar 2020 08:05:11 +0100 Subject: 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. --- pkg/ast/parser_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/ast/parser_test.go') 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() }) } } -- cgit mrf-deployment