summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Function/prototype/toString/arrow-function.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/built-ins/Function/prototype/toString/arrow-function.js')
-rw-r--r--js/src/tests/test262/built-ins/Function/prototype/toString/arrow-function.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Function/prototype/toString/arrow-function.js b/js/src/tests/test262/built-ins/Function/prototype/toString/arrow-function.js
new file mode 100644
index 0000000000..9b8b494938
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Function/prototype/toString/arrow-function.js
@@ -0,0 +1,18 @@
+// Copyright (C) 2016 Michael Ficarra. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-arrow-function-definitions-runtime-semantics-evaluation
+description: Function.prototype.toString on an arrow function
+includes: [nativeFunctionMatcher.js]
+---*/
+
+let f = /* before */( /* a */ a /* b */ , /* c */ b /* d */ ) /* e */ => /* f */ { /* g */ ; /* h */ }/* after */;
+let g = /* before */( /* a */ ) /* b */ => /* c */ 0/* after */;
+let h = /* before */a /* a */ => /* b */ 0/* after */;
+
+assertToStringOrNativeFunction(f, "( /* a */ a /* b */ , /* c */ b /* d */ ) /* e */ => /* f */ { /* g */ ; /* h */ }");
+assertToStringOrNativeFunction(g, "( /* a */ ) /* b */ => /* c */ 0");
+assertToStringOrNativeFunction(h, "a /* a */ => /* b */ 0");
+
+reportCompare(0, 0);