diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Function/prototype/toString/private-method-class-statement.js')
-rw-r--r-- | js/src/tests/test262/built-ins/Function/prototype/toString/private-method-class-statement.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Function/prototype/toString/private-method-class-statement.js b/js/src/tests/test262/built-ins/Function/prototype/toString/private-method-class-statement.js new file mode 100644 index 0000000000..de64988c99 --- /dev/null +++ b/js/src/tests/test262/built-ins/Function/prototype/toString/private-method-class-statement.js @@ -0,0 +1,20 @@ +// Copyright (C) 2019 Kubilay Kahveci (Bloomberg LP). All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Function.prototype.toString on a private method +features: [class-methods-private] +includes: [nativeFunctionMatcher.js] +---*/ + +class C { + /* before */#f /* a */ ( /* b */ ) /* c */ { /* d */ }/* after */ + assert(expected) { + assertToStringOrNativeFunction(this.#f, expected); + } +} + +let c = new C(); +c.assert("#f /* a */ ( /* b */ ) /* c */ { /* d */ }"); + +reportCompare(0, 0); |