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 28, 2021
1 parent 54ed0c0 commit 904094c
Show file tree
Hide file tree
Showing 24 changed files with 15,836 additions and 0 deletions.

Large diffs are not rendered by default.

@@ -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);

0 comments on commit 904094c

Please sign in to comment.