summaryrefslogtreecommitdiff
path: root/test/suite/intl402/ch10
diff options
context:
space:
mode:
Diffstat (limited to 'test/suite/intl402/ch10')
-rw-r--r--test/suite/intl402/ch10/10.1/10.1_L15.js14
-rw-r--r--test/suite/intl402/ch10/10.2/10.2.1.js25
-rw-r--r--test/suite/intl402/ch10/10.2/10.2.2_L15.js14
-rw-r--r--test/suite/intl402/ch10/10.2/10.2.js16
-rw-r--r--test/suite/intl402/ch10/10.3/10.3.2_1_a_L15.js14
-rw-r--r--test/suite/intl402/ch10/10.3/10.3.2_L15.js14
-rw-r--r--test/suite/intl402/ch10/10.3/10.3.3_L15.js14
-rw-r--r--test/suite/intl402/ch10/10.3/10.3_L15.js14
8 files changed, 84 insertions, 41 deletions
diff --git a/test/suite/intl402/ch10/10.1/10.1_L15.js b/test/suite/intl402/ch10/10.1/10.1_L15.js
new file mode 100644
index 000000000..4dbabfd64
--- /dev/null
+++ b/test/suite/intl402/ch10/10.1/10.1_L15.js
@@ -0,0 +1,14 @@
+// Copyright 2012 Mozilla Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/**
+ * @description Tests that Intl.Collator
+ * meets the requirements for built-in objects defined by the introduction of
+ * chapter 15 of the ECMAScript Language Specification.
+ * @author Norbert Lindenberg
+ */
+
+$INCLUDE("testBuiltInObject.js");
+
+testBuiltInObject(Intl.Collator, true, true, ["supportedLocalesOf"], 0);
+
diff --git a/test/suite/intl402/ch10/10.2/10.2.1.js b/test/suite/intl402/ch10/10.2/10.2.1.js
deleted file mode 100644
index 6583bed08..000000000
--- a/test/suite/intl402/ch10/10.2/10.2.1.js
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2012 Google Inc. All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/**
- * @description Tests that the Intl.Collator prototype object exists and
- * is not writable, enumerable, or configurable.
- */
-
-var desc;
-
-if (!Intl.Collator.hasOwnProperty('prototype')) {
- $ERROR('Intl.Collator has no prototype property');
-}
-
-desc = Object.getOwnPropertyDescriptor(Intl.Collator, 'prototype');
-if (desc.writable === true) {
- $ERROR('Intl.Collator.prototype is writable.');
-}
-if (desc.enumerable === true) {
- $ERROR('Intl.Collator.prototype is enumerable.');
-}
-if (desc.configurable === true) {
- $ERROR('Intl.Collator.prototype is configurable.');
-}
-
diff --git a/test/suite/intl402/ch10/10.2/10.2.2_L15.js b/test/suite/intl402/ch10/10.2/10.2.2_L15.js
new file mode 100644
index 000000000..6ffcdde84
--- /dev/null
+++ b/test/suite/intl402/ch10/10.2/10.2.2_L15.js
@@ -0,0 +1,14 @@
+// Copyright 2012 Mozilla Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/**
+ * @description Tests that Intl.Collator.supportedLocalesOf
+ * meets the requirements for built-in objects defined by the introduction of
+ * chapter 15 of the ECMAScript Language Specification.
+ * @author Norbert Lindenberg
+ */
+
+$INCLUDE("testBuiltInObject.js");
+
+testBuiltInObject(Intl.Collator.supportedLocalesOf, true, false, [], 1);
+
diff --git a/test/suite/intl402/ch10/10.2/10.2.js b/test/suite/intl402/ch10/10.2/10.2.js
deleted file mode 100644
index 2a9c073e9..000000000
--- a/test/suite/intl402/ch10/10.2/10.2.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2012 Google Inc. All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/**
- * @description Tests that the Intl.Collator constructor has a length
- * property that equals 2.
- */
-
-if (!Intl.Collator.hasOwnProperty('length')) {
- $ERROR('Intl.Collator has no length property');
-}
-
-if (Intl.Collator.length != 2) {
- $ERROR('Intl.Collator.length is not 2.');
-}
-
diff --git a/test/suite/intl402/ch10/10.3/10.3.2_1_a_L15.js b/test/suite/intl402/ch10/10.3/10.3.2_1_a_L15.js
new file mode 100644
index 000000000..3d49601db
--- /dev/null
+++ b/test/suite/intl402/ch10/10.3/10.3.2_1_a_L15.js
@@ -0,0 +1,14 @@
+// Copyright 2012 Mozilla Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/**
+ * @description Tests that the function returned by Intl.Collator.prototype.compare
+ * meets the requirements for built-in objects defined by the introduction of
+ * chapter 15 of the ECMAScript Language Specification.
+ * @author Norbert Lindenberg
+ */
+
+$INCLUDE("testBuiltInObject.js");
+
+testBuiltInObject(new Intl.Collator().compare, true, false, [], 2);
+
diff --git a/test/suite/intl402/ch10/10.3/10.3.2_L15.js b/test/suite/intl402/ch10/10.3/10.3.2_L15.js
new file mode 100644
index 000000000..5845ea3ca
--- /dev/null
+++ b/test/suite/intl402/ch10/10.3/10.3.2_L15.js
@@ -0,0 +1,14 @@
+// Copyright 2012 Mozilla Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/**
+ * @description Tests that the getter for Intl.Collator.prototype.compare
+ * meets the requirements for built-in objects defined by the introduction of
+ * chapter 15 of the ECMAScript Language Specification.
+ * @author Norbert Lindenberg
+ */
+
+$INCLUDE("testBuiltInObject.js");
+
+testBuiltInObject(Object.getOwnPropertyDescriptor(Intl.Collator.prototype, "compare").get , true, false, [], 0);
+
diff --git a/test/suite/intl402/ch10/10.3/10.3.3_L15.js b/test/suite/intl402/ch10/10.3/10.3.3_L15.js
new file mode 100644
index 000000000..718cc9fea
--- /dev/null
+++ b/test/suite/intl402/ch10/10.3/10.3.3_L15.js
@@ -0,0 +1,14 @@
+// Copyright 2012 Mozilla Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/**
+ * @description Tests that Intl.Collator.prototype.resolvedOptions
+ * meets the requirements for built-in objects defined by the introduction of
+ * chapter 15 of the ECMAScript Language Specification.
+ * @author Norbert Lindenberg
+ */
+
+$INCLUDE("testBuiltInObject.js");
+
+testBuiltInObject(Intl.Collator.prototype.resolvedOptions, true, false, [], 0);
+
diff --git a/test/suite/intl402/ch10/10.3/10.3_L15.js b/test/suite/intl402/ch10/10.3/10.3_L15.js
new file mode 100644
index 000000000..60719736c
--- /dev/null
+++ b/test/suite/intl402/ch10/10.3/10.3_L15.js
@@ -0,0 +1,14 @@
+// Copyright 2012 Mozilla Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/**
+ * @description Tests that Intl.Collator.prototype
+ * meets the requirements for built-in objects defined by the introduction of
+ * chapter 15 of the ECMAScript Language Specification.
+ * @author Norbert Lindenberg
+ */
+
+$INCLUDE("testBuiltInObject.js");
+
+testBuiltInObject(Intl.Collator.prototype, false, false, ["constructor", "compare", "resolvedOptions"]);
+