From c15079e7415463f4b799bb9fda964a757dca8e83 Mon Sep 17 00:00:00 2001
From: Leonardo Balter <leonardo.balter@gmail.com>
Date: Mon, 21 Mar 2016 16:49:31 -0400
Subject: [PATCH] Remove surface tests for %TypedArray%.prototype.toString

Because Test262 asserts the strict equality of
`Array.prototype.toString` and `TypedArray.prototype.toString`, tests
for properties of the object do not need to be reproduced in both
location.

Ref gh-526
---
 .../prototype/toString/S15.4.4.2_A4.1.js      | 25 ------------------
 .../prototype/toString/S15.4.4.2_A4.2.js      | 25 ------------------
 .../prototype/toString/S15.4.4.2_A4.3.js      | 16 ------------
 .../prototype/toString/S15.4.4.2_A4.4.js      | 13 ----------
 .../prototype/toString/length.js              | 19 +++++++-------
 .../TypedArray/prototype/toString/name.js     | 26 -------------------
 6 files changed, 10 insertions(+), 114 deletions(-)
 delete mode 100644 test/built-ins/Array/prototype/toString/S15.4.4.2_A4.1.js
 delete mode 100644 test/built-ins/Array/prototype/toString/S15.4.4.2_A4.2.js
 delete mode 100644 test/built-ins/Array/prototype/toString/S15.4.4.2_A4.3.js
 delete mode 100644 test/built-ins/Array/prototype/toString/S15.4.4.2_A4.4.js
 rename test/built-ins/{TypedArray => Array}/prototype/toString/length.js (62%)
 mode change 100755 => 100644
 delete mode 100755 test/built-ins/TypedArray/prototype/toString/name.js

diff --git a/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.1.js b/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.1.js
deleted file mode 100644
index 401ce22396..0000000000
--- a/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.1.js
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2009 the Sputnik authors.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-info: The length property of toString has the attribute DontEnum
-es5id: 15.4.4.2_A4.1
-description: Checking use propertyIsEnumerable, for-in
----*/
-
-//CHECK#1
-if (Array.prototype.toString.propertyIsEnumerable('length') !== false) {
-  $ERROR('#1: Array.prototype.toString.propertyIsEnumerable(\'length\') === false. Actual: ' + (Array.prototype.toString.propertyIsEnumerable('length')));
-}
-
-//CHECK#2
-var result = true;
-for (var p in Array.prototype.toString){
-  if (p === "length") {
-    result = false;
-  }  
-}
-
-if (result !== true) {
-  $ERROR('#2: result = true; for (p in Array.prototype.toString) { if (p === "length") result = false; }  result === true;');
-}
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
deleted file mode 100644
index 8e99d4f6c1..0000000000
--- a/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.2.js
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2009 the Sputnik authors.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-info: The length property of toString does not have the attribute DontDelete
-es5id: 15.4.4.2_A4.2
-description: Checking use hasOwnProperty, delete
----*/
-
-//CHECK#1
-if (Array.prototype.toString.hasOwnProperty('length') !== true) {
-  $ERROR('#1: Array.prototype.toString.hasOwnProperty(\'length\') === true. Actual: ' + (Array.prototype.toString.hasOwnProperty('length')));
-}
-
-delete Array.prototype.toString.length;
-
-//CHECK#2
-if (Array.prototype.toString.hasOwnProperty('length') !== false) {
-  $ERROR('#2: delete Array.prototype.toString.length; Array.prototype.toString.hasOwnProperty(\'length\') === false. Actual: ' + (Array.prototype.toString.hasOwnProperty('length')));
-}
-
-//CHECK#3
-if (Array.prototype.toString.length === undefined) {
-  $ERROR('#3: delete Array.prototype.toString.length; Array.prototype.toString.length !== undefined');
-}
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
deleted file mode 100644
index b6b88a74f1..0000000000
--- a/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.3.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2009 the Sputnik authors.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-info: The length property of toString has the attribute ReadOnly
-es5id: 15.4.4.2_A4.3
-description: Checking if varying the length property fails
-includes: [propertyHelper.js]
----*/
-
-//CHECK#1
-var x = Array.prototype.toString.length;
-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/toString/S15.4.4.2_A4.4.js b/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.4.js
deleted file mode 100644
index dc3cbd03de..0000000000
--- a/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.4.js
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2009 the Sputnik authors.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-info: The length property of toString is 0
-es5id: 15.4.4.2_A4.4
-description: toString.length === 1
----*/
-
-//CHECK#1
-if (Array.prototype.toString.length !== 0) {
-  $ERROR('#1: Array.prototype.toString.length === 0. Actual: ' + (Array.prototype.toString.length));
-}
diff --git a/test/built-ins/TypedArray/prototype/toString/length.js b/test/built-ins/Array/prototype/toString/length.js
old mode 100755
new mode 100644
similarity index 62%
rename from test/built-ins/TypedArray/prototype/toString/length.js
rename to test/built-ins/Array/prototype/toString/length.js
index de6bea035d..92e091a1dd
--- a/test/built-ins/TypedArray/prototype/toString/length.js
+++ b/test/built-ins/Array/prototype/toString/length.js
@@ -1,12 +1,13 @@
-// Copyright (C) 2015 André Bargull. All rights reserved.
+// Copyright (C) 2016 The V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 
 /*---
-es6id: 22.2.3.28
+es6id: 22.1.3.27
+esid: sec-array.prototype.tostring
 description: >
-  %TypedArray%.prototype.toString.length is 0.
+  Array.prototype.toString.length is 0.
 info: >
-  %TypedArray%.prototype.toString ( )
+  Array.prototype.toString ( )
 
   17 ECMAScript Standard Built-in Objects:
     Every built-in Function object, including constructors, has a length
@@ -19,11 +20,11 @@ info: >
     Unless otherwise specified, the length property of a built-in Function
     object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
     [[Configurable]]: true }.
-includes: [propertyHelper.js, testTypedArray.js]
+includes: [propertyHelper.js]
 ---*/
 
-assert.sameValue(TypedArray.prototype.toString.length, 0);
+assert.sameValue(Array.prototype.toString.length, 0);
 
-verifyNotEnumerable(TypedArray.prototype.toString, "length");
-verifyNotWritable(TypedArray.prototype.toString, "length");
-verifyConfigurable(TypedArray.prototype.toString, "length");
+verifyNotEnumerable(Array.prototype.toString, "length");
+verifyNotWritable(Array.prototype.toString, "length");
+verifyConfigurable(Array.prototype.toString, "length");
diff --git a/test/built-ins/TypedArray/prototype/toString/name.js b/test/built-ins/TypedArray/prototype/toString/name.js
deleted file mode 100755
index d5e98315e9..0000000000
--- a/test/built-ins/TypedArray/prototype/toString/name.js
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (C) 2015 André Bargull. All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-es6id: 22.2.3.28
-description: >
-  %TypedArray%.prototype.toString.name is "toString".
-info: >
-  %TypedArray%.prototype.toString ( )
-
-  17 ECMAScript Standard Built-in Objects:
-    Every built-in Function object, including constructors, that is not
-    identified as an anonymous function has a name property whose value
-    is a String.
-
-    Unless otherwise specified, the name property of a built-in Function
-    object, if it exists, has the attributes { [[Writable]]: false,
-    [[Enumerable]]: false, [[Configurable]]: true }.
-includes: [propertyHelper.js, testTypedArray.js]
----*/
-
-assert.sameValue(TypedArray.prototype.toString.name, "toString");
-
-verifyNotEnumerable(TypedArray.prototype.toString, "name");
-verifyNotWritable(TypedArray.prototype.toString, "name");
-verifyConfigurable(TypedArray.prototype.toString, "name");
-- 
GitLab