Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: mbaxter <[email protected]>
  • Loading branch information
GrapeBaBa and mbaxter committed Nov 13, 2024
1 parent 5e7e893 commit 90c0514
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cannon/mipsevm/tests/evm_common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ func TestEVM_SingleStep_MthiMtlo(t *testing.T) {
}
}

func TestEVMSingleStep_BeqBne(t *testing.T) {
func TestEVM_SingleStep_BeqBne(t *testing.T) {
versions := GetMipsVersionTestCases(t)
cases := []struct {
name string
Expand Down Expand Up @@ -467,7 +467,7 @@ func TestEVMSingleStep_SlSr(t *testing.T) {
}{
{name: "sll", funct: uint16(4) << 6, rt: Word(0x20), rsReg: uint32(0x0), expectVal: Word(0x20) << uint8(4)}, // sll t0, t1, 3
{name: "srl", funct: uint16(4)<<6 | 2, rt: Word(0x20), rsReg: uint32(0x0), expectVal: Word(0x20) >> uint8(4)}, // srl t0, t1, 3
{name: "sra", funct: uint16(4)<<6 | 3, rt: Word(0x80_00_00_20), rsReg: uint32(0x0), expectVal: exec.SignExtend(Word(0xF8_00_00_02), Word(32))}, // sra t0, t1, 3
{name: "sra", funct: uint16(4)<<6 | 3, rt: Word(0x80_00_00_20), rsReg: uint32(0x0), expectVal: signExtend64(0xF8_00_00_02)}, // sra t0, t1, 3
{name: "sllv", funct: uint16(4), rt: Word(0x20), rs: Word(4), rsReg: uint32(0xa), expectVal: Word(0x20) << Word(4)}, // sllv t0, t1, t2
{name: "srlv", funct: uint16(6), rt: Word(0x20_00), rs: Word(4), rsReg: uint32(0xa), expectVal: Word(0x20_00) >> Word(4)}, // srlv t0, t1, t2
{name: "srav", funct: uint16(7), rt: Word(0xdeafbeef), rs: Word(12), rsReg: uint32(0xa), expectVal: exec.SignExtend(Word(0xfffdeafb), Word(32))}, // srav t0, t1, t2
Expand Down Expand Up @@ -533,7 +533,7 @@ func TestEVMSingleStep_JrJalr(t *testing.T) {
expected.PC = state.GetCpu().NextPC
expected.NextPC = state.GetRegistersRef()[rsReg]
if tt.expectLink {
expected.Registers[9] = state.GetPC() + 8
expected.Registers[tt.rdReg] = state.GetPC() + 8
}

stepWitness, err := goVm.Step(true)
Expand Down

0 comments on commit 90c0514

Please sign in to comment.