From 3a41065a27fc4e65d563ae983a06cbe774ad2ea7 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Tue, 6 Feb 2024 14:05:27 -0800 Subject: Properly stringify names in tests (#6279) Update identifiers used in tests to use a format supported by the new text parser, i.e. either the standard format with its limited set of allowed characters or the non-standard `$"..."` format. Notably, any name containing square or curly braces now uses the string format. Input automatically updated with this script: https://gist.github.com/tlively/4e22311736661849e641d02e521a0748 The printer is updated to properly escape names in more places as well. The logic for escaping names is moved to a common location so that the type printing logic in wasm-type.cpp can use it as well. --- test/lit/ctor-eval/array_new_data.wast | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/lit/ctor-eval/array_new_data.wast') diff --git a/test/lit/ctor-eval/array_new_data.wast b/test/lit/ctor-eval/array_new_data.wast index 90551862d..c82fb22fa 100644 --- a/test/lit/ctor-eval/array_new_data.wast +++ b/test/lit/ctor-eval/array_new_data.wast @@ -4,8 +4,8 @@ (module ;; CHECK: (type $0 (func)) - ;; CHECK: (type $[i8] (array i8)) - (type $[i8] (array i8)) + ;; CHECK: (type $"[i8]" (array i8)) + (type $"[i8]" (array i8)) ;; CHECK: (memory $0 16 17 shared) (memory $0 16 17 shared) @@ -18,7 +18,7 @@ ;; CHECK: (func $test (type $0) ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (array.new_data $[i8] $1 + ;; CHECK-NEXT: (array.new_data $"[i8]" $1 ;; CHECK-NEXT: (i32.const 16) ;; CHECK-NEXT: (i32.const 8) ;; CHECK-NEXT: ) @@ -29,7 +29,7 @@ ;; atm. In fact the module would not validate as we refer to segment 1 here ;; but after flattening only segment 0 exists. (drop - (array.new_data $[i8] $1 + (array.new_data $"[i8]" $1 (i32.const 16) (i32.const 8) ) -- cgit v1.2.3