aboutsummaryrefslogtreecommitdiffstats
path: root/test/suite/sputnik_converted/15_Native/15.4_Array_Objects/15.4.5_Properties_of_Array_Instances/15.4.5.1_Put/S15.4.5.1_A1.3_T2.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/suite/sputnik_converted/15_Native/15.4_Array_Objects/15.4.5_Properties_of_Array_Instances/15.4.5.1_Put/S15.4.5.1_A1.3_T2.js')
-rw-r--r--test/suite/sputnik_converted/15_Native/15.4_Array_Objects/15.4.5_Properties_of_Array_Instances/15.4.5.1_Put/S15.4.5.1_A1.3_T2.js103
1 files changed, 0 insertions, 103 deletions
diff --git a/test/suite/sputnik_converted/15_Native/15.4_Array_Objects/15.4.5_Properties_of_Array_Instances/15.4.5.1_Put/S15.4.5.1_A1.3_T2.js b/test/suite/sputnik_converted/15_Native/15.4_Array_Objects/15.4.5_Properties_of_Array_Instances/15.4.5.1_Put/S15.4.5.1_A1.3_T2.js
deleted file mode 100644
index 8279c55c9..000000000
--- a/test/suite/sputnik_converted/15_Native/15.4_Array_Objects/15.4.5_Properties_of_Array_Instances/15.4.5.1_Put/S15.4.5.1_A1.3_T2.js
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright 2009 the Sputnik authors. All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/**
- * @name: S15.4.5.1_A1.3_T2;
- * @section: 15.4.5.1, 15.4;
- * @assertion: Set the value of property length of A to Uint32(length);
- * @description: Uint32 use ToNumber and ToPrimitve;
-*/
-
-
-// Converted for Test262 from original Sputnik source
-
-ES5Harness.registerTest( {
-id: "S15.4.5.1_A1.3_T2",
-
-path: "TestCases/15_Native/15.4_Array_Objects/15.4.5_Properties_of_Array_Instances/15.4.5.1_Put/S15.4.5.1_A1.3_T2.js",
-
-assertion: "Set the value of property length of A to Uint32(length)",
-
-description: "Uint32 use ToNumber and ToPrimitve",
-
-test: function testcase() {
- //CHECK#1
-var x = [];
-x.length = {valueOf: function() {return 2}};
-if (x.length !== 2) {
- $ERROR('#1: x = []; x.length = {valueOf: function() {return 2}}; x.length === 2. Actual: ' + (x.length));
-}
-
-//CHECK#2
-x = [];
-x.length = {valueOf: function() {return 2}, toString: function() {return 1}};
-if (x.length !== 2) {
- $ERROR('#0: x = []; x.length = {valueOf: function() {return 2}, toString: function() {return 1}}; x.length === 2. Actual: ' + (x.length));
-}
-
-//CHECK#3
-x = [];
-x.length = {valueOf: function() {return 2}, toString: function() {return {}}};
-if (x.length !== 2) {
- $ERROR('#3: x = []; x.length = {valueOf: function() {return 2}, toString: function() {return {}}}; x.length === 2. Actual: ' + (x.length));
-}
-
-//CHECK#4
-try {
- x = [];
- x.length = {valueOf: function() {return 2}, toString: function() {throw "error"}};
- if (x.length !== 2) {
- $ERROR('#4.1: x = []; x.length = {valueOf: function() {return 2}, toString: function() {throw "error"}}; x.length === ",". Actual: ' + (x.length));
- }
-}
-catch (e) {
- if (e === "error") {
- $ERROR('#4.2: x = []; x.length = {valueOf: function() {return 2}, toString: function() {throw "error"}}; x.length not throw "error"');
- } else {
- $ERROR('#4.3: x = []; x.length = {valueOf: function() {return 2}, toString: function() {throw "error"}}; x.length not throw Error. Actual: ' + (e));
- }
-}
-
-//CHECK#5
-x = [];
-x.length = {toString: function() {return 1}};
-if (x.length !== 1) {
- $ERROR('#5: x = []; x.length = {toString: function() {return 1}}; x.length === 1. Actual: ' + (x.length));
-}
-
-//CHECK#6
-x = [];
-x.length = {valueOf: function() {return {}}, toString: function() {return 1}}
-if (x.length !== 1) {
- $ERROR('#6: x = []; x.length = {valueOf: function() {return {}}, toString: function() {return 1}}; x.length === 1. Actual: ' + (x.length));
-}
-
-//CHECK#7
-try {
- x = [];
- x.length = {valueOf: function() {throw "error"}, toString: function() {return 1}};
- x.length;
- $ERROR('#7.1: x = []; x.length = {valueOf: function() {throw "error"}, toString: function() {return 1}}; x.length throw "error". Actual: ' + (x.length));
-}
-catch (e) {
- if (e !== "error") {
- $ERROR('#7.2: x = []; x.length = {valueOf: function() {throw "error"}, toString: function() {return 1}}; x.length throw "error". Actual: ' + (e));
- }
-}
-
-//CHECK#8
-try {
- x = [];
- x.length = {valueOf: function() {return {}}, toString: function() {return {}}};
- x.length;
- $ERROR('#8.1: x = []; x.length = {valueOf: function() {return {}}, toString: function() {return {}}} x.length throw TypeError. Actual: ' + (x.length));
-}
-catch (e) {
- if ((e instanceof TypeError) !== true) {
- $ERROR('#8.2: x = []; x.length = {valueOf: function() {return {}}, toString: function() {return {}}} x.length throw TypeError. Actual: ' + (e));
- }
-}
-
- }
-});
-