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