summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/intl402/Collator/prototype/compare/compare-function-length.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/intl402/Collator/prototype/compare/compare-function-length.js')
-rw-r--r--js/src/tests/test262/intl402/Collator/prototype/compare/compare-function-length.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/js/src/tests/test262/intl402/Collator/prototype/compare/compare-function-length.js b/js/src/tests/test262/intl402/Collator/prototype/compare/compare-function-length.js
new file mode 100644
index 0000000000..8fab13ccf5
--- /dev/null
+++ b/js/src/tests/test262/intl402/Collator/prototype/compare/compare-function-length.js
@@ -0,0 +1,31 @@
+// Copyright (C) 2017 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-intl.collator.prototype.compare
+description: >
+ The length of the bound Collator compare function is 2.
+info: |
+ get Intl.Collator.prototype.compare
+
+ ...
+ 4. If collator.[[BoundCompare]] is undefined, then
+ a. Let F be a new built-in function object as defined in 10.3.4.
+ b. Let bc be BoundFunctionCreate(F, collator, « »).
+ c. Perform ! DefinePropertyOrThrow(bc, "length", PropertyDescriptor {[[Value]]: 2,
+ [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true}).
+ ...
+
+includes: [propertyHelper.js]
+---*/
+
+var compareFn = new Intl.Collator().compare;
+
+verifyProperty(compareFn, "length", {
+ value: 2,
+ writable: false,
+ enumerable: false,
+ configurable: true,
+});
+
+reportCompare(0, 0);