diff --git a/test/built-ins/Function/prototype/toString/AsyncGenerator.js b/test/built-ins/Function/prototype/toString/AsyncGenerator.js new file mode 100644 index 0000000000..43cce215e9 --- /dev/null +++ b/test/built-ins/Function/prototype/toString/AsyncGenerator.js @@ -0,0 +1,16 @@ +// Copyright 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: pending +description: > + Function.prototype.toString on an async generator created with the + AsyncGenerator constructor. +features: [async-iteration] +---*/ + +async function* f() {} +var AsyncGenerator = f.constructor; + +var g = /* before */AsyncGenerator("a", " /* a */ b, c /* b */ //", "/* c */ ; /* d */ //")/* after */; +assert.sameValue(g.toString(), "async function* anonymous(a, /* a */ b, c /* b */ //\n) {\n/* c */ ; /* d */ //\n}"); diff --git a/test/built-ins/Function/prototype/toString/async-arrow-function.js b/test/built-ins/Function/prototype/toString/async-arrow-function.js new file mode 100644 index 0000000000..39a2a03886 --- /dev/null +++ b/test/built-ins/Function/prototype/toString/async-arrow-function.js @@ -0,0 +1,16 @@ +// Copyright 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-async-arrow-function-definitions-runtime-semantics-evaluation +description: Function.prototype.toString on an async arrow function +features: [async-functions] +---*/ + +let f = /* before */async /* a */ ( /* b */ a /* c */ , /* d */ b /* e */ ) /* f */ => /* g */ { /* h */ ; /* i */ }/* after */; +let g = /* before */async /* a */ ( /* b */ ) /* c */ => /* d */ 0/* after */; +let h = /* before */async /* a */ a /* b */ => /* c */ 0/* after */; + +assert.sameValue(f.toString(), "async /* a */ ( /* b */ a /* c */ , /* d */ b /* e */ ) /* f */ => /* g */ { /* h */ ; /* i */ }"); +assert.sameValue(g.toString(), "async /* a */ ( /* b */ ) /* c */ => /* d */ 0"); +assert.sameValue(h.toString(), "async /* a */ a /* b */ => /* c */ 0"); diff --git a/test/built-ins/Function/prototype/toString/async-function-expression.js b/test/built-ins/Function/prototype/toString/async-function-expression.js index 8e7a8bf9ea..6b7f26bd5c 100644 --- a/test/built-ins/Function/prototype/toString/async-function-expression.js +++ b/test/built-ins/Function/prototype/toString/async-function-expression.js @@ -8,6 +8,8 @@ description: Function.prototype.toString on an async function expression features: [async-functions] ---*/ -let f = /* before */async function /* a */ f /* b */ ( /* c */ x /* d */ , /* e */ y /* f */ ) /* g */ { /* h */ ; /* i */ ; /* j */ }/* after */; +let f = /* before */async function /* a */ F /* b */ ( /* c */ x /* d */ , /* e */ y /* f */ ) /* g */ { /* h */ ; /* i */ ; /* j */ }/* after */; +let g = /* before */async function /* a */ ( /* b */ x /* c */ , /* d */ y /* e */ ) /* f */ { /* g */ ; /* h */ ; /* i */ }/* after */; -assert.sameValue(f.toString(), "async function /* a */ f /* b */ ( /* c */ x /* d */ , /* e */ y /* f */ ) /* g */ { /* h */ ; /* i */ ; /* j */ }"); +assert.sameValue(f.toString(), "async function /* a */ F /* b */ ( /* c */ x /* d */ , /* e */ y /* f */ ) /* g */ { /* h */ ; /* i */ ; /* j */ }"); +assert.sameValue(g.toString(), "async function /* a */ ( /* b */ x /* c */ , /* d */ y /* e */ ) /* f */ { /* g */ ; /* h */ ; /* i */ }"); diff --git a/test/built-ins/Function/prototype/toString/async-generator-declaration.js b/test/built-ins/Function/prototype/toString/async-generator-declaration.js new file mode 100644 index 0000000000..9a5bb3f3db --- /dev/null +++ b/test/built-ins/Function/prototype/toString/async-generator-declaration.js @@ -0,0 +1,12 @@ +// Copyright 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: pending +description: Function.prototype.toString on an async generator declaration +features: [async-iteration] +---*/ + +/* before */async /* a */ function /* b */ * /* c */ f /* d */ ( /* e */ x /* f */ , /* g */ y /* h */ ) /* i */ { /* j */ ; /* k */ ; /* l */ }/* after */ + +assert.sameValue(f.toString(), "async /* a */ function /* b */ * /* c */ f /* d */ ( /* e */ x /* f */ , /* g */ y /* h */ ) /* i */ { /* j */ ; /* k */ ; /* l */ }"); diff --git a/test/built-ins/Function/prototype/toString/async-generator-expression.js b/test/built-ins/Function/prototype/toString/async-generator-expression.js new file mode 100644 index 0000000000..60a712820d --- /dev/null +++ b/test/built-ins/Function/prototype/toString/async-generator-expression.js @@ -0,0 +1,14 @@ +// Copyright 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: pending +description: Function.prototype.toString on an async generator expression +features: [async-iteration] +---*/ + +let f = /* before */async /* a */ function /* b */ * /* c */ F /* d */ ( /* e */ x /* f */ , /* g */ y /* h */ ) /* i */ { /* j */ ; /* k */ ; /* l */ }/* after */; +let g = /* before */async /* a */ function /* b */ * /* c */ ( /* d */ x /* e */ , /* f */ y /* g */ ) /* h */ { /* i */ ; /* j */ ; /* k */ }/* after */; + +assert.sameValue(f.toString(), "async /* a */ function /* b */ * /* c */ F /* d */ ( /* e */ x /* f */ , /* g */ y /* h */ ) /* i */ { /* j */ ; /* k */ ; /* l */ }"); +assert.sameValue(g.toString(), "async /* a */ function /* b */ * /* c */ ( /* d */ x /* e */ , /* f */ y /* g */ ) /* h */ { /* i */ ; /* j */ ; /* k */ }"); diff --git a/test/built-ins/Function/prototype/toString/async-generator-method-class-expression-static.js b/test/built-ins/Function/prototype/toString/async-generator-method-class-expression-static.js new file mode 100644 index 0000000000..03ac897e2c --- /dev/null +++ b/test/built-ins/Function/prototype/toString/async-generator-method-class-expression-static.js @@ -0,0 +1,17 @@ +// Copyright 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: pending +description: Function.prototype.toString on an async generator method +features: [async-iteration] +---*/ + +let x = "h"; +let f = class { static /* before */async /* a */ * /* b */ f /* c */ ( /* d */ ) /* e */ { /* f */ }/* after */ }.f; +let g = class { static /* before */async /* a */ * /* b */ [ /* c */ "g" /* d */ ] /* e */ ( /* f */ ) /* g */ { /* h */ }/* after */ }.g; +let h = class { static /* before */async /* a */ * /* b */ [ /* c */ x /* d */ ] /* e */ ( /* f */ ) /* g */ { /* h */ }/* after */ }.h; + +assert.sameValue(f.toString(), "async /* a */ * /* b */ f /* c */ ( /* d */ ) /* e */ { /* f */ }"); +assert.sameValue(g.toString(), "async /* a */ * /* b */ [ /* c */ \"g\" /* d */ ] /* e */ ( /* f */ ) /* g */ { /* h */ }"); +assert.sameValue(h.toString(), "async /* a */ * /* b */ [ /* c */ x /* d */ ] /* e */ ( /* f */ ) /* g */ { /* h */ }"); diff --git a/test/built-ins/Function/prototype/toString/async-generator-method-class-expression.js b/test/built-ins/Function/prototype/toString/async-generator-method-class-expression.js new file mode 100644 index 0000000000..3c98485583 --- /dev/null +++ b/test/built-ins/Function/prototype/toString/async-generator-method-class-expression.js @@ -0,0 +1,17 @@ +// Copyright 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: pending +description: Function.prototype.toString on an async generator method +features: [async-iteration] +---*/ + +let x = "h"; +let f = class { /* before */async /* a */ * /* b */ f /* c */ ( /* d */ ) /* e */ { /* f */ }/* after */ }.prototype.f; +let g = class { /* before */async /* a */ * /* b */ [ /* c */ "g" /* d */ ] /* e */ ( /* f */ ) /* g */ { /* h */ }/* after */ }.prototype.g; +let h = class { /* before */async /* a */ * /* b */ [ /* c */ x /* d */ ] /* e */ ( /* f */ ) /* g */ { /* h */ }/* after */ }.prototype.h; + +assert.sameValue(f.toString(), "async /* a */ * /* b */ f /* c */ ( /* d */ ) /* e */ { /* f */ }"); +assert.sameValue(g.toString(), "async /* a */ * /* b */ [ /* c */ \"g\" /* d */ ] /* e */ ( /* f */ ) /* g */ { /* h */ }"); +assert.sameValue(h.toString(), "async /* a */ * /* b */ [ /* c */ x /* d */ ] /* e */ ( /* f */ ) /* g */ { /* h */ }"); diff --git a/test/built-ins/Function/prototype/toString/async-generator-method-class-statement-static.js b/test/built-ins/Function/prototype/toString/async-generator-method-class-statement-static.js new file mode 100644 index 0000000000..58d5835eba --- /dev/null +++ b/test/built-ins/Function/prototype/toString/async-generator-method-class-statement-static.js @@ -0,0 +1,21 @@ +// Copyright 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: pending +description: Function.prototype.toString on an async generator method +features: [async-iteration] +---*/ + +let x = "h"; +class F { static /* before */async /* a */ * /* b */ f /* c */ ( /* d */ ) /* e */ { /* f */ }/* after */ } +class G { static /* before */async /* a */ * /* b */ [ /* c */ "g" /* d */ ] /* e */ ( /* f */ ) /* g */ { /* h */ }/* after */ } +class H { static /* before */async /* a */ * /* b */ [ /* c */ x /* d */ ] /* e */ ( /* f */ ) /* g */ { /* h */ }/* after */ } + +let f = F.f; +let g = G.g; +let h = H.h; + +assert.sameValue(f.toString(), "async /* a */ * /* b */ f /* c */ ( /* d */ ) /* e */ { /* f */ }"); +assert.sameValue(g.toString(), "async /* a */ * /* b */ [ /* c */ \"g\" /* d */ ] /* e */ ( /* f */ ) /* g */ { /* h */ }"); +assert.sameValue(h.toString(), "async /* a */ * /* b */ [ /* c */ x /* d */ ] /* e */ ( /* f */ ) /* g */ { /* h */ }"); diff --git a/test/built-ins/Function/prototype/toString/async-generator-method-class-statement.js b/test/built-ins/Function/prototype/toString/async-generator-method-class-statement.js new file mode 100644 index 0000000000..1001b983c5 --- /dev/null +++ b/test/built-ins/Function/prototype/toString/async-generator-method-class-statement.js @@ -0,0 +1,21 @@ +// Copyright 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: pending +description: Function.prototype.toString on an async generator method +features: [async-iteration] +---*/ + +let x = "h"; +class F { /* before */async /* a */ * /* b */ f /* c */ ( /* d */ ) /* e */ { /* f */ }/* after */ } +class G { /* before */async /* a */ * /* b */ [ /* c */ "g" /* d */ ] /* e */ ( /* f */ ) /* g */ { /* h */ }/* after */ } +class H { /* before */async /* a */ * /* b */ [ /* c */ x /* d */ ] /* e */ ( /* f */ ) /* g */ { /* h */ }/* after */ } + +let f = F.prototype.f; +let g = G.prototype.g; +let h = H.prototype.h; + +assert.sameValue(f.toString(), "async /* a */ * /* b */ f /* c */ ( /* d */ ) /* e */ { /* f */ }"); +assert.sameValue(g.toString(), "async /* a */ * /* b */ [ /* c */ \"g\" /* d */ ] /* e */ ( /* f */ ) /* g */ { /* h */ }"); +assert.sameValue(h.toString(), "async /* a */ * /* b */ [ /* c */ x /* d */ ] /* e */ ( /* f */ ) /* g */ { /* h */ }"); diff --git a/test/built-ins/Function/prototype/toString/async-generator-method-object.js b/test/built-ins/Function/prototype/toString/async-generator-method-object.js new file mode 100644 index 0000000000..58a274a851 --- /dev/null +++ b/test/built-ins/Function/prototype/toString/async-generator-method-object.js @@ -0,0 +1,17 @@ +// Copyright 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: pending +description: Function.prototype.toString on an async generator method +features: [async-iteration] +---*/ + +let x = "h"; +let f = { /* before */async /* a */ * /* b */ f /* c */ ( /* d */ ) /* e */ { /* f */ }/* after */ }.f; +let g = { /* before */async /* a */ * /* b */ [ /* c */ "g" /* d */ ] /* e */ ( /* f */ ) /* g */ { /* h */ }/* after */ }.g; +let h = { /* before */async /* a */ * /* b */ [ /* c */ x /* d */ ] /* e */ ( /* f */ ) /* g */ { /* h */ }/* after */ }.h; + +assert.sameValue(f.toString(), "async /* a */ * /* b */ f /* c */ ( /* d */ ) /* e */ { /* f */ }"); +assert.sameValue(g.toString(), "async /* a */ * /* b */ [ /* c */ \"g\" /* d */ ] /* e */ ( /* f */ ) /* g */ { /* h */ }"); +assert.sameValue(h.toString(), "async /* a */ * /* b */ [ /* c */ x /* d */ ] /* e */ ( /* f */ ) /* g */ { /* h */ }"); diff --git a/test/built-ins/Function/prototype/toString/async-method-class-expression-static.js b/test/built-ins/Function/prototype/toString/async-method-class-expression-static.js new file mode 100644 index 0000000000..8388c4dda5 --- /dev/null +++ b/test/built-ins/Function/prototype/toString/async-method-class-expression-static.js @@ -0,0 +1,17 @@ +// Copyright 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: pending +description: Function.prototype.toString on an async method +features: [async-functions] +---*/ + +let x = "h"; +let f = class { static /* before */async f /* a */ ( /* b */ ) /* c */ { /* d */ }/* after */ }.f; +let g = class { static /* before */async /* a */ [ /* b */ "g" /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }/* after */ }.g; +let h = class { static /* before */async /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }/* after */ }.h; + +assert.sameValue(f.toString(), "async f /* a */ ( /* b */ ) /* c */ { /* d */ }"); +assert.sameValue(g.toString(), "async /* a */ [ /* b */ \"g\" /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }"); +assert.sameValue(h.toString(), "async /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }"); diff --git a/test/built-ins/Function/prototype/toString/async-method-class-expression.js b/test/built-ins/Function/prototype/toString/async-method-class-expression.js new file mode 100644 index 0000000000..dcacd9c9dd --- /dev/null +++ b/test/built-ins/Function/prototype/toString/async-method-class-expression.js @@ -0,0 +1,17 @@ +// Copyright 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: pending +description: Function.prototype.toString on an async method +features: [async-functions] +---*/ + +let x = "h"; +let f = class { /* before */async f /* a */ ( /* b */ ) /* c */ { /* d */ }/* after */ }.prototype.f; +let g = class { /* before */async /* a */ [ /* b */ "g" /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }/* after */ }.prototype.g; +let h = class { /* before */async /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }/* after */ }.prototype.h; + +assert.sameValue(f.toString(), "async f /* a */ ( /* b */ ) /* c */ { /* d */ }"); +assert.sameValue(g.toString(), "async /* a */ [ /* b */ \"g\" /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }"); +assert.sameValue(h.toString(), "async /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }"); diff --git a/test/built-ins/Function/prototype/toString/async-method-class-statement-static.js b/test/built-ins/Function/prototype/toString/async-method-class-statement-static.js new file mode 100644 index 0000000000..56e27d0ead --- /dev/null +++ b/test/built-ins/Function/prototype/toString/async-method-class-statement-static.js @@ -0,0 +1,21 @@ +// Copyright 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: pending +description: Function.prototype.toString on an async method +features: [async-functions] +---*/ + +let x = "h"; +class F { static /* before */async f /* a */ ( /* b */ ) /* c */ { /* d */ }/* after */ } +class G { static /* before */async /* a */ [ /* b */ "g" /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }/* after */ } +class H { static /* before */async /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }/* after */ } + +let f = F.f; +let g = G.g; +let h = H.h; + +assert.sameValue(f.toString(), "async f /* a */ ( /* b */ ) /* c */ { /* d */ }"); +assert.sameValue(g.toString(), "async /* a */ [ /* b */ \"g\" /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }"); +assert.sameValue(h.toString(), "async /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }"); diff --git a/test/built-ins/Function/prototype/toString/async-method-class-statement.js b/test/built-ins/Function/prototype/toString/async-method-class-statement.js new file mode 100644 index 0000000000..50f512607f --- /dev/null +++ b/test/built-ins/Function/prototype/toString/async-method-class-statement.js @@ -0,0 +1,21 @@ +// Copyright 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: pending +description: Function.prototype.toString on an async method +features: [async-functions] +---*/ + +let x = "h"; +class F { /* before */async f /* a */ ( /* b */ ) /* c */ { /* d */ }/* after */ } +class G { /* before */async /* a */ [ /* b */ "g" /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }/* after */ } +class H { /* before */async /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }/* after */ } + +let f = F.prototype.f; +let g = G.prototype.g; +let h = H.prototype.h; + +assert.sameValue(f.toString(), "async f /* a */ ( /* b */ ) /* c */ { /* d */ }"); +assert.sameValue(g.toString(), "async /* a */ [ /* b */ \"g\" /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }"); +assert.sameValue(h.toString(), "async /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }"); diff --git a/test/built-ins/Function/prototype/toString/async-method.js b/test/built-ins/Function/prototype/toString/async-method-object.js similarity index 74% rename from test/built-ins/Function/prototype/toString/async-method.js rename to test/built-ins/Function/prototype/toString/async-method-object.js index d711ec5bec..de117ed4f1 100644 --- a/test/built-ins/Function/prototype/toString/async-method.js +++ b/test/built-ins/Function/prototype/toString/async-method-object.js @@ -8,8 +8,11 @@ description: Function.prototype.toString on an async method features: [async-functions] ---*/ +let x = "h"; let f = { /* before */async f /* a */ ( /* b */ ) /* c */ { /* d */ }/* after */ }.f; let g = { /* before */async /* a */ [ /* b */ "g" /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }/* after */ }.g; +let h = { /* before */async /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }/* after */ }.h; assert.sameValue(f.toString(), "async f /* a */ ( /* b */ ) /* c */ { /* d */ }"); assert.sameValue(g.toString(), "async /* a */ [ /* b */ \"g\" /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }"); +assert.sameValue(h.toString(), "async /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }"); diff --git a/test/built-ins/Function/prototype/toString/function-expression.js b/test/built-ins/Function/prototype/toString/function-expression.js index 7ff4503f57..b1bcedaf49 100644 --- a/test/built-ins/Function/prototype/toString/function-expression.js +++ b/test/built-ins/Function/prototype/toString/function-expression.js @@ -6,6 +6,8 @@ esid: sec-function-definitions-runtime-semantics-evaluation description: Function.prototype.toString on a function expression ---*/ -let f = /* before */function /* a */ f /* b */ ( /* c */ x /* d */ , /* e */ y /* f */ ) /* g */ { /* h */ ; /* i */ ; /* j */ }/* after */; +let f = /* before */function /* a */ F /* b */ ( /* c */ x /* d */ , /* e */ y /* f */ ) /* g */ { /* h */ ; /* i */ ; /* j */ }/* after */; +let g = /* before */function /* a */ ( /* b */ x /* c */ , /* d */ y /* e */ ) /* f */ { /* g */ ; /* h */ ; /* i */ }/* after */; -assert.sameValue(f.toString(), "function /* a */ f /* b */ ( /* c */ x /* d */ , /* e */ y /* f */ ) /* g */ { /* h */ ; /* i */ ; /* j */ }"); +assert.sameValue(f.toString(), "function /* a */ F /* b */ ( /* c */ x /* d */ , /* e */ y /* f */ ) /* g */ { /* h */ ; /* i */ ; /* j */ }"); +assert.sameValue(g.toString(), "function /* a */ ( /* b */ x /* c */ , /* d */ y /* e */ ) /* f */ { /* g */ ; /* h */ ; /* i */ }"); diff --git a/test/built-ins/Function/prototype/toString/generator-function-expression.js b/test/built-ins/Function/prototype/toString/generator-function-expression.js index 012d98d6a8..d175055ec1 100644 --- a/test/built-ins/Function/prototype/toString/generator-function-expression.js +++ b/test/built-ins/Function/prototype/toString/generator-function-expression.js @@ -6,6 +6,8 @@ esid: sec-generator-function-definitions-runtime-semantics-evaluation description: Function.prototype.toString on a generator function expression ---*/ -let g = /* before */function /* a */ * /* b */ name /* c */ ( /* d */ x /* e */ , /* f */ y /* g */ ) /* h */ { /* i */ ; /* j */ ; /* k */ }/* after */ +let f = /* before */function /* a */ * /* b */ F /* c */ ( /* d */ x /* e */ , /* f */ y /* g */ ) /* h */ { /* i */ ; /* j */ ; /* k */ }/* after */ +let g = /* before */function /* a */ * /* b */ ( /* c */ x /* d */ , /* e */ y /* f */ ) /* g */ { /* h */ ; /* i */ ; /* j */ }/* after */ -assert.sameValue(g.toString(), "function /* a */ * /* b */ name /* c */ ( /* d */ x /* e */ , /* f */ y /* g */ ) /* h */ { /* i */ ; /* j */ ; /* k */ }"); +assert.sameValue(f.toString(), "function /* a */ * /* b */ F /* c */ ( /* d */ x /* e */ , /* f */ y /* g */ ) /* h */ { /* i */ ; /* j */ ; /* k */ }"); +assert.sameValue(g.toString(), "function /* a */ * /* b */ ( /* c */ x /* d */ , /* e */ y /* f */ ) /* g */ { /* h */ ; /* i */ ; /* j */ }"); diff --git a/test/built-ins/Function/prototype/toString/generator-method.js b/test/built-ins/Function/prototype/toString/generator-method.js index 60f6ceff34..f5cb5d2187 100644 --- a/test/built-ins/Function/prototype/toString/generator-method.js +++ b/test/built-ins/Function/prototype/toString/generator-method.js @@ -6,8 +6,11 @@ esid: sec-generator-function-definitions-runtime-semantics-propertydefinitioneva description: Function.prototype.toString on a generator method ---*/ +let x = "h"; let f = { /* before */* /* a */ f /* b */ ( /* c */ ) /* d */ { /* e */ }/* after */ }.f; let g = { /* before */* /* a */ [ /* b */ "g" /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }/* after */ }.g; +let h = { /* before */* /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }/* after */ }.h; assert.sameValue(f.toString(), "* /* a */ f /* b */ ( /* c */ ) /* d */ { /* e */ }"); assert.sameValue(g.toString(), "* /* a */ [ /* b */ \"g\" /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }"); +assert.sameValue(h.toString(), "* /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }"); diff --git a/test/built-ins/Function/prototype/toString/getter-class-static.js b/test/built-ins/Function/prototype/toString/getter-class-expression-static.js similarity index 73% rename from test/built-ins/Function/prototype/toString/getter-class-static.js rename to test/built-ins/Function/prototype/toString/getter-class-expression-static.js index 27a41a3b9e..009d92127b 100644 --- a/test/built-ins/Function/prototype/toString/getter-class-static.js +++ b/test/built-ins/Function/prototype/toString/getter-class-expression-static.js @@ -6,8 +6,11 @@ esid: sec-method-definitions-runtime-semantics-propertydefinitionevaluation description: Function.prototype.toString on a getter (class; static) ---*/ +let x = "h"; let f = Object.getOwnPropertyDescriptor(class { static /* before */get /* a */ f /* b */ ( /* c */ ) /* d */ { /* e */ }/* after */ }, "f").get; let g = Object.getOwnPropertyDescriptor(class { static /* before */get /* a */ [ /* b */ "g" /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }/* after */ }, "g").get; +let h = Object.getOwnPropertyDescriptor(class { static /* before */get /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }/* after */ }, "h").get; assert.sameValue(f.toString(), "get /* a */ f /* b */ ( /* c */ ) /* d */ { /* e */ }"); assert.sameValue(g.toString(), "get /* a */ [ /* b */ \"g\" /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }"); +assert.sameValue(h.toString(), "get /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }"); diff --git a/test/built-ins/Function/prototype/toString/getter-class.js b/test/built-ins/Function/prototype/toString/getter-class-expression.js similarity index 73% rename from test/built-ins/Function/prototype/toString/getter-class.js rename to test/built-ins/Function/prototype/toString/getter-class-expression.js index 91d584a6dc..7b3eef410a 100644 --- a/test/built-ins/Function/prototype/toString/getter-class.js +++ b/test/built-ins/Function/prototype/toString/getter-class-expression.js @@ -6,8 +6,11 @@ esid: sec-method-definitions-runtime-semantics-propertydefinitionevaluation description: Function.prototype.toString on a getter (class) ---*/ +let x = "h"; let f = Object.getOwnPropertyDescriptor(class { /* before */get /* a */ f /* b */ ( /* c */ ) /* d */ { /* e */ }/* after */ }.prototype, "f").get; let g = Object.getOwnPropertyDescriptor(class { /* before */get /* a */ [ /* b */ "g" /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }/* after */ }.prototype, "g").get; +let h = Object.getOwnPropertyDescriptor(class { /* before */get /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }/* after */ }.prototype, "h").get; assert.sameValue(f.toString(), "get /* a */ f /* b */ ( /* c */ ) /* d */ { /* e */ }"); assert.sameValue(g.toString(), "get /* a */ [ /* b */ \"g\" /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }"); +assert.sameValue(h.toString(), "get /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }"); diff --git a/test/built-ins/Function/prototype/toString/getter-class-statement-static.js b/test/built-ins/Function/prototype/toString/getter-class-statement-static.js new file mode 100644 index 0000000000..4ac72bccdd --- /dev/null +++ b/test/built-ins/Function/prototype/toString/getter-class-statement-static.js @@ -0,0 +1,20 @@ +// Copyright (C) 2016 Michael Ficarra. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-method-definitions-runtime-semantics-propertydefinitionevaluation +description: Function.prototype.toString on a getter (class; static) +---*/ + +let x = "h"; +class F { static /* before */get /* a */ f /* b */ ( /* c */ ) /* d */ { /* e */ }/* after */ } +class G { static /* before */get /* a */ [ /* b */ "g" /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }/* after */ } +class H { static /* before */get /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }/* after */ } + +let f = Object.getOwnPropertyDescriptor(F, "f").get; +let g = Object.getOwnPropertyDescriptor(G, "g").get; +let h = Object.getOwnPropertyDescriptor(H, "h").get; + +assert.sameValue(f.toString(), "get /* a */ f /* b */ ( /* c */ ) /* d */ { /* e */ }"); +assert.sameValue(g.toString(), "get /* a */ [ /* b */ \"g\" /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }"); +assert.sameValue(h.toString(), "get /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }"); diff --git a/test/built-ins/Function/prototype/toString/getter-class-statement.js b/test/built-ins/Function/prototype/toString/getter-class-statement.js new file mode 100644 index 0000000000..83139c33c4 --- /dev/null +++ b/test/built-ins/Function/prototype/toString/getter-class-statement.js @@ -0,0 +1,20 @@ +// Copyright (C) 2016 Michael Ficarra. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-method-definitions-runtime-semantics-propertydefinitionevaluation +description: Function.prototype.toString on a getter (class) +---*/ + +let x = "h"; +class F { /* before */get /* a */ f /* b */ ( /* c */ ) /* d */ { /* e */ }/* after */ } +class G { /* before */get /* a */ [ /* b */ "g" /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }/* after */ } +class H { /* before */get /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }/* after */ } + +let f = Object.getOwnPropertyDescriptor(F.prototype, "f").get; +let g = Object.getOwnPropertyDescriptor(G.prototype, "g").get; +let h = Object.getOwnPropertyDescriptor(H.prototype, "h").get; + +assert.sameValue(f.toString(), "get /* a */ f /* b */ ( /* c */ ) /* d */ { /* e */ }"); +assert.sameValue(g.toString(), "get /* a */ [ /* b */ \"g\" /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }"); +assert.sameValue(h.toString(), "get /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }"); diff --git a/test/built-ins/Function/prototype/toString/getter-object.js b/test/built-ins/Function/prototype/toString/getter-object.js index e2859484ee..3e794d04bd 100644 --- a/test/built-ins/Function/prototype/toString/getter-object.js +++ b/test/built-ins/Function/prototype/toString/getter-object.js @@ -6,8 +6,11 @@ esid: sec-method-definitions-runtime-semantics-propertydefinitionevaluation description: Function.prototype.toString on a getter (object) ---*/ +let x = "h"; let f = Object.getOwnPropertyDescriptor({ /* before */get /* a */ f /* b */ ( /* c */ ) /* d */ { /* e */ }/* after */ }, "f").get; let g = Object.getOwnPropertyDescriptor({ /* before */get /* a */ [ /* b */ "g" /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }/* after */ }, "g").get; +let h = Object.getOwnPropertyDescriptor({ /* before */get /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }/* after */ }, "h").get; assert.sameValue(f.toString(), "get /* a */ f /* b */ ( /* c */ ) /* d */ { /* e */ }"); assert.sameValue(g.toString(), "get /* a */ [ /* b */ \"g\" /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }"); +assert.sameValue(h.toString(), "get /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ ) /* f */ { /* g */ }"); diff --git a/test/built-ins/Function/prototype/toString/method-class-static.js b/test/built-ins/Function/prototype/toString/method-class-expression-static.js similarity index 74% rename from test/built-ins/Function/prototype/toString/method-class-static.js rename to test/built-ins/Function/prototype/toString/method-class-expression-static.js index 5ebb90c744..9a81f8f10f 100644 --- a/test/built-ins/Function/prototype/toString/method-class-static.js +++ b/test/built-ins/Function/prototype/toString/method-class-expression-static.js @@ -6,8 +6,11 @@ esid: sec-runtime-semantics-definemethod description: Function.prototype.toString on a method (class; static) ---*/ +let x = "h"; let f = class { static /* before */f /* a */ ( /* b */ ) /* c */ { /* d */ }/* after */ }.f; let g = class { static /* before */[ /* a */ "g" /* b */ ] /* c */ ( /* d */ ) /* e */ { /* f */ }/* after */ }.g; +let h = class { static /* before */[ /* a */ x /* b */ ] /* c */ ( /* d */ ) /* e */ { /* f */ }/* after */ }.h; assert.sameValue(f.toString(), "f /* a */ ( /* b */ ) /* c */ { /* d */ }"); assert.sameValue(g.toString(), "[ /* a */ \"g\" /* b */ ] /* c */ ( /* d */ ) /* e */ { /* f */ }"); +assert.sameValue(h.toString(), "[ /* a */ x /* b */ ] /* c */ ( /* d */ ) /* e */ { /* f */ }"); diff --git a/test/built-ins/Function/prototype/toString/method-class.js b/test/built-ins/Function/prototype/toString/method-class-expression.js similarity index 73% rename from test/built-ins/Function/prototype/toString/method-class.js rename to test/built-ins/Function/prototype/toString/method-class-expression.js index 76b43a852f..cdfe9643ed 100644 --- a/test/built-ins/Function/prototype/toString/method-class.js +++ b/test/built-ins/Function/prototype/toString/method-class-expression.js @@ -6,8 +6,11 @@ esid: sec-runtime-semantics-definemethod description: Function.prototype.toString on a method (class) ---*/ +let x = "h"; let f = class { /* before */f /* a */ ( /* b */ ) /* c */ { /* d */ }/* after */ }.prototype.f; let g = class { /* before */[ /* a */ "g" /* b */ ] /* c */ ( /* d */ ) /* e */ { /* f */ }/* after */ }.prototype.g; +let h = class { /* before */[ /* a */ x /* b */ ] /* c */ ( /* d */ ) /* e */ { /* f */ }/* after */ }.prototype.h; assert.sameValue(f.toString(), "f /* a */ ( /* b */ ) /* c */ { /* d */ }"); assert.sameValue(g.toString(), "[ /* a */ \"g\" /* b */ ] /* c */ ( /* d */ ) /* e */ { /* f */ }"); +assert.sameValue(h.toString(), "[ /* a */ x /* b */ ] /* c */ ( /* d */ ) /* e */ { /* f */ }"); diff --git a/test/built-ins/Function/prototype/toString/method-class-statement-static.js b/test/built-ins/Function/prototype/toString/method-class-statement-static.js new file mode 100644 index 0000000000..f8e9817a8f --- /dev/null +++ b/test/built-ins/Function/prototype/toString/method-class-statement-static.js @@ -0,0 +1,20 @@ +// Copyright (C) 2016 Michael Ficarra. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-runtime-semantics-definemethod +description: Function.prototype.toString on a method (class; static) +---*/ + +let x = "h"; +class F { static /* before */f /* a */ ( /* b */ ) /* c */ { /* d */ }/* after */ } +class G { static /* before */[ /* a */ "g" /* b */ ] /* c */ ( /* d */ ) /* e */ { /* f */ }/* after */ } +class H { static /* before */[ /* a */ x /* b */ ] /* c */ ( /* d */ ) /* e */ { /* f */ }/* after */ } + +let f = F.f; +let g = G.g; +let h = H.h; + +assert.sameValue(f.toString(), "f /* a */ ( /* b */ ) /* c */ { /* d */ }"); +assert.sameValue(g.toString(), "[ /* a */ \"g\" /* b */ ] /* c */ ( /* d */ ) /* e */ { /* f */ }"); +assert.sameValue(h.toString(), "[ /* a */ x /* b */ ] /* c */ ( /* d */ ) /* e */ { /* f */ }"); diff --git a/test/built-ins/Function/prototype/toString/method-class-statement.js b/test/built-ins/Function/prototype/toString/method-class-statement.js new file mode 100644 index 0000000000..3ee83d514c --- /dev/null +++ b/test/built-ins/Function/prototype/toString/method-class-statement.js @@ -0,0 +1,20 @@ +// Copyright (C) 2016 Michael Ficarra. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-runtime-semantics-definemethod +description: Function.prototype.toString on a method (class) +---*/ + +let x = "h"; +class F { /* before */f /* a */ ( /* b */ ) /* c */ { /* d */ }/* after */ } +class G { /* before */[ /* a */ "g" /* b */ ] /* c */ ( /* d */ ) /* e */ { /* f */ }/* after */ } +class H { /* before */[ /* a */ x /* b */ ] /* c */ ( /* d */ ) /* e */ { /* f */ }/* after */ } + +let f = F.prototype.f; +let g = G.prototype.g; +let h = H.prototype.h; + +assert.sameValue(f.toString(), "f /* a */ ( /* b */ ) /* c */ { /* d */ }"); +assert.sameValue(g.toString(), "[ /* a */ \"g\" /* b */ ] /* c */ ( /* d */ ) /* e */ { /* f */ }"); +assert.sameValue(h.toString(), "[ /* a */ x /* b */ ] /* c */ ( /* d */ ) /* e */ { /* f */ }"); diff --git a/test/built-ins/Function/prototype/toString/setter-class-static.js b/test/built-ins/Function/prototype/toString/setter-class-expression-static.js similarity index 73% rename from test/built-ins/Function/prototype/toString/setter-class-static.js rename to test/built-ins/Function/prototype/toString/setter-class-expression-static.js index 0a3041a95d..ab0b1ede43 100644 --- a/test/built-ins/Function/prototype/toString/setter-class-static.js +++ b/test/built-ins/Function/prototype/toString/setter-class-expression-static.js @@ -6,8 +6,11 @@ esid: sec-method-definitions-runtime-semantics-propertydefinitionevaluation description: Function.prototype.toString on a setter (class; static) ---*/ +let x = "h"; let f = Object.getOwnPropertyDescriptor(class { static /* before */set /* a */ f /* b */ ( /* c */ a /* d */ ) /* e */ { /* f */ }/* after */ }, "f").set; let g = Object.getOwnPropertyDescriptor(class { static /* before */set /* a */ [ /* b */ "g" /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }/* after */ }, "g").set; +let h = Object.getOwnPropertyDescriptor(class { static /* before */set /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }/* after */ }, "h").set; assert.sameValue(f.toString(), "set /* a */ f /* b */ ( /* c */ a /* d */ ) /* e */ { /* f */ }"); assert.sameValue(g.toString(), "set /* a */ [ /* b */ \"g\" /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }"); +assert.sameValue(h.toString(), "set /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }"); diff --git a/test/built-ins/Function/prototype/toString/setter-class.js b/test/built-ins/Function/prototype/toString/setter-class-expression.js similarity index 73% rename from test/built-ins/Function/prototype/toString/setter-class.js rename to test/built-ins/Function/prototype/toString/setter-class-expression.js index e83f478bc4..b34b4128e5 100644 --- a/test/built-ins/Function/prototype/toString/setter-class.js +++ b/test/built-ins/Function/prototype/toString/setter-class-expression.js @@ -6,8 +6,11 @@ esid: sec-method-definitions-runtime-semantics-propertydefinitionevaluation description: Function.prototype.toString on a setter (class) ---*/ +let x = "h"; let f = Object.getOwnPropertyDescriptor(class { /* before */set /* a */ f /* b */ ( /* c */ a /* d */ ) /* e */ { /* f */ }/* after */ }.prototype, "f").set; let g = Object.getOwnPropertyDescriptor(class { /* before */set /* a */ [ /* b */ "g" /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }/* after */ }.prototype, "g").set; +let h = Object.getOwnPropertyDescriptor(class { /* before */set /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }/* after */ }.prototype, "h").set; assert.sameValue(f.toString(), "set /* a */ f /* b */ ( /* c */ a /* d */ ) /* e */ { /* f */ }"); assert.sameValue(g.toString(), "set /* a */ [ /* b */ \"g\" /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }"); +assert.sameValue(h.toString(), "set /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }"); diff --git a/test/built-ins/Function/prototype/toString/setter-class-statement-static.js b/test/built-ins/Function/prototype/toString/setter-class-statement-static.js new file mode 100644 index 0000000000..7a5a37de0a --- /dev/null +++ b/test/built-ins/Function/prototype/toString/setter-class-statement-static.js @@ -0,0 +1,20 @@ +// Copyright (C) 2016 Michael Ficarra. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-method-definitions-runtime-semantics-propertydefinitionevaluation +description: Function.prototype.toString on a setter (class; static) +---*/ + +let x = "h"; +class F { static /* before */set /* a */ f /* b */ ( /* c */ a /* d */ ) /* e */ { /* f */ }/* after */ } +class G { static /* before */set /* a */ [ /* b */ "g" /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }/* after */ } +class H { static /* before */set /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }/* after */ } + +let f = Object.getOwnPropertyDescriptor(F, "f").set; +let g = Object.getOwnPropertyDescriptor(G, "g").set; +let h = Object.getOwnPropertyDescriptor(H, "h").set; + +assert.sameValue(f.toString(), "set /* a */ f /* b */ ( /* c */ a /* d */ ) /* e */ { /* f */ }"); +assert.sameValue(g.toString(), "set /* a */ [ /* b */ \"g\" /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }"); +assert.sameValue(h.toString(), "set /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }"); diff --git a/test/built-ins/Function/prototype/toString/setter-class-statement.js b/test/built-ins/Function/prototype/toString/setter-class-statement.js new file mode 100644 index 0000000000..7c0c2b3e0c --- /dev/null +++ b/test/built-ins/Function/prototype/toString/setter-class-statement.js @@ -0,0 +1,20 @@ +// Copyright (C) 2016 Michael Ficarra. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-method-definitions-runtime-semantics-propertydefinitionevaluation +description: Function.prototype.toString on a setter (class) +---*/ + +let x = "h"; +class F { /* before */set /* a */ f /* b */ ( /* c */ a /* d */ ) /* e */ { /* f */ }/* after */ } +class G { /* before */set /* a */ [ /* b */ "g" /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }/* after */ } +class H { /* before */set /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }/* after */ } + +let f = Object.getOwnPropertyDescriptor(F.prototype, "f").set; +let g = Object.getOwnPropertyDescriptor(G.prototype, "g").set; +let h = Object.getOwnPropertyDescriptor(H.prototype, "h").set; + +assert.sameValue(f.toString(), "set /* a */ f /* b */ ( /* c */ a /* d */ ) /* e */ { /* f */ }"); +assert.sameValue(g.toString(), "set /* a */ [ /* b */ \"g\" /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }"); +assert.sameValue(h.toString(), "set /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }"); diff --git a/test/built-ins/Function/prototype/toString/setter-object.js b/test/built-ins/Function/prototype/toString/setter-object.js index 8432d5ca6c..20adbe3e05 100644 --- a/test/built-ins/Function/prototype/toString/setter-object.js +++ b/test/built-ins/Function/prototype/toString/setter-object.js @@ -6,8 +6,11 @@ esid: sec-method-definitions-runtime-semantics-propertydefinitionevaluation description: Function.prototype.toString on a setter (object) ---*/ +let x = "h"; let f = Object.getOwnPropertyDescriptor({ /* before */set /* a */ f /* b */ ( /* c */ a /* d */ ) /* e */ { /* f */ }/* after */ }, "f").set; let g = Object.getOwnPropertyDescriptor({ /* before */set /* a */ [ /* b */ "g" /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }/* after */ }, "g").set; +let h = Object.getOwnPropertyDescriptor({ /* before */set /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }/* after */ }, "h").set; assert.sameValue(f.toString(), "set /* a */ f /* b */ ( /* c */ a /* d */ ) /* e */ { /* f */ }"); assert.sameValue(g.toString(), "set /* a */ [ /* b */ \"g\" /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }"); +assert.sameValue(h.toString(), "set /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }");