-
-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: add class static blocks tests
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
1 parent
54ed0c0
commit 904094c
Showing
24 changed files
with
15,836 additions
and
0 deletions.
There are no files selected for viewing
890 changes: 890 additions & 0 deletions
890
...cma-version/13/class-static-blocks/statements-class-static-init-expr-new-target.result.js
Large diffs are not rendered by default.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
...s/ecma-version/13/class-static-blocks/statements-class-static-init-expr-new-target.src.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (C) 2021 the V8 project authors. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
/*--- | ||
esid: sec-operations-on-objects | ||
description: The "new.target" value within a static initialization block is undefined | ||
info: | | ||
2.1.1 EvaluateStaticBlock ( receiver , blockRecord ) | ||
1. Assert: Type(receiver) is Object. | ||
2. Assert: blockRecord is a ClassStaticBlockDefinition Record. | ||
3. Perform ? Call(blockRecord.[[Body]], receiver). | ||
features: [class-static-block] | ||
---*/ | ||
|
||
var value = null; | ||
|
||
class C { | ||
static { | ||
value = new.target; | ||
} | ||
} | ||
|
||
assert.sameValue(value, undefined); |
Oops, something went wrong.