summaryrefslogtreecommitdiff
path: root/test/built-ins/Date/prototype/getTime
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Date/prototype/getTime')
-rw-r--r--test/built-ins/Date/prototype/getTime/S15.9.5.9_A1_T1.js17
-rw-r--r--test/built-ins/Date/prototype/getTime/S15.9.5.9_A1_T2.js17
-rw-r--r--test/built-ins/Date/prototype/getTime/S15.9.5.9_A1_T3.js18
-rw-r--r--test/built-ins/Date/prototype/getTime/S15.9.5.9_A2_T1.js16
-rw-r--r--test/built-ins/Date/prototype/getTime/S15.9.5.9_A3_T1.js16
-rw-r--r--test/built-ins/Date/prototype/getTime/S15.9.5.9_A3_T2.js19
-rw-r--r--test/built-ins/Date/prototype/getTime/S15.9.5.9_A3_T3.js20
7 files changed, 123 insertions, 0 deletions
diff --git a/test/built-ins/Date/prototype/getTime/S15.9.5.9_A1_T1.js b/test/built-ins/Date/prototype/getTime/S15.9.5.9_A1_T1.js
new file mode 100644
index 000000000..3a8d8bf58
--- /dev/null
+++ b/test/built-ins/Date/prototype/getTime/S15.9.5.9_A1_T1.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The Date.prototype property "getTime" has { DontEnum } attributes
+es5id: 15.9.5.9_A1_T1
+description: Checking absence of ReadOnly attribute
+---*/
+
+x = Date.prototype.getTime;
+if(x === 1)
+ Date.prototype.getTime = 2;
+else
+ Date.prototype.getTime = 1;
+if (Date.prototype.getTime === x) {
+ $ERROR('#1: The Date.prototype.getTime has not the attribute ReadOnly');
+}
diff --git a/test/built-ins/Date/prototype/getTime/S15.9.5.9_A1_T2.js b/test/built-ins/Date/prototype/getTime/S15.9.5.9_A1_T2.js
new file mode 100644
index 000000000..3b0889172
--- /dev/null
+++ b/test/built-ins/Date/prototype/getTime/S15.9.5.9_A1_T2.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The Date.prototype property "getTime" has { DontEnum } attributes
+es5id: 15.9.5.9_A1_T2
+description: Checking absence of DontDelete attribute
+includes: [$FAIL.js]
+---*/
+
+if (delete Date.prototype.getTime === false) {
+ $ERROR('#1: The Date.prototype.getTime property has not the attributes DontDelete');
+}
+
+if (Date.prototype.hasOwnProperty('getTime')) {
+ $FAIL('#2: The Date.prototype.getTime property has not the attributes DontDelete');
+}
diff --git a/test/built-ins/Date/prototype/getTime/S15.9.5.9_A1_T3.js b/test/built-ins/Date/prototype/getTime/S15.9.5.9_A1_T3.js
new file mode 100644
index 000000000..498b15437
--- /dev/null
+++ b/test/built-ins/Date/prototype/getTime/S15.9.5.9_A1_T3.js
@@ -0,0 +1,18 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The Date.prototype property "getTime" has { DontEnum } attributes
+es5id: 15.9.5.9_A1_T3
+description: Checking DontEnum attribute
+---*/
+
+if (Date.prototype.propertyIsEnumerable('getTime')) {
+ $ERROR('#1: The Date.prototype.getTime property has the attribute DontEnum');
+}
+
+for(x in Date.prototype) {
+ if(x === "getTime") {
+ $ERROR('#2: The Date.prototype.getTime has the attribute DontEnum');
+ }
+}
diff --git a/test/built-ins/Date/prototype/getTime/S15.9.5.9_A2_T1.js b/test/built-ins/Date/prototype/getTime/S15.9.5.9_A2_T1.js
new file mode 100644
index 000000000..0e161e627
--- /dev/null
+++ b/test/built-ins/Date/prototype/getTime/S15.9.5.9_A2_T1.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: The "length" property of the "getTime" is 0
+es5id: 15.9.5.9_A2_T1
+description: The "length" property of the "getTime" is 0
+---*/
+
+if(Date.prototype.getTime.hasOwnProperty("length") !== true){
+ $ERROR('#1: The getTime has a "length" property');
+}
+
+if(Date.prototype.getTime.length !== 0){
+ $ERROR('#2: The "length" property of the getTime is 0');
+}
diff --git a/test/built-ins/Date/prototype/getTime/S15.9.5.9_A3_T1.js b/test/built-ins/Date/prototype/getTime/S15.9.5.9_A3_T1.js
new file mode 100644
index 000000000..8f246a799
--- /dev/null
+++ b/test/built-ins/Date/prototype/getTime/S15.9.5.9_A3_T1.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The Date.prototype.getTime property "length" has { ReadOnly, DontDelete,
+ DontEnum } attributes
+es5id: 15.9.5.9_A3_T1
+description: Checking ReadOnly attribute
+---*/
+
+x = Date.prototype.getTime.length;
+Date.prototype.getTime.length = 1;
+if (Date.prototype.getTime.length !== x) {
+ $ERROR('#1: The Date.prototype.getTime.length has the attribute ReadOnly');
+}
diff --git a/test/built-ins/Date/prototype/getTime/S15.9.5.9_A3_T2.js b/test/built-ins/Date/prototype/getTime/S15.9.5.9_A3_T2.js
new file mode 100644
index 000000000..29f714300
--- /dev/null
+++ b/test/built-ins/Date/prototype/getTime/S15.9.5.9_A3_T2.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The Date.prototype.getTime property "length" has { ReadOnly, !
+ DontDelete, DontEnum } attributes
+es5id: 15.9.5.9_A3_T2
+description: Checking DontDelete attribute
+includes: [$FAIL.js]
+---*/
+
+if (delete Date.prototype.getTime.length !== true) {
+ $ERROR('#1: The Date.prototype.getTime.length property does not have the attributes DontDelete');
+}
+
+if (Date.prototype.getTime.hasOwnProperty('length')) {
+ $FAIL('#2: The Date.prototype.getTime.length property does not have the attributes DontDelete');
+}
diff --git a/test/built-ins/Date/prototype/getTime/S15.9.5.9_A3_T3.js b/test/built-ins/Date/prototype/getTime/S15.9.5.9_A3_T3.js
new file mode 100644
index 000000000..3d60b60b3
--- /dev/null
+++ b/test/built-ins/Date/prototype/getTime/S15.9.5.9_A3_T3.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: >
+ The Date.prototype.getTime property "length" has { ReadOnly, DontDelete,
+ DontEnum } attributes
+es5id: 15.9.5.9_A3_T3
+description: Checking DontEnum attribute
+---*/
+
+if (Date.prototype.getTime.propertyIsEnumerable('length')) {
+ $ERROR('#1: The Date.prototype.getTime.length property has the attribute DontEnum');
+}
+
+for(x in Date.prototype.getTime) {
+ if(x === "length") {
+ $ERROR('#2: The Date.prototype.getTime.length has the attribute DontEnum');
+ }
+}