diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Function/prototype/toString/method-computed-property-name.js')
-rw-r--r-- | js/src/tests/test262/built-ins/Function/prototype/toString/method-computed-property-name.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Function/prototype/toString/method-computed-property-name.js b/js/src/tests/test262/built-ins/Function/prototype/toString/method-computed-property-name.js new file mode 100644 index 0000000000..fcfe262176 --- /dev/null +++ b/js/src/tests/test262/built-ins/Function/prototype/toString/method-computed-property-name.js @@ -0,0 +1,16 @@ +// 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 (object) +includes: [nativeFunctionMatcher.js] +---*/ + +let f = { /* before */[ /* a */ "f" /* b */ ] /* c */ ( /* d */ ) /* e */ { /* f */ }/* after */ }.f; +let g = { [ { a(){} }.a ](){ } }["a(){}"]; + +assertToStringOrNativeFunction(f, "[ /* a */ \"f\" /* b */ ] /* c */ ( /* d */ ) /* e */ { /* f */ }"); +assertToStringOrNativeFunction(g, "[ { a(){} }.a ](){ }"); + +reportCompare(0, 0); |