From 3168b92b97f07af9ed7e8a2b533baab918a5a109 Mon Sep 17 00:00:00 2001 From: Goran Rojovic Date: Tue, 20 Feb 2024 09:28:31 +0100 Subject: [PATCH] Remove unnecessary case --- state/runtime/evm/instructions_test.go | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/state/runtime/evm/instructions_test.go b/state/runtime/evm/instructions_test.go index 0830da9d64..0dca1631f9 100644 --- a/state/runtime/evm/instructions_test.go +++ b/state/runtime/evm/instructions_test.go @@ -872,28 +872,15 @@ func TestCallValue(t *testing.T) { } func TestCallDataLoad(t *testing.T) { - t.Run("NonZeroOffset", func(t *testing.T) { - s, cancelFn := getState(&chain.ForksInTime{}) - defer cancelFn() - - s.push(one) - - s.msg = &runtime.Contract{Input: big.NewInt(7).Bytes()} - - opCallDataLoad(s) - assert.Equal(t, zero.Uint64(), s.pop().Uint64()) - }) - t.Run("ZeroOffset", func(t *testing.T) { - s, cancelFn := getState(&chain.ForksInTime{}) - defer cancelFn() + s, cancelFn := getState(&chain.ForksInTime{}) + defer cancelFn() - s.push(zero) + s.push(one) - s.msg = &runtime.Contract{Input: big.NewInt(7).Bytes()} + s.msg = &runtime.Contract{Input: big.NewInt(7).Bytes()} - opCallDataLoad(s) - assert.NotEqual(t, zero.Uint64(), s.pop().Uint64()) - }) + opCallDataLoad(s) + assert.Equal(t, zero.Uint64(), s.pop().Uint64()) } func TestCallDataSize(t *testing.T) {