summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Function/prototype/toString/proxy-function-expression.js
blob: 13fe06881ae138e8c916b2644b0c9699f75f7ade (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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);