Update cases to use appropriate templates

This commit is contained in:
Leo Balter 2018-11-05 10:51:47 -05:00 committed by Rick Waldron
parent a6f2446e19
commit 6a9a6f5698
3 changed files with 24 additions and 12 deletions

View File

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

View File

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

View File

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