ewasm-kernel
ewasm-kernel copied to clipboard
Update tests to support new call/create interface
Cf. https://github.com/ewasm/evm2wasm/issues/184, https://github.com/ewasm/design/issues/70. This appears to be causing issues in https://github.com/ewasm/evm2wasm/pull/196 as some of the vmTests there are failing like the below. AFAICT it's coming from https://github.com/ewasm/ewasm-kernel/blob/master/tests/interface/call.wast which needs to be updated.
# env1 env1
not ok 1076 should not have VM exception
---
operator: fail
at: checkResults (/Users/lanerettig/wip/eth/evm2wasm/tests/runVmTests.js:122:9)
stack: |-
Error: should not have VM exception
at Test.assert [as _assert] (/Users/lanerettig/wip/eth/evm2wasm/node_modules/tape/lib/test.js:225:54)
at Test.bound [as _assert] (/Users/lanerettig/wip/eth/evm2wasm/node_modules/tape/lib/test.js:77:32)
at Test.fail (/Users/lanerettig/wip/eth/evm2wasm/node_modules/tape/lib/test.js:318:10)
at Test.bound [as fail] (/Users/lanerettig/wip/eth/evm2wasm/node_modules/tape/lib/test.js:77:32)
at checkResults (/Users/lanerettig/wip/eth/evm2wasm/tests/runVmTests.js:122:9)
at runner (/Users/lanerettig/wip/eth/evm2wasm/tests/runVmTests.js:71:11)
at <anonymous>
...
vmExceptionErr: LinkError: WebAssembly Instantiation: Import #16 module="ethereum" function="call" error: imported function does not match the expected type
at VM.run (/Users/lanerettig/wip/eth/evm2wasm/node_modules/ewasm-kernel/vm.js:16:51)
at Kernel.run (/Users/lanerettig/wip/eth/evm2wasm/node_modules/ewasm-kernel/index.js:35:20)
at runner (/Users/lanerettig/wip/eth/evm2wasm/tests/runVmTests.js:67:29)
at <anonymous>