Commit f8ae64de authored by Shu-yu Guo's avatar Shu-yu Guo Committed by Commit Bot

[class] Remove local test262 private class field tests

Merged upstream in https://github.com/tc39/test262/commit/a31961f7ea

Bug: v8:7834
Change-Id: Ic2e0e4558357edabf3d155fdebd3bc195c12e68c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1922889
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65023}
parent 1a9c6e5f
// This file was procedurally generated from the following sources:
// - src/class-elements/private-field-on-nested-class.case
// - src/class-elements/default/cls-expr.template
/*---
description: PrivateName CallExpression usage (private field) (field definitions in a class expression)
esid: prod-FieldDefinition
features: [class-fields-private, class-fields-public, class]
flags: [generated]
info: |
Updated Productions
CallExpression[Yield, Await]:
CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
SuperCall[?Yield, ?Await]
CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
CallExpression[?Yield, ?Await].IdentifierName
CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
CallExpression[?Yield, ?Await].PrivateName
---*/
var C = class {
#outer = 'test262';
B_withoutPrivateField = class {
method(o) {
return o.#outer;
}
}
B_withPrivateField = class {
#inner = 42;
method(o) {
return o.#outer;
}
}
}
let c = new C();
let innerB1 = new c.B_withoutPrivateField();
assert.sameValue(innerB1.method(c), 'test262');
let innerB2 = new c.B_withPrivateField();
assert.sameValue(innerB2.method(c), 'test262');
// This file was procedurally generated from the following sources:
// - src/class-elements/private-field-on-nested-class.case
// - src/class-elements/default/cls-decl.template
/*---
description: PrivateName CallExpression usage (private field) (field definitions in a class declaration)
esid: prod-FieldDefinition
features: [class-fields-private, class-fields-public, class]
flags: [generated]
info: |
Updated Productions
CallExpression[Yield, Await]:
CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
SuperCall[?Yield, ?Await]
CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
CallExpression[?Yield, ?Await].IdentifierName
CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
CallExpression[?Yield, ?Await].PrivateName
---*/
class C {
#outer = 'test262';
B_withoutPrivateField = class {
method(o) {
return o.#outer;
}
}
B_withPrivateField = class {
#inner = 42;
method(o) {
return o.#outer;
}
}
}
let c = new C();
let innerB1 = new c.B_withoutPrivateField();
assert.sameValue(innerB1.method(c), 'test262');
let innerB2 = new c.B_withPrivateField();
assert.sameValue(innerB2.method(c), 'test262');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment