Bug 1185106 - Part 11.4: Add function length test for async function. r=till
authorTooru Fujisawa <arai_a@mac.com>
Mon, 29 Aug 2016 02:06:19 +0900
changeset 320249 707c862f4d63f444a307aca6f7f5ecf1bd0cc070
parent 320248 4bfb6261bdc98c47a4cc3b5d42ee89667e6016df
child 320250 a141cb00c7deef08035c09de9ebd720fd74ff7a7
push id20754
push usercbook@mozilla.com
push dateMon, 31 Oct 2016 15:58:35 +0000
treeherderfx-team@b1b66b1780c2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstill
bugs1185106
milestone52.0a1
Bug 1185106 - Part 11.4: Add function length test for async function. r=till MozReview-Commit-ID: BILq634dpL2
js/src/tests/ecma_7/AsyncFunctions/length.js
new file mode 100644
--- /dev/null
+++ b/js/src/tests/ecma_7/AsyncFunctions/length.js
@@ -0,0 +1,12 @@
+var BUGNUMBER = 1185106;
+var summary = "async function length";
+
+print(BUGNUMBER + ": " + summary);
+
+assertEq(async function() {}.length, 0);
+assertEq(async function(a) {}.length, 1);
+assertEq(async function(a, b, c) {}.length, 3);
+assertEq(async function(a, b, c, ...d) {}.length, 3);
+
+if (typeof reportCompare === "function")
+    reportCompare(true, true);