aboutsummaryrefslogtreecommitdiffstats
path: root/test/suite/intl402/ch08
diff options
context:
space:
mode:
authorNorbert Lindenberg <ecmascript@lindenbergsoftware.com>2012-08-26 20:48:49 -0700
committerNorbert Lindenberg <ecmascript@lindenbergsoftware.com>2012-08-26 20:48:49 -0700
commit8cad7d03cea197bd374b35f4af95a58c7b583538 (patch)
tree2b2da7d73e42bd4026714127b4af56ee77759d88 /test/suite/intl402/ch08
parent1be52e222bddc6acfb14ad3a655d6359e121dc93 (diff)
Added tests for requirements imposed on the built-in objects of the ECMAScript Internationalization API Specification by the introduction of chapter 15 of the ECMAScript Language Specification.
- Removed some old tests that were redundant with the new tests. - Added testBuiltInObject.js as standard include for all console tests in test262.py – see related bug 574.
Diffstat (limited to 'test/suite/intl402/ch08')
-rw-r--r--test/suite/intl402/ch08/8.0/8.0.js39
-rw-r--r--test/suite/intl402/ch08/8.0/8.0_L15.js14
-rw-r--r--test/suite/intl402/ch08/8.1/8.1.js23
3 files changed, 14 insertions, 62 deletions
diff --git a/test/suite/intl402/ch08/8.0/8.0.js b/test/suite/intl402/ch08/8.0/8.0.js
deleted file mode 100644
index e35db5dff..000000000
--- a/test/suite/intl402/ch08/8.0/8.0.js
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2012 Google Inc. All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/**
- * @description Tests properties of Intl object.
- */
-
-// We keep Intl extensible and not frozen.
-if (Object.isFrozen(Intl) === true) {
- $ERROR('isFrozen(Intl) returns true.');
-}
-
-if (Object.isExtensible(Intl) === false) {
- $ERROR('isExtensible(Intl) returns false.');
-}
-
-var falsey;
-
-// Intl can't be constructed.
-try {
- falsey = new Intl();
-} catch (e) {
-}
-
-if (!!falsey) {
- $ERROR('Intl object should not be constructable.');
-}
-
-// Intl can't be called as a function.
-try {
- /*jshint newcap:false*/
- falsey = Intl();
-} catch (e) {
-}
-
-if (!!falsey) {
- $ERROR('Intl should not be callable.');
-}
-
diff --git a/test/suite/intl402/ch08/8.0/8.0_L15.js b/test/suite/intl402/ch08/8.0/8.0_L15.js
new file mode 100644
index 000000000..9b0b63952
--- /dev/null
+++ b/test/suite/intl402/ch08/8.0/8.0_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
+ * 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, false, false, ["Collator", "NumberFormat", "DateTimeFormat"]);
+
diff --git a/test/suite/intl402/ch08/8.1/8.1.js b/test/suite/intl402/ch08/8.1/8.1.js
deleted file mode 100644
index f9ee77111..000000000
--- a/test/suite/intl402/ch08/8.1/8.1.js
+++ /dev/null
@@ -1,23 +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 Intl object has proper constructors.
- */
-
-if (Intl === undefined) {
- $ERROR('Intl object is undefined.');
-}
-
-if (typeof Intl.Collator !== 'function') {
- $ERROR('Intl.Collator is not a function.');
-}
-
-if (typeof Intl.NumberFormat !== 'function') {
- $ERROR('Intl.NumberFormat is not a function.');
-}
-
-if (typeof Intl.DateTimeFormat !== 'function') {
- $ERROR('Intl.DateTimeFormat is not a function.');
-}
-