From 6a9a6f5698cafece88dc57db05929c0fafd91e5f Mon Sep 17 00:00:00 2001 From: Leo Balter Date: Mon, 5 Nov 2018 10:51:47 -0500 Subject: [PATCH] Update cases to use appropriate templates --- src/class-elements/private-field-usage.case | 12 ++++++++---- src/class-elements/private-method-getter-usage.case | 12 ++++++++---- src/class-elements/private-method-usage.case | 12 ++++++++---- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/class-elements/private-field-usage.case b/src/class-elements/private-field-usage.case index 5c5b9ba0ec..f4597c3c7f 100644 --- a/src/class-elements/private-field-usage.case +++ b/src/class-elements/private-field-usage.case @@ -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'); diff --git a/src/class-elements/private-method-getter-usage.case b/src/class-elements/private-method-getter-usage.case index 59c0748a91..6a3dcea2ea 100644 --- a/src/class-elements/private-method-getter-usage.case +++ b/src/class-elements/private-method-getter-usage.case @@ -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'); diff --git a/src/class-elements/private-method-usage.case b/src/class-elements/private-method-usage.case index a671359fbe..e4f2a2684e 100644 --- a/src/class-elements/private-method-usage.case +++ b/src/class-elements/private-method-usage.case @@ -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');