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/compiler/consts_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/compiler/consts_test.go') diff --git a/pkg/compiler/consts_test.go b/pkg/compiler/consts_test.go index 69810c877..77a124b04 100644 --- a/pkg/compiler/consts_test.go +++ b/pkg/compiler/consts_test.go @@ -66,10 +66,10 @@ func TestConstErrors(t *testing.T) { em := ast.NewErrorMatcher(t, filepath.Join("testdata", name)) desc := ast.Parse(em.Data, name, em.ErrorHandler) if desc == nil { - em.DumpErrors(t) + em.DumpErrors() t.Fatalf("parsing failed") } target := targets.List["linux"]["amd64"] ExtractConsts(desc, target, em.ErrorHandler) - em.Check(t) + em.Check() } -- cgit mrf-deployment