Skip to content

Commit

Permalink
More test precision
Browse files Browse the repository at this point in the history
  • Loading branch information
smoynes committed Oct 8, 2023
1 parent f220bd5 commit cd1d26b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/asm/gen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (t *generatorHarness) Run(pc uint16, symbols SymbolTable, tcs []generateCas
if !errors.As(err, &wantErr) {
t.Errorf("unexpected error: want: %#v, got: %#v", wantErr, err)
}
if wantErr.Offset != expErr.(*OffsetError).Offset {
if wantErr.Offset != expErr.(*OffsetError).Offset { //nolint:errorlint
t.Errorf("unexpected error: want: %#v, got: %#v", wantErr, expErr)
}
}
Expand Down Expand Up @@ -192,6 +192,7 @@ func TestADD_Generate(tt *testing.T) {
t := generatorHarness{tt}
tcs := []generateCase{
{&ADD{DR: "R0", SR1: "R0", SR2: "RR"}, 0, &RegisterError{Reg: "RR"}},
{&ADD{DR: "R4", SR1: "R1", LITERAL: ^uint16(0x0004)}, 0x185b, nil},
{&ADD{DR: "R1", SR1: "R1", LITERAL: 0x000f}, 0x124f, nil},
{&ADD{DR: "R1", SR1: "R1", SR2: "R0"}, 0x1240, nil},
{&ADD{DR: "R0", SR1: "R7", LITERAL: 0b0000_0000_0000_1010}, 0b0001_0001_1100_1010, nil},
Expand Down

0 comments on commit cd1d26b

Please sign in to comment.