From bbeafbd3c6082e4d30e76b5867f12b5458c4e9e8 Mon Sep 17 00:00:00 2001
From: Brian Terlson <brian.terlson@microsoft.com>
Date: Wed, 19 Nov 2014 14:55:32 -0800
Subject: [PATCH] Remove "best practice" tests

Sbp_A1_T1 to Sbp_A5_T2, Sbp_12, Sbp_7*: Functions are now valid in blocks, tests syntactically invalid anyway
Sbp_A10_T1 to Sbp_A10_T2: Tests are broken
---
 test/suite/bestPractice/Sbp_12.5_A9_T3.js    | 20 ---------
 test/suite/bestPractice/Sbp_12.6.1_A13_T3.js | 18 --------
 test/suite/bestPractice/Sbp_12.6.2_A13_T3.js | 18 --------
 test/suite/bestPractice/Sbp_12.6.4_A13_T3.js | 18 --------
 test/suite/bestPractice/Sbp_7.8.4_A6.1_T4.js | 11 -----
 test/suite/bestPractice/Sbp_7.8.4_A6.2_T1.js | 11 -----
 test/suite/bestPractice/Sbp_7.8.4_A6.2_T2.js | 11 -----
 test/suite/bestPractice/Sbp_7.9_A9_T3.js     | 12 ------
 test/suite/bestPractice/Sbp_7.9_A9_T4.js     | 11 -----
 test/suite/bestPractice/Sbp_A10_T1.js        | 45 --------------------
 test/suite/bestPractice/Sbp_A10_T2.js        | 45 --------------------
 test/suite/bestPractice/Sbp_A1_T1.js         | 17 --------
 test/suite/bestPractice/Sbp_A2_T1.js         | 19 ---------
 test/suite/bestPractice/Sbp_A2_T2.js         | 23 ----------
 test/suite/bestPractice/Sbp_A3_T1.js         | 17 --------
 test/suite/bestPractice/Sbp_A3_T2.js         | 21 ---------
 test/suite/bestPractice/Sbp_A4_T1.js         | 17 --------
 test/suite/bestPractice/Sbp_A4_T2.js         | 19 ---------
 test/suite/bestPractice/Sbp_A5_T1.js         | 15 -------
 test/suite/bestPractice/Sbp_A5_T2.js         | 19 ---------
 20 files changed, 387 deletions(-)
 delete mode 100644 test/suite/bestPractice/Sbp_12.5_A9_T3.js
 delete mode 100644 test/suite/bestPractice/Sbp_12.6.1_A13_T3.js
 delete mode 100644 test/suite/bestPractice/Sbp_12.6.2_A13_T3.js
 delete mode 100644 test/suite/bestPractice/Sbp_12.6.4_A13_T3.js
 delete mode 100644 test/suite/bestPractice/Sbp_7.8.4_A6.1_T4.js
 delete mode 100644 test/suite/bestPractice/Sbp_7.8.4_A6.2_T1.js
 delete mode 100644 test/suite/bestPractice/Sbp_7.8.4_A6.2_T2.js
 delete mode 100644 test/suite/bestPractice/Sbp_7.9_A9_T3.js
 delete mode 100644 test/suite/bestPractice/Sbp_7.9_A9_T4.js
 delete mode 100644 test/suite/bestPractice/Sbp_A10_T1.js
 delete mode 100644 test/suite/bestPractice/Sbp_A10_T2.js
 delete mode 100644 test/suite/bestPractice/Sbp_A1_T1.js
 delete mode 100644 test/suite/bestPractice/Sbp_A2_T1.js
 delete mode 100644 test/suite/bestPractice/Sbp_A2_T2.js
 delete mode 100644 test/suite/bestPractice/Sbp_A3_T1.js
 delete mode 100644 test/suite/bestPractice/Sbp_A3_T2.js
 delete mode 100644 test/suite/bestPractice/Sbp_A4_T1.js
 delete mode 100644 test/suite/bestPractice/Sbp_A4_T2.js
 delete mode 100644 test/suite/bestPractice/Sbp_A5_T1.js
 delete mode 100644 test/suite/bestPractice/Sbp_A5_T2.js

diff --git a/test/suite/bestPractice/Sbp_12.5_A9_T3.js b/test/suite/bestPractice/Sbp_12.5_A9_T3.js
deleted file mode 100644
index cb00f3ea47..0000000000
--- a/test/suite/bestPractice/Sbp_12.5_A9_T3.js
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2009 the Sputnik authors.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-info: Function declaration within an "if" statement is not allowed
-description: >
-    Declaring function within an "if" statement that is declared
-    within the function declaration
-negative: SyntaxError
----*/
-
-function(){
-
-if (true) {
-    function __func(){};
-} else {
-    function __func(){};
-}
-
-};
diff --git a/test/suite/bestPractice/Sbp_12.6.1_A13_T3.js b/test/suite/bestPractice/Sbp_12.6.1_A13_T3.js
deleted file mode 100644
index 2891ce6094..0000000000
--- a/test/suite/bestPractice/Sbp_12.6.1_A13_T3.js
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2009 the Sputnik authors.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-info: FunctionDeclaration within a "do-while" Block is not allowed
-description: >
-    Declaring a function within a "do-while" loop that is within a
-    function declaration itself
-negative: SyntaxError
----*/
-
-function(){
-
-do{
-    function __func(){};
-}while(0);
-
-};
diff --git a/test/suite/bestPractice/Sbp_12.6.2_A13_T3.js b/test/suite/bestPractice/Sbp_12.6.2_A13_T3.js
deleted file mode 100644
index 790a46cc99..0000000000
--- a/test/suite/bestPractice/Sbp_12.6.2_A13_T3.js
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2009 the Sputnik authors.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-info: FunctionDeclaration within a "while" Statement is not allowed
-description: >
-    Checking if declaring a function within a "while" Statement that
-    is in a function body leads to an exception
-negative: SyntaxError
----*/
-
-function(){
-
-while(0){
-    function __func(){};
-};
-
-};
diff --git a/test/suite/bestPractice/Sbp_12.6.4_A13_T3.js b/test/suite/bestPractice/Sbp_12.6.4_A13_T3.js
deleted file mode 100644
index 0a934ad548..0000000000
--- a/test/suite/bestPractice/Sbp_12.6.4_A13_T3.js
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2009 the Sputnik authors.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-info: FunctionDeclaration within a "for-in" Statement is not allowed
-description: >
-    Declaring function within a "for-in" Statement that is within
-    function declaration
-negative: SyntaxError
----*/
-
-function(){
-
-for(x in this){
-    function __func(){};
-};
-
-};
diff --git a/test/suite/bestPractice/Sbp_7.8.4_A6.1_T4.js b/test/suite/bestPractice/Sbp_7.8.4_A6.1_T4.js
deleted file mode 100644
index 33061648af..0000000000
--- a/test/suite/bestPractice/Sbp_7.8.4_A6.1_T4.js
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2009 the Sputnik authors.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-info: "EscapeSequence :: HexEscapeSequence :: x HexDigit HexDigit"
-description: "HexEscapeSequence :: x0G is incorrect"
-negative: SyntaxError
----*/
-
-//CHECK#
-"\x0G"
diff --git a/test/suite/bestPractice/Sbp_7.8.4_A6.2_T1.js b/test/suite/bestPractice/Sbp_7.8.4_A6.2_T1.js
deleted file mode 100644
index a44677357f..0000000000
--- a/test/suite/bestPractice/Sbp_7.8.4_A6.2_T1.js
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2009 the Sputnik authors.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-info: "HexEscapeSequence :: x HexDigit is incorrect"
-description: "HexDigit :: 1"
-negative: SyntaxError
----*/
-
-//CHECK#1
-"\x1"
diff --git a/test/suite/bestPractice/Sbp_7.8.4_A6.2_T2.js b/test/suite/bestPractice/Sbp_7.8.4_A6.2_T2.js
deleted file mode 100644
index 1c3165a73a..0000000000
--- a/test/suite/bestPractice/Sbp_7.8.4_A6.2_T2.js
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2009 the Sputnik authors.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-info: "HexEscapeSequence :: x HexDigit is incorrect"
-description: "HexDigit :: A"
-negative: SyntaxError
----*/
-
-//CHECK#1
-"\xA"
diff --git a/test/suite/bestPractice/Sbp_7.9_A9_T3.js b/test/suite/bestPractice/Sbp_7.9_A9_T3.js
deleted file mode 100644
index a1d72919bb..0000000000
--- a/test/suite/bestPractice/Sbp_7.9_A9_T3.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2009 the Sputnik authors.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-info: Check Do-While Statement for automatic semicolon insertion
-description: Execute do { \n ; \n }while(false) true
----*/
-
-//CHECK#1
-do {
-  ;
-} while (false) true
diff --git a/test/suite/bestPractice/Sbp_7.9_A9_T4.js b/test/suite/bestPractice/Sbp_7.9_A9_T4.js
deleted file mode 100644
index 2f41ee39df..0000000000
--- a/test/suite/bestPractice/Sbp_7.9_A9_T4.js
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2009 the Sputnik authors.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-info: Check Do-While Statement for automatic semicolon insertion
-description: Execute do ; while \n (false) true
----*/
-
-//CHECK#1
-do ; while 
-(false) true
diff --git a/test/suite/bestPractice/Sbp_A10_T1.js b/test/suite/bestPractice/Sbp_A10_T1.js
deleted file mode 100644
index d12572491d..0000000000
--- a/test/suite/bestPractice/Sbp_A10_T1.js
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2011 Google Inc.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-description: >
-    Built-in functions should not have a non-deletable,  non-poisoned
-    "caller" property.
-bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:make_non-standard_properties_configurable"
----*/
-
-(function() {
-   var map = Array.prototype.map;
-   if (!map) { return; }
-   try {
-     delete map.caller;
-   } catch (err1) {
-     // ignore
-   }
-   if ('caller' in map) {
-     try {
-       Object.defineProperty(map, 'caller', {
-         writable: false,
-         configurable: false
-       });
-     } catch (err2) {
-       // ignore
-     }
-   }
-
-   function foo(m) { return m.caller; }
-   function testfn(a, f) { return a.map(f)[0]; }
-   var a = [map];
-   var caller;
-   try {
-     caller = testfn(a, foo);
-   } catch (err3) {
-     if (err3 instanceof TypeError) { return; }
-     $ERROR('#1: Built-in "caller" failed with: ' + err3);
-   }
-   if (null === caller || void 0 === caller) { return; }
-   if (testfn === caller) {
-     $ERROR('#2: Built-in revealed caller');
-   }
-   $ERROR('#3: Unexpected "caller": ' + caller);
-})();
diff --git a/test/suite/bestPractice/Sbp_A10_T2.js b/test/suite/bestPractice/Sbp_A10_T2.js
deleted file mode 100644
index 7d7eb20717..0000000000
--- a/test/suite/bestPractice/Sbp_A10_T2.js
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2011 Google Inc.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-description: >
-    Built-in functions should not have a non-deletable,  non-poisoned
-    "arguments" property.
-bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:make_non-standard_properties_configurable"
----*/
-
-(function() {
-   var map = Array.prototype.map;
-   if (!map) { return; }
-   try {
-     delete map.arguments;
-   } catch (err1) {
-     // ignore
-   }
-   if ('arguments' in map) {
-     try {
-       Object.defineProperty(map, 'arguments', {
-         writable: false,
-         configurable: false
-       });
-     } catch (err2) {
-       // ignore
-     }
-   }
-
-   function foo(m) { return m.arguments; }
-   function testfn(a, f) { return a.map(f)[0]; }
-   var a = [map];
-   var args;
-   try {
-     args = testfn(a, foo);
-   } catch (err3) {
-     if (err3 instanceof TypeError) { return; }
-     $ERROR('#1: Built-in "arguments" failed with: ' + err3);
-   }
-   if (null === args || void 0 === args) { return; }
-   if (testfn === args) {
-     $ERROR('#2: Built-in revealed arguments');
-   }
-   $ERROR('#3: Unexpected "arguments": ' + args);
-})();
diff --git a/test/suite/bestPractice/Sbp_A1_T1.js b/test/suite/bestPractice/Sbp_A1_T1.js
deleted file mode 100644
index 409a74c517..0000000000
--- a/test/suite/bestPractice/Sbp_A1_T1.js
+++ /dev/null
@@ -1,17 +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 production Block { } in strict code can't contain function
-    declaration;
-description: Trying to declare function at the Block statement
-negative: SyntaxError
-bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls"
-flags: [onlyStrict]
----*/
-
-"use strict";
-{
-    function __func(){}
-}
diff --git a/test/suite/bestPractice/Sbp_A2_T1.js b/test/suite/bestPractice/Sbp_A2_T1.js
deleted file mode 100644
index ed2e11ab59..0000000000
--- a/test/suite/bestPractice/Sbp_A2_T1.js
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2009 the Sputnik authors.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-info: >
-    Function declaration within an "if" statement in strict code is not
-    allowed
-description: Declaring function within a strict "if" statement
-negative: SyntaxError
-bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls"
-flags: [onlyStrict]
----*/
-
-"use strict";
-if (true) {
-    function __func(){};
-} else {
-    function __func(){};
-}
diff --git a/test/suite/bestPractice/Sbp_A2_T2.js b/test/suite/bestPractice/Sbp_A2_T2.js
deleted file mode 100644
index 007ebb4c81..0000000000
--- a/test/suite/bestPractice/Sbp_A2_T2.js
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2009 the Sputnik authors.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-info: >
-    Function declaration within an "if" statement in strict code is not
-    allowed;
-description: >
-    Declaring function within an "if" that is declared  within the
-    strict function
-negative: SyntaxError
-bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls"
-flags: [onlyStrict]
----*/
-
-"use strict";
-(function(){
-   if (true) {
-     function __func(){};
-   } else {
-     function __func(){};
-   }
-});
diff --git a/test/suite/bestPractice/Sbp_A3_T1.js b/test/suite/bestPractice/Sbp_A3_T1.js
deleted file mode 100644
index 793f277f4b..0000000000
--- a/test/suite/bestPractice/Sbp_A3_T1.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2009 the Sputnik authors.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-info: >
-    FunctionDeclaration within a "do-while" Block in strict code is not
-    allowed
-description: Declaring function within a "do-while" loop
-negative: SyntaxError
-bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls"
-flags: [onlyStrict]
----*/
-
-"use strict";
-do {
-    function __func(){};
-} while(0);
diff --git a/test/suite/bestPractice/Sbp_A3_T2.js b/test/suite/bestPractice/Sbp_A3_T2.js
deleted file mode 100644
index 21139af0dd..0000000000
--- a/test/suite/bestPractice/Sbp_A3_T2.js
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2009 the Sputnik authors.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-info: >
-    FunctionDeclaration within a "do-while" Block in strict code is not
-    allowed
-description: >
-    Declaring a function within a "do-while" loop that is  within a
-    strict function
-negative: SyntaxError
-bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls"
-flags: [onlyStrict]
----*/
-
-"use strict";
-(function(){
-   do {
-     function __func(){};
-   } while(0);
-});
diff --git a/test/suite/bestPractice/Sbp_A4_T1.js b/test/suite/bestPractice/Sbp_A4_T1.js
deleted file mode 100644
index fa64297beb..0000000000
--- a/test/suite/bestPractice/Sbp_A4_T1.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2009 the Sputnik authors.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-info: FunctionDeclaration within a "while" Statement is not allowed
-description: >
-    Checking if declaring a function within a "while"  Statement leads
-    to an exception
-negative: SyntaxError
-bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls"
-flags: [onlyStrict]
----*/
-
-"use strict";
-while (0) {
-    function __func(){};
-};
diff --git a/test/suite/bestPractice/Sbp_A4_T2.js b/test/suite/bestPractice/Sbp_A4_T2.js
deleted file mode 100644
index 52e6e76fdd..0000000000
--- a/test/suite/bestPractice/Sbp_A4_T2.js
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2009 the Sputnik authors.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-info: FunctionDeclaration within a "while" Statement is not allowed
-description: >
-    Checking if declaring a function within a "while"  Statement that
-    is in a function call leads to an exception
-negative: SyntaxError
-bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls"
-flags: [onlyStrict]
----*/
-
-"use strict";
-(function(){
-   while (0) {
-     function __func(){};
-   };
-})();
diff --git a/test/suite/bestPractice/Sbp_A5_T1.js b/test/suite/bestPractice/Sbp_A5_T1.js
deleted file mode 100644
index b5b34a01a2..0000000000
--- a/test/suite/bestPractice/Sbp_A5_T1.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2009 the Sputnik authors.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-info: FunctionDeclaration within a "for-in" Statement is not allowed
-description: Declaring function within a "for-in" Statement
-negative: SyntaxError
-bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls"
-flags: [onlyStrict]
----*/
-
-"use strict";
-for (x in this) {
-    function __func(){};
-}
diff --git a/test/suite/bestPractice/Sbp_A5_T2.js b/test/suite/bestPractice/Sbp_A5_T2.js
deleted file mode 100644
index d139b8548c..0000000000
--- a/test/suite/bestPractice/Sbp_A5_T2.js
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2009 the Sputnik authors.  All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-info: FunctionDeclaration within a "for-in" Statement is not allowed
-description: >
-    Declaring function within a "for-in" Statement that is  within a
-    function call
-negative: SyntaxError
-bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls"
-flags: [onlyStrict]
----*/
-
-"use strict";
-(function(){
-   for (x in this) {
-     function __func(){};
-   }
-})();
-- 
GitLab