Skip to content

Commit b02725a

Browse files
author
erifan01
committed
cmd/asm: initialize assembler before running error tests
The Test{ARCH}Errors tests will call ctxt.Arch.Assemble, but this function requires the assembler has been initialized. So this CL adds a call to architecture.Init(ctxt) in testErrors, otherwise running Test{ARCH}Errors alone would fail. Change-Id: I4f3ba5a5fc1375d28779701989cf700cb4d1b635 Reviewed-on: https://go-review.googlesource.com/c/go/+/505976 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Eric Fang <eric.fang@arm.com>
1 parent 02482a5 commit b02725a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/cmd/asm/internal/asm/endtoend_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ var (
272272
func testErrors(t *testing.T, goarch, file string, flags ...string) {
273273
input := filepath.Join("testdata", file+".s")
274274
architecture, ctxt := setArch(goarch)
275+
architecture.Init(ctxt)
275276
lexer := lex.NewLexer(input)
276277
parser := NewParser(ctxt, architecture, lexer, false)
277278
pList := new(obj.Plist)

0 commit comments

Comments
 (0)