mirror of https://github.com/tc39/test262.git
Update cases to use appropriate templates
This commit is contained in:
parent
a6f2446e19
commit
6a9a6f5698
|
@ -1,4 +1,5 @@
|
|||
// Copyright (C) 2018 Jaideep Bhoosreddy (Bloomberg LP). All rights reserved.
|
||||
// Copyright (C) 2018 Leo Balter. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
|
@ -15,12 +16,15 @@ info: |
|
|||
CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
|
||||
CallExpression[?Yield, ?Await].PrivateName
|
||||
|
||||
template: syntax/valid
|
||||
template: productions
|
||||
features: [class-methods-private]
|
||||
---*/
|
||||
|
||||
//- elements
|
||||
#m = 1;
|
||||
//- fields
|
||||
#m = 'test262';
|
||||
//- privateinspectionfunctions
|
||||
method() {
|
||||
assert.sameValue(this.#m, 1);
|
||||
return this.#m;
|
||||
}
|
||||
//- assertions
|
||||
assert.sameValue(c.method(), 'test262');
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// Copyright (C) 2018 Jaideep Bhoosreddy (Bloomberg LP). All rights reserved.
|
||||
// Copyright (C) 2018 Leo Balter. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
|
@ -15,12 +16,15 @@ info: |
|
|||
CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
|
||||
CallExpression[?Yield, ?Await].PrivateName
|
||||
|
||||
template: syntax/valid
|
||||
template: productions
|
||||
features: [class-methods-private]
|
||||
---*/
|
||||
|
||||
//- elements
|
||||
get #m() { return 1; }
|
||||
//- fields
|
||||
get #m() { return 'test262'; }
|
||||
//- privateinspectionfunctions
|
||||
method() {
|
||||
assert.sameValue(this.#m, 1);
|
||||
return this.#m;
|
||||
}
|
||||
//- assertions
|
||||
assert.sameValue(c.method(), 'test262');
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// Copyright (C) 2018 Jaideep Bhoosreddy (Bloomberg LP). All rights reserved.
|
||||
// Copyright (C) 2018 Leo Balter. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
|
@ -15,12 +16,15 @@ info: |
|
|||
CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
|
||||
CallExpression[?Yield, ?Await].PrivateName
|
||||
|
||||
template: syntax/valid
|
||||
template: productions
|
||||
features: [class-methods-private]
|
||||
---*/
|
||||
|
||||
//- elements
|
||||
#m() { return 1; }
|
||||
//- fields
|
||||
#m() { return 'test262'; }
|
||||
//- privateinspectionfunctions
|
||||
method() {
|
||||
assert.sameValue(this.#m(), 1);
|
||||
return this.#m();
|
||||
}
|
||||
//- assertions
|
||||
assert.sameValue(c.method(), 'test262');
|
||||
|
|
Loading…
Reference in New Issue