diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Function/prototype/toString/proxy-function-expression.js')
-rw-r--r-- | js/src/tests/test262/built-ins/Function/prototype/toString/proxy-function-expression.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Function/prototype/toString/proxy-function-expression.js b/js/src/tests/test262/built-ins/Function/prototype/toString/proxy-function-expression.js new file mode 100644 index 0000000000..13fe06881a --- /dev/null +++ b/js/src/tests/test262/built-ins/Function/prototype/toString/proxy-function-expression.js @@ -0,0 +1,24 @@ +// Copyright (C) 2018 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-function.prototype.tostring +description: > + toString of Proxy for function target does not throw (Function Expression) +info: | + ... + If Type(func) is Object and IsCallable(func) is true, then return an + implementation-dependent String source code representation of func. + The representation must have the syntax of a NativeFunction. + ... + + NativeFunction: + function IdentifierName_opt ( FormalParameters ) { [ native code ] } + +features: [Proxy] +includes: [nativeFunctionMatcher.js] +---*/ + +assertNativeFunction(new Proxy(function() {}, {})); +assertNativeFunction(new Proxy(function() {}, { apply() {} }).apply); + +reportCompare(0, 0); |