tests
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
ret > ExitSuccess
|
||||
out > 22
|
||||
out >
|
||||
err > warning: using `--invoke` with a function that returns values is experimental and may break in the future
|
||||
err >
|
||||
@@ -0,0 +1,19 @@
|
||||
(module
|
||||
(func
|
||||
(param)
|
||||
(result i32)
|
||||
(local i32 i32 i32 i32 i32)
|
||||
(i32.const 3)
|
||||
(i32.const 4)
|
||||
i32.mul
|
||||
(local.set 0)
|
||||
(i32.const 2)
|
||||
(i32.const 5)
|
||||
i32.mul
|
||||
(local.set 1)
|
||||
(local.get 0)
|
||||
(local.get 1)
|
||||
i32.add
|
||||
(local.set 2)
|
||||
(local.get 2))
|
||||
(export "main" (func 0)))
|
||||
@@ -0,0 +1 @@
|
||||
(+ (* 3 4) (* 2 5))
|
||||
@@ -0,0 +1,5 @@
|
||||
ret > ExitSuccess
|
||||
out > 555
|
||||
out >
|
||||
err > warning: using `--invoke` with a function that returns values is experimental and may break in the future
|
||||
err >
|
||||
@@ -0,0 +1,11 @@
|
||||
(module
|
||||
(func
|
||||
(param)
|
||||
(result i32)
|
||||
(local i32 i32 i32 i32 i32)
|
||||
(i32.const 0)
|
||||
(if
|
||||
(result i32)
|
||||
(then (i32.const 777))
|
||||
(else (i32.const 555))))
|
||||
(export "main" (func 0)))
|
||||
@@ -0,0 +1 @@
|
||||
(if #false 777 555)
|
||||
@@ -0,0 +1,5 @@
|
||||
ret > ExitSuccess
|
||||
out > 777
|
||||
out >
|
||||
err > warning: using `--invoke` with a function that returns values is experimental and may break in the future
|
||||
err >
|
||||
@@ -0,0 +1,11 @@
|
||||
(module
|
||||
(func
|
||||
(param)
|
||||
(result i32)
|
||||
(local i32 i32 i32 i32 i32)
|
||||
(i32.const 1)
|
||||
(if
|
||||
(result i32)
|
||||
(then (i32.const 777))
|
||||
(else (i32.const 555))))
|
||||
(export "main" (func 0)))
|
||||
@@ -0,0 +1 @@
|
||||
(if #true 777 555)
|
||||
@@ -0,0 +1 @@
|
||||
((λ (x) (* x x)) 5)
|
||||
Reference in New Issue
Block a user