mirror of
https://github.com/pezkuwichain/wasm-instrument.git
synced 2026-06-12 17:01:05 +00:00
Add gas tests.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
(module
|
||||
(type (;0;) (func))
|
||||
(type (;1;) (func (param i32)))
|
||||
(import "env" "gas" (func (;0;) (type 1)))
|
||||
(func (;1;) (type 0)
|
||||
i32.const 3
|
||||
call 0
|
||||
i32.const 1
|
||||
if ;; label = @1
|
||||
i32.const 2
|
||||
call 0
|
||||
loop ;; label = @2
|
||||
i32.const 3
|
||||
call 0
|
||||
i32.const 123
|
||||
drop
|
||||
end
|
||||
end)
|
||||
(func (;2;) (type 0)
|
||||
i32.const 2
|
||||
call 0
|
||||
block ;; label = @1
|
||||
i32.const 1
|
||||
call 0
|
||||
end)
|
||||
(export "simple" (func 1)))
|
||||
@@ -0,0 +1,20 @@
|
||||
(module
|
||||
(type (;0;) (func (param i32 i32)))
|
||||
(type (;1;) (func))
|
||||
(type (;2;) (func (param i32)))
|
||||
(import "env" "ext_return" (func (;0;) (type 0)))
|
||||
(import "env" "memory" (memory (;0;) 1 1))
|
||||
(import "env" "gas" (func (;1;) (type 2)))
|
||||
(func (;2;) (type 1)
|
||||
i32.const 5
|
||||
call 1
|
||||
i32.const 8
|
||||
i32.const 4
|
||||
call 0
|
||||
unreachable)
|
||||
(func (;3;) (type 1)
|
||||
i32.const 1
|
||||
call 1)
|
||||
(export "call" (func 3))
|
||||
(start 2)
|
||||
(data (i32.const 8) "\01\02\03\04"))
|
||||
Reference in New Issue
Block a user