mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 03:10:48 +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,
|
1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "DUPN_MISSING_IMMEDIATE",
|
|
||||||
codeHex: "60016000808080808080808080808080808080e6",
|
|
||||||
wantErr: &ErrStackUnderflow{},
|
|
||||||
wantOpcode: DUPN,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "SWAPN",
|
name: "SWAPN",
|
||||||
codeHex: "600160008080808080808080808080808080806002e780",
|
codeHex: "600160008080808080808080808080808080806002e780",
|
||||||
|
|
@ -1045,10 +1039,14 @@ func TestEIP8024_Execution(t *testing.T) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "SWAPN_MISSING_IMMEDIATE",
|
name: "EXCHANGE_MISSING_IMMEDIATE",
|
||||||
codeHex: "600160008080808080808080808080808080806002e7",
|
codeHex: "600260008080808080600160008080808080808080e8",
|
||||||
wantErr: &ErrStackUnderflow{},
|
wantVals: []uint64{
|
||||||
wantOpcode: SWAPN,
|
0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
2, // 10th from top
|
||||||
|
0, 0, 0, 0, 0, 0,
|
||||||
|
1, // bottom
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "EXCHANGE",
|
name: "EXCHANGE",
|
||||||
|
|
@ -1056,8 +1054,8 @@ func TestEIP8024_Execution(t *testing.T) {
|
||||||
wantVals: []uint64{2, 0, 1},
|
wantVals: []uint64{2, 0, 1},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "EXCHANGE_MISSING_IMMEDIATE",
|
name: "EXCHANGE",
|
||||||
codeHex: "600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060016002e88f",
|
codeHex: "600080808080808080808080808080808080808080808080808080808060016002e88f",
|
||||||
wantVals: []uint64{
|
wantVals: []uint64{
|
||||||
2,
|
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,
|
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,
|
wantOpcode: SWAPN,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "JUMP over INVALID_DUPN",
|
name: "JUMP_OVER_INVALID_DUPN",
|
||||||
codeHex: "600456e65b",
|
codeHex: "600456e65b",
|
||||||
wantErr: nil,
|
wantErr: nil,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue