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 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.
|
// 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]TemplateLiteral[?Yield, ?Await]
|
||||||
CallExpression[?Yield, ?Await].PrivateName
|
CallExpression[?Yield, ?Await].PrivateName
|
||||||
|
|
||||||
template: syntax/valid
|
template: productions
|
||||||
features: [class-methods-private]
|
features: [class-methods-private]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//- elements
|
//- fields
|
||||||
#m = 1;
|
#m = 'test262';
|
||||||
|
//- privateinspectionfunctions
|
||||||
method() {
|
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 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.
|
// 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]TemplateLiteral[?Yield, ?Await]
|
||||||
CallExpression[?Yield, ?Await].PrivateName
|
CallExpression[?Yield, ?Await].PrivateName
|
||||||
|
|
||||||
template: syntax/valid
|
template: productions
|
||||||
features: [class-methods-private]
|
features: [class-methods-private]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//- elements
|
//- fields
|
||||||
get #m() { return 1; }
|
get #m() { return 'test262'; }
|
||||||
|
//- privateinspectionfunctions
|
||||||
method() {
|
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 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.
|
// 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]TemplateLiteral[?Yield, ?Await]
|
||||||
CallExpression[?Yield, ?Await].PrivateName
|
CallExpression[?Yield, ?Await].PrivateName
|
||||||
|
|
||||||
template: syntax/valid
|
template: productions
|
||||||
features: [class-methods-private]
|
features: [class-methods-private]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//- elements
|
//- fields
|
||||||
#m() { return 1; }
|
#m() { return 'test262'; }
|
||||||
|
//- privateinspectionfunctions
|
||||||
method() {
|
method() {
|
||||||
assert.sameValue(this.#m(), 1);
|
return this.#m();
|
||||||
}
|
}
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(c.method(), 'test262');
|
||||||
|
|
Loading…
Reference in New Issue