diff --git a/harness/propertyHelper.js b/harness/propertyHelper.js index c5b5e0f7c160ec3ef90594a0efff2614806421fc..e2627877e4c3bdbc854a1509740c5255b03b4926 100644 --- a/harness/propertyHelper.js +++ b/harness/propertyHelper.js @@ -41,8 +41,7 @@ function isWritable(obj, name, verifyProp, value) { } } - writeSucceeded = (verifyProp && isEqualTo(obj, verifyProp, newValue)) || - isEqualTo(obj, name, newValue); + writeSucceeded = isEqualTo(obj, verifyProp || name, newValue); // Revert the change only if it was successful (in other cases, reverting // is unnecessary and may trigger exceptions for certain property diff --git a/test/built-ins/Array/S15.4.3_A2.3.js b/test/built-ins/Array/S15.4.3_A2.3.js index fbd42918c05c3f8be185155a23f6c68f221e1011..5e00bf260330ed96c41a8035f0ef3b250074ad96 100644 --- a/test/built-ins/Array/S15.4.3_A2.3.js +++ b/test/built-ins/Array/S15.4.3_A2.3.js @@ -5,12 +5,12 @@ info: The length property of Array has the attribute ReadOnly es5id: 15.4.3_A2.3 description: Checking if varying the length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 var x = Array.length; -Array.length = Infinity; +verifyNotWritable(Array, "length", null, Infinity); if (Array.length !== x) { $ERROR('#1: x = Array.length; Array.length = Infinity; Array.length === x. Actual: ' + (Array.length)); } diff --git a/test/built-ins/Array/prototype/S15.4.3.1_A3.js b/test/built-ins/Array/prototype/S15.4.3.1_A3.js index 5b432b4abe163a2b670a9c28753010a195cc4aa0..420e31492e1feeed489f2e4c86c05b34ac07db43 100644 --- a/test/built-ins/Array/prototype/S15.4.3.1_A3.js +++ b/test/built-ins/Array/prototype/S15.4.3.1_A3.js @@ -5,8 +5,7 @@ info: The Array.prototype property has the attribute DontDelete es5id: 15.4.3.1_A3 description: Checking if deleting the Array.prototype property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ //CHECK#1 @@ -14,14 +13,24 @@ if (Array.hasOwnProperty('prototype') !== true) { $FAIL('#1: Array.hasOwnProperty(\'prototype\') === true. Actual: ' + (Array.hasOwnProperty('prototype'))); } -delete Array.prototype; +verifyNotConfigurable(Array, "prototype"); //CHECK#2 -if (Array.hasOwnProperty('prototype') !== true) { - $ERROR('#2: delete Array.prototype; Array.hasOwnProperty(\'prototype\') === true. Actual: ' + (Array.hasOwnProperty('prototype'))); +try { + if((delete Array.prototype) !== false){ + $ERROR('#2: Array.prototype has the attribute DontDelete'); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } //CHECK#3 +if (Array.hasOwnProperty('prototype') !== true) { + $ERROR('#3: delete Array.prototype; Array.hasOwnProperty(\'prototype\') === true. Actual: ' + (Array.hasOwnProperty('prototype'))); +} + +//CHECK#4 if (Array.prototype === undefined) { - $ERROR('#3: delete Array.prototype; Array.prototype !== undefined'); + $ERROR('#4: delete Array.prototype; Array.prototype !== undefined'); } diff --git a/test/built-ins/Array/prototype/S15.4.3.1_A4.js b/test/built-ins/Array/prototype/S15.4.3.1_A4.js index f077df9d6c2c96e3cd593512e37345c82680342a..fd62eaff40449668e3fa83bf8570e7f90ba3544a 100644 --- a/test/built-ins/Array/prototype/S15.4.3.1_A4.js +++ b/test/built-ins/Array/prototype/S15.4.3.1_A4.js @@ -5,12 +5,12 @@ info: The Array.prototype property has the attribute ReadOnly es5id: 15.4.3.1_A4 description: Checking if varying the Array.prototype property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 var x = Array.prototype; -Array.prototype = 1; +verifyNotWritable(Array, "prototype", null, 1); if (Array.prototype !== x) { $ERROR('#1: x = Array.prototype; Array.prototype = 1; Array.prototype === x. Actual: ' + (Array.prototype)); } diff --git a/test/built-ins/Array/prototype/concat/S15.4.4.4_A4.2.js b/test/built-ins/Array/prototype/concat/S15.4.4.4_A4.2.js index ed257692273e3d749eca2773f4d061ca653e7179..caf9da58f16da1160030562fbb5e65e49141308d 100644 --- a/test/built-ins/Array/prototype/concat/S15.4.4.4_A4.2.js +++ b/test/built-ins/Array/prototype/concat/S15.4.4.4_A4.2.js @@ -5,7 +5,6 @@ info: The length property of concat does not have the attribute DontDelete es5id: 15.4.4.4_A4.2 description: Checking use hasOwnProperty, delete -flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/Array/prototype/concat/S15.4.4.4_A4.3.js b/test/built-ins/Array/prototype/concat/S15.4.4.4_A4.3.js index cdf728da1c8ab2fcd1e06ccdffa6f9bfb343b1cf..206c47194e8ed39541e9ecb28de37c1e1c2b8dff 100644 --- a/test/built-ins/Array/prototype/concat/S15.4.4.4_A4.3.js +++ b/test/built-ins/Array/prototype/concat/S15.4.4.4_A4.3.js @@ -5,12 +5,12 @@ info: The length property of concat has the attribute ReadOnly es5id: 15.4.4.4_A4.3 description: Checking if varying the length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 var x = Array.prototype.concat.length; -Array.prototype.concat.length = Infinity; +verifyNotWritable(Array.prototype.concat, "length", null, Infinity); if (Array.prototype.concat.length !== x) { $ERROR('#1: x = Array.prototype.concat.length; Array.prototype.concat.length = Infinity; Array.prototype.concat.length === x. Actual: ' + (Array.prototype.concat.length)); } diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A6.2.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A6.2.js index 3b80f2ce1cae711f83c41ef1837c3b88cb7d4924..8cc60f7f74cd3d711c27ded4b9909ba311459889 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A6.2.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A6.2.js @@ -5,7 +5,6 @@ info: The length property of join does not have the attribute DontDelete es5id: 15.4.4.5_A6.2 description: Checking use hasOwnProperty, delete -flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A6.3.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A6.3.js index 5f520eddab3f681e61c642bf355e6ebfdadd4ff5..0a0391e6a46800c03635b3ec21eaa5653a8374c3 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A6.3.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A6.3.js @@ -5,12 +5,12 @@ info: The length property of join has the attribute ReadOnly es5id: 15.4.4.5_A6.3 description: Checking if varying the length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 var x = Array.prototype.join.length; -Array.prototype.join.length = Infinity; +verifyNotWritable(Array.prototype.join, "length", null, Infinity); if (Array.prototype.join.length !== x) { $ERROR('#1: x = Array.prototype.join.length; Array.prototype.join.length = Infinity; Array.prototype.join.length === x. Actual: ' + (Array.prototype.join.length)); } diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A5.2.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A5.2.js index f1167771b858c98a803e1ad107473f04ec109c5d..21c1374617c35986f713f91cd7c788f8c78c3e61 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A5.2.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A5.2.js @@ -5,7 +5,6 @@ info: The length property of pop does not have the attribute DontDelete es5id: 15.4.4.6_A5.2 description: Checking use hasOwnProperty, delete -flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A5.3.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A5.3.js index 19bce0d7ac1cd266ada95c5eb76a948c15bdc27f..bec89ff4140aa92df454bcb118d2a816cb95f5ed 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A5.3.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A5.3.js @@ -5,12 +5,12 @@ info: The length property of pop has the attribute ReadOnly es5id: 15.4.4.6_A5.3 description: Checking if varying the length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 var x = Array.prototype.pop.length; -Array.prototype.pop.length = Infinity; +verifyNotWritable(Array.prototype.pop, "length", null, Infinity); if (Array.prototype.pop.length !== x) { $ERROR('#1: x = Array.prototype.pop.length; Array.prototype.pop.length = Infinity; Array.prototype.pop.length === x. Actual: ' + (Array.prototype.pop.length)); } diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A6.2.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A6.2.js index 15ab62b680cc6da32cf3309aba475f21157596cb..4084d34a0e9b1f65c0f31c8ab36a61a72c0cc491 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A6.2.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A6.2.js @@ -5,7 +5,6 @@ info: The length property of push does not have the attribute DontDelete es5id: 15.4.4.7_A6.2 description: Checking use hasOwnProperty, delete -flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A6.3.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A6.3.js index ca2f60397807b5ccf4b97abf53d1bd5f32b4a813..6b1dcf8e04ef521ea423851bc0d084877bc6a3d1 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A6.3.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A6.3.js @@ -5,12 +5,12 @@ info: The length property of push has the attribute ReadOnly es5id: 15.4.4.7_A6.3 description: Checking if varying the length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 var x = Array.prototype.push.length; -Array.prototype.push.length = Infinity; +verifyNotWritable(Array.prototype.push, "length", null, Infinity); if (Array.prototype.push.length !== x) { $ERROR('#1: x = Array.prototype.push.length; Array.prototype.push.length = Infinity; Array.prototype.push.length === x. Actual: ' + (Array.prototype.push.length)); } diff --git a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A5.2.js b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A5.2.js index 0c4365d795d22f99f891d868caadbef03216ba66..a80c86a5653e340443ae9d620693c88c742419ad 100644 --- a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A5.2.js +++ b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A5.2.js @@ -5,7 +5,6 @@ info: The length property of reverse does not have the attribute DontDelete es5id: 15.4.4.8_A5.2 description: Checking use hasOwnProperty, delete -flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A5.3.js b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A5.3.js index 65b5bf2fe75257099398e60acb6d8719f58bc94d..d18c4bad86f7fa6c3008c64962cd304868d0f721 100644 --- a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A5.3.js +++ b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A5.3.js @@ -5,12 +5,12 @@ info: The length property of reverse has the attribute ReadOnly es5id: 15.4.4.8_A5.3 description: Checking if varying the length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 var x = Array.prototype.reverse.length; -Array.prototype.reverse.length = Infinity; +verifyNotWritable(Array.prototype.reverse, "length", null, Infinity); if (Array.prototype.reverse.length !== x) { $ERROR('#1: x = Array.prototype.reverse.length; Array.prototype.reverse.length = Infinity; Array.prototype.reverse.length === x. Actual: ' + (Array.prototype.reverse.length)); } diff --git a/test/built-ins/Array/prototype/shift/S15.4.4.9_A5.3.js b/test/built-ins/Array/prototype/shift/S15.4.4.9_A5.3.js index a126e00969a36cbbca1c155e05b85cc04e46e36a..a3c2ea971df96c5f04e6184450715b161cda2bd3 100644 --- a/test/built-ins/Array/prototype/shift/S15.4.4.9_A5.3.js +++ b/test/built-ins/Array/prototype/shift/S15.4.4.9_A5.3.js @@ -5,12 +5,12 @@ info: The length property of shift has the attribute ReadOnly es5id: 15.4.4.9_A5.3 description: Checking if varying the length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 var x = Array.prototype.shift.length; -Array.prototype.shift.length = Infinity; +verifyNotWritable(Array.prototype.shift, "length", null, Infinity); if (Array.prototype.shift.length !== x) { $ERROR('#1: x = Array.prototype.shift.length; Array.prototype.shift.length = Infinity; Array.prototype.shift.length === x. Actual: ' + (Array.prototype.shift.length)); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A5.3.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A5.3.js index b2f7114179af8e4bbe4ac01866bdbb053cc2280d..f50e5af1eb45da96dd4a7fcdb4d34911c3c518bc 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A5.3.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A5.3.js @@ -5,12 +5,12 @@ info: The length property of slice has the attribute ReadOnly es5id: 15.4.4.10_A5.3 description: Checking if varying the length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 var x = Array.prototype.slice.length; -Array.prototype.slice.length = Infinity; +verifyNotWritable(Array.prototype.slice, "length", null, Infinity); if (Array.prototype.slice.length !== x) { $ERROR('#1: x = Array.prototype.slice.length; Array.prototype.slice.length = Infinity; Array.prototypeslice.length === x. Actual: ' + (Array.prototypeslice.length)); } diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A7.2.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A7.2.js index 101ee5365a4f2912a0dc5d2ad7f7e6bcb22c90c6..bd006de0cc103a2557eaa24918aba93273601075 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A7.2.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A7.2.js @@ -5,7 +5,6 @@ info: The length property of sort does not have the attribute DontDelete es5id: 15.4.4.11_A7.2 description: Checking use hasOwnProperty, delete -flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A7.3.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A7.3.js index cf12ce9f0f9b0519ab1221ad8e8accdd77f4adbd..a8497cb9a90c380849f008082b9ac76ec679e3fd 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A7.3.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A7.3.js @@ -5,12 +5,12 @@ info: The length property of sort has the attribute ReadOnly es5id: 15.4.4.11_A7.3 description: Checking if varying the length fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 var x = Array.prototype.sort.length; -Array.prototype.sort.length = Infinity; +verifyNotWritable(Array.prototype.sort, "length", null, Infinity); if (Array.prototype.sort.length !== x) { $ERROR('#1: x = Array.prototype.sort.length; Array.prototype.sort.length = Infinity; Array.prototype.sort.length === x. Actual: ' + (Array.prototype.sort.length)); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A5.2.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A5.2.js index 20ec46bf89155c73d81d0077e7db9839417dfd4d..2fae02e1402d888ac86b6791784055e182ccfebb 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A5.2.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A5.2.js @@ -5,7 +5,6 @@ info: The length property of splice does not have the attribute DontDelete es5id: 15.4.4.12_A5.2 description: Checking use hasOwnProperty, delete -flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A5.3.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A5.3.js index 75f002ea06533e12d456063f1773e155d74c54c1..8d250f34114663f83e8d2b6fd19b38a88ee306fa 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A5.3.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A5.3.js @@ -5,12 +5,12 @@ info: The length property of splice has the attribute ReadOnly es5id: 15.4.4.12_A5.3 description: Checking if varying the length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 var x = Array.prototype.splice.length; -Array.prototype.splice.length = Infinity; +verifyNotWritable(Array.prototype.splice, "length", null, Infinity); if (Array.prototype.splice.length !== x) { $ERROR('#1: x = Array.prototype.splice.length; Array.prototype.splice.length = Infinity; Array.prototype.splice.length === x. Actual: ' + (Array.prototype.splice.length)); } diff --git a/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A4.3.js b/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A4.3.js index b860c9bba3dd031d270a3a1aa216e96cdfe2f512..e96f635af4ca171d4cce05d81d9966b4a41436c2 100644 --- a/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A4.3.js +++ b/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A4.3.js @@ -5,12 +5,12 @@ info: The length property of toLocaleString has the attribute ReadOnly es5id: 15.4.4.3_A4.3 description: Checking if varying the length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 var x = Array.prototype.toLocaleString.length; -Array.prototype.toLocaleString.length = Infinity; +verifyNotWritable(Array.prototype.toLocaleString, "length", null, Infinity); if (Array.prototype.toLocaleString.length !== x) { $ERROR('#1: x = Array.prototype.toLocaleString.length; Array.prototype.toLocaleString.length = Infinity; Array.prototype.toLocaleString.length === x. Actual: ' + (Array.prototype.toLocaleString.length)); } diff --git a/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.2.js b/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.2.js index 63e9b9cf174d9cd351ebfadb2ed2f5b37bd2fec8..f86a7757ff87ad5a62bb0f90a9dcd5540d74c9a7 100644 --- a/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.2.js +++ b/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.2.js @@ -5,7 +5,6 @@ info: The length property of toString does not have the attribute DontDelete es5id: 15.4.4.2_A4.2 description: Checking use hasOwnProperty, delete -flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.3.js b/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.3.js index f6211ddb8f7922abbf358de7ddfc510e44b5b921..b6b88a74f15e3831d45cd6c7475d00758337927f 100644 --- a/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.3.js +++ b/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.3.js @@ -5,12 +5,12 @@ info: The length property of toString has the attribute ReadOnly es5id: 15.4.4.2_A4.3 description: Checking if varying the length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 var x = Array.prototype.toString.length; -Array.prototype.toString.length = Infinity; +verifyNotWritable(Array.prototype.toString, "length", null, Infinity); if (Array.prototype.toString.length !== x) { $ERROR('#1: x = Array.prototype.toString.length; Array.prototype.toString.length = Infinity; Array.prototype.toString.length === x. Actual: ' + (Array.prototype.toString.length)); } diff --git a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A5.2.js b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A5.2.js index 5dc23d845e694c0936346c177625629f4cdd0c16..9d4ed0c948531756979fbe2901910210e2d8255a 100644 --- a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A5.2.js +++ b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A5.2.js @@ -5,7 +5,6 @@ info: The length property of unshift does not have the attribute DontDelete es5id: 15.4.4.13_A5.2 description: Checking use hasOwnProperty, delete -flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A5.3.js b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A5.3.js index dcc17cc0ba9273fa8a6d63ffecfbc57a213883b0..cc94d11e9e089591befaf8ce655da9c8831a0e09 100644 --- a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A5.3.js +++ b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A5.3.js @@ -5,12 +5,12 @@ info: The length property of unshift has the attribute ReadOnly es5id: 15.4.4.13_A5.3 description: Checking if varying the length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 var x = Array.prototype.unshift.length; -Array.prototype.unshift.length = Infinity; +verifyNotWritable(Array.prototype.unshift, "length", null, Infinity); if (Array.prototype.unshift.length !== x) { $ERROR('#1: x = Array.prototype.unshift.length; Array.prototype.unshift.length = Infinity; Array.prototype.unshift.length === x. Actual: ' + (Array.prototype.unshift.length)); } diff --git a/test/built-ins/Boolean/prototype/S15.6.3.1_A2.js b/test/built-ins/Boolean/prototype/S15.6.3.1_A2.js index c834d39fd2d20bcf5f0af87ec96f9b9b945f42e0..fa6539868a67b3c3ac85d91a610193c4fda75f99 100644 --- a/test/built-ins/Boolean/prototype/S15.6.3.1_A2.js +++ b/test/built-ins/Boolean/prototype/S15.6.3.1_A2.js @@ -5,12 +5,12 @@ info: Boolean.prototype has the attribute ReadOnly es5id: 15.6.3.1_A2 description: Checking if varying the Boolean.prototype property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ // CHECK#1 -x = Boolean.prototype; -Boolean.prototype = 1; +var x = Boolean.prototype; +verifyNotWritable(Boolean, "prototype", null, 1); if (Boolean.prototype !== x) { $ERROR('#1: Boolean.prototype has the attribute ReadOnly'); } diff --git a/test/built-ins/Boolean/prototype/S15.6.3.1_A3.js b/test/built-ins/Boolean/prototype/S15.6.3.1_A3.js index 3decf9d4471a5b17202bf7a316308dcb60ddecf0..f4b5a8c723c68c5b78b4d278c251f00314cc855d 100644 --- a/test/built-ins/Boolean/prototype/S15.6.3.1_A3.js +++ b/test/built-ins/Boolean/prototype/S15.6.3.1_A3.js @@ -5,10 +5,17 @@ info: Boolean.prototype has the attribute DontDelete es5id: 15.6.3.1_A3 description: Checking if deleting the Boolean.prototype property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ // CHECK#1 -if (delete Boolean.prototype !== false) { - $ERROR('#1: Boolean.prototype has the attribute DontDelete'); +verifyNotConfigurable(Boolean, "prototype"); + +try { + if (delete Boolean.prototype !== false) { + $ERROR('#1: Boolean.prototype has the attribute DontDelete'); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } diff --git a/test/built-ins/Date/UTC/S15.9.4.3_A3_T1.js b/test/built-ins/Date/UTC/S15.9.4.3_A3_T1.js index d21ad9dfc91feffd9a56b5c2b2e8205f381f21f3..c7b2dca71707a2527101fb4286eb7c6a2694a388 100644 --- a/test/built-ins/Date/UTC/S15.9.4.3_A3_T1.js +++ b/test/built-ins/Date/UTC/S15.9.4.3_A3_T1.js @@ -7,11 +7,11 @@ info: > attributes es5id: 15.9.4.3_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.UTC.length; -Date.UTC.length = 1; +var x = Date.UTC.length; +verifyNotWritable(Date.UTC, "length", null, 1); if (Date.UTC.length !== x) { $ERROR('#1: The Date.UTC.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/parse/S15.9.4.2_A3_T1.js b/test/built-ins/Date/parse/S15.9.4.2_A3_T1.js index 920571356c03659f1730bcc6bde60ed6c6318f39..3ad63c9aeddec9b6b1fd2c6b7770b38006b81408 100644 --- a/test/built-ins/Date/parse/S15.9.4.2_A3_T1.js +++ b/test/built-ins/Date/parse/S15.9.4.2_A3_T1.js @@ -7,11 +7,11 @@ info: > attributes es5id: 15.9.4.2_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.parse.length; -Date.parse.length = 1; +var x = Date.parse.length; +verifyNotWritable(Date.parse, "length", null, 1); if (Date.parse.length !== x) { $ERROR('#1: The Date.parse.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/S15.9.4.1_A1_T1.js b/test/built-ins/Date/prototype/S15.9.4.1_A1_T1.js index 1113f1cdb0426f56b794811d5c1518d7ac27192c..3815abe0e1ad40a44925a49b91c741ce3429a1cd 100644 --- a/test/built-ins/Date/prototype/S15.9.4.1_A1_T1.js +++ b/test/built-ins/Date/prototype/S15.9.4.1_A1_T1.js @@ -7,11 +7,11 @@ info: > attributes es5id: 15.9.4.1_A1_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype; -Date.prototype = 1; +var x = Date.prototype; +verifyNotWritable(Date, "prototype", null, 1); if (Date.prototype !== x) { $ERROR('#1: The Date.prototype has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/S15.9.4.1_A1_T2.js b/test/built-ins/Date/prototype/S15.9.4.1_A1_T2.js index 66cffbf49caae74ce4b7c6f7ba0deeb35079fd79..bcca9c2ca792f6ea3063e8f8c5485550256e1a2d 100644 --- a/test/built-ins/Date/prototype/S15.9.4.1_A1_T2.js +++ b/test/built-ins/Date/prototype/S15.9.4.1_A1_T2.js @@ -7,12 +7,18 @@ info: > attributes es5id: 15.9.4.1_A1_T2 description: Checking DontDelete attribute -flags: [noStrict] -includes: [$FAIL.js] +includes: [propertyHelper.js] ---*/ -if (delete Date.prototype !== false) { - $ERROR('#1: The Date.prototype property has the attributes DontDelete'); +verifyNotConfigurable(Date, "prototype"); + +try { + if (delete Date.prototype !== false) { + $ERROR('#1: The Date.prototype property has the attributes DontDelete'); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } if (!Date.hasOwnProperty('prototype')) { diff --git a/test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T1.js b/test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T1.js index 88e191f80b2e62cd7e7a544336abd2769c676a32..015d2b1ce92d29f181506e0e61874aad3c47636b 100644 --- a/test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T1.js +++ b/test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.1_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.constructor.length; -Date.prototype.constructor.length = 1; +var x = Date.prototype.constructor.length; +verifyNotWritable(Date.prototype.constructor, "length", null, 1); if (Date.prototype.constructor.length !== x) { $ERROR('#1: The Date.prototype.constructor.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/getDate/S15.9.5.14_A3_T1.js b/test/built-ins/Date/prototype/getDate/S15.9.5.14_A3_T1.js index 039948888a6075e73c1137cf8fe524ed8ac6cc6f..31f0cbb4708a9df38393dd5e80f39bc92a6e86cc 100644 --- a/test/built-ins/Date/prototype/getDate/S15.9.5.14_A3_T1.js +++ b/test/built-ins/Date/prototype/getDate/S15.9.5.14_A3_T1.js @@ -7,11 +7,11 @@ info: > DontEnum } attributes es5id: 15.9.5.14_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.getDate.length; -Date.prototype.getDate.length = 1; +var x = Date.prototype.getDate.length; +verifyNotWritable(Date.prototype.getDate, "length", null, 1); if (Date.prototype.getDate.length !== x) { $ERROR('#1: The Date.prototype.getDate.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/getDay/S15.9.5.16_A3_T1.js b/test/built-ins/Date/prototype/getDay/S15.9.5.16_A3_T1.js index 767579e4a3a5d1fe0984570b03204c116dd80d28..ce1d0b17b05520f3f81cb77d73d7cb1f29725296 100644 --- a/test/built-ins/Date/prototype/getDay/S15.9.5.16_A3_T1.js +++ b/test/built-ins/Date/prototype/getDay/S15.9.5.16_A3_T1.js @@ -7,11 +7,11 @@ info: > DontEnum } attributes es5id: 15.9.5.16_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.getDay.length; -Date.prototype.getDay.length = 1; +var x = Date.prototype.getDay.length; +verifyNotWritable(Date.prototype.getDay, "length", null, 1); if (Date.prototype.getDay.length !== x) { $ERROR('#1: The Date.prototype.getDay.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/getFullYear/S15.9.5.10_A3_T1.js b/test/built-ins/Date/prototype/getFullYear/S15.9.5.10_A3_T1.js index c0ec89047855155e440184a9e878d2bed055d404..173f9e83a3ec74e6496843f79c896e83fd4a5949 100644 --- a/test/built-ins/Date/prototype/getFullYear/S15.9.5.10_A3_T1.js +++ b/test/built-ins/Date/prototype/getFullYear/S15.9.5.10_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.10_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.getFullYear.length; -Date.prototype.getFullYear.length = 1; +var x = Date.prototype.getFullYear.length; +verifyNotWritable(Date.prototype.getFullYear, "length", null, 1); if (Date.prototype.getFullYear.length !== x) { $ERROR('#1: The Date.prototype.getFullYear.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/getHours/S15.9.5.18_A3_T1.js b/test/built-ins/Date/prototype/getHours/S15.9.5.18_A3_T1.js index 556323d1de075d3c0be7a85671e1083d12896576..fdbaa633f95ada6d44c1f67b7bb228c3c050a01f 100644 --- a/test/built-ins/Date/prototype/getHours/S15.9.5.18_A3_T1.js +++ b/test/built-ins/Date/prototype/getHours/S15.9.5.18_A3_T1.js @@ -7,11 +7,11 @@ info: > DontEnum } attributes es5id: 15.9.5.18_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.getHours.length; -Date.prototype.getHours.length = 1; +var x = Date.prototype.getHours.length; +verifyNotWritable(Date.prototype.getHours, "length", null, 1); if (Date.prototype.getHours.length !== x) { $ERROR('#1: The Date.prototype.getHours.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/getMilliseconds/S15.9.5.24_A3_T1.js b/test/built-ins/Date/prototype/getMilliseconds/S15.9.5.24_A3_T1.js index fe1ecd8ee87d998da9046bdf381cf028940d1d0d..48d763d1865ec4c0d4f642f831f11e87e9583250 100644 --- a/test/built-ins/Date/prototype/getMilliseconds/S15.9.5.24_A3_T1.js +++ b/test/built-ins/Date/prototype/getMilliseconds/S15.9.5.24_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.24_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.getMilliseconds.length; -Date.prototype.getMilliseconds.length = 1; +var x = Date.prototype.getMilliseconds.length; +verifyNotWritable(Date.prototype.getMilliseconds, "length", null, 1); if (Date.prototype.getMilliseconds.length !== x) { $ERROR('#1: The Date.prototype.getMilliseconds.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/getMinutes/S15.9.5.20_A3_T1.js b/test/built-ins/Date/prototype/getMinutes/S15.9.5.20_A3_T1.js index 10cde1ca5f3189b8d35c7ef323a9931e9fcf2a68..8c1b3d739c0a6490c19b39d88e56c7610ecea9a8 100644 --- a/test/built-ins/Date/prototype/getMinutes/S15.9.5.20_A3_T1.js +++ b/test/built-ins/Date/prototype/getMinutes/S15.9.5.20_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.20_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.getMinutes.length; -Date.prototype.getMinutes.length = 1; +var x = Date.prototype.getMinutes.length; +verifyNotWritable(Date.prototype.getMinutes, "length", null, 1); if (Date.prototype.getMinutes.length !== x) { $ERROR('#1: The Date.prototype.getMinutes.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/getMonth/S15.9.5.12_A3_T1.js b/test/built-ins/Date/prototype/getMonth/S15.9.5.12_A3_T1.js index 2c65e30b6a8b38ace55feed48ee965de05476d1e..0878a8593ae49790db1f5d043974612036522348 100644 --- a/test/built-ins/Date/prototype/getMonth/S15.9.5.12_A3_T1.js +++ b/test/built-ins/Date/prototype/getMonth/S15.9.5.12_A3_T1.js @@ -7,11 +7,11 @@ info: > DontEnum } attributes es5id: 15.9.5.12_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.getMonth.length; -Date.prototype.getMonth.length = 1; +var x = Date.prototype.getMonth.length; +verifyNotWritable(Date.prototype.getMonth, "length", null, 1); if (Date.prototype.getMonth.length !== x) { $ERROR('#1: The Date.prototype.getMonth.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/getSeconds/S15.9.5.22_A3_T1.js b/test/built-ins/Date/prototype/getSeconds/S15.9.5.22_A3_T1.js index c5b790c046467042da2e589592c771ff1eadde59..784c2260e1ee3dc872114d69ba6ba4da898fcf26 100644 --- a/test/built-ins/Date/prototype/getSeconds/S15.9.5.22_A3_T1.js +++ b/test/built-ins/Date/prototype/getSeconds/S15.9.5.22_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.22_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.getSeconds.length; -Date.prototype.getSeconds.length = 1; +var x = Date.prototype.getSeconds.length; +verifyNotWritable(Date.prototype.getSeconds, "length", null, 1); if (Date.prototype.getSeconds.length !== x) { $ERROR('#1: The Date.prototype.getSeconds.length has the attribute ReadOnly'); } 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 index 6034ff9be607e985706519cadc987c1bda23e0f8..f6429f230fcf455ee9d9d697c504c89becd965cb 100644 --- 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 @@ -7,11 +7,11 @@ info: > DontEnum } attributes es5id: 15.9.5.9_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.getTime.length; -Date.prototype.getTime.length = 1; +var x = Date.prototype.getTime.length; +verifyNotWritable(Date.prototype.getTime, "length", null, 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/getTimezoneOffset/S15.9.5.26_A3_T1.js b/test/built-ins/Date/prototype/getTimezoneOffset/S15.9.5.26_A3_T1.js index 09b0df7b8ded768ec8fb4cfd81ca60ab8e1b4904..6d132420e061d179b40ead480d96d5a33772b026 100644 --- a/test/built-ins/Date/prototype/getTimezoneOffset/S15.9.5.26_A3_T1.js +++ b/test/built-ins/Date/prototype/getTimezoneOffset/S15.9.5.26_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.26_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.getTimezoneOffset.length; -Date.prototype.getTimezoneOffset.length = 1; +var x = Date.prototype.getTimezoneOffset.length; +verifyNotWritable(Date.prototype.getTimezoneOffset, "length", null, 1); if (Date.prototype.getTimezoneOffset.length !== x) { $ERROR('#1: The Date.prototype.getTimezoneOffset.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/getUTCDate/S15.9.5.15_A3_T1.js b/test/built-ins/Date/prototype/getUTCDate/S15.9.5.15_A3_T1.js index 667d3a0692802b237bb5f90e8944ec97e6ed3b11..d7476cdeee23498d4e907ed505c4620664fa3629 100644 --- a/test/built-ins/Date/prototype/getUTCDate/S15.9.5.15_A3_T1.js +++ b/test/built-ins/Date/prototype/getUTCDate/S15.9.5.15_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.15_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.getUTCDate.length; -Date.prototype.getUTCDate.length = 1; +var x = Date.prototype.getUTCDate.length; +verifyNotWritable(Date.prototype.getUTCDate, "length", null, 1); if (Date.prototype.getUTCDate.length !== x) { $ERROR('#1: The Date.prototype.getUTCDate.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/getUTCDay/S15.9.5.17_A3_T1.js b/test/built-ins/Date/prototype/getUTCDay/S15.9.5.17_A3_T1.js index f1c668e8c178af351595628da641f0723aeb91fe..ff08c81ff3560e2fafd3abd839fe26a270deb287 100644 --- a/test/built-ins/Date/prototype/getUTCDay/S15.9.5.17_A3_T1.js +++ b/test/built-ins/Date/prototype/getUTCDay/S15.9.5.17_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.17_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.getUTCDay.length; -Date.prototype.getUTCDay.length = 1; +var x = Date.prototype.getUTCDay.length; +verifyNotWritable(Date.prototype.getUTCDay, "length", null, 1); if (Date.prototype.getUTCDay.length !== x) { $ERROR('#1: The Date.prototype.getUTCDay.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/getUTCFullYear/S15.9.5.11_A3_T1.js b/test/built-ins/Date/prototype/getUTCFullYear/S15.9.5.11_A3_T1.js index 18cd31ff869201e54a2109843570d16a7c97d83c..26b96be009d78f9376b7dfb9d4268757e248f448 100644 --- a/test/built-ins/Date/prototype/getUTCFullYear/S15.9.5.11_A3_T1.js +++ b/test/built-ins/Date/prototype/getUTCFullYear/S15.9.5.11_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.11_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.getUTCFullYear.length; -Date.prototype.getUTCFullYear.length = 1; +var x = Date.prototype.getUTCFullYear.length; +verifyNotWritable(Date.prototype.getUTCFullYear, "length", null, 1); if (Date.prototype.getUTCFullYear.length !== x) { $ERROR('#1: The Date.prototype.getUTCFullYear.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/getUTCHours/S15.9.5.19_A3_T1.js b/test/built-ins/Date/prototype/getUTCHours/S15.9.5.19_A3_T1.js index 6cc63fa0fe0d704ae7d578ec3a1835591c6100d6..492c9b76205a3bbcd32d4da5b8ba896f07b2ac81 100644 --- a/test/built-ins/Date/prototype/getUTCHours/S15.9.5.19_A3_T1.js +++ b/test/built-ins/Date/prototype/getUTCHours/S15.9.5.19_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.19_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.getUTCHours.length; -Date.prototype.getUTCHours.length = 1; +var x = Date.prototype.getUTCHours.length; +verifyNotWritable(Date.prototype.getUTCHours, "length", null, 1); if (Date.prototype.getUTCHours.length !== x) { $ERROR('#1: The Date.prototype.getUTCHours.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/getUTCMilliseconds/S15.9.5.25_A3_T1.js b/test/built-ins/Date/prototype/getUTCMilliseconds/S15.9.5.25_A3_T1.js index 397f11816aa6d1ac6332d90753a8109c254f6c36..029a9290ef6c5a124ab1503b922e455b21b0c4af 100644 --- a/test/built-ins/Date/prototype/getUTCMilliseconds/S15.9.5.25_A3_T1.js +++ b/test/built-ins/Date/prototype/getUTCMilliseconds/S15.9.5.25_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.25_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.getUTCMilliseconds.length; -Date.prototype.getUTCMilliseconds.length = 1; +var x = Date.prototype.getUTCMilliseconds.length; +verifyNotWritable(Date.prototype.getUTCMilliseconds, "length", null, 1); if (Date.prototype.getUTCMilliseconds.length !== x) { $ERROR('#1: The Date.prototype.getUTCMilliseconds.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/getUTCMinutes/S15.9.5.21_A3_T1.js b/test/built-ins/Date/prototype/getUTCMinutes/S15.9.5.21_A3_T1.js index e642dfdef7f0f8da2ed3a8c5e757e6b2bb9bc9cd..014d0e802de495d535be34f8587951972254a4fd 100644 --- a/test/built-ins/Date/prototype/getUTCMinutes/S15.9.5.21_A3_T1.js +++ b/test/built-ins/Date/prototype/getUTCMinutes/S15.9.5.21_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.21_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.getUTCMinutes.length; -Date.prototype.getUTCMinutes.length = 1; +var x = Date.prototype.getUTCMinutes.length; +verifyNotWritable(Date.prototype.getUTCMinutes, "length", null, 1); if (Date.prototype.getUTCMinutes.length !== x) { $ERROR('#1: The Date.prototype.getUTCMinutes.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/getUTCMonth/S15.9.5.13_A3_T1.js b/test/built-ins/Date/prototype/getUTCMonth/S15.9.5.13_A3_T1.js index f2b03bea2fb2289d4673ed5fcc98820035c78fab..265d2e683e0930085b50c674414bfdd54f8427d1 100644 --- a/test/built-ins/Date/prototype/getUTCMonth/S15.9.5.13_A3_T1.js +++ b/test/built-ins/Date/prototype/getUTCMonth/S15.9.5.13_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.13_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.getUTCMonth.length; -Date.prototype.getUTCMonth.length = 1; +var x = Date.prototype.getUTCMonth.length; +verifyNotWritable(Date.prototype.getUTCMonth, "length", null, 1); if (Date.prototype.getUTCMonth.length !== x) { $ERROR('#1: The Date.prototype.getUTCMonth.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/getUTCSeconds/S15.9.5.23_A3_T1.js b/test/built-ins/Date/prototype/getUTCSeconds/S15.9.5.23_A3_T1.js index 0c5cf3fda500040b460bc1ef1267b506542d0d89..8c1af370e19baeec8ef9bc57e17141e3f47c06c3 100644 --- a/test/built-ins/Date/prototype/getUTCSeconds/S15.9.5.23_A3_T1.js +++ b/test/built-ins/Date/prototype/getUTCSeconds/S15.9.5.23_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.23_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.getUTCSeconds.length; -Date.prototype.getUTCSeconds.length = 1; +var x = Date.prototype.getUTCSeconds.length; +verifyNotWritable(Date.prototype.getUTCSeconds, "length", null, 1); if (Date.prototype.getUTCSeconds.length !== x) { $ERROR('#1: The Date.prototype.getUTCSeconds.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/setDate/S15.9.5.36_A3_T1.js b/test/built-ins/Date/prototype/setDate/S15.9.5.36_A3_T1.js index 951643f302b861f6f6c36c026fedad0923d6dd59..c04c0804897e800dfc5474dd709d4a9b720a1d48 100644 --- a/test/built-ins/Date/prototype/setDate/S15.9.5.36_A3_T1.js +++ b/test/built-ins/Date/prototype/setDate/S15.9.5.36_A3_T1.js @@ -7,11 +7,11 @@ info: > DontEnum } attributes es5id: 15.9.5.36_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.setDate.length; -Date.prototype.setDate.length = 1; +var x = Date.prototype.setDate.length; +verifyNotWritable(Date.prototype.setDate, "length", null, 1); if (Date.prototype.setDate.length !== x) { $ERROR('#1: The Date.prototype.setDate.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A3_T1.js b/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A3_T1.js index cbd1b11a2ec0d627bac10487ad93828e54393f58..bf8c19aba43f83f0cf8510a37a335680e68961e7 100644 --- a/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A3_T1.js +++ b/test/built-ins/Date/prototype/setFullYear/S15.9.5.40_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.40_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.setFullYear.length; -Date.prototype.setFullYear.length = 1; +var x = Date.prototype.setFullYear.length; +verifyNotWritable(Date.prototype.setFullYear, "length", null, 1); if (Date.prototype.setFullYear.length !== x) { $ERROR('#1: The Date.prototype.setFullYear.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/setHours/S15.9.5.34_A3_T1.js b/test/built-ins/Date/prototype/setHours/S15.9.5.34_A3_T1.js index 7ff13e48937d7dbafdcff8aa29bb3ac65bb4a306..31a9a32837d11bf2c06ee5e522f575890e4e4813 100644 --- a/test/built-ins/Date/prototype/setHours/S15.9.5.34_A3_T1.js +++ b/test/built-ins/Date/prototype/setHours/S15.9.5.34_A3_T1.js @@ -7,11 +7,11 @@ info: > DontEnum } attributes es5id: 15.9.5.34_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.setHours.length; -Date.prototype.setHours.length = 1; +var x = Date.prototype.setHours.length; +verifyNotWritable(Date.prototype.setHours, "length", null, 1); if (Date.prototype.setHours.length !== x) { $ERROR('#1: The Date.prototype.setHours.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A3_T1.js b/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A3_T1.js index a9ebc7802a91184508feed5e71f88bd90853ec8e..57960b1ec10fef3dcc09ed93a6586936d036357c 100644 --- a/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A3_T1.js +++ b/test/built-ins/Date/prototype/setMilliseconds/S15.9.5.28_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.28_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.setMilliseconds.length; -Date.prototype.setMilliseconds.length = 1; +var x = Date.prototype.setMilliseconds.length; +verifyNotWritable(Date.prototype.setMilliseconds, "length", null, 1); if (Date.prototype.setMilliseconds.length !== x) { $ERROR('#1: The Date.prototype.setMilliseconds.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A3_T1.js b/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A3_T1.js index 3caecaee1579258928512f4212c31381fb6fc79f..ddbd3da4aff148534ca5534e59ddb57cb44c6910 100644 --- a/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A3_T1.js +++ b/test/built-ins/Date/prototype/setMinutes/S15.9.5.32_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.32_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.setMinutes.length; -Date.prototype.setMinutes.length = 1; +var x = Date.prototype.setMinutes.length; +verifyNotWritable(Date.prototype.setMinutes, "length", null, 1); if (Date.prototype.setMinutes.length !== x) { $ERROR('#1: The Date.prototype.setMinutes.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A3_T1.js b/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A3_T1.js index 1dc158a92c1fa53eb959ec2fffacea6584db22aa..9a97ec1ad2fc3a60a2601920565aea9b8be36be5 100644 --- a/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A3_T1.js +++ b/test/built-ins/Date/prototype/setMonth/S15.9.5.38_A3_T1.js @@ -7,11 +7,11 @@ info: > DontEnum } attributes es5id: 15.9.5.38_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.setMonth.length; -Date.prototype.setMonth.length = 1; +var x = Date.prototype.setMonth.length; +verifyNotWritable(Date.prototype.setMonth, "length", null, 1); if (Date.prototype.setMonth.length !== x) { $ERROR('#1: The Date.prototype.setMonth.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A3_T1.js b/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A3_T1.js index fb655a8a65b0c029f1776d89c1f178829756d0b7..61c054f61700505ed52faf2a2c198ff6da573cbc 100644 --- a/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A3_T1.js +++ b/test/built-ins/Date/prototype/setSeconds/S15.9.5.30_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.30_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.setSeconds.length; -Date.prototype.setSeconds.length = 1; +var x = Date.prototype.setSeconds.length; +verifyNotWritable(Date.prototype.setSeconds, "length", null, 1); if (Date.prototype.setSeconds.length !== x) { $ERROR('#1: The Date.prototype.setSeconds.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/setTime/S15.9.5.27_A3_T1.js b/test/built-ins/Date/prototype/setTime/S15.9.5.27_A3_T1.js index 170b2228994a58912634d37878d2672641442079..b8a29e63fa163e32819828b42604b503f7baa8ff 100644 --- a/test/built-ins/Date/prototype/setTime/S15.9.5.27_A3_T1.js +++ b/test/built-ins/Date/prototype/setTime/S15.9.5.27_A3_T1.js @@ -7,11 +7,11 @@ info: > DontEnum } attributes es5id: 15.9.5.27_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.setTime.length; -Date.prototype.setTime.length = 1; +var x = Date.prototype.setTime.length; +verifyNotWritable(Date.prototype.setTime, "length", null, 1); if (Date.prototype.setTime.length !== x) { $ERROR('#1: The Date.prototype.setTime.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A3_T1.js b/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A3_T1.js index 97362346bb8e135ecb4c170eb68154fc4b4b0121..6e82ad213194cc68e90f8908ab8ff92ba042827a 100644 --- a/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A3_T1.js +++ b/test/built-ins/Date/prototype/setUTCDate/S15.9.5.37_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.37_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.setUTCDate.length; -Date.prototype.setUTCDate.length = 1; +var x = Date.prototype.setUTCDate.length; +verifyNotWritable(Date.prototype.setUTCDate, "length", null, 1); if (Date.prototype.setUTCDate.length !== x) { $ERROR('#1: The Date.prototype.setUTCDate.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A3_T1.js b/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A3_T1.js index f2ea0e6878c748167322f01de633b1c01e752c2b..5a0fea02f50fc0f4a638b5c28ab99c1765e72488 100644 --- a/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A3_T1.js +++ b/test/built-ins/Date/prototype/setUTCFullYear/S15.9.5.41_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.41_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.setUTCFullYear.length; -Date.prototype.setUTCFullYear.length = 1; +var x = Date.prototype.setUTCFullYear.length; +verifyNotWritable(Date.prototype.setUTCFullYear, "length", null, 1); if (Date.prototype.setUTCFullYear.length !== x) { $ERROR('#1: The Date.prototype.setUTCFullYear.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A3_T1.js b/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A3_T1.js index fea978f4e8243c3f636e5e214e8f8882d50123ae..35f9fab8f780db90436ccbc55585605e6bc74c8c 100644 --- a/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A3_T1.js +++ b/test/built-ins/Date/prototype/setUTCHours/S15.9.5.35_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.35_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.setUTCHours.length; -Date.prototype.setUTCHours.length = 1; +var x = Date.prototype.setUTCHours.length; +verifyNotWritable(Date.prototype.setUTCHours, "length", null, 1); if (Date.prototype.setUTCHours.length !== x) { $ERROR('#1: The Date.prototype.setUTCHours.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A3_T1.js b/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A3_T1.js index ca89f11c8cfd6840232ccca431156a5aef739c4d..54da31437c47c5a1b4005c8c875d31ae8faed444 100644 --- a/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A3_T1.js +++ b/test/built-ins/Date/prototype/setUTCMilliseconds/S15.9.5.29_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.29_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.setUTCMilliseconds.length; -Date.prototype.setUTCMilliseconds.length = 1; +var x = Date.prototype.setUTCMilliseconds.length; +verifyNotWritable(Date.prototype.setUTCMilliseconds, "length", null, 1); if (Date.prototype.setUTCMilliseconds.length !== x) { $ERROR('#1: The Date.prototype.setUTCMilliseconds.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A3_T1.js b/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A3_T1.js index cba299bcb4a76b24bea19347495ee2f5abe61066..67f1beee26d6d827b5dc25f906975f763ac0839f 100644 --- a/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A3_T1.js +++ b/test/built-ins/Date/prototype/setUTCMinutes/S15.9.5.33_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.33_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.setUTCMinutes.length; -Date.prototype.setUTCMinutes.length = 1; +var x = Date.prototype.setUTCMinutes.length; +verifyNotWritable(Date.prototype.setUTCMinutes, "length", null, 1); if (Date.prototype.setUTCMinutes.length !== x) { $ERROR('#1: The Date.prototype.setUTCMinutes.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A3_T1.js b/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A3_T1.js index 8979fe138e77f7efa8124d97fec269c27e35cc8e..12fdc2fb9f6557d214a9761d9939929c0dadee82 100644 --- a/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A3_T1.js +++ b/test/built-ins/Date/prototype/setUTCMonth/S15.9.5.39_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.39_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.setUTCMonth.length; -Date.prototype.setUTCMonth.length = 1; +var x = Date.prototype.setUTCMonth.length; +verifyNotWritable(Date.prototype.setUTCMonth, "length", null, 1); if (Date.prototype.setUTCMonth.length !== x) { $ERROR('#1: The Date.prototype.setUTCMonth.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A3_T1.js b/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A3_T1.js index 59a0c073d8d03b90bd12109d3340272d28f972d1..3b0cd3aa63988da62075d19d30a79c4d9a306c8a 100644 --- a/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A3_T1.js +++ b/test/built-ins/Date/prototype/setUTCSeconds/S15.9.5.31_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.31_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.setUTCSeconds.length; -Date.prototype.setUTCSeconds.length = 1; +var x = Date.prototype.setUTCSeconds.length; +verifyNotWritable(Date.prototype.setUTCSeconds, "length", null, 1); if (Date.prototype.setUTCSeconds.length !== x) { $ERROR('#1: The Date.prototype.setUTCSeconds.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/toDateString/S15.9.5.3_A3_T1.js b/test/built-ins/Date/prototype/toDateString/S15.9.5.3_A3_T1.js index 4b7b3ac24e3426b167d76a7b457a496f799712a9..304bb633cfd24825bf4efc8c079b125a038f905a 100644 --- a/test/built-ins/Date/prototype/toDateString/S15.9.5.3_A3_T1.js +++ b/test/built-ins/Date/prototype/toDateString/S15.9.5.3_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.3_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.toDateString.length; -Date.prototype.toDateString.length = 1; +var x = Date.prototype.toDateString.length; +verifyNotWritable(Date.prototype.toDateString, "length", null, 1); if (Date.prototype.toDateString.length !== x) { $ERROR('#1: The Date.prototype.toDateString.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A3_T1.js b/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A3_T1.js index 127061c169b95d0383b9b234b54a0d87286a9515..4333ae2f05bb1f04623fab2a5fcb5041bfd450bf 100644 --- a/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A3_T1.js +++ b/test/built-ins/Date/prototype/toLocaleDateString/S15.9.5.6_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.6_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.toLocaleDateString.length; -Date.prototype.toLocaleDateString.length = 1; +var x = Date.prototype.toLocaleDateString.length; +verifyNotWritable(Date.prototype.toLocaleDateString, "length", null, 1); if (Date.prototype.toLocaleDateString.length !== x) { $ERROR('#1: The Date.prototype.toLocaleDateString.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A3_T1.js b/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A3_T1.js index c7c3b052c04c69e7fe8093e49fb7d79fdefea3df..c2b9d0c3738b9e36b84f2b3b1170055af39b8d3e 100644 --- a/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A3_T1.js +++ b/test/built-ins/Date/prototype/toLocaleString/S15.9.5.5_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.5_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.toLocaleString.length; -Date.prototype.toLocaleString.length = 1; +var x = Date.prototype.toLocaleString.length; +verifyNotWritable(Date.prototype.toLocaleString, "length", null, 1); if (Date.prototype.toLocaleString.length !== x) { $ERROR('#1: The Date.prototype.toLocaleString.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A3_T1.js b/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A3_T1.js index d216416b4edf3c8bb396eaa061a5f07f1722f72f..4699669804019dc2882b50ed9877f29eadb42a6c 100644 --- a/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A3_T1.js +++ b/test/built-ins/Date/prototype/toLocaleTimeString/S15.9.5.7_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.7_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.toLocaleTimeString.length; -Date.prototype.toLocaleTimeString.length = 1; +var x = Date.prototype.toLocaleTimeString.length; +verifyNotWritable(Date.prototype.toLocaleTimeString, "length", null, 1); if (Date.prototype.toLocaleTimeString.length !== x) { $ERROR('#1: The Date.prototype.toLocaleTimeString.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/toString/S15.9.5.2_A3_T1.js b/test/built-ins/Date/prototype/toString/S15.9.5.2_A3_T1.js index 36184f6005f56dafe01376ca4229436380c70023..6b8773c32008b2abcfcd01d9a637d1d706a753a1 100644 --- a/test/built-ins/Date/prototype/toString/S15.9.5.2_A3_T1.js +++ b/test/built-ins/Date/prototype/toString/S15.9.5.2_A3_T1.js @@ -7,11 +7,11 @@ info: > DontEnum } attributes es5id: 15.9.5.2_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.toString.length; -Date.prototype.toString.length = 1; +var x = Date.prototype.toString.length; +verifyNotWritable(Date.prototype.toString, "length", null, 1); if (Date.prototype.toString.length !== x) { $ERROR('#1: The Date.prototype.toString.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A3_T1.js b/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A3_T1.js index ca723dbc3e0f37b2ce3d2f25b3457a87b7c9a7a3..b81f57011d9c3ab9b4f377a984dea611c2781071 100644 --- a/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A3_T1.js +++ b/test/built-ins/Date/prototype/toTimeString/S15.9.5.4_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.4_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.toTimeString.length; -Date.prototype.toTimeString.length = 1; +var x = Date.prototype.toTimeString.length; +verifyNotWritable(Date.prototype.toTimeString, "length", null, 1); if (Date.prototype.toTimeString.length !== x) { $ERROR('#1: The Date.prototype.toTimeString.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A3_T1.js b/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A3_T1.js index 378ac27b46c935a4535906ff3a21d7a19bb9ea56..e46825e437dce84a831f851ec6b5ae38c61920b7 100644 --- a/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A3_T1.js +++ b/test/built-ins/Date/prototype/toUTCString/S15.9.5.42_A3_T1.js @@ -7,11 +7,11 @@ info: > DontDelete, DontEnum } attributes es5id: 15.9.5.42_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.toUTCString.length; -Date.prototype.toUTCString.length = 1; +var x = Date.prototype.toUTCString.length; +verifyNotWritable(Date.prototype.toUTCString, "length", null, 1); if (Date.prototype.toUTCString.length !== x) { $ERROR('#1: The Date.prototype.toUTCString.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Date/prototype/valueOf/S15.9.5.8_A3_T1.js b/test/built-ins/Date/prototype/valueOf/S15.9.5.8_A3_T1.js index fdd237daa76a9ec552b31f5561bac832da731e5a..d7489c584522bea2e0aaf4084acc93c7c81619be 100644 --- a/test/built-ins/Date/prototype/valueOf/S15.9.5.8_A3_T1.js +++ b/test/built-ins/Date/prototype/valueOf/S15.9.5.8_A3_T1.js @@ -7,11 +7,11 @@ info: > DontEnum } attributes es5id: 15.9.5.8_A3_T1 description: Checking ReadOnly attribute -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -x = Date.prototype.valueOf.length; -Date.prototype.valueOf.length = 1; +var x = Date.prototype.valueOf.length; +verifyNotWritable(Date.prototype.valueOf, "length", null, 1); if (Date.prototype.valueOf.length !== x) { $ERROR('#1: The Date.prototype.valueOf.length has the attribute ReadOnly'); } diff --git a/test/built-ins/Error/prototype/S15.11.3.1_A1_T1.js b/test/built-ins/Error/prototype/S15.11.3.1_A1_T1.js index 336a11998a9d859bd7e3259f8422cd1ec723e386..e7bc80e565fcc2d1577fdec32e1c7a3eab1d45e2 100644 --- a/test/built-ins/Error/prototype/S15.11.3.1_A1_T1.js +++ b/test/built-ins/Error/prototype/S15.11.3.1_A1_T1.js @@ -5,14 +5,20 @@ info: Error.prototype property has the attributes {DontDelete} es5id: 15.11.3.1_A1_T1 description: Checking if deleting the Error.prototype property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ var proto=Error.prototype; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 -if(delete Error.prototype){ - $ERROR('#1: delete Error.prototype return false'); +verifyNotConfigurable(Error, "prototype"); +try { + if ((delete Error.prototype) !== false) { + $ERROR('#1: Error.prototype has the attribute DontDelete'); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/Error/prototype/S15.11.3.1_A3_T1.js b/test/built-ins/Error/prototype/S15.11.3.1_A3_T1.js index 7b62671d7a37dd7b441e3cab32bce23bcb9e7143..d76e90fb5139928f58154d724eafd16f61fa61e0 100644 --- a/test/built-ins/Error/prototype/S15.11.3.1_A3_T1.js +++ b/test/built-ins/Error/prototype/S15.11.3.1_A3_T1.js @@ -5,7 +5,7 @@ info: Error.prototype property has the attributes {ReadOnly} es5id: 15.11.3.1_A3_T1 description: Checking if varying the Error.prototype property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ ////////////////////////////////////////////////////////////////////////////// @@ -16,9 +16,9 @@ if (!(Error.hasOwnProperty('prototype'))) { // ////////////////////////////////////////////////////////////////////////////// -__obj = Error.prototype; +var __obj = Error.prototype; -Error.prototype = function(){return "shifted";}; +verifyNotWritable(Error, "prototype", null, function(){return "shifted";}); ////////////////////////////////////////////////////////////////////////////// //CHECK#2 @@ -34,7 +34,7 @@ try { Error.prototype(); $ERROR('#3: "Error.prototype()" lead to throwing exception'); } catch (e) { - ; + if (e instanceof Test262Error) throw e; } // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/Function/length/S15.3.5.1_A3_T1.js b/test/built-ins/Function/length/S15.3.5.1_A3_T1.js index 78f134f73efad5b97011ed13905d6406efbc64e5..6b810fb8c4b180ca1e32c54e34dfabf871d67cb5 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A3_T1.js +++ b/test/built-ins/Function/length/S15.3.5.1_A3_T1.js @@ -7,23 +7,22 @@ es5id: 15.3.5.1_A3_T1 description: > Checking if varying the length property of Function("arg1,arg2,arg3","arg4,arg5", null) fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ -f = new Function("arg1,arg2,arg3","arg4,arg5", null); +var f = new Function("arg1,arg2,arg3","arg4,arg5", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { $FAIL('#1: the function has length property.'); } -length = f.length; +var flength = f.length; -f.length = function(){}; +verifyNotWritable(f, "length", null, function(){}); //CHECK#2 -if (f.length !== length) { +if (f.length !== flength) { $ERROR('#2: the function.length property has the attributes ReadOnly'); } @@ -32,7 +31,7 @@ try { f.length(); $ERROR('#3: the function.length property has the attributes ReadOnly'); } catch (e) { - ; + if (e instanceof Test262Error) throw e; } //CHECK#4 diff --git a/test/built-ins/Function/length/S15.3.5.1_A3_T2.js b/test/built-ins/Function/length/S15.3.5.1_A3_T2.js index d7993cb30cb9e640fb331bff9c10e0d3bd3b342f..6ab88a92c072692533fdc2fe43e1abf2ddcf2059 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A3_T2.js +++ b/test/built-ins/Function/length/S15.3.5.1_A3_T2.js @@ -7,23 +7,22 @@ es5id: 15.3.5.1_A3_T2 description: > Checking if varying the length property of Function("arg1,arg2,arg3", null) fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ -f = Function("arg1,arg2,arg3", null); +var f = Function("arg1,arg2,arg3", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { $FAIL('#1: the function has length property.'); } -length = f.length; +var flength = f.length; -f.length = function(){}; +verifyNotWritable(f, "length", null, function(){}); //CHECK#2 -if (f.length !== length) { +if (f.length !== flength) { $ERROR('#2: the function.length property has the attributes ReadOnly'); } @@ -32,7 +31,7 @@ try { f.length(); $ERROR('#3: the function.length property has the attributes ReadOnly'); } catch (e) { - ; + if (e instanceof Test262Error) throw e; } //CHECK#4 diff --git a/test/built-ins/Function/length/S15.3.5.1_A3_T3.js b/test/built-ins/Function/length/S15.3.5.1_A3_T3.js index 1156a5a9dc221df950d75029823d730f31b1838d..26cfedc3ea13ee04f35d9b902ef9bdec488d1fac 100644 --- a/test/built-ins/Function/length/S15.3.5.1_A3_T3.js +++ b/test/built-ins/Function/length/S15.3.5.1_A3_T3.js @@ -7,23 +7,22 @@ es5id: 15.3.5.1_A3_T3 description: > Checking if varying the length property of Function("arg1,arg2,arg3","arg1,arg2","arg3", null) fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ -f = new Function("arg1,arg2,arg3","arg1,arg2","arg3", null); +var f = new Function("arg1,arg2,arg3","arg1,arg2","arg3", null); //CHECK#1 if (!(f.hasOwnProperty('length'))) { $FAIL('#1: the function has length property.'); } -length = f.length; +var flength = f.length; -f.length = function(){}; +verifyNotWritable(f, "length", null, function(){}); //CHECK#2 -if (f.length !== length) { +if (f.length !== flength) { $ERROR('#2: the function.length property has the attributes ReadOnly'); } @@ -32,7 +31,7 @@ try { f.length(); $ERROR('#3: the function.length property has the attributes ReadOnly'); } catch (e) { - ; + if (e instanceof Test262Error) throw e; } //CHECK#4 diff --git a/test/built-ins/Function/prototype/S15.3.3.1_A1.js b/test/built-ins/Function/prototype/S15.3.3.1_A1.js index 6b7df68ea7c60371be1d4dccb92e1db69f073300..af9795ab90096c7b1afebcb4c117861a31510c4b 100644 --- a/test/built-ins/Function/prototype/S15.3.3.1_A1.js +++ b/test/built-ins/Function/prototype/S15.3.3.1_A1.js @@ -5,11 +5,12 @@ info: The Function.prototype property has the attribute ReadOnly es5id: 15.3.3.1_A1 description: Checking if varying the Function.prototype property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ var obj = Function.prototype; -Function.prototype = function(){return "shifted";}; + +verifyNotWritable(Function, "prototype", null, function(){return "shifted";}); //CHECK#1 if (Function.prototype !== obj) { diff --git a/test/built-ins/Function/prototype/S15.3.3.1_A3.js b/test/built-ins/Function/prototype/S15.3.3.1_A3.js index c5f79553200bb5ac64c6013610d19c958945e46b..79568c9e719e0505a20252a1b572c9129c12e134 100644 --- a/test/built-ins/Function/prototype/S15.3.3.1_A3.js +++ b/test/built-ins/Function/prototype/S15.3.3.1_A3.js @@ -5,12 +5,22 @@ info: The Function.prototype property has the attribute DontDelete es5id: 15.3.3.1_A3 description: Checking if deleting the Function.prototype property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -delete Function.prototype; +verifyNotConfigurable(Function, "prototype"); //CHECK#1 +try { + if ((delete Function.prototype) !== false) { + $ERROR('#1: Function.prototype has the attribute DontDelete'); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); +} + +//CHECK#2 if (!(Function.hasOwnProperty('prototype'))) { - $ERROR('#1: the Function.prototype property has the attributes DontDelete.'); + $ERROR('#2: the Function.prototype property has the attributes DontDelete.'); } diff --git a/test/built-ins/Function/prototype/S15.3.5.2_A1_T1.js b/test/built-ins/Function/prototype/S15.3.5.2_A1_T1.js index 2844023b4bc869b82241e5765cb55f9299db4ce5..386557b43a618c1e3815bd128c1d12ca6fad5de5 100644 --- a/test/built-ins/Function/prototype/S15.3.5.2_A1_T1.js +++ b/test/built-ins/Function/prototype/S15.3.5.2_A1_T1.js @@ -7,22 +7,28 @@ es5id: 15.3.5.2_A1_T1 description: > Checking if deleting the prototype property of Function("", null) fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ -f = new Function("", null); +var f = new Function("", null); //CHECK#1 if (!(f.hasOwnProperty('prototype'))) { $FAIL('#1: the function has length property.'); } -fproto = f.prototype; +var fproto = f.prototype; + +verifyNotConfigurable(f, "prototype"); //CHECK#2 -if (delete f.prototype) { - $ERROR('#2: the prototype property has the attributes { DontDelete }'); +try { + if ((delete f.prototype) !== false) { + $ERROR('#2: the prototype property has the attributes { DontDelete }'); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } //CHECK#3 diff --git a/test/built-ins/Function/prototype/S15.3.5.2_A1_T2.js b/test/built-ins/Function/prototype/S15.3.5.2_A1_T2.js index 3ac833ed1c024270734c9f2f4c4b1c180347da1e..ae3d200c0876f54a29ddb576a8e1d1fc296bd19e 100644 --- a/test/built-ins/Function/prototype/S15.3.5.2_A1_T2.js +++ b/test/built-ins/Function/prototype/S15.3.5.2_A1_T2.js @@ -7,22 +7,28 @@ es5id: 15.3.5.2_A1_T2 description: > Checking if deleting the prototype property of Function(void 0, "") fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ -f = Function(void 0, ""); +var f = Function(void 0, ""); //CHECK#1 if (!(f.hasOwnProperty('prototype'))) { $FAIL('#1: the function has length property.'); } -fproto = f.prototype; +var fproto = f.prototype; + +verifyNotConfigurable(f, "prototype"); //CHECK#2 -if (delete f.prototype) { - $ERROR('#2: the prototype property has the attributes { DontDelete }'); +try { + if ((delete f.prototype) !== false) { + $ERROR('#2: the prototype property has the attributes { DontDelete }'); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } //CHECK#3 diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A10.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A10.js index 8219a5e8a63bd80bc6d78d6da05afabf9fb466b9..843d3250eee08670e3124d2d1abed99f159e6c39 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A10.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A10.js @@ -7,8 +7,7 @@ es5id: 15.3.4.3_A10 description: > Checking if varying the Function.prototype.apply.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ //CHECK#1 @@ -18,7 +17,7 @@ if (!(Function.prototype.apply.hasOwnProperty('length'))) { var obj = Function.prototype.apply.length; -Function.prototype.apply.length = function(){return "shifted";}; +verifyNotWritable(Function.prototype.apply, "length", null, function(){return "shifted";}); //CHECK#2 if (Function.prototype.apply.length !== obj) { diff --git a/test/built-ins/Function/prototype/bind/15.3.4.5-15-3.js b/test/built-ins/Function/prototype/bind/15.3.4.5-15-3.js index a11fb1344eeedfc40f05a8d6e0dedd4cd768e951..6181f56a1c61edb4ed5ad2c2a5104e69ad4b135b 100644 --- a/test/built-ins/Function/prototype/bind/15.3.4.5-15-3.js +++ b/test/built-ins/Function/prototype/bind/15.3.4.5-15-3.js @@ -9,19 +9,13 @@ es5id: 15.3.4.5-15-3 description: > Function.prototype.bind - The [[Writable]] attribute of length property in F set as false -flags: [noStrict] -includes: [runTestCase.js] +includes: [propertyHelper.js] ---*/ -function testcase() { +function foo() { } +var obj = foo.bind({}); +var flength = obj.length; - var canWritable = false; - var hasProperty = false; - function foo() { } - var obj = foo.bind({}); - hasProperty = obj.hasOwnProperty("length"); - obj.length = 100; - canWritable = (obj.length === 100); - return hasProperty && !canWritable; - } -runTestCase(testcase); +assert(obj.hasOwnProperty("length")); +verifyNotWritable(obj, "length", null, 100); +assert.sameValue(obj.length, flength); diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A10.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A10.js index f9eae7d6da4890e025da6be06e3f9379d3fcc90d..a2be8f05808a38b57eeae63fb2cc02810a8615c5 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A10.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A10.js @@ -7,8 +7,7 @@ es5id: 15.3.4.4_A10 description: > Checking if varying the Function.prototype.call.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ //CHECK#1 @@ -18,7 +17,7 @@ if (!(Function.prototype.call.hasOwnProperty('length'))) { var obj = Function.prototype.call.length; -Function.prototype.call.length = function(){return "shifted";}; +verifyNotWritable(Function.prototype.call, "length", null, function(){return "shifted";}); //CHECK#2 if (Function.prototype.call.length !== obj) { diff --git a/test/built-ins/Function/prototype/toString/S15.3.4.2_A10.js b/test/built-ins/Function/prototype/toString/S15.3.4.2_A10.js index 511765b6f52c5af91c022284a911007e58b28ddd..509f75b2c3786f87081c1abfbf6b8b2d9cc8b3a4 100644 --- a/test/built-ins/Function/prototype/toString/S15.3.4.2_A10.js +++ b/test/built-ins/Function/prototype/toString/S15.3.4.2_A10.js @@ -7,8 +7,7 @@ es5id: 15.3.4.2_A10 description: > Checking if varying the Function.prototype.toString.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ //CHECK#1 @@ -18,7 +17,7 @@ if (!(Function.prototype.toString.hasOwnProperty('length'))) { var obj = Function.prototype.toString.length; -Function.prototype.toString.length = function(){return "shifted";}; +verifyNotWritable(Function.prototype.toString, "length", null, function(){return "shifted";}); //CHECK#2 if (Function.prototype.toString.length !== obj) { diff --git a/test/built-ins/Infinity/S15.1.1.2_A2_T1.js b/test/built-ins/Infinity/S15.1.1.2_A2_T1.js new file mode 100755 index 0000000000000000000000000000000000000000..c0b90e5986f463d418188dc98be212a844a34200 --- /dev/null +++ b/test/built-ins/Infinity/S15.1.1.2_A2_T1.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: The Infinity is ReadOnly +es5id: 15.1.1.2_A2_T1 +description: Checking typeof Functions +includes: [propertyHelper.js, fnGlobalObject.js] +---*/ + +// CHECK#1 +verifyNotWritable(fnGlobalObject(), "Infinity", null, true); +if (typeof(Infinity) === "boolean") { + $ERROR('#1: Infinity = true; typeof(Infinity) !== "boolean". Actual: ' + (typeof(Infinity))); +} diff --git a/test/built-ins/Infinity/S15.1.1.2_A2_T2.js b/test/built-ins/Infinity/S15.1.1.2_A2_T2.js index 3f35df431e5567ee6b5d5012098e312fbf3f9fcb..d6c4093870169e5337636e6c4c123c5f65106989 100644 --- a/test/built-ins/Infinity/S15.1.1.2_A2_T2.js +++ b/test/built-ins/Infinity/S15.1.1.2_A2_T2.js @@ -2,13 +2,14 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: The Infinity is not ReadOnly +info: The Infinity is ReadOnly es5id: 15.1.1.2_A2_T2 description: Checking typeof Functions +flags: [noStrict] ---*/ // CHECK#1 -var Finite = true; -if (typeof(Finite) !== "boolean") { - $ERROR('#1: Finite = true; typeof(NaN) === "boolean". Actual: ' + (typeof(NaN))); +Infinity = true; +if (typeof(Infinity) === "boolean") { + $ERROR('#1: Infinity = true; typeof(Infinity) !== "boolean". Actual: ' + (typeof(Infinity))); } diff --git a/test/built-ins/Infinity/S15.1.1.2_A3_T1.js b/test/built-ins/Infinity/S15.1.1.2_A3_T1.js new file mode 100644 index 0000000000000000000000000000000000000000..6c8d877a8770512cc48a0dd77653e5c0d0265bc8 --- /dev/null +++ b/test/built-ins/Infinity/S15.1.1.2_A3_T1.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: The Infinity is DontDelete +es5id: 15.1.1.2_A3_T1 +description: Use delete +includes: [propertyHelper.js, fnGlobalObject.js] +---*/ + +// CHECK#1 +verifyNotConfigurable(fnGlobalObject(), "Infinity"); + +try { + if (delete fnGlobalObject().Infinity !== false) { + $ERROR('#1: delete Infinity === false.'); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); +} diff --git a/test/built-ins/Infinity/S15.1.1.2_A3.1.js b/test/built-ins/Infinity/S15.1.1.2_A3_T2.js old mode 100644 new mode 100755 similarity index 91% rename from test/built-ins/Infinity/S15.1.1.2_A3.1.js rename to test/built-ins/Infinity/S15.1.1.2_A3_T2.js index f55723df66b0cbef8257531faa019ed2d5db69fd..8e8433f4dd421bb391b0d4f4088486fb93061754 --- a/test/built-ins/Infinity/S15.1.1.2_A3.1.js +++ b/test/built-ins/Infinity/S15.1.1.2_A3_T2.js @@ -3,12 +3,12 @@ /*--- info: The Infinity is DontDelete -es5id: 15.1.1.2_A3.1 +es5id: 15.1.1.2_A3_T2 description: Use delete flags: [noStrict] ---*/ // CHECK#1 if (delete Infinity !== false) { - $ERROR('#1: delete Infinity === false. Actual: ' + (delete Infinity)); + $ERROR('#1: delete Infinity === false. Actual: ' + (delete Infinity)); } diff --git a/test/built-ins/Infinity/S15.1.1.2_A3.2.js b/test/built-ins/Infinity/S15.1.1.2_A4.js similarity index 91% rename from test/built-ins/Infinity/S15.1.1.2_A3.2.js rename to test/built-ins/Infinity/S15.1.1.2_A4.js index 18f7d83e371c71801952ad8458ae8c6a3f0f4822..fe9c76f6d16dcb796b16a36dd9d5c72f73559187 100644 --- a/test/built-ins/Infinity/S15.1.1.2_A3.2.js +++ b/test/built-ins/Infinity/S15.1.1.2_A4.js @@ -3,7 +3,7 @@ /*--- info: The Infinity is DontEnum -es5id: 15.1.1.2_A3.2 +es5id: 15.1.1.2_A4 description: Use for-in statement ---*/ @@ -11,5 +11,5 @@ description: Use for-in statement for (var prop in this) { if (prop === "Infinity") { $ERROR('#1: The Infinity is DontEnum'); - } + } } diff --git a/test/built-ins/Math/E/S15.8.1.1_A3.js b/test/built-ins/Math/E/S15.8.1.1_A3.js index 1c588bee4e2b4546cb3bfa930c8220e0b8e9e1b3..38126ffc34eab1cbb315f088dd175ee683f09747 100644 --- a/test/built-ins/Math/E/S15.8.1.1_A3.js +++ b/test/built-ins/Math/E/S15.8.1.1_A3.js @@ -5,10 +5,17 @@ info: Value Property E of the Math Object has the attribute DontDelete es5id: 15.8.1.1_A3 description: Checking if Math.E property has the attribute DontDelete -flags: [noStrict] +includes: [propertyHelper.js] ---*/ +verifyNotConfigurable(Math, "E"); + // CHECK#1 -if (delete Math.E === true) { +try { + if (delete Math.E === true) { $ERROR('#1: Value Property E of the Math Object hasn\'t attribute DontDelete: \'Math.E === true\''); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } diff --git a/test/built-ins/Math/E/S15.8.1.1_A4.js b/test/built-ins/Math/E/S15.8.1.1_A4.js index aa6c97a33754dab9d55db020ce76d1d123498ce4..b8b67c8ab5ff783835cfeb0b65c4d8be4b6aa694 100644 --- a/test/built-ins/Math/E/S15.8.1.1_A4.js +++ b/test/built-ins/Math/E/S15.8.1.1_A4.js @@ -5,12 +5,12 @@ info: Value Property E of the Math Object has the attribute ReadOnly es5id: 15.8.1.1_A4 description: Checking if Math.E property has the attribute ReadOnly -flags: [noStrict] +includes: [propertyHelper.js] ---*/ // CHECK#1 var x = Math.E; -Math.E = 1; +verifyNotWritable(Math, "E", null, 1); if (Math.E !== x) { $ERROR('#1: Math.E hasn\'t ReadOnly: \'x = Math.E;Math.E = 1;Math.E === x\''); } diff --git a/test/built-ins/Math/LN10/S15.8.1.2_A3.js b/test/built-ins/Math/LN10/S15.8.1.2_A3.js index 1d39f320523a787513e47c3cf486237f8d8498ae..8ee3eb6fb0ba1aa7c95dce161636500975e93aa0 100644 --- a/test/built-ins/Math/LN10/S15.8.1.2_A3.js +++ b/test/built-ins/Math/LN10/S15.8.1.2_A3.js @@ -5,10 +5,17 @@ info: Value Property LN10 of the Math Object has the attribute DontDelete es5id: 15.8.1.2_A3 description: Checking if Math.LN10 property has the attribute DontDelete -flags: [noStrict] +includes: [propertyHelper.js] ---*/ +verifyNotConfigurable(Math, "LN10"); + // CHECK#1 -if (delete Math.LN10 === true) { - $ERROR('#1: Value Property LN10 of the Math Object hasn\'t attribute DontDelete: \'Math.LN10 === true\''); +try { + if (delete Math.LN10 === true) { + $ERROR('#1: Value Property LN10 of the Math Object hasn\'t attribute DontDelete: \'Math.LN10 === true\''); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } diff --git a/test/built-ins/Math/LN10/S15.8.1.2_A4.js b/test/built-ins/Math/LN10/S15.8.1.2_A4.js index 1c5c360335b59f2b3ea7ab0b557be2795cbcc668..088d821a5157d111b34b723784a82441862b11c8 100644 --- a/test/built-ins/Math/LN10/S15.8.1.2_A4.js +++ b/test/built-ins/Math/LN10/S15.8.1.2_A4.js @@ -5,12 +5,12 @@ info: Value Property LN10 of the Math Object has the attribute ReadOnly es5id: 15.8.1.2_A4 description: Checking if Math.LN10 property has the attribute ReadOnly -flags: [noStrict] +includes: [propertyHelper.js] ---*/ // CHECK#1 var x = Math.LN10; -Math.LN10 = 1; +verifyNotWritable(Math, "LN10", null, 1); if (Math.LN10 !== x) { $ERROR('#1: Math.LN10 hasn\'t ReadOnly: \'x = Math.LN10;Math.LN10 = 1;Math.LN10 === x\''); } diff --git a/test/built-ins/Math/LN2/S15.8.1.3_A3.js b/test/built-ins/Math/LN2/S15.8.1.3_A3.js index aafb1cb482954c0d2d41e3ad52599154da2f64e4..66de45f9ce41fd94cf4a2ba8d0fd948c08252ca1 100644 --- a/test/built-ins/Math/LN2/S15.8.1.3_A3.js +++ b/test/built-ins/Math/LN2/S15.8.1.3_A3.js @@ -5,10 +5,17 @@ info: Value Property LN2 of the Math Object has the attribute DontDelete es5id: 15.8.1.3_A3 description: Checking if Math.LN2 property has the attribute DontDelete -flags: [noStrict] +includes: [propertyHelper.js] ---*/ +verifyNotConfigurable(Math, "LN2"); + // CHECK#1 -if (delete Math.LN2 === true) { +try { + if (delete Math.LN2 === true) { $ERROR('#1: Value Property LN2 of the Math Object hasn\'t attribute DontDelete: \'Math.LN2 === true\''); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } diff --git a/test/built-ins/Math/LN2/S15.8.1.3_A4.js b/test/built-ins/Math/LN2/S15.8.1.3_A4.js index 26509885d0bcbc017959fbc9931a8fedf89b7320..db335f4e397175fd6293f0beac11c5289f5137cd 100644 --- a/test/built-ins/Math/LN2/S15.8.1.3_A4.js +++ b/test/built-ins/Math/LN2/S15.8.1.3_A4.js @@ -5,12 +5,12 @@ info: Value Property LN2 of the Math Object has the attribute ReadOnly es5id: 15.8.1.3_A4 description: Checking if Math.LN2 property has the attribute DontDelete -flags: [noStrict] +includes: [propertyHelper.js] ---*/ // CHECK#1 var x = Math.LN2; -Math.LN2 = 1; +verifyNotWritable(Math, "LN2", null, 1); if (Math.LN2 !== x) { $ERROR('#1: Math.LN2 hasn\'t ReadOnly: \'x = Math.LN2;Math.LN2 = 1;Math.LN2 === x\''); } diff --git a/test/built-ins/Math/LOG10E/S15.8.1.5_A3.js b/test/built-ins/Math/LOG10E/S15.8.1.5_A3.js index 2903f6d32ed020376cc155d9f5e3e130df37eec6..5c02f2b0dd38c8db4be642d6e8fc122b5d53e473 100644 --- a/test/built-ins/Math/LOG10E/S15.8.1.5_A3.js +++ b/test/built-ins/Math/LOG10E/S15.8.1.5_A3.js @@ -5,10 +5,17 @@ info: Value Property LOG10E of the Math Object has the attribute DontDelete es5id: 15.8.1.5_A3 description: Checking if Math.LOG10E property has the attribute DontDelete -flags: [noStrict] +includes: [propertyHelper.js] ---*/ +verifyNotConfigurable(Math, "LOG10E"); + // CHECK#1 -if (delete Math.LOG10E === true) { +try { + if (delete Math.LOG10E === true) { $ERROR('#1: Value Property LOG10E of the Math Object hasn\'t attribute DontDelete: \'Math.LOG10E === true\''); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } diff --git a/test/built-ins/Math/LOG10E/S15.8.1.5_A4.js b/test/built-ins/Math/LOG10E/S15.8.1.5_A4.js index 6fc967cd022fc8dc8c26e38700d4c0b8514b8bc7..9708e5edaeb4524071c90983e1bfa75a2cb96bff 100644 --- a/test/built-ins/Math/LOG10E/S15.8.1.5_A4.js +++ b/test/built-ins/Math/LOG10E/S15.8.1.5_A4.js @@ -5,12 +5,12 @@ info: Value Property LOG10E of the Math Object has the attribute ReadOnly es5id: 15.8.1.5_A4 description: Checking if Math.LOG10E property has the attribute ReadOnly -flags: [noStrict] +includes: [propertyHelper.js] ---*/ // CHECK#1 var x = Math.LOG10E; -Math.LOG10E = 1; +verifyNotWritable(Math, "LOG10E", null, 1); if (Math.LOG10E !== x) { $ERROR('#1: Math.LOG10E hasn\'t ReadOnly: \'x = Math.LOG10E;Math.LOG10E = 1;Math.LOG10E === x\''); } diff --git a/test/built-ins/Math/LOG2E/S15.8.1.4_A3.js b/test/built-ins/Math/LOG2E/S15.8.1.4_A3.js index e041cb3332883b96aeb28514be54dffb404e0be8..e31dbe98e528d6dee7f3d5fb6500c1c11308b849 100644 --- a/test/built-ins/Math/LOG2E/S15.8.1.4_A3.js +++ b/test/built-ins/Math/LOG2E/S15.8.1.4_A3.js @@ -5,10 +5,17 @@ info: Value Property LOG2E of the Math Object has the attribute DontDelete es5id: 15.8.1.4_A3 description: Checking if Math.LOG2E property has the attribute DontDelete -flags: [noStrict] +includes: [propertyHelper.js] ---*/ +verifyNotConfigurable(Math, "LOG2E"); + // CHECK#1 -if (delete Math.LOG2E === true) { +try { + if (delete Math.LOG2E === true) { $ERROR('#1: Value Property LOG2E of the Math Object hasn\'t attribute DontDelete: \'Math.LOG2E === true\''); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } diff --git a/test/built-ins/Math/LOG2E/S15.8.1.4_A4.js b/test/built-ins/Math/LOG2E/S15.8.1.4_A4.js index 5398e4c9076045a5fd54f40e93515d59258176b8..579d02b12524e360fed6796fff5e23241dfc30f8 100644 --- a/test/built-ins/Math/LOG2E/S15.8.1.4_A4.js +++ b/test/built-ins/Math/LOG2E/S15.8.1.4_A4.js @@ -5,12 +5,12 @@ info: Value Property LOG2E of the Math Object has the attribute ReadOnly es5id: 15.8.1.4_A4 description: Checking if Math.LOG2E property has the attribute ReadOnly -flags: [noStrict] +includes: [propertyHelper.js] ---*/ // CHECK#1 var x = Math.LOG2E; -Math.LOG2E = 1; +verifyNotWritable(Math, "LOG2E", null, 1); if (Math.LOG2E !== x) { $ERROR('#1: Math.LOG2E hasn\'t ReadOnly: \'x = Math.LOG2E;Math.LOG2E = 1;Math.LOG2E === x\''); } diff --git a/test/built-ins/Math/PI/S15.8.1.6_A3.js b/test/built-ins/Math/PI/S15.8.1.6_A3.js index da27bb16d601154ea1ffeb7ba9e585e7c062dc79..1563c33a7b54c240b52c82f86683bc0337967b41 100644 --- a/test/built-ins/Math/PI/S15.8.1.6_A3.js +++ b/test/built-ins/Math/PI/S15.8.1.6_A3.js @@ -5,10 +5,17 @@ info: Value Property PI of the Math Object has the attribute DontDelete es5id: 15.8.1.6_A3 description: Checking if Math.PI property has the attribute DontDelete -flags: [noStrict] +includes: [propertyHelper.js] ---*/ +verifyNotConfigurable(Math, "PI"); + // CHECK#1 -if (delete Math.PI === true) { +try { + if (delete Math.PI === true) { $ERROR('#1: Value Property PI of the Math Object hasn\'t attribute DontDelete: \'Math.PI === true\''); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } diff --git a/test/built-ins/Math/PI/S15.8.1.6_A4.js b/test/built-ins/Math/PI/S15.8.1.6_A4.js index b4479726bd805c36b9f7ebe6a0ce9261caea200e..a65b24b2a613c4ddf4fb600b1e30fcacff47f355 100644 --- a/test/built-ins/Math/PI/S15.8.1.6_A4.js +++ b/test/built-ins/Math/PI/S15.8.1.6_A4.js @@ -5,12 +5,12 @@ info: Value Property PI of the Math Object has the attribute ReadOnly es5id: 15.8.1.6_A4 description: Checking if Math.PI property has the attribute ReadOnly -flags: [noStrict] +includes: [propertyHelper.js] ---*/ // CHECK#1 var x = Math.PI; -Math.PI = 1; +verifyNotWritable(Math, "PI", null, 1); if (Math.PI !== x) { $ERROR('#1: Math.PI hasn\'t ReadOnly: \'x = Math.PI;Math.PI = 1;Math.PI === x\''); } diff --git a/test/built-ins/Math/SQRT1_2/S15.8.1.7_A3.js b/test/built-ins/Math/SQRT1_2/S15.8.1.7_A3.js index e3613f5897f04086176bc05c78dd23f6e56670c8..1a95fb060b42f5be4dfc5046c330ad9f3492f20d 100644 --- a/test/built-ins/Math/SQRT1_2/S15.8.1.7_A3.js +++ b/test/built-ins/Math/SQRT1_2/S15.8.1.7_A3.js @@ -5,10 +5,17 @@ info: Value Property SQRT1_2 of the Math Object has the attribute DontDelete es5id: 15.8.1.7_A3 description: Checking if Math.SQRT1_2 property has the attribute DontDelete -flags: [noStrict] +includes: [propertyHelper.js] ---*/ +verifyNotConfigurable(Math, "SQRT1_2"); + // CHECK#1 -if (delete Math.SQRT1_2 === true) { - $ERROR("#1: Value Property SQRT1_2 of the Math Object hasn't attribute DontDelete: 'Math.SQRT1_2 === true'"); +try { + if (delete Math.SQRT1_2 === true) { + $ERROR("#1: Value Property SQRT1_2 of the Math Object hasn't attribute DontDelete: 'Math.SQRT1_2 === true'"); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } diff --git a/test/built-ins/Math/SQRT1_2/S15.8.1.7_A4.js b/test/built-ins/Math/SQRT1_2/S15.8.1.7_A4.js index 99c3f2f5224bf7077f364862a7df825d2b7c54bb..3204f222464266f5dd0e78d7d92ae203ee039f55 100644 --- a/test/built-ins/Math/SQRT1_2/S15.8.1.7_A4.js +++ b/test/built-ins/Math/SQRT1_2/S15.8.1.7_A4.js @@ -5,12 +5,12 @@ info: Value Property SQRT1_2 of the Math Object has the attribute ReadOnly es5id: 15.8.1.7_A4 description: Checking if Math.SQRT1_2 property has the attribute ReadOnly -flags: [noStrict] +includes: [propertyHelper.js] ---*/ // CHECK#1 var x = Math.SQRT1_2; -Math.SQRT1_2 = 1; +verifyNotWritable(Math, "SQRT1_2", null, 1); if (Math.SQRT1_2 !== x) { $ERROR('#1: Math.SQRT1_2 hasn\'t ReadOnly: \'x = Math.SQRT1_2;Math.SQRT1_2 = 1;Math.SQRT1_2 === x\''); } diff --git a/test/built-ins/Math/SQRT2/S15.8.1.8_A3.js b/test/built-ins/Math/SQRT2/S15.8.1.8_A3.js index 3ae63684e4a3799ce49cf61095d6f09f8e9c4cf9..0897581a36d98d9adafa2b85d4b918f0b14d46d1 100644 --- a/test/built-ins/Math/SQRT2/S15.8.1.8_A3.js +++ b/test/built-ins/Math/SQRT2/S15.8.1.8_A3.js @@ -5,10 +5,17 @@ info: Value Property SQRT2 of the Math Object has the attribute DontDelete es5id: 15.8.1.8_A3 description: Checking if Math.SQRT2 property has the attribute DontDelete -flags: [noStrict] +includes: [propertyHelper.js] ---*/ +verifyNotConfigurable(Math, "SQRT2"); + // CHECK#1 -if (delete Math.SQRT2 === true) { +try { + if (delete Math.SQRT2 === true) { $ERROR('#1: Value Property SQRT2 of the Math Object hasn\'t attribute DontDelete: \'Math.SQRT2 === true\''); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } diff --git a/test/built-ins/Math/SQRT2/S15.8.1.8_A4.js b/test/built-ins/Math/SQRT2/S15.8.1.8_A4.js index f96050f0b2786d78e76dca8ca12bf9cbcced6531..f318bbf1cb6cb1fa0a41d05f60614a992c867380 100644 --- a/test/built-ins/Math/SQRT2/S15.8.1.8_A4.js +++ b/test/built-ins/Math/SQRT2/S15.8.1.8_A4.js @@ -5,12 +5,12 @@ info: Value Property SQRT2 of the Math Object has the attribute ReadOnly es5id: 15.8.1.8_A4 description: Checking if Math.SQRT2 property has the attribute ReadOnly -flags: [noStrict] +includes: [propertyHelper.js] ---*/ // CHECK#1 var x = Math.SQRT2; -Math.SQRT2 = 1; +verifyNotWritable(Math, "SQRT2", null, 1); if (Math.SQRT2 !== x) { $ERROR('#1: Math.SQRT2 hasn\'t ReadOnly: \'x = Math.SQRT2;Math.SQRT2 = 1;Math.SQRT2 === x\''); } diff --git a/test/built-ins/NaN/S15.1.1.1_A2_T1.js b/test/built-ins/NaN/S15.1.1.1_A2_T1.js new file mode 100755 index 0000000000000000000000000000000000000000..89fd2b8edf10225bd1e55d76244f20c74c07faee --- /dev/null +++ b/test/built-ins/NaN/S15.1.1.1_A2_T1.js @@ -0,0 +1,15 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: The NaN is ReadOnly +es5id: 15.1.1.1_A2_T1 +description: Checking typeof Functions +includes: [propertyHelper.js, fnGlobalObject.js] +---*/ + +// CHECK#1 +verifyNotWritable(fnGlobalObject(), "NaN", null, true); +if (typeof(NaN) === "boolean") { + $ERROR('#1: NaN = true; typeof(NaN) !== "boolean". Actual: ' + (typeof(NaN))); +} diff --git a/test/built-ins/NaN/S15.1.1.1_A2_T2.js b/test/built-ins/NaN/S15.1.1.1_A2_T2.js new file mode 100755 index 0000000000000000000000000000000000000000..e357fbe37032004fd7f7f1f82d1a2f34382f661e --- /dev/null +++ b/test/built-ins/NaN/S15.1.1.1_A2_T2.js @@ -0,0 +1,15 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: The NaN is ReadOnly +es5id: 15.1.1.1_A2_T2 +description: Checking typeof Functions +flags: [noStrict] +---*/ + +// CHECK#1 +NaN = true; +if (typeof(NaN) === "boolean") { + $ERROR('#1: NaN = true; typeof(NaN) !== "boolean". Actual: ' + (typeof(NaN))); +} diff --git a/test/built-ins/NaN/S15.1.1.1_A3_T1.js b/test/built-ins/NaN/S15.1.1.1_A3_T1.js new file mode 100644 index 0000000000000000000000000000000000000000..8be21335783c2e9ca26e5aa2ee0d75da2291846f --- /dev/null +++ b/test/built-ins/NaN/S15.1.1.1_A3_T1.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: The NaN is DontDelete +es5id: 15.1.1.2_A3_T1 +description: Use delete +includes: [propertyHelper.js, fnGlobalObject.js] +---*/ + +// CHECK#1 +verifyNotConfigurable(fnGlobalObject(), "NaN"); + +try { + if (delete fnGlobalObject().NaN !== false) { + $ERROR('#1: delete NaN === false.'); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); +} diff --git a/test/built-ins/NaN/S15.1.1.1_A3.1.js b/test/built-ins/NaN/S15.1.1.1_A3_T2.js old mode 100644 new mode 100755 similarity index 75% rename from test/built-ins/NaN/S15.1.1.1_A3.1.js rename to test/built-ins/NaN/S15.1.1.1_A3_T2.js index bc23c3652ec48267863649ec3358370cb5a3c22d..c9e072c4b4c0f3385e5ee30d0c7422cc36b310ee --- a/test/built-ins/NaN/S15.1.1.1_A3.1.js +++ b/test/built-ins/NaN/S15.1.1.1_A3_T2.js @@ -3,12 +3,12 @@ /*--- info: The NaN is DontDelete -es5id: 15.1.1.1_A3.1 +es5id: 15.1.1.1_A3_T2 description: Use delete flags: [noStrict] ---*/ // CHECK#1 if (delete NaN !== false) { - $ERROR('#1: delete NaN === false. Actual: ' + (delete NaN)); + $ERROR('#1: delete NaN === false. Actual: ' + (delete NaN)); } diff --git a/test/built-ins/NaN/S15.1.1.1_A3.2.js b/test/built-ins/NaN/S15.1.1.1_A4.js similarity index 97% rename from test/built-ins/NaN/S15.1.1.1_A3.2.js rename to test/built-ins/NaN/S15.1.1.1_A4.js index 9148a78eec2a6e1916c0a985af32bc07b28c5f7b..797f524381c04159b2b432f6e73dcf40fd953bdd 100644 --- a/test/built-ins/NaN/S15.1.1.1_A3.2.js +++ b/test/built-ins/NaN/S15.1.1.1_A4.js @@ -11,5 +11,5 @@ description: Use for-in statement for (var prop in this) { if (prop === "NaN") { $ERROR('#1: The NaN is DontEnum'); - } + } } diff --git a/test/built-ins/Number/MAX_VALUE/S15.7.3.2_A2.js b/test/built-ins/Number/MAX_VALUE/S15.7.3.2_A2.js index a7031a0abc2119d400d014d8d20eb8f8a15b24cf..64047381ad15f1e6f36e355ca97f9951fabb5a78 100644 --- a/test/built-ins/Number/MAX_VALUE/S15.7.3.2_A2.js +++ b/test/built-ins/Number/MAX_VALUE/S15.7.3.2_A2.js @@ -5,12 +5,12 @@ info: Number.MAX_VALUE is ReadOnly es5id: 15.7.3.2_A2 description: Checking if varying Number.MAX_VALUE fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ // CHECK#1 var x = Number.MAX_VALUE; -Number.MAX_VALUE = 1; +verifyNotWritable(Number, "MAX_VALUE", null, 1); if (Number.MAX_VALUE !== x) { $ERROR('#1: x = Number.MAX_VALUE; Number.MAX_VALUE = 1; Number.MAX_VALUE === x'); } diff --git a/test/built-ins/Number/MAX_VALUE/S15.7.3.2_A3.js b/test/built-ins/Number/MAX_VALUE/S15.7.3.2_A3.js index 60e661fc2cbe1bb457e7064b1cbe176bd5668929..ff5361257ed40e002fa481cc992167118d972729 100644 --- a/test/built-ins/Number/MAX_VALUE/S15.7.3.2_A3.js +++ b/test/built-ins/Number/MAX_VALUE/S15.7.3.2_A3.js @@ -5,10 +5,17 @@ info: Number.MAX_VALUE is DontDelete es5id: 15.7.3.2_A3 description: Checking if deleting Number.MAX_VALUE fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ +verifyNotConfigurable(Number, "MAX_VALUE"); + // CHECK#1 -if (delete Number.MAX_VALUE !== false) { - $ERROR('#1: delete Number.MAX_VALUE === false'); +try { + if (delete Number.MAX_VALUE !== false) { + $ERROR('#1: delete Number.MAX_VALUE === false'); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } diff --git a/test/built-ins/Number/MIN_VALUE/S15.7.3.3_A2.js b/test/built-ins/Number/MIN_VALUE/S15.7.3.3_A2.js index d3bebcd9589eba7c25e8b1a7e4d4223ad7eeabd8..c8ae5b4411eb6335576f261e7575562303590ac1 100644 --- a/test/built-ins/Number/MIN_VALUE/S15.7.3.3_A2.js +++ b/test/built-ins/Number/MIN_VALUE/S15.7.3.3_A2.js @@ -5,12 +5,12 @@ info: Number.MIN_VALUE is ReadOnly es5id: 15.7.3.3_A2 description: Checking if varying Number.MIN_VALUE fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ // CHECK#1 var x = Number.MIN_VALUE; -Number.MIN_VALUE = 1; +verifyNotWritable(Number, "MIN_VALUE", null, 1); if (Number.MIN_VALUE !== x) { $ERROR('#1: x = Number.MIN_VALUE; Number.MIN_VALUE = 1; Number.MIN_VALUE === x'); } diff --git a/test/built-ins/Number/MIN_VALUE/S15.7.3.3_A3.js b/test/built-ins/Number/MIN_VALUE/S15.7.3.3_A3.js index 9faa7b02672af1bfc24e3e229795bf7cf30149ad..474bfd29e9f9729088dd9eda26003e400ef50878 100644 --- a/test/built-ins/Number/MIN_VALUE/S15.7.3.3_A3.js +++ b/test/built-ins/Number/MIN_VALUE/S15.7.3.3_A3.js @@ -5,10 +5,17 @@ info: Number.MIN_VALUE is DontDelete es5id: 15.7.3.3_A3 description: Checking if deleting Number.MIN_VALUE fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ +verifyNotConfigurable(Number, "MIN_VALUE"); + //CHECK#1 -if (delete Number.MIN_VALUE !== false) { - $ERROR('#1: delete Number.MIN_VALUE === false'); +try { + if (delete Number.MIN_VALUE !== false) { + $ERROR('#1: delete Number.MIN_VALUE === false'); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } diff --git a/test/built-ins/Number/NEGATIVE_INFINITY/S15.7.3.5_A2.js b/test/built-ins/Number/NEGATIVE_INFINITY/S15.7.3.5_A2.js index 370fdbbdfb298ec8b2086e9cd581b4bbc4ef56fb..2136e588d47edb8540b7afac02c3995a7be02876 100644 --- a/test/built-ins/Number/NEGATIVE_INFINITY/S15.7.3.5_A2.js +++ b/test/built-ins/Number/NEGATIVE_INFINITY/S15.7.3.5_A2.js @@ -5,11 +5,11 @@ info: Number.NEGATIVE_INFINITY is ReadOnly es5id: 15.7.3.5_A2 description: Checking if varying Number.NEGATIVE_INFINITY fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ // CHECK#1 -Number.NEGATIVE_INFINITY = 1; +verifyNotWritable(Number, "NEGATIVE_INFINITY", null, 1); if (isFinite(Number.NEGATIVE_INFINITY)) { $ERROR('#1: Number.NEGATIVE_INFINITY = 1; Number.NEGATIVE_INFINITY === -Infinity'); } else { diff --git a/test/built-ins/Number/NEGATIVE_INFINITY/S15.7.3.5_A3.js b/test/built-ins/Number/NEGATIVE_INFINITY/S15.7.3.5_A3.js index 2b19951747c743f25ce1bdccdb7190a08b740db5..c0f9c501e4c1031c9422fd535c3043b34f7ba0b7 100644 --- a/test/built-ins/Number/NEGATIVE_INFINITY/S15.7.3.5_A3.js +++ b/test/built-ins/Number/NEGATIVE_INFINITY/S15.7.3.5_A3.js @@ -5,10 +5,17 @@ info: Number.NEGATIVE_INFINITY is DontDelete es5id: 15.7.3.5_A3 description: Checking if deleting Number.NEGATIVE_INFINITY fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ +verifyNotConfigurable(Number, "NEGATIVE_INFINITY"); + // CHECK#1 -if (delete Number.NEGATIVE_INFINITY !== false) { - $ERROR('#1: delete Number.NEGATIVE_INFINITY === false'); +try { + if (delete Number.NEGATIVE_INFINITY !== false) { + $ERROR('#1: delete Number.NEGATIVE_INFINITY === false'); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } diff --git a/test/built-ins/Number/NaN/S15.7.3.4_A2.js b/test/built-ins/Number/NaN/S15.7.3.4_A2.js index 00dd3f80f8d958b79622350528dc83c43919c91b..751913d2025d16dbda9769b6eb4d57c485d48b6c 100644 --- a/test/built-ins/Number/NaN/S15.7.3.4_A2.js +++ b/test/built-ins/Number/NaN/S15.7.3.4_A2.js @@ -5,11 +5,11 @@ info: Number.NaN is ReadOnly es5id: 15.7.3.4_A2 description: Checking if varying Number.NaN fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ // CHECK#1 -Number.NaN = 1; +verifyNotWritable(Number, "NaN", null, 1); if (isNaN(Number.NaN) !== true) { $ERROR('#1: Number.NaN = 1; Number.NaN === Not-a-Number'); } diff --git a/test/built-ins/Number/NaN/S15.7.3.4_A3.js b/test/built-ins/Number/NaN/S15.7.3.4_A3.js index cfa2233237d99a3d2476a4f36a553e2db0fde8dd..667cd76474eca94ad035fcaa57a68c7de81a8fe2 100644 --- a/test/built-ins/Number/NaN/S15.7.3.4_A3.js +++ b/test/built-ins/Number/NaN/S15.7.3.4_A3.js @@ -5,10 +5,17 @@ info: Number.NaN is DontDelete es5id: 15.7.3.4_A3 description: Checking if deleting Number.NaN fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ +verifyNotConfigurable(Number, "NaN"); + // CHECK#1 -if (delete Number.NaN !== false) { - $ERROR('#1: delete Number.NaN === false'); +try { + if (delete Number.NaN !== false) { + $ERROR('#1: delete Number.NaN === false'); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } diff --git a/test/built-ins/Number/POSITIVE_INFINITY/S15.7.3.6_A2.js b/test/built-ins/Number/POSITIVE_INFINITY/S15.7.3.6_A2.js index a2431db0e17e4fc3978eece8437206ac90fd9223..f13ec952da7dfd9db663573fa1f6346cd2f5dc58 100644 --- a/test/built-ins/Number/POSITIVE_INFINITY/S15.7.3.6_A2.js +++ b/test/built-ins/Number/POSITIVE_INFINITY/S15.7.3.6_A2.js @@ -5,11 +5,11 @@ info: Number.POSITIVE_INFINITY is ReadOnly es5id: 15.7.3.6_A2 description: Checking if varying Number.POSITIVE_INFINITY fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ // CHECK#1 -Number.POSITIVE_INFINITY = 1; +verifyNotWritable(Number, "POSITIVE_INFINITY", null, 1); if (isFinite(Number.POSITIVE_INFINITY)) { $ERROR('#1: Number.POSITIVE_INFINITY = 1; Number.POSITIVE_INFINITY === +Infinity'); } else { diff --git a/test/built-ins/Number/POSITIVE_INFINITY/S15.7.3.6_A3.js b/test/built-ins/Number/POSITIVE_INFINITY/S15.7.3.6_A3.js index ddebfce0a56b153cf1edd565200e7a4567dc8bec..4e893ea2ac94eaa908bbbd5695d6a7e40aac591a 100644 --- a/test/built-ins/Number/POSITIVE_INFINITY/S15.7.3.6_A3.js +++ b/test/built-ins/Number/POSITIVE_INFINITY/S15.7.3.6_A3.js @@ -5,10 +5,17 @@ info: Number.POSITIVE_INFINITY is DontDelete es5id: 15.7.3.6_A3 description: Checking if deleting Number.POSITIVE_INFINITY fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ +verifyNotConfigurable(Number, "POSITIVE_INFINITY"); + // CHECK#1 -if (delete Number.POSITIVE_INFINITY !== false) { - $ERROR('#1: delete Number.POSITIVE_INFINITY === false'); +try { + if (delete Number.POSITIVE_INFINITY !== false) { + $ERROR('#1: delete Number.POSITIVE_INFINITY === false'); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } diff --git a/test/built-ins/Number/prototype/S15.7.3.1_A1_T1.js b/test/built-ins/Number/prototype/S15.7.3.1_A1_T1.js index 8e59e1fc732a86ac4ac14629e7dc1bb3392b8412..bb585b229c9fe7c7dbb1ef4beee054917a10578e 100644 --- a/test/built-ins/Number/prototype/S15.7.3.1_A1_T1.js +++ b/test/built-ins/Number/prototype/S15.7.3.1_A1_T1.js @@ -7,12 +7,12 @@ info: > attributes es5id: 15.7.3.1_A1_T1 description: Checking if varying the Number.prototype property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 var x = Number.prototype; -Number.prototype = 1; +verifyNotWritable(Number, "prototype", null, 1); if (Number.prototype !== x) { $ERROR('#1: The Number.prototype property has the attributes ReadOnly'); } diff --git a/test/built-ins/Number/prototype/S15.7.3.1_A1_T2.js b/test/built-ins/Number/prototype/S15.7.3.1_A1_T2.js index 973cc0046d272470daddacfb57ae3e7a9a36936c..63705263d8af6876d7777a2a0658439bedc922c9 100644 --- a/test/built-ins/Number/prototype/S15.7.3.1_A1_T2.js +++ b/test/built-ins/Number/prototype/S15.7.3.1_A1_T2.js @@ -7,13 +7,19 @@ info: > attributes es5id: 15.7.3.1_A1_T2 description: Checking if deleting the Number.prototype property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ +verifyNotConfigurable(Number, "prototype"); + // CHECK#1 -if (delete Number.prototype !== false) { - $ERROR('#1: The Number.prototype property has the attributes DontDelete'); +try { + if (delete Number.prototype !== false) { + $ERROR('#1: The Number.prototype property has the attributes DontDelete'); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } if (!Number.hasOwnProperty('prototype')) { diff --git a/test/built-ins/Object/defineProperty/symbol-data-property-configurable-strict.js b/test/built-ins/Object/defineProperty/symbol-data-property-configurable-strict.js deleted file mode 100644 index 4e8be2295c700efcf4acb5eacfe7518b41c6edf8..0000000000000000000000000000000000000000 --- a/test/built-ins/Object/defineProperty/symbol-data-property-configurable-strict.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) Copyright 2013 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -es6id: 19.1.2.4 -description: > - Symbol used as property for configurable data property definition -flags: [onlyStrict] ----*/ -var sym = Symbol(); -var obj = {}; - - -Object.defineProperty(obj, sym, { - value: 1, - configurable: true -}); - -assert.sameValue(sym in obj, true, "The result of `sym in obj` is `true`"); -assert.sameValue( - Object.hasOwnProperty.call(obj, sym), - true, - "`Object.hasOwnProperty.call(obj, sym)` returns `true`" -); - -var desc = Object.getOwnPropertyDescriptor(obj, sym); - -assert.sameValue(desc.value, 1, "The value of `desc.value` is `1`"); -assert.sameValue(desc.configurable, true, "The value of `desc.configurable` is `true`"); -assert.sameValue(desc.writable, false, "The value of `desc.writable` is `false`"); -assert.sameValue(desc.enumerable, false, "The value of `desc.enumerable` is `false`"); -assert.sameValue( - Object.prototype.propertyIsEnumerable.call(obj, sym), - false, - "`Object.prototype.propertyIsEnumerable.call(obj, sym)` returns `false`" -); - -assert.sameValue(delete obj[sym], true, "The result of `delete obj[sym]` is `true`"); - -assert.sameValue( - Object.getOwnPropertyDescriptor(obj, sym), - undefined, - "`Object.getOwnPropertyDescriptor(obj, sym)` returns `undefined`" -); diff --git a/test/built-ins/Object/defineProperty/symbol-data-property-configurable-non-strict.js b/test/built-ins/Object/defineProperty/symbol-data-property-configurable.js similarity index 98% rename from test/built-ins/Object/defineProperty/symbol-data-property-configurable-non-strict.js rename to test/built-ins/Object/defineProperty/symbol-data-property-configurable.js index 622f6787c68247635f6c2fbd4a1755e2058c9735..cac26a7335fb8c774a3a0368ce7a2cfe34c0f8db 100644 --- a/test/built-ins/Object/defineProperty/symbol-data-property-configurable-non-strict.js +++ b/test/built-ins/Object/defineProperty/symbol-data-property-configurable.js @@ -4,7 +4,6 @@ es6id: 19.1.2.4 description: > Symbol used as property for configurable data property definition -flags: [noStrict] ---*/ var sym = Symbol(); var obj = {}; diff --git a/test/built-ins/Object/defineProperty/symbol-data-property-writable-strict.js b/test/built-ins/Object/defineProperty/symbol-data-property-writable-strict.js deleted file mode 100644 index d76388ad628adaa367be458915077b96b0bc4a5b..0000000000000000000000000000000000000000 --- a/test/built-ins/Object/defineProperty/symbol-data-property-writable-strict.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (C) Copyright 2013 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -es6id: 19.1.2.4 -description: > - Symbol used as property for writable data property definition -flags: [onlyStrict] ----*/ -var sym = Symbol(); -var obj = {}; - - -Object.defineProperty(obj, sym, { - value: 1, - writable: true -}); - -assert.sameValue(sym in obj, true, "The result of `sym in obj` is `true`"); -assert.sameValue( - Object.hasOwnProperty.call(obj, sym), - true, - "`Object.hasOwnProperty.call(obj, sym)` returns `true`" -); - -var desc = Object.getOwnPropertyDescriptor(obj, sym); - -assert.sameValue(desc.value, 1, "The value of `desc.value` is `1`"); -assert.sameValue(desc.configurable, false, "The value of `desc.configurable` is `false`"); -assert.sameValue(desc.writable, true, "The value of `desc.writable` is `true`"); -assert.sameValue(desc.enumerable, false, "The value of `desc.enumerable` is `false`"); -assert.sameValue( - Object.prototype.propertyIsEnumerable.call(obj, sym), - false, - "`Object.prototype.propertyIsEnumerable.call(obj, sym)` returns `false`" -); - -obj[sym] = 2; - -assert.sameValue(obj[sym], 2, "The value of `obj[sym]` is `2`"); diff --git a/test/built-ins/Object/defineProperty/symbol-data-property-writable-non-strict.js b/test/built-ins/Object/defineProperty/symbol-data-property-writable.js similarity index 98% rename from test/built-ins/Object/defineProperty/symbol-data-property-writable-non-strict.js rename to test/built-ins/Object/defineProperty/symbol-data-property-writable.js index 5156206a65c9e56d23e7bfd911b6824f494cddf2..69357f0c55c77406877009a82db3ce9aa9697ae7 100644 --- a/test/built-ins/Object/defineProperty/symbol-data-property-writable-non-strict.js +++ b/test/built-ins/Object/defineProperty/symbol-data-property-writable.js @@ -4,7 +4,6 @@ es6id: 19.1.2.4 description: > Symbol used as property for writable data property definition -flags: [noStrict] ---*/ var sym = Symbol(); var obj = {}; diff --git a/test/built-ins/Object/prototype/S15.2.3.1_A1.js b/test/built-ins/Object/prototype/S15.2.3.1_A1.js index 21192d1077b1ba9542d8824667a0fcc37bee113a..44b0ea6e6b5b9d9d9dc58b6147f4075d3a7b1431 100644 --- a/test/built-ins/Object/prototype/S15.2.3.1_A1.js +++ b/test/built-ins/Object/prototype/S15.2.3.1_A1.js @@ -5,11 +5,11 @@ info: The Object.prototype property has the attribute ReadOnly es5id: 15.2.3.1_A1 description: Checking if varying "Object.prototype" property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ var obj = Object.prototype; -Object.prototype = function(){return "shifted";}; +verifyNotWritable(Object, "prototype", null, function(){return "shifted";}); //CHECK#1 if (Object.prototype !== obj) { @@ -21,5 +21,5 @@ try { Object.prototype(); $ERROR('#2: the Object.prototype property has the attributes ReadOnly'); } catch (e) { - ; + if (e instanceof Test262Error) throw e; } diff --git a/test/built-ins/Object/prototype/S15.2.3.1_A3.js b/test/built-ins/Object/prototype/S15.2.3.1_A3.js index e069f594e3d17435f01b06e7a1e7c9d594158850..5b7c6e5eab45f660e458cf3b86bad9d234e32585 100644 --- a/test/built-ins/Object/prototype/S15.2.3.1_A3.js +++ b/test/built-ins/Object/prototype/S15.2.3.1_A3.js @@ -4,10 +4,20 @@ /*--- es5id: 15.2.3.1_A3 description: Checking if deleting "Object.prototype" property fails; -flags: [noStrict] +includes: [propertyHelper.js] ---*/ -delete Object.prototype; +verifyNotConfigurable(Object, "prototype"); + +//CHECK#1 +try { + if((delete Object.prototype) !== false){ + $ERROR('#1: Object.prototype has the attribute DontDelete'); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); +} //CHECK#2 if (!(Object.hasOwnProperty('prototype'))) { diff --git a/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A10.js b/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A10.js index 9076d9ae95ea145538b1444751ae214e0e3b422a..5a190b8cb58eef3ebc952731b5cd447eeb9b7f04 100644 --- a/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A10.js +++ b/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A10.js @@ -9,8 +9,7 @@ es5id: 15.2.4.5_A10 description: > Checking if varying the Object.prototype.hasOwnProperty.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ //CHECK#1 @@ -20,7 +19,7 @@ if (!(Object.prototype.hasOwnProperty.hasOwnProperty('length'))) { var obj = Object.prototype.hasOwnProperty.length; -Object.prototype.hasOwnProperty.length = function(){return "shifted";}; +verifyNotWritable(Object.prototype.hasOwnProperty, "length", null, function(){return "shifted";}); //CHECK#2 if (Object.prototype.hasOwnProperty.length !== obj) { diff --git a/test/built-ins/Object/prototype/isPrototypeOf/S15.2.4.6_A10.js b/test/built-ins/Object/prototype/isPrototypeOf/S15.2.4.6_A10.js index 6ace571c50c74d9d3a6c8c37b68c392ec9f15e7b..466a70a6974024ed25eba7c6fd75eecb6d6045b2 100644 --- a/test/built-ins/Object/prototype/isPrototypeOf/S15.2.4.6_A10.js +++ b/test/built-ins/Object/prototype/isPrototypeOf/S15.2.4.6_A10.js @@ -9,8 +9,7 @@ es5id: 15.2.4.6_A10 description: > Checking if varying the Object.prototype.isPrototypeOf.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ //CHECK#1 @@ -20,7 +19,7 @@ if (!(Object.prototype.isPrototypeOf.hasOwnProperty('length'))) { var obj = Object.prototype.isPrototypeOf.length; -Object.prototype.isPrototypeOf.length = function(){return "shifted";}; +verifyNotWritable(Object.prototype.isPrototypeOf, "length", null, function(){return "shifted";}); //CHECK#2 if (Object.prototype.isPrototypeOf.length !== obj) { diff --git a/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A10.js b/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A10.js index 876a17131f7a6acd937530ba8cd4343fcb940f5a..4aa9a16b65a5191b200304d4aca528a4b2124853 100644 --- a/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A10.js +++ b/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A10.js @@ -9,8 +9,7 @@ es5id: 15.2.4.7_A10 description: > Checking if varying the Object.prototype.propertyIsEnumerable.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ //CHECK#1 @@ -20,7 +19,7 @@ if (!(Object.prototype.propertyIsEnumerable.hasOwnProperty('length'))) { var obj = Object.prototype.propertyIsEnumerable.length; -Object.prototype.propertyIsEnumerable.length = function(){return "shifted";}; +verifyNotWritable(Object.prototype.propertyIsEnumerable, "length", null, function(){return "shifted";}); //CHECK#2 if (Object.prototype.propertyIsEnumerable.length !== obj) { diff --git a/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A10.js b/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A10.js index c71880656a63ad47d755277a8c8d0c25c780b512..f77571101ea8ed2577870d4b2a28497ba8fb58c5 100644 --- a/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A10.js +++ b/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A10.js @@ -9,8 +9,7 @@ es5id: 15.2.4.3_A10 description: > Checking if varying the Object.prototype.toLocaleString.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ //CHECK#1 @@ -20,7 +19,7 @@ if (!(Object.prototype.toLocaleString.hasOwnProperty('length'))) { var obj = Object.prototype.toLocaleString.length; -Object.prototype.toLocaleString.length = function(){return "shifted";}; +verifyNotWritable(Object.prototype.toLocaleString, "length", null, function(){return "shifted";}); //CHECK#2 if (Object.prototype.toLocaleString.length !== obj) { diff --git a/test/built-ins/Object/prototype/toString/S15.2.4.2_A10.js b/test/built-ins/Object/prototype/toString/S15.2.4.2_A10.js index a97f7f79da332edeb870a9750b13bbd39f3fc107..887915b20e2de4355ff54401ccac906012c0cebe 100644 --- a/test/built-ins/Object/prototype/toString/S15.2.4.2_A10.js +++ b/test/built-ins/Object/prototype/toString/S15.2.4.2_A10.js @@ -7,8 +7,7 @@ es5id: 15.2.4.2_A10 description: > Checking if varying the Object.prototype.toString.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ //CHECK#1 @@ -18,7 +17,7 @@ if (!(Object.prototype.toString.hasOwnProperty('length'))) { var obj = Object.prototype.toString.length; -Object.prototype.toString.length = function(){return "shifted";}; +verifyNotWritable(Object.prototype.toString, "length", null, function(){return "shifted";}); //CHECK#2 if (Object.prototype.toString.length !== obj) { diff --git a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A10.js b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A10.js index 878ecf265ea5b9490515ef66bc1b8e0cb578733c..734343a08cf8fe4dfefd91beb285554c4dbec358 100644 --- a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A10.js +++ b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A10.js @@ -7,8 +7,7 @@ es5id: 15.2.4.4_A10 description: > Checking if varying the Object.prototype.valueOf.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ //CHECK#1 @@ -18,7 +17,7 @@ if (!(Object.prototype.valueOf.hasOwnProperty('length'))) { var obj = Object.prototype.valueOf.length; -Object.prototype.valueOf.length = function(){return "shifted";}; +verifyNotWritable(Object.prototype.valueOf, "length", null, function(){return "shifted";}); //CHECK#2 if (Object.prototype.valueOf.length !== obj) { diff --git a/test/built-ins/RegExp/prototype/S15.10.5.1_A3.js b/test/built-ins/RegExp/prototype/S15.10.5.1_A3.js index 8a0d8eee75acecc5986f7a4948156f04d185d7e4..55b48d98bb5c33230aaee823f89b1bee5ed11266 100644 --- a/test/built-ins/RegExp/prototype/S15.10.5.1_A3.js +++ b/test/built-ins/RegExp/prototype/S15.10.5.1_A3.js @@ -5,8 +5,7 @@ info: The RegExp.prototype property has the attribute DontDelete es5id: 15.10.5.1_A3 description: Checking if deleting the RegExp.prototype property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ //CHECK#0 @@ -14,9 +13,16 @@ if (RegExp.hasOwnProperty('prototype') !== true) { $FAIL('#0: RegExp.hasOwnProperty(\'prototype\') === true'); } +verifyNotConfigurable(RegExp, "prototype"); + //CHECK#1 -if (delete RegExp.prototype !== false) { - $ERROR('#1: delete RegExp.prototype === false'); +try { + if (delete RegExp.prototype !== false) { + $ERROR('#1: delete RegExp.prototype === false'); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } //CHECK#2 diff --git a/test/built-ins/RegExp/prototype/S15.10.5.1_A4.js b/test/built-ins/RegExp/prototype/S15.10.5.1_A4.js index 3843e0a24bb930bff548e8b9dc060832cabf9f93..db97e911b05ee36a94c857a4673e7abe086adf44 100644 --- a/test/built-ins/RegExp/prototype/S15.10.5.1_A4.js +++ b/test/built-ins/RegExp/prototype/S15.10.5.1_A4.js @@ -5,8 +5,7 @@ info: The RegExp.prototype property has the attribute ReadOnly es5id: 15.10.5.1_A4 description: Checking if varying the RegExp.prototype property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ //CHECK#1 @@ -14,9 +13,9 @@ if (RegExp.hasOwnProperty('prototype') !== true) { $FAIL('#1: RegExp.hasOwnProperty(\'prototype\') === true'); } -__obj = RegExp.prototype; +var __obj = RegExp.prototype; -RegExp.prototype = function(){return "shifted";}; +verifyNotWritable(RegExp, "prototype", null, function(){return "shifted";}); //CHECK#2 if (RegExp.prototype !== __obj) { diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A10.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A10.js index f68ea5899f0ec6b2bfc2bb8afa8e54ca75adfa28..d3ecd4035d2ea154adc08a061f3c73e90e44b4e5 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A10.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A10.js @@ -5,8 +5,7 @@ info: The RegExp.prototype.exec.length property has the attribute ReadOnly es5id: 15.10.6.2_A10 description: Checking if varying the RegExp.prototype.exec.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ //CHECK#1 @@ -14,9 +13,9 @@ if (RegExp.prototype.exec.hasOwnProperty('length') !== true) { $FAIL('#1: RegExp.prototype.exec.hasOwnProperty(\'length\') === true'); } -__obj = RegExp.prototype.exec.length; +var __obj = RegExp.prototype.exec.length; -RegExp.prototype.exec.length = function(){return "shifted";}; +verifyNotWritable(RegExp.prototype.exec, "length", null, function(){return "shifted";}); //CHECK#2 if (RegExp.prototype.exec.length !== __obj) { diff --git a/test/built-ins/RegExp/prototype/global/S15.10.7.2_A10.js b/test/built-ins/RegExp/prototype/global/S15.10.7.2_A10.js index 73c4ff52632eaa43f69407ddef5d0ca3e46729ea..c7e605d48928b3cd8a885636240e88c0a31914d2 100644 --- a/test/built-ins/RegExp/prototype/global/S15.10.7.2_A10.js +++ b/test/built-ins/RegExp/prototype/global/S15.10.7.2_A10.js @@ -5,21 +5,20 @@ info: The RegExp.prototype global property does not have a set accessor es5id: 15.10.7.2_A10 description: Checking if varying the global property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ -__re = RegExp.prototype; +var __re = RegExp.prototype; //CHECK#1 if (__re.hasOwnProperty('global') !== true) { $FAIL('#1: __re = RegExp.prototype; __re.hasOwnProperty(\'global\') === true'); } -__sample = /^|^/; -__obj = __sample.global; +var __sample = /^|^/; +var __obj = __sample.global; -__sample.global = "shifted"; +verifyNotWritable(__sample, "global", "global", "shifted"); //CHECK#2 if (__sample.global !== __obj) { diff --git a/test/built-ins/RegExp/prototype/ignoreCase/S15.10.7.3_A10.js b/test/built-ins/RegExp/prototype/ignoreCase/S15.10.7.3_A10.js index 20a02aca15b15f52f97351f642e7ac7152bf20a5..923032369d5e82350f81f4d5b16ea327434282a7 100644 --- a/test/built-ins/RegExp/prototype/ignoreCase/S15.10.7.3_A10.js +++ b/test/built-ins/RegExp/prototype/ignoreCase/S15.10.7.3_A10.js @@ -5,21 +5,20 @@ info: The RegExp.prototype ignoreCase property does not have a set accessor es5id: 15.10.7.3_A10 description: Checking if varying the ignoreCase property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ -__re = RegExp.prototype; +var __re = RegExp.prototype; //CHECK#1 if (__re.hasOwnProperty('ignoreCase') !== true) { $FAIL('#1: __re = RegExp.prototype; __re.hasOwnProperty(\'ignoreCase\') === true'); } -__sample = /a|b|c/; -__obj = __sample.ignoreCase; +var __sample = /a|b|c/; +var __obj = __sample.ignoreCase; -__sample.ignoreCase = "shifted"; +verifyNotWritable(__sample, "ignoreCase", "ignoreCase", "shifted"); //CHECK#2 if (__sample.ignoreCase !== __obj) { diff --git a/test/built-ins/RegExp/prototype/lastIndex/S15.10.7.5_A9.js b/test/built-ins/RegExp/prototype/lastIndex/S15.10.7.5_A9.js index abdf5d21c09e2e3bc9142f9d198c6fd261de63d0..fcd56a21de2c88089a3e6f081afe4d75596151a3 100644 --- a/test/built-ins/RegExp/prototype/lastIndex/S15.10.7.5_A9.js +++ b/test/built-ins/RegExp/prototype/lastIndex/S15.10.7.5_A9.js @@ -5,20 +5,26 @@ info: The RegExp instance lastIndex property has the attribute DontDelete es5id: 15.10.7.5_A9 description: Checking if deleting the lastIndex property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ -__re = new RegExp; +var __re = new RegExp; //CHECK#0 if (__re.hasOwnProperty('lastIndex') !== true) { $FAIL('#0: __re = new RegExp; __re.hasOwnProperty(\'lastIndex\') === true'); } +verifyNotConfigurable(__re, "lastIndex"); + //CHECK#1 -if ((delete __re.lastIndex) !== false) { - $ERROR('#1: __re = new RegExp; (delete __re.lastIndex) === false'); +try { + if ((delete __re.lastIndex) !== false) { + $ERROR('#1: __re = new RegExp; (delete __re.lastIndex) === false'); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } //CHECK#2 diff --git a/test/built-ins/RegExp/prototype/multiline/S15.10.7.4_A10.js b/test/built-ins/RegExp/prototype/multiline/S15.10.7.4_A10.js index 179a1303f5ddc3c154967134f7ac9a3e3de73e1f..6b6802344aed2329669b94d97d86b4af634cbaca 100644 --- a/test/built-ins/RegExp/prototype/multiline/S15.10.7.4_A10.js +++ b/test/built-ins/RegExp/prototype/multiline/S15.10.7.4_A10.js @@ -5,21 +5,20 @@ info: The RegExp.prototype multiline property does not have a set accessor es5id: 15.10.7.4_A10 description: Checking if varying the multiline property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ -__re = RegExp.prototype; +var __re = RegExp.prototype; //CHECK#1 if (__re.hasOwnProperty('multiline') !== true) { $FAIL('#1: __re = RegExp.prototype; __re.hasOwnProperty(\'multiline\') === true'); } -__sample = /\n/; -__obj = __sample.multiline; +var __sample = /\n/; +var __obj = __sample.multiline; -__sample.multiline = "shifted"; +verifyNotWritable(__sample, "multiline", "multiline", "shifted"); //CHECK#2 if (__sample.multiline !== __obj) { diff --git a/test/built-ins/RegExp/prototype/source/S15.10.7.1_A10.js b/test/built-ins/RegExp/prototype/source/S15.10.7.1_A10.js index 08fe7e7961de0f7f674aa402bead7b26fc9ba0b3..85e86d5f43eaaaa75014ad14f75771ac1e44b7aa 100644 --- a/test/built-ins/RegExp/prototype/source/S15.10.7.1_A10.js +++ b/test/built-ins/RegExp/prototype/source/S15.10.7.1_A10.js @@ -5,21 +5,20 @@ info: The RegExp.prototype source property does not have a set accessor es5id: 15.10.7.1_A10 description: Checking if varying the source property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ -__re = RegExp.prototype; +var __re = RegExp.prototype; //CHECK#1 if (__re.hasOwnProperty('source') !== true) { $FAIL('#1: __re = RegExp.prototype; __re.hasOwnProperty(\'source\') === true'); } -__sample = /./; -__obj = __sample.source; +var __sample = /./; +var __obj = __sample.source; -__sample.source = "shifted"; +verifyNotWritable(__sample, "source", "source", "shifted"); //CHECK#2 if (__sample.source !== __obj) { diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A10.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A10.js index 1a0c6bce2a63aec4a15a1c20b18252104ea8c51e..331a328141414f3b3d68a2262b64d0292d35d141 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A10.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A10.js @@ -5,8 +5,7 @@ info: The RegExp.prototype.test.length property has the attribute ReadOnly es5id: 15.10.6.3_A10 description: Checking if varying the RegExp.prototype.test.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ //CHECK#1 @@ -14,9 +13,9 @@ if (RegExp.prototype.test.hasOwnProperty('length') !== true) { $FAIL('#1: RegExp.prototype.test.hasOwnProperty(\'length\') === true'); } -__obj = RegExp.prototype.test.length; +var __obj = RegExp.prototype.test.length; -RegExp.prototype.test.length = function(){return "shifted";}; +verifyNotWritable(RegExp.prototype.test, "length", null, function(){return "shifted";}); //CHECK#2 if (RegExp.prototype.test.length !== __obj) { diff --git a/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A10.js b/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A10.js index b1de97d0d51ba1369576a9ca14c3017cfcad1bfd..ff7e939601dd66241ee1f3214dcddb4b33d33b86 100644 --- a/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A10.js +++ b/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A10.js @@ -7,8 +7,7 @@ es5id: 15.10.6.4_A10 description: > Checking if varying the RegExp.prototype.toString.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ //CHECK#1 @@ -16,9 +15,9 @@ if (RegExp.prototype.toString.hasOwnProperty('length') !== true) { $FAIL('#1: RegExp.prototype.toString.hasOwnProperty(\'length\') === true'); } -__obj = RegExp.prototype.toString.length; +var __obj = RegExp.prototype.toString.length; -RegExp.prototype.toString.length = function(){return "shifted";}; +verifyNotWritable(RegExp.prototype.toString, "length", null, function(){return "shifted";}); //CHECK#2 if (RegExp.prototype.toString.length !== __obj) { diff --git a/test/built-ins/String/S15.5.5.1_A3.js b/test/built-ins/String/S15.5.5.1_A3.js index 5d550b7d42f00800e524daadb35029e9ffeaa42b..8cdd0622103c3f09da9722332492f6664911dc9e 100644 --- a/test/built-ins/String/S15.5.5.1_A3.js +++ b/test/built-ins/String/S15.5.5.1_A3.js @@ -5,7 +5,7 @@ info: length property has the attributes {DontDelete} es5id: 15.5.5.1_A3 description: Checking if deleting the length property of String fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ var __str__instance = new String("globglob"); @@ -18,10 +18,17 @@ if (!(__str__instance.hasOwnProperty("length"))) { // ////////////////////////////////////////////////////////////////////////////// +verifyNotConfigurable(__str__instance, "length"); + ////////////////////////////////////////////////////////////////////////////// //CHECK#2 -if (delete __str__instance.length === true) { - $ERROR('#2: var __str__instance = new String("globglob"); delete __str__instance.length !== true'); +try { + if (delete __str__instance.length === true) { + $ERROR('#2: var __str__instance = new String("globglob"); delete __str__instance.length !== true'); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); } // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/S15.5.5.1_A4.js b/test/built-ins/String/S15.5.5.1_A4_T1.js similarity index 94% rename from test/built-ins/String/S15.5.5.1_A4.js rename to test/built-ins/String/S15.5.5.1_A4_T1.js index 8c17dee4813e65b7170ffb4509e439d9867a54a9..2df5f77c64a5ca3bfa17bb64687b8d65d32361a4 100644 --- a/test/built-ins/String/S15.5.5.1_A4.js +++ b/test/built-ins/String/S15.5.5.1_A4_T1.js @@ -3,7 +3,7 @@ /*--- info: length property has the attributes {ReadOnly} -es5id: 15.5.5.1_A4 +es5id: 15.5.5.1_A4_T1 description: Checking if varying the length property of String fails flags: [noStrict] ---*/ @@ -21,7 +21,7 @@ if (!(__str__instance.hasOwnProperty("length"))) { ////////////////////////////////////////////////////////////////////////////// //CHECK#2 if (__str__instance.length !== 8) { - $ERROR('#2: var __str__instance = new String("globglob"); __str__instance.length === 8. Actual: __str__instance.length ==='+__str__instance.length ); + $ERROR('#2: var __str__instance = new String("globglob"); __str__instance.length === 8. Actual: __str__instance.length ==='+__str__instance.length ); } // ////////////////////////////////////////////////////////////////////////////// @@ -31,18 +31,18 @@ __str__instance.length=-1; ////////////////////////////////////////////////////////////////////////////// //CHECK#3 if (__str__instance.length !== 8) { - $ERROR('#3: var __str__instance = new String("globglob"); __str__instance.length=-1; __str__instance.length === 8(after redefine length property). Actual: __str__instance.length ==='+__str__instance.length ); + $ERROR('#3: var __str__instance = new String("globglob"); __str__instance.length=-1; __str__instance.length === 8(after redefine length property). Actual: __str__instance.length ==='+__str__instance.length ); } // ////////////////////////////////////////////////////////////////////////////// with(__str__instance) length = 0; - + ////////////////////////////////////////////////////////////////////////////// //CHECK#4 if (__str__instance.length !== 8) { - $ERROR('#4: var __str__instance = new String("globglob"); with(__str__instance) length = 0; __str__instance.length === 8(after redefine length property with using "with"). Actual: __str__instance.length ==='+__str__instance.length ); + $ERROR('#4: var __str__instance = new String("globglob"); with(__str__instance) length = 0; __str__instance.length === 8(after redefine length property with using "with"). Actual: __str__instance.length ==='+__str__instance.length ); } // ////////////////////////////////////////////////////////////////////////////// @@ -52,7 +52,7 @@ __str__instance.length++; ////////////////////////////////////////////////////////////////////////////// //CHECK#5 if (__str__instance.length !== 8) { - $ERROR('#5: var __str__instance = new String("globglob"); __str__instance.length++; __str__instance.length === 8(after redefine length property with using "++"). Actual: __str__instance.length ==='+__str__instance.length ); + $ERROR('#5: var __str__instance = new String("globglob"); __str__instance.length++; __str__instance.length === 8(after redefine length property with using "++"). Actual: __str__instance.length ==='+__str__instance.length ); } // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/S15.5.5.1_A4_T2.js b/test/built-ins/String/S15.5.5.1_A4_T2.js new file mode 100644 index 0000000000000000000000000000000000000000..08fb0724060b13cd71c0758ad947dd263726a0e1 --- /dev/null +++ b/test/built-ins/String/S15.5.5.1_A4_T2.js @@ -0,0 +1,37 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: length property has the attributes {ReadOnly} +es5id: 15.5.5.1_A4_T2 +description: Checking if varying the length property of String fails +includes: [propertyHelper.js] +---*/ + +var __str__instance = new String("globglob"); + +////////////////////////////////////////////////////////////////////////////// +//CHECK#1 +if (!(__str__instance.hasOwnProperty("length"))) { + $ERROR('#1: var __str__instance = new String("globglob"); __str__instance.hasOwnProperty("length") return true. Actual: '+__str__instance.hasOwnProperty("length")); +} +// +////////////////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////////////// +//CHECK#2 +if (__str__instance.length !== 8) { + $ERROR('#2: var __str__instance = new String("globglob"); __str__instance.length === 8. Actual: __str__instance.length ==='+__str__instance.length ); +} +// +////////////////////////////////////////////////////////////////////////////// + +verifyNotWritable(__str__instance, "length", null, -1); + +////////////////////////////////////////////////////////////////////////////// +//CHECK#3 +if (__str__instance.length !== 8) { + $ERROR('#3: var __str__instance = new String("globglob"); __str__instance.length=-1; __str__instance.length === 8(after redefine length property). Actual: __str__instance.length ==='+__str__instance.length ); +} +// +////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/S15.5.3.1_A3.js b/test/built-ins/String/prototype/S15.5.3.1_A3.js index 8ee49875f8a442f569ad3d5def06d9da83a83b70..eddfc2e48ff32604cf56f9e5b3d8398e3c482bf7 100644 --- a/test/built-ins/String/prototype/S15.5.3.1_A3.js +++ b/test/built-ins/String/prototype/S15.5.3.1_A3.js @@ -5,8 +5,7 @@ info: The String.prototype property has the attribute DontDelete es5id: 15.5.3.1_A3 description: Checking if deleting the String.prototype property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ ////////////////////////////////////////////////////////////////////////////// @@ -17,12 +16,25 @@ if (!(String.hasOwnProperty('prototype'))) { // ////////////////////////////////////////////////////////////////////////////// -delete String.prototype; +verifyNotConfigurable(String, "prototype"); ////////////////////////////////////////////////////////////////////////////// //CHECK#2 +try { + if ((delete String.prototype) !== false) { + $ERROR('#2: String.prototype has the attribute DontDelete'); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); +} +// +////////////////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////////////// +//CHECK#3 if (!(String.hasOwnProperty('prototype'))) { - $ERROR('#2: delete String.prototype; String.hasOwnProperty(\'prototype\') return true. Actual: '+String.hasOwnProperty('prototype')); + $ERROR('#3: delete String.prototype; String.hasOwnProperty(\'prototype\') return true. Actual: '+String.hasOwnProperty('prototype')); } // ////////////////////////////////////////////////////////////////////////////// diff --git a/test/built-ins/String/prototype/S15.5.3.1_A4.js b/test/built-ins/String/prototype/S15.5.3.1_A4.js index 71eb71d235271228c0df76fc8a9b5bd8344052ee..fb570b94153ed8470bbcaa8749552b36289d458a 100644 --- a/test/built-ins/String/prototype/S15.5.3.1_A4.js +++ b/test/built-ins/String/prototype/S15.5.3.1_A4.js @@ -5,8 +5,7 @@ info: The String.prototype property has the attribute ReadOnly es5id: 15.5.3.1_A4 description: Checking if varying the String.prototype property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ ////////////////////////////////////////////////////////////////////////////// @@ -19,7 +18,7 @@ if (!(String.hasOwnProperty('prototype'))) { var __obj = String.prototype; -String.prototype = function(){return "shifted";}; +verifyNotWritable(String, "prototype", null, function(){return "shifted";}); ////////////////////////////////////////////////////////////////////////////// //CHECK#2 diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A10.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A10.js index c07d01b2695fe56b9207a7c09cc9568e18afe863..ad3379461da3338f281444b5d0808a2849100b04 100644 --- a/test/built-ins/String/prototype/charAt/S15.5.4.4_A10.js +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A10.js @@ -7,7 +7,7 @@ es5id: 15.5.4.4_A10 description: > Checking if varying the String.prototype.charAt.length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ ////////////////////////////////////////////////////////////////////////////// @@ -20,7 +20,7 @@ if (!(String.prototype.charAt.hasOwnProperty('length'))) { var __obj = String.prototype.charAt.length; -String.prototype.charAt.length = function(){return "shifted";}; +verifyNotWritable(String.prototype.charAt, "length", null, function(){return "shifted";}); ////////////////////////////////////////////////////////////////////////////// //CHECK#2 diff --git a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A10.js b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A10.js index 5f4e556f68a0176209a518ec4f01a52d80ad1842..a22bf9d0e950ea14d7f2b62516407e738cad4117 100644 --- a/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A10.js +++ b/test/built-ins/String/prototype/charCodeAt/S15.5.4.5_A10.js @@ -7,7 +7,7 @@ es5id: 15.5.4.5_A10 description: > Checking if varying the String.prototype.charCodeAt.length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ ////////////////////////////////////////////////////////////////////////////// @@ -20,7 +20,7 @@ if (!(String.prototype.charCodeAt.hasOwnProperty('length'))) { var __obj = String.prototype.charCodeAt.length; -String.prototype.charCodeAt.length = function(){return "shifted";}; +verifyNotWritable(String.prototype.charCodeAt, "length", null, function(){return "shifted";}); ////////////////////////////////////////////////////////////////////////////// //CHECK#2 diff --git a/test/built-ins/String/prototype/concat/S15.5.4.6_A10.js b/test/built-ins/String/prototype/concat/S15.5.4.6_A10.js index 1a4e14cc56734609837a99f847d87346c9a93a35..00258a5e572a896261da948fcd258e9eeb3f8b96 100644 --- a/test/built-ins/String/prototype/concat/S15.5.4.6_A10.js +++ b/test/built-ins/String/prototype/concat/S15.5.4.6_A10.js @@ -7,7 +7,7 @@ es5id: 15.5.4.6_A10 description: > Checking if varying the String.prototype.concat.length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ ////////////////////////////////////////////////////////////////////////////// @@ -20,7 +20,7 @@ if (!(String.prototype.concat.hasOwnProperty('length'))) { var __obj = String.prototype.concat.length; -String.prototype.concat.length = function(){return "shifted";}; +verifyNotWritable(String.prototype.concat, "length", null, function(){return "shifted";}); ////////////////////////////////////////////////////////////////////////////// //CHECK#2 diff --git a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A10.js b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A10.js index 51faa063c5fff00ad8d721598e52158571881c69..e9f6ceed195f024379a8e9c07c6f9ec9802eebf4 100644 --- a/test/built-ins/String/prototype/indexOf/S15.5.4.7_A10.js +++ b/test/built-ins/String/prototype/indexOf/S15.5.4.7_A10.js @@ -7,8 +7,7 @@ es5id: 15.5.4.7_A10 description: > Checking if varying the String.prototype.indexOf.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ ////////////////////////////////////////////////////////////////////////////// @@ -21,7 +20,7 @@ if (!(String.prototype.indexOf.hasOwnProperty('length'))) { var __obj = String.prototype.indexOf.length; -String.prototype.indexOf.length = function(){return "shifted";}; +verifyNotWritable(String.prototype.indexOf, "length", null, function(){return "shifted";}); ////////////////////////////////////////////////////////////////////////////// //CHECK#2 diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A10.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A10.js index 538f8f6b679fa208595c65881ea418c712c53fe6..3a59f0f6cd9b8c139a36ba470818fb38dd5c94cc 100644 --- a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A10.js +++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A10.js @@ -9,8 +9,7 @@ es5id: 15.5.4.8_A10 description: > Checking if varying the String.prototype.lastIndexOf.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ ////////////////////////////////////////////////////////////////////////////// @@ -23,7 +22,7 @@ if (!(String.prototype.lastIndexOf.hasOwnProperty('length'))) { var __obj = String.prototype.lastIndexOf.length; -String.prototype.lastIndexOf.length = function(){return "shifted";}; +verifyNotWritable(String.prototype.lastIndexOf, "length", null, function(){return "shifted";}); ////////////////////////////////////////////////////////////////////////////// //CHECK#2 diff --git a/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A10.js b/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A10.js index 754377c99cb51394efdc0552778ddc16c7f9dfaf..56579a81b04d590d747de9467c66e8b86220427e 100644 --- a/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A10.js +++ b/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A10.js @@ -9,7 +9,7 @@ es5id: 15.5.4.9_A10 description: > Checking if varying the String.prototype.localeCompare.length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ ////////////////////////////////////////////////////////////////////////////// @@ -22,7 +22,7 @@ if (!(String.prototype.localeCompare.hasOwnProperty('length'))) { var __obj = String.prototype.localeCompare.length; -String.prototype.localeCompare.length = function(){return "shifted";}; +verifyNotWritable(String.prototype.localeCompare, "length", null, function(){return "shifted";}); ////////////////////////////////////////////////////////////////////////////// //CHECK#2 diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A10.js b/test/built-ins/String/prototype/match/S15.5.4.10_A10.js index 973343e62fee2b0f8943511d8dc90149795834ac..1a9f0acbd93fb5b150f5e4dc49af021062148a9e 100644 --- a/test/built-ins/String/prototype/match/S15.5.4.10_A10.js +++ b/test/built-ins/String/prototype/match/S15.5.4.10_A10.js @@ -7,8 +7,7 @@ es5id: 15.5.4.10_A10 description: > Checking if varying the String.prototype.match.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ ////////////////////////////////////////////////////////////////////////////// @@ -21,7 +20,7 @@ if (!(String.prototype.match.hasOwnProperty('length'))) { var __obj = String.prototype.match.length; -String.prototype.match.length = function(){return "shifted";}; +verifyNotWritable(String.prototype.match, "length", null, function(){return "shifted";}); ////////////////////////////////////////////////////////////////////////////// //CHECK#2 diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A10.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A10.js index f838683e47369bbfe243abd8dd1ba524531c373d..d1cb41ab3e12a03ef39a490e119287f97deb66e8 100644 --- a/test/built-ins/String/prototype/replace/S15.5.4.11_A10.js +++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A10.js @@ -7,8 +7,7 @@ es5id: 15.5.4.11_A10 description: > Checking if varying the String.prototype.replace.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ ////////////////////////////////////////////////////////////////////////////// @@ -21,7 +20,7 @@ if (!(String.prototype.replace.hasOwnProperty('length'))) { var __obj = String.prototype.replace.length; -String.prototype.replace.length = function(){return "shifted";}; +verifyNotWritable(String.prototype.replace, "length", null, function(){return "shifted";}); ////////////////////////////////////////////////////////////////////////////// //CHECK#2 diff --git a/test/built-ins/String/prototype/search/S15.5.4.12_A10.js b/test/built-ins/String/prototype/search/S15.5.4.12_A10.js index afd98d43fffe246876cb35aef5382747fa2a1055..de22f528cdfe29c90848ceb259a86a29caa4e8eb 100644 --- a/test/built-ins/String/prototype/search/S15.5.4.12_A10.js +++ b/test/built-ins/String/prototype/search/S15.5.4.12_A10.js @@ -7,8 +7,7 @@ es5id: 15.5.4.12_A10 description: > Checking if varying the String.prototype.search.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ ////////////////////////////////////////////////////////////////////////////// @@ -21,7 +20,7 @@ if (!(String.prototype.search.hasOwnProperty('length'))) { var __obj = String.prototype.search.length; -String.prototype.search.length = function(){return "shifted";}; +verifyNotWritable(String.prototype.search, "length", null, function(){return "shifted";}); ////////////////////////////////////////////////////////////////////////////// //CHECK#2 diff --git a/test/built-ins/String/prototype/slice/S15.5.4.13_A10.js b/test/built-ins/String/prototype/slice/S15.5.4.13_A10.js index 7aed6ca591ad930daf4df8bb932aa4b5ff63f8a5..0c1cf4ac32a4b645ac5dd9af5a001cb0c5f4cb04 100644 --- a/test/built-ins/String/prototype/slice/S15.5.4.13_A10.js +++ b/test/built-ins/String/prototype/slice/S15.5.4.13_A10.js @@ -7,8 +7,7 @@ es5id: 15.5.4.13_A10 description: > Checking if varying the String.prototype.slice.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ ////////////////////////////////////////////////////////////////////////////// @@ -21,7 +20,7 @@ if (!(String.prototype.slice.hasOwnProperty('length'))) { var __obj = String.prototype.slice.length; -String.prototype.slice.length = function(){return "shifted";}; +verifyNotWritable(String.prototype.slice, "length", null, function(){return "shifted";}); ////////////////////////////////////////////////////////////////////////////// //CHECK#2 diff --git a/test/built-ins/String/prototype/split/S15.5.4.14_A10.js b/test/built-ins/String/prototype/split/S15.5.4.14_A10.js index b6139de201b6238d5146e528acaa1fb45bb7d003..ed6951d6c9c0ca937756e453be8df113bcb6cfb8 100644 --- a/test/built-ins/String/prototype/split/S15.5.4.14_A10.js +++ b/test/built-ins/String/prototype/split/S15.5.4.14_A10.js @@ -7,8 +7,7 @@ es5id: 15.5.4.14_A10 description: > Checking if varying the String.prototype.split.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ ////////////////////////////////////////////////////////////////////////////// @@ -21,7 +20,7 @@ if (!(String.prototype.split.hasOwnProperty('length'))) { var __obj = String.prototype.split.length; -String.prototype.split.length = function(){return "shifted";}; +verifyNotWritable(String.prototype.split, "length", null, function(){return "shifted";}); ////////////////////////////////////////////////////////////////////////////// //CHECK#2 diff --git a/test/built-ins/String/prototype/substring/S15.5.4.15_A10.js b/test/built-ins/String/prototype/substring/S15.5.4.15_A10.js index 1d48b27e4d0b6c3b3db620b5192da3efc62baacb..2cc1836ffe6f48a5fe21f4e9cce447d477a374d0 100644 --- a/test/built-ins/String/prototype/substring/S15.5.4.15_A10.js +++ b/test/built-ins/String/prototype/substring/S15.5.4.15_A10.js @@ -7,8 +7,7 @@ es5id: 15.5.4.15_A10 description: > Checking if varying the String.prototype.substring.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ ////////////////////////////////////////////////////////////////////////////// @@ -21,7 +20,7 @@ if (!(String.prototype.substring.hasOwnProperty('length'))) { var __obj = String.prototype.substring.length; -String.prototype.substring.length = function(){return "shifted";}; +verifyNotWritable(String.prototype.substring, "length", null, function(){return "shifted";}); ////////////////////////////////////////////////////////////////////////////// //CHECK#2 diff --git a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A10.js b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A10.js index 57c534f137b0a66d091df15e61157e49bfedb838..1da33690bd2c59fbf2bc6ca10489a76dd4523038 100644 --- a/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A10.js +++ b/test/built-ins/String/prototype/toLocaleLowerCase/S15.5.4.17_A10.js @@ -9,8 +9,7 @@ es5id: 15.5.4.17_A10 description: > Checking if varying the String.prototype.toLocaleLowerCase.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ ////////////////////////////////////////////////////////////////////////////// @@ -21,9 +20,9 @@ if (!(String.prototype.toLocaleLowerCase.hasOwnProperty('length'))) { // ////////////////////////////////////////////////////////////////////////////// -__obj = String.prototype.toLocaleLowerCase.length; +var __obj = String.prototype.toLocaleLowerCase.length; -String.prototype.toLocaleLowerCase.length = function(){return "shifted";}; +verifyNotWritable(String.prototype.toLocaleLowerCase, "length", null, function(){return "shifted";}); ////////////////////////////////////////////////////////////////////////////// //CHECK#2 diff --git a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A10.js b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A10.js index c91a71387c78381e4d3b95ac13bdf6cba6d68e64..01ed626162562aeaca1836ee97eacead173f6afa 100644 --- a/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A10.js +++ b/test/built-ins/String/prototype/toLocaleUpperCase/S15.5.4.19_A10.js @@ -9,8 +9,7 @@ es5id: 15.5.4.19_A10 description: > Checking if varying the String.prototype.toLocaleUpperCase.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ ////////////////////////////////////////////////////////////////////////////// @@ -23,7 +22,7 @@ if (!(String.prototype.toLocaleUpperCase.hasOwnProperty('length'))) { var __obj = String.prototype.toLocaleUpperCase.length; -String.prototype.toLocaleUpperCase.length = function(){return "shifted";}; +verifyNotWritable(String.prototype.toLocaleUpperCase, "length", null, function(){return "shifted";}); ////////////////////////////////////////////////////////////////////////////// //CHECK#2 diff --git a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A10.js b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A10.js index 8f7966b7a679e1208cf623bc24653d9ccbd6dbf2..e396b4ab6270a8e4c0a0570ea3ac0cc6fedfb73a 100644 --- a/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A10.js +++ b/test/built-ins/String/prototype/toLowerCase/S15.5.4.16_A10.js @@ -9,8 +9,7 @@ es5id: 15.5.4.16_A10 description: > Checking if varying the String.prototype.toLowerCase.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ ////////////////////////////////////////////////////////////////////////////// @@ -23,7 +22,7 @@ if (!(String.prototype.toLowerCase.hasOwnProperty('length'))) { var __obj = String.prototype.toLowerCase.length; -String.prototype.toLowerCase.length = function(){return "shifted";}; +verifyNotWritable(String.prototype.toLowerCase, "length", null, function(){return "shifted";}); ////////////////////////////////////////////////////////////////////////////// //CHECK#2 diff --git a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A10.js b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A10.js index b2cf13f5715f97b9c8d49aa9b549b4d9908632a1..c8f354dd39668e21fb3c7ea133bf6c816647cb2b 100644 --- a/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A10.js +++ b/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A10.js @@ -9,8 +9,7 @@ es5id: 15.5.4.18_A10 description: > Checking if varying the String.prototype.toUpperCase.length property fails -flags: [noStrict] -includes: [$FAIL.js] +includes: [$FAIL.js, propertyHelper.js] ---*/ ////////////////////////////////////////////////////////////////////////////// @@ -23,7 +22,7 @@ if (!(String.prototype.toUpperCase.hasOwnProperty('length'))) { var __obj = String.prototype.toUpperCase.length; -String.prototype.toUpperCase.length = function(){return "shifted";}; +verifyNotWritable(String.prototype.toUpperCase, "length", null, function(){return "shifted";}); ////////////////////////////////////////////////////////////////////////////// //CHECK#2 diff --git a/test/built-ins/decodeURI/S15.1.3.1_A5.3.js b/test/built-ins/decodeURI/S15.1.3.1_A5.3.js index 6d3c425b58712cb545df94a553b05bad5178fcd7..3aca2c34786e8d0d9f598b47222797906970f72d 100644 --- a/test/built-ins/decodeURI/S15.1.3.1_A5.3.js +++ b/test/built-ins/decodeURI/S15.1.3.1_A5.3.js @@ -5,12 +5,12 @@ info: The length property of decodeURI has the attribute ReadOnly es5id: 15.1.3.1_A5.3 description: Checking if varying the length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 var x = decodeURI.length; -decodeURI.length = Infinity; +verifyNotWritable(decodeURI, "length", null, Infinity); if (decodeURI.length !== x) { $ERROR('#1: x = decodeURI.length; decodeURI.length = Infinity; decodeURI.length === x. Actual: ' + (decodeURI.length)); } diff --git a/test/built-ins/decodeURIComponent/S15.1.3.2_A5.3.js b/test/built-ins/decodeURIComponent/S15.1.3.2_A5.3.js index 5f656ede18e67f20b6776083f5f498fb597e0ac1..cb11b7ed5df70fe626193ffff60d352be8b24eb5 100644 --- a/test/built-ins/decodeURIComponent/S15.1.3.2_A5.3.js +++ b/test/built-ins/decodeURIComponent/S15.1.3.2_A5.3.js @@ -5,12 +5,12 @@ info: The length property of decodeURIComponent has the attribute ReadOnly es5id: 15.1.3.2_A5.3 description: Checking if varying the length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 -x = decodeURIComponent.length; -decodeURIComponent.length = Infinity; +var x = decodeURIComponent.length; +verifyNotWritable(decodeURIComponent, "length", null, Infinity); if (decodeURIComponent.length !== x) { $ERROR('#1: x = decodeURIComponent.length; decodeURIComponent.length = Infinity; decodeURIComponent.length === x. Actual: ' + (decodeURIComponent.length)); } diff --git a/test/built-ins/encodeURI/S15.1.3.3_A5.3.js b/test/built-ins/encodeURI/S15.1.3.3_A5.3.js index 28c592460db16ff0aec4a249e1bcd1878b7e2c5f..ea8846bd7702326e3a34142bac49144eb334ad1c 100644 --- a/test/built-ins/encodeURI/S15.1.3.3_A5.3.js +++ b/test/built-ins/encodeURI/S15.1.3.3_A5.3.js @@ -5,12 +5,12 @@ info: The length property of encodeURI has the attribute ReadOnly es5id: 15.1.3.3_A5.3 description: Checking if varying the length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 -x = encodeURI.length; -encodeURI.length = Infinity; +var x = encodeURI.length; +verifyNotWritable(encodeURI, "length", null, Infinity); if (encodeURI.length !== x) { $ERROR('#1: x = encodeURI.length; encodeURI.length = Infinity; encodeURI.length === x. Actual: ' + (encodeURI.length)); } diff --git a/test/built-ins/encodeURIComponent/S15.1.3.4_A5.3.js b/test/built-ins/encodeURIComponent/S15.1.3.4_A5.3.js index 0445812f57ff14d58c3ca4324414c81c55e40d3e..62912ddb373b764ffbeef8085f2ef0e2998c074a 100644 --- a/test/built-ins/encodeURIComponent/S15.1.3.4_A5.3.js +++ b/test/built-ins/encodeURIComponent/S15.1.3.4_A5.3.js @@ -5,12 +5,12 @@ info: The length property of encodeURIComponent has the attribute ReadOnly es5id: 15.1.3.4_A5.3 description: Checking if varying the length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 -x = encodeURIComponent.length; -encodeURIComponent.length = Infinity; +var x = encodeURIComponent.length; +verifyNotWritable(encodeURIComponent, "length", null, Infinity); if (encodeURIComponent.length !== x) { $ERROR('#1: x = encodeURIComponent.length; encodeURIComponent.length = Infinity; encodeURIComponent.length === x. Actual: ' + (encodeURIComponent.length)); } diff --git a/test/built-ins/eval/S15.1.2.1_A4.3.js b/test/built-ins/eval/S15.1.2.1_A4.3.js index 1df06ecda94f93c1d4b871fdaa29795bbc8c872c..82aad23995b2dcc6cb1b3e102136600e2a8f3b34 100644 --- a/test/built-ins/eval/S15.1.2.1_A4.3.js +++ b/test/built-ins/eval/S15.1.2.1_A4.3.js @@ -5,12 +5,12 @@ info: The length property of eval has the attribute ReadOnly es5id: 15.1.2.1_A4.3 description: Checking if varying the length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 var x = eval.length; -eval.length = Infinity; +verifyNotWritable(eval, "length", null, Infinity); if (eval.length !== x) { $ERROR('#1: x = eval.length; eval.length = Infinity; eval.length === x. Actual: ' + (eval.length)); } diff --git a/test/built-ins/isFinite/S15.1.2.5_A2.3.js b/test/built-ins/isFinite/S15.1.2.5_A2.3.js index fd679488ce538d7583ac631ac1a9d71054d6146d..ea89d94a389a32ccb2c71af27d99fd78f2a6d12e 100644 --- a/test/built-ins/isFinite/S15.1.2.5_A2.3.js +++ b/test/built-ins/isFinite/S15.1.2.5_A2.3.js @@ -5,12 +5,12 @@ info: The length property of isFinite has the attribute ReadOnly es5id: 15.1.2.5_A2.3 description: Checking if varying the length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 -x = isFinite.length; -isFinite.length = Infinity; +var x = isFinite.length; +verifyNotWritable(isFinite, "length", null, Infinity); if (isFinite.length !== x) { $ERROR('#1: x = isFinite.length; isFinite.length = Infinity; isFinite.length === x. Actual: ' + (isFinite.length)); } diff --git a/test/built-ins/isNaN/S15.1.2.4_A2.3.js b/test/built-ins/isNaN/S15.1.2.4_A2.3.js index cd9ac4911ee45fbfe69e85872f1c0262c74fe0cb..99efe94e3f46a1b58e4d525c624f343d2b5c74b0 100644 --- a/test/built-ins/isNaN/S15.1.2.4_A2.3.js +++ b/test/built-ins/isNaN/S15.1.2.4_A2.3.js @@ -5,12 +5,12 @@ info: The length property of isNaN has the attribute ReadOnly es5id: 15.1.2.4_A2.3 description: Checking if varying the length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 -x = isNaN.length; -isNaN.length = Infinity; +var x = isNaN.length; +verifyNotWritable(isNaN, "length", null, Infinity); if (isNaN.length !== x) { $ERROR('#1: x = isNaN.length; isNaN.length = Infinity; isNaN.length === x. Actual: ' + (isNaN.length)); } diff --git a/test/built-ins/parseFloat/S15.1.2.3_A7.3.js b/test/built-ins/parseFloat/S15.1.2.3_A7.3.js index b6faa93a3b0a3d522fd2748b673cb0510a2493cd..54baa6a3a84f78ba3bf959eb1f0c00c3f6e8f02c 100644 --- a/test/built-ins/parseFloat/S15.1.2.3_A7.3.js +++ b/test/built-ins/parseFloat/S15.1.2.3_A7.3.js @@ -5,12 +5,12 @@ info: The length property of parseFloat has the attribute ReadOnly es5id: 15.1.2.3_A7.3 description: Checking if varying the length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 var x = parseFloat.length; -parseFloat.length = Infinity; +verifyNotWritable(parseFloat, "length", null, Infinity); if (parseFloat.length !== x) { $ERROR('#1: x = parseFloat.length; parseFloat.length = Infinity; parseFloat.length === x. Actual: ' + (parseFloat.length)); } diff --git a/test/built-ins/parseInt/S15.1.2.2_A9.3.js b/test/built-ins/parseInt/S15.1.2.2_A9.3.js index e0bfc8072bee1f3b9f98780ef74695765ed94e89..a4db5344215de2521dff080103b4d266b1784e5f 100644 --- a/test/built-ins/parseInt/S15.1.2.2_A9.3.js +++ b/test/built-ins/parseInt/S15.1.2.2_A9.3.js @@ -5,12 +5,12 @@ info: The length property of parseInt has the attribute ReadOnly es5id: 15.1.2.2_A9.3 description: Checking if varying the length property fails -flags: [noStrict] +includes: [propertyHelper.js] ---*/ //CHECK#1 -x = parseInt.length; -parseInt.length = Infinity; +var x = parseInt.length; +verifyNotWritable(parseInt, "length", null, Infinity); if (parseInt.length !== x) { $ERROR('#1: x = parseInt.length; parseInt.length = Infinity; parseInt.length === x. Actual: ' + (parseInt.length)); } diff --git a/test/built-ins/undefined/15.1.1.3-2.js b/test/built-ins/undefined/15.1.1.3-2.js index d1ed84364f54ad510810e6dcf1d79e431bcdde7a..449812b04536f3d690438692383e49e1ba9babb4 100644 --- a/test/built-ins/undefined/15.1.1.3-2.js +++ b/test/built-ins/undefined/15.1.1.3-2.js @@ -8,23 +8,13 @@ es5id: 15.1.1.3-2 description: undefined is not writable, should throw TypeError in strict mode flags: [onlyStrict] -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase(){ - "use strict"; - var global = fnGlobalObject(); - try{ - global["undefined"] = 5; // Should throw a TypeError as per 8.12.5 - } catch (ex) { - if(ex instanceof TypeError){ - return true; - } else { - return false; - } - } -} +var global = fnGlobalObject(); -runTestCase(testcase); +assert.throws(TypeError, function() { + global["undefined"] = 5; // Should throw a TypeError as per 8.12.5 +}); +assert.sameValue(global["undefined"], void 0); +assert.sameValue(undefined, void 0); diff --git a/test/built-ins/undefined/S15.1.1.3_A3_T1.js b/test/built-ins/undefined/S15.1.1.3_A3_T1.js new file mode 100644 index 0000000000000000000000000000000000000000..43d8ec4f76a7a90c58910b956d65850235f7f851 --- /dev/null +++ b/test/built-ins/undefined/S15.1.1.3_A3_T1.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: The undefined is DontDelete +es5id: 15.1.1.3_A3.1 +description: Use delete +includes: [propertyHelper.js, fnGlobalObject.js] +---*/ + +// CHECK#1 +verifyNotConfigurable(fnGlobalObject(), "undefined"); + +try { + if (delete fnGlobalObject().undefined !== false) { + $ERROR('#1: delete undefined === false.'); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); +} diff --git a/test/built-ins/undefined/S15.1.1.3_A3.1.js b/test/built-ins/undefined/S15.1.1.3_A3_T2.js similarity index 96% rename from test/built-ins/undefined/S15.1.1.3_A3.1.js rename to test/built-ins/undefined/S15.1.1.3_A3_T2.js index 57174a55d6ebe07fd5f7fd0724380378d00cb007..5ef6923755b5509375d864b52091aee4ac2d7e9f 100644 --- a/test/built-ins/undefined/S15.1.1.3_A3.1.js +++ b/test/built-ins/undefined/S15.1.1.3_A3_T2.js @@ -10,5 +10,5 @@ flags: [noStrict] // CHECK#1 if (delete undefined !== false) { - $ERROR('#1: delete undefined === false. Actual: ' + (delete undefined)); + $ERROR('#1: delete undefined === false. Actual: ' + (delete undefined)); } diff --git a/test/built-ins/undefined/S15.1.1.3_A3.2.js b/test/built-ins/undefined/S15.1.1.3_A4.js similarity index 98% rename from test/built-ins/undefined/S15.1.1.3_A3.2.js rename to test/built-ins/undefined/S15.1.1.3_A4.js index abbb847b02a7ae347879524d3d9cd8adda86e8c4..a040518349c740131b3df0247c5f9de0a17ca6f6 100644 --- a/test/built-ins/undefined/S15.1.1.3_A3.2.js +++ b/test/built-ins/undefined/S15.1.1.3_A4.js @@ -11,5 +11,5 @@ description: Use for-in statement for (var prop in this) { if (prop === "undefined") { $ERROR('#1: The undefined is DontEnum'); - } + } }