aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/compiler/compiler_test.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-03-17 14:27:55 +0100
committerDmitry Vyukov <dvyukov@google.com>2020-03-17 21:19:13 +0100
commit0bcbb36f9fff81ac0bff9ec0959b9ea4c444a700 (patch)
treee0adbe28c3a590a544ba8812c78e7fdb025bd4fa /pkg/compiler/compiler_test.go
parent80d43738f1e4c648ccfc4599e17dc8ba455fe1ea (diff)
pkg/compiler: unshare error handler
eh is shared across several tests and uses wrong t. Unshare it.
Diffstat (limited to 'pkg/compiler/compiler_test.go')
-rw-r--r--pkg/compiler/compiler_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/compiler/compiler_test.go b/pkg/compiler/compiler_test.go
index c051702a2..46582d9aa 100644
--- a/pkg/compiler/compiler_test.go
+++ b/pkg/compiler/compiler_test.go
@@ -37,6 +37,9 @@ func TestCompileAll(t *testing.T) {
arch, target := arch, target
t.Run(arch, func(t *testing.T) {
t.Parallel()
+ eh := func(pos ast.Pos, msg string) {
+ t.Logf("%v: %v", pos, msg)
+ }
consts := DeserializeConstsGlob(filepath.Join(path, "*_"+arch+".const"), eh)
if consts == nil {
t.Fatalf("reading consts failed")