Skip to content

Commit

Permalink
Chore: add class static blocks tests
Browse files Browse the repository at this point in the history
acorn has been upgraded in ee1d3ec, this commit simply added some tests.
The tests were copied from test262, refs: tc39/test262@afe217b
  • Loading branch information
aladdin-add committed Sep 16, 2021
1 parent 54ed0c0 commit ce7f636
Show file tree
Hide file tree
Showing 146 changed files with 55,150 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
"index": 185,
"lineNumber": 4,
"column": 6,
"message": "Cannot use await in class static initialization block"
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// refs: https://github.com/tc39/test262/commit/afe217b318df5f197e64b30a8b5a4b391c777359/test/language/expressions/arrow-function/static-init-await-binding.js
class C {
static {
(await => 0);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
"index": 192,
"lineNumber": 4,
"column": 11,
"message": "Cannot use await in class static initialization block"
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// refs: https://github.com/tc39/test262/commit/afe217b318df5f197e64b30a8b5a4b391c777359/test/language/expressions/arrow-function/static-init-await-reference.js
class C {
static {
((x = await) => 0);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
"index": 182,
"lineNumber": 4,
"column": 12,
"message": "Cannot use await in class static initialization block"
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// refs: https://github.com/tc39/test262/commit/afe217b318df5f197e64b30a8b5a4b391c777359/test/language/expressions/class/static-init-await-binding.js
class C {
static {
(class await {});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
"index": 158,
"lineNumber": 4,
"column": 5,
"message": "Cannot use keyword 'await' outside an async function"
};
Loading

0 comments on commit ce7f636

Please sign in to comment.