mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 19:00:46 +00:00
core/vm: update tests
This commit is contained in:
parent
b1b6c46a79
commit
1bb6a01533
1 changed files with 11 additions and 13 deletions
|
|
@ -1029,12 +1029,6 @@ func TestEIP8024_Execution(t *testing.T) {
|
|||
1,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "DUPN_MISSING_IMMEDIATE",
|
||||
codeHex: "60016000808080808080808080808080808080e6",
|
||||
wantErr: &ErrStackUnderflow{},
|
||||
wantOpcode: DUPN,
|
||||
},
|
||||
{
|
||||
name: "SWAPN",
|
||||
codeHex: "600160008080808080808080808080808080806002e780",
|
||||
|
|
@ -1045,10 +1039,14 @@ func TestEIP8024_Execution(t *testing.T) {
|
|||
},
|
||||
},
|
||||
{
|
||||
name: "SWAPN_MISSING_IMMEDIATE",
|
||||
codeHex: "600160008080808080808080808080808080806002e7",
|
||||
wantErr: &ErrStackUnderflow{},
|
||||
wantOpcode: SWAPN,
|
||||
name: "EXCHANGE_MISSING_IMMEDIATE",
|
||||
codeHex: "600260008080808080600160008080808080808080e8",
|
||||
wantVals: []uint64{
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
2, // 10th from top
|
||||
0, 0, 0, 0, 0, 0,
|
||||
1, // bottom
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "EXCHANGE",
|
||||
|
|
@ -1056,8 +1054,8 @@ func TestEIP8024_Execution(t *testing.T) {
|
|||
wantVals: []uint64{2, 0, 1},
|
||||
},
|
||||
{
|
||||
name: "EXCHANGE_MISSING_IMMEDIATE",
|
||||
codeHex: "600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060016002e88f",
|
||||
name: "EXCHANGE",
|
||||
codeHex: "600080808080808080808080808080808080808080808080808080808060016002e88f",
|
||||
wantVals: []uint64{
|
||||
2,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
|
@ -1071,7 +1069,7 @@ func TestEIP8024_Execution(t *testing.T) {
|
|||
wantOpcode: SWAPN,
|
||||
},
|
||||
{
|
||||
name: "JUMP over INVALID_DUPN",
|
||||
name: "JUMP_OVER_INVALID_DUPN",
|
||||
codeHex: "600456e65b",
|
||||
wantErr: nil,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue