diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Function/prototype/toString/proxy-async-function.js')
-rw-r--r-- | js/src/tests/test262/built-ins/Function/prototype/toString/proxy-async-function.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Function/prototype/toString/proxy-async-function.js b/js/src/tests/test262/built-ins/Function/prototype/toString/proxy-async-function.js new file mode 100644 index 0000000000..e618b0071e --- /dev/null +++ b/js/src/tests/test262/built-ins/Function/prototype/toString/proxy-async-function.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 (Async 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: [async-functions, Proxy] +includes: [nativeFunctionMatcher.js] +---*/ + +assertNativeFunction(new Proxy(async function() {}, {})); +assertNativeFunction(new Proxy(async function() {}, { apply() {} }).apply); + +reportCompare(0, 0); |