mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
fix test cases
This commit is contained in:
parent
bf5d9ff88c
commit
d584160a70
1 changed files with 5 additions and 5 deletions
|
|
@ -94,19 +94,19 @@ func TestStructLogMarshalingOmitEmpty(t *testing.T) {
|
|||
`{"pc":0,"op":"STOP","gas":0,"gasCost":0,"depth":0,"error":"this failed"}`},
|
||||
{"with mem", &StructLog{Memory: make([]byte, 2), MemorySize: 2},
|
||||
`{"pc":0,"op":0,"gas":"0x0","gasCost":"0x0","memory":"0x0000","memSize":2,"stack":null,"depth":0,"refund":0,"opName":"STOP"}`,
|
||||
`{"pc":0,"op":"STOP","gas":0,"gasCost":0,"depth":0,"memory":[]}`},
|
||||
`{"pc":0,"op":"STOP","gas":0,"gasCost":0,"depth":0}`},
|
||||
{"with 0-size mem", &StructLog{Memory: make([]byte, 0)},
|
||||
`{"pc":0,"op":0,"gas":"0x0","gasCost":"0x0","memSize":0,"stack":null,"depth":0,"refund":0,"opName":"STOP"}`,
|
||||
`{"pc":0,"op":"STOP","gas":0,"gasCost":0,"depth":0,"memory":[]}`},
|
||||
`{"pc":0,"op":"STOP","gas":0,"gasCost":0,"depth":0}`},
|
||||
{"with stack mem", &StructLog{Memory: make([]byte, 0), Stack: make([]uint256.Int, 0)},
|
||||
`{"pc":0,"op":0,"gas":"0x0","gasCost":"0x0","memSize":0,"stack":[],"depth":0,"refund":0,"opName":"STOP"}`,
|
||||
`{"pc":0,"op":"STOP","gas":0,"gasCost":0,"depth":0,"stack":[],"memory":[]}`},
|
||||
`{"pc":0,"op":"STOP","gas":0,"gasCost":0,"depth":0}`},
|
||||
{"with empty storage", &StructLog{Memory: make([]byte, 32), Storage: make(map[common.Hash]common.Hash)},
|
||||
`{"pc":0,"op":0,"gas":"0x0","gasCost":"0x0","memory":"0x0000000000000000000000000000000000000000000000000000000000000000","memSize":0,"stack":null,"depth":0,"refund":0,"opName":"STOP"}`,
|
||||
`{"pc":0,"op":"STOP","gas":0,"gasCost":0,"depth":0,"memory":["0000000000000000000000000000000000000000000000000000000000000000"],"storage":{}}`},
|
||||
`{"pc":0,"op":"STOP","gas":0,"gasCost":0,"depth":0,"memory":["0x0000000000000000000000000000000000000000000000000000000000000000"]}`},
|
||||
{"with storage", &StructLog{Storage: map[common.Hash]common.Hash{common.HexToHash("0x1234"): common.HexToHash("0xaabb")}},
|
||||
`{"pc":0,"op":0,"gas":"0x0","gasCost":"0x0","memSize":0,"stack":null,"depth":0,"refund":0,"opName":"STOP"}`,
|
||||
`{"pc":0,"op":"STOP","gas":0,"gasCost":0,"depth":0,"storage":{"0000000000000000000000000000000000000000000000000000000000001234":"000000000000000000000000000000000000000000000000000000000000aabb"}}`},
|
||||
`{"pc":0,"op":"STOP","gas":0,"gasCost":0,"depth":0,"storage":{"0000000000000000000000000000000000000000000000000000000000001234":"0x000000000000000000000000000000000000000000000000000000000000aabb"}}`},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
|
|
|
|||
Loading…
Reference in a new issue