From 657176a67a72ce64a03f646b517ed5e106d0d2c7 Mon Sep 17 00:00:00 2001 From: DJ Date: Tue, 13 May 2025 19:54:30 +0900 Subject: [PATCH 1/3] [test] Add test for passive data syntax --- test/core/bulk.wast | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/core/bulk.wast b/test/core/bulk.wast index 5dcac724cf..fc8426232c 100644 --- a/test/core/bulk.wast +++ b/test/core/bulk.wast @@ -1,7 +1,10 @@ ;; segment syntax (module (memory 1) - (data "foo")) + (data) + (data "foo") + (data $d1) + (data $d2 "foo")) (module (table 3 funcref) From 2540135d8b547d339a22609693b9a4baa0640a14 Mon Sep 17 00:00:00 2001 From: DJ Date: Tue, 13 May 2025 21:21:10 +0900 Subject: [PATCH 2/3] Move test to data.wast --- test/core/bulk.wast | 5 +---- test/core/data.wast | 4 ++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/core/bulk.wast b/test/core/bulk.wast index fc8426232c..5dcac724cf 100644 --- a/test/core/bulk.wast +++ b/test/core/bulk.wast @@ -1,10 +1,7 @@ ;; segment syntax (module (memory 1) - (data) - (data "foo") - (data $d1) - (data $d2 "foo")) + (data "foo")) (module (table 3 funcref) diff --git a/test/core/data.wast b/test/core/data.wast index b1e1239753..37432ee011 100644 --- a/test/core/data.wast +++ b/test/core/data.wast @@ -16,6 +16,8 @@ (data (memory $m) (i32.const 1) "a" "" "bcd") (data (memory $m) (offset (i32.const 0))) (data (memory $m) (offset (i32.const 0)) "" "a" "bc" "") + (data) + (data "a" "" "bcd") (data $d1 (i32.const 0)) (data $d2 (i32.const 1) "a" "" "bcd") (data $d3 (offset (i32.const 0))) @@ -28,6 +30,8 @@ (data $d10 (memory $m) (i32.const 1) "a" "" "bcd") (data $d11 (memory $m) (offset (i32.const 0))) (data $d12 (memory $m) (offset (i32.const 0)) "" "a" "bc" "") + (data $d13) + (data $d14 "a" "bc" "") ) ;; Basic use From 8036fe40950bd831c4e2b9527df181fc0bbcd1c4 Mon Sep 17 00:00:00 2001 From: DJ Date: Tue, 13 May 2025 21:22:49 +0900 Subject: [PATCH 3/3] Minor tweak --- test/core/data.wast | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/data.wast b/test/core/data.wast index 37432ee011..6493864029 100644 --- a/test/core/data.wast +++ b/test/core/data.wast @@ -31,7 +31,7 @@ (data $d11 (memory $m) (offset (i32.const 0))) (data $d12 (memory $m) (offset (i32.const 0)) "" "a" "bc" "") (data $d13) - (data $d14 "a" "bc" "") + (data $d14 "a" "" "bcd") ) ;; Basic use