|
|
|
@ -118,8 +118,8 @@ func testTwoOperandOp(t *testing.T, tests []TwoOperandTestcase, opFn executionFu |
|
|
|
|
stack.push(x) |
|
|
|
|
stack.push(y) |
|
|
|
|
opFn(&pc, evmInterpreter, &ScopeContext{nil, stack, nil}) |
|
|
|
|
if len(stack.data) != 1 { |
|
|
|
|
t.Errorf("Expected one item on stack after %v, got %d: ", name, len(stack.data)) |
|
|
|
|
if stack.len() != 1 { |
|
|
|
|
t.Errorf("Expected one item on stack after %v, got %d: ", name, stack.len()) |
|
|
|
|
} |
|
|
|
|
actual := stack.pop() |
|
|
|
|
|
|
|
|
@ -735,8 +735,8 @@ func TestRandom(t *testing.T) { |
|
|
|
|
evmInterpreter = env.interpreter |
|
|
|
|
) |
|
|
|
|
opRandom(&pc, evmInterpreter, &ScopeContext{nil, stack, nil}) |
|
|
|
|
if len(stack.data) != 1 { |
|
|
|
|
t.Errorf("Expected one item on stack after %v, got %d: ", tt.name, len(stack.data)) |
|
|
|
|
if have, want := stack.len(), 1; have != want { |
|
|
|
|
t.Errorf("test '%v': want %d item(s) on stack, have %d: ", tt.name, have, want) |
|
|
|
|
} |
|
|
|
|
actual := stack.pop() |
|
|
|
|
expected, overflow := uint256.FromBig(new(big.Int).SetBytes(tt.random.Bytes())) |
|
|
|
@ -777,8 +777,8 @@ func TestBlobHash(t *testing.T) { |
|
|
|
|
) |
|
|
|
|
stack.push(uint256.NewInt(tt.idx)) |
|
|
|
|
opBlobHash(&pc, evmInterpreter, &ScopeContext{nil, stack, nil}) |
|
|
|
|
if len(stack.data) != 1 { |
|
|
|
|
t.Errorf("Expected one item on stack after %v, got %d: ", tt.name, len(stack.data)) |
|
|
|
|
if have, want := stack.len(), 1; have != want { |
|
|
|
|
t.Errorf("test '%v': want %d item(s) on stack, have %d: ", tt.name, have, want) |
|
|
|
|
} |
|
|
|
|
actual := stack.pop() |
|
|
|
|
expected, overflow := uint256.FromBig(new(big.Int).SetBytes(tt.expect.Bytes())) |
|
|
|
|