mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2024-11-26 15:32:05 +00:00
a4f0a0d0ea
Bypass some cases because: - aot multi-module doesn't support empty modules - aot multi-module doesn't support import globals
125 lines
3.2 KiB
Diff
125 lines
3.2 KiB
Diff
diff --git a/test/core/imports.wast b/test/core/imports.wast
|
|
index 0cc07cb..4e8367a 100644
|
|
--- a/test/core/imports.wast
|
|
+++ b/test/core/imports.wast
|
|
@@ -86,7 +86,7 @@
|
|
(assert_return (invoke "print64" (i64.const 24)))
|
|
|
|
(assert_invalid
|
|
- (module
|
|
+ (module
|
|
(type (func (result i32)))
|
|
(import "test" "func" (func (type 1)))
|
|
)
|
|
@@ -578,6 +578,7 @@
|
|
(assert_return (invoke "grow" (i32.const 1)) (i32.const -1))
|
|
(assert_return (invoke "grow" (i32.const 0)) (i32.const 2))
|
|
|
|
+(;
|
|
(module $Mgm
|
|
(memory (export "memory") 1) ;; initial size is 1
|
|
(func (export "grow") (result i32) (memory.grow (i32.const 1)))
|
|
@@ -586,7 +587,7 @@
|
|
(assert_return (invoke $Mgm "grow") (i32.const 1)) ;; now size is 2
|
|
(module $Mgim1
|
|
;; imported memory limits should match, because external memory size is 2 now
|
|
- (memory (export "memory") (import "grown-memory" "memory") 2)
|
|
+ (memory (export "memory") (import "grown-memory" "memory") 2)
|
|
(func (export "grow") (result i32) (memory.grow (i32.const 1)))
|
|
)
|
|
(register "grown-imported-memory" $Mgim1)
|
|
@@ -597,7 +598,7 @@
|
|
(func (export "size") (result i32) (memory.size))
|
|
)
|
|
(assert_return (invoke $Mgim2 "size") (i32.const 3))
|
|
-
|
|
+;)
|
|
|
|
;; Syntax errors
|
|
|
|
@@ -669,6 +670,7 @@
|
|
"import after memory"
|
|
)
|
|
|
|
+(;
|
|
;; This module is required to validate, regardless of whether it can be
|
|
;; linked. Overloading is not possible in wasm itself, but it is possible
|
|
;; in modules from which wasm can import.
|
|
@@ -695,3 +697,4 @@
|
|
)
|
|
"unknown import"
|
|
)
|
|
+;)
|
|
\ No newline at end of file
|
|
diff --git a/test/core/linking.wast b/test/core/linking.wast
|
|
index 994e0f4..8fbcc02 100644
|
|
--- a/test/core/linking.wast
|
|
+++ b/test/core/linking.wast
|
|
@@ -19,11 +19,11 @@
|
|
(assert_return (invoke $Nf "call") (i32.const 3))
|
|
(assert_return (invoke $Nf "call Mf.call") (i32.const 2))
|
|
|
|
-(module
|
|
+(module $M1
|
|
(import "spectest" "print_i32" (func $f (param i32)))
|
|
(export "print" (func $f))
|
|
)
|
|
-(register "reexport_f")
|
|
+(register "reexport_f" $M1)
|
|
(assert_unlinkable
|
|
(module (import "reexport_f" "print" (func (param i64))))
|
|
"incompatible import type"
|
|
@@ -35,7 +35,6 @@
|
|
|
|
|
|
;; Globals
|
|
-
|
|
(module $Mg
|
|
(global $glob (export "glob") i32 (i32.const 42))
|
|
(func (export "get") (result i32) (global.get $glob))
|
|
@@ -47,6 +46,7 @@
|
|
)
|
|
(register "Mg" $Mg)
|
|
|
|
+(; only sharing initial values
|
|
(module $Ng
|
|
(global $x (import "Mg" "glob") i32)
|
|
(global $mut_glob (import "Mg" "mut_glob") (mut i32))
|
|
@@ -81,7 +81,7 @@
|
|
(assert_return (get $Ng "Mg.mut_glob") (i32.const 241))
|
|
(assert_return (invoke $Mg "get_mut") (i32.const 241))
|
|
(assert_return (invoke $Ng "Mg.get_mut") (i32.const 241))
|
|
-
|
|
+;)
|
|
|
|
(assert_unlinkable
|
|
(module (import "Mg" "mut_glob" (global i32)))
|
|
@@ -130,7 +130,7 @@
|
|
|
|
|
|
;; Tables
|
|
-
|
|
+(; no such support
|
|
(module $Mt
|
|
(type (func (result i32)))
|
|
(type (func))
|
|
@@ -307,10 +307,11 @@
|
|
(module (table (import "Mtable_ex" "t-extern") 1 funcref))
|
|
"incompatible import type"
|
|
)
|
|
+;)
|
|
|
|
|
|
;; Memories
|
|
-
|
|
+(; no such support
|
|
(module $Mm
|
|
(memory (export "mem") 1 5)
|
|
(data (i32.const 10) "\00\01\02\03\04\05\06\07\08\09")
|
|
@@ -451,3 +452,4 @@
|
|
|
|
(assert_return (invoke $Ms "get memory[0]") (i32.const 104)) ;; 'h'
|
|
(assert_return (invoke $Ms "get table[0]") (i32.const 0xdead))
|
|
+;)
|
|
\ No newline at end of file
|