From 5654faf68b7ebc1aaaf5193ae31c9c08875c6d17 Mon Sep 17 00:00:00 2001 From: xucheng46 Date: Thu, 8 Sep 2022 11:06:13 +0800 Subject: [PATCH] Fix several es2abc parser tests Issue: https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/I5QA78 Test: parser Signed-off-by: xucheng46 Change-Id: Id82e5415f0cb34923eee1fecaa98604490f77f48 --- .../js/test-class-constructor-1-expected.txt | 2 +- .../js/test-import-expression-expected.txt | 2 +- .../parser/js/test-import-meta-expected.txt | 2 +- .../parser/ts/test_module_binder-expected.txt | 70 +++++++++---------- es2panda/test/parser/ts/test_module_binder.ts | 1 + 5 files changed, 39 insertions(+), 38 deletions(-) diff --git a/es2panda/test/parser/js/test-class-constructor-1-expected.txt b/es2panda/test/parser/js/test-class-constructor-1-expected.txt index 4f33b991ef..27b8d61d95 100644 --- a/es2panda/test/parser/js/test-class-constructor-1-expected.txt +++ b/es2panda/test/parser/js/test-class-constructor-1-expected.txt @@ -1 +1 @@ -SyntaxError: 'static' modifier cannot appear on a parameter. [test-class-constructor.js:18:17] \ No newline at end of file +SyntaxError: 'static' modifier cannot appear on a parameter. [test-class-constructor-1.js:18:17] diff --git a/es2panda/test/parser/js/test-import-expression-expected.txt b/es2panda/test/parser/js/test-import-expression-expected.txt index e74e061c9b..fd40f3b41a 100644 --- a/es2panda/test/parser/js/test-import-expression-expected.txt +++ b/es2panda/test/parser/js/test-import-expression-expected.txt @@ -1 +1 @@ -SyntaxError: 'import' and 'export' may appear only with 'sourceType: module' [test-import-expression.js:20:1] +SyntaxError: 'import' and 'export' may appear only with 'sourceType: module' [test-import-expression.js:22:1] diff --git a/es2panda/test/parser/js/test-import-meta-expected.txt b/es2panda/test/parser/js/test-import-meta-expected.txt index 3fa3cb7b2f..a72ea7e966 100644 --- a/es2panda/test/parser/js/test-import-meta-expected.txt +++ b/es2panda/test/parser/js/test-import-meta-expected.txt @@ -1 +1 @@ -SyntaxError: 'import' and 'export' may appear only with 'sourceType: module' [test-import-meta.js:21:1] +SyntaxError: 'import.Meta' may appear only with 'sourceType: module' [test-import-meta.js:21:14] diff --git a/es2panda/test/parser/ts/test_module_binder-expected.txt b/es2panda/test/parser/ts/test_module_binder-expected.txt index cf94fb985d..9c316602ff 100644 --- a/es2panda/test/parser/ts/test_module_binder-expected.txt +++ b/es2panda/test/parser/ts/test_module_binder-expected.txt @@ -9,11 +9,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 9 } } @@ -30,12 +30,12 @@ "decorators": [], "loc": { "start": { - "line": 2, - "column": 9 + "line": 18, + "column": 11 }, "end": { - "line": 2, - "column": 10 + "line": 18, + "column": 12 } } }, @@ -111,12 +111,12 @@ "decorators": [], "loc": { "start": { - "line": 2, - "column": 3 + "line": 18, + "column": 5 }, "end": { - "line": 2, - "column": 24 + "line": 18, + "column": 26 } } }, @@ -129,12 +129,12 @@ "decorators": [], "loc": { "start": { - "line": 2, - "column": 13 + "line": 18, + "column": 15 }, "end": { - "line": 2, - "column": 14 + "line": 18, + "column": 16 } } }, @@ -147,24 +147,24 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, - "column": 16 + "line": 18, + "column": 18 }, "end": { - "line": 2, - "column": 22 + "line": 18, + "column": 24 } } }, "decorators": [], "loc": { "start": { - "line": 2, - "column": 13 + "line": 18, + "column": 15 }, "end": { - "line": 2, - "column": 14 + "line": 18, + "column": 16 } } } @@ -172,35 +172,35 @@ "indexSignatures": [], "loc": { "start": { - "line": 2, - "column": 11 + "line": 18, + "column": 13 }, "end": { - "line": 2, - "column": 24 + "line": 18, + "column": 26 } } }, "decorators": [], "loc": { "start": { - "line": 2, - "column": 3 + "line": 18, + "column": 5 }, "end": { - "line": 2, - "column": 24 + "line": 18, + "column": 26 } } } ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -209,11 +209,11 @@ "global": false, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } @@ -225,7 +225,7 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } diff --git a/es2panda/test/parser/ts/test_module_binder.ts b/es2panda/test/parser/ts/test_module_binder.ts index 94a59026ed..8a6f5c7248 100644 --- a/es2panda/test/parser/ts/test_module_binder.ts +++ b/es2panda/test/parser/ts/test_module_binder.ts @@ -13,6 +13,7 @@ * limitations under the License. */ + module A { class A { s: string } } -- Gitee