summaryrefslogtreecommitdiffstats
path: root/lld/test/wasm/import-memory.test
diff options
context:
space:
mode:
Diffstat (limited to 'lld/test/wasm/import-memory.test')
-rw-r--r--lld/test/wasm/import-memory.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/lld/test/wasm/import-memory.test b/lld/test/wasm/import-memory.test
index ab38c7a4800..955d2df0ea8 100644
--- a/lld/test/wasm/import-memory.test
+++ b/lld/test/wasm/import-memory.test
@@ -11,3 +11,23 @@
# CHECK-NEXT: Kind: MEMORY
# CHECK-NEXT: Memory:
# CHECK-NEXT: Initial: 0x00000002
+# CHECK-NEXT: - Type:
+
+
+
+# RUN: wasm-ld --check-signatures --import-memory --initial-memory=262144 \
+# RUN: --max-memory=327680 -o %t.max.wasm %t.start.o
+# RUN: obj2yaml %t.max.wasm | FileCheck -check-prefix=CHECK-MAX %s
+
+# Verify the --initial-memory and --max-memory arguments work with imports
+
+# CHECK-MAX: - Type: IMPORT
+# CHECK-MAX-NEXT: Imports:
+# CHECK-MAX-NEXT: - Module: env
+# CHECK-MAX-NEXT: Field: memory
+# CHECK-MAX-NEXT: Kind: MEMORY
+# CHECK-MAX-NEXT: Memory:
+# CHECK-MAX-NEXT: Flags: [ HAS_MAX ]
+# CHECK-MAX-NEXT: Initial: 0x00000004
+# CHECK-MAX-NEXT: Maximum: 0x00000005
+# CHECK-MAX-NEXT: - Type:
OpenPOWER on IntegriCloud