From e01a560648efd5c65073ffcaa5264be7ddf589e0 Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Fri, 27 Apr 2018 22:04:23 -0400 Subject: [PATCH] Remove superfluous code from negative syntax tests Because these files contain syntax errors, the code they contain is not intended to be executed, and the runtime semantics are therefore irrelevant. Simplify the files by removing the unnecessary code. --- test/language/asi/S7.9_A11_T8.js | 9 ++------- test/language/asi/S7.9_A4.js | 1 - test/language/asi/S7.9_A5.1_T1.js | 2 -- test/language/asi/S7.9_A5.3_T1.js | 1 - test/language/module-code/early-strict-mode.js | 1 - test/language/statements/break/S12.8_A8_T1.js | 10 ---------- test/language/statements/break/S12.8_A8_T2.js | 10 ---------- test/language/statements/continue/S12.7_A8_T1.js | 10 ---------- test/language/statements/continue/S12.7_A8_T2.js | 12 ------------ 9 files changed, 2 insertions(+), 54 deletions(-) diff --git a/test/language/asi/S7.9_A11_T8.js b/test/language/asi/S7.9_A11_T8.js index c41423fb0b..cb5e2b419f 100644 --- a/test/language/asi/S7.9_A11_T8.js +++ b/test/language/asi/S7.9_A11_T8.js @@ -12,10 +12,5 @@ negative: throw "Test262: This statement should not be evaluated."; -//CHECK#1 -var x = 0; -if (false) {x = 1}; -else x = -1 -if (x !== -1) { - $ERROR('#1: Check If Statement for automatic semicolon insertion'); -} +if (false) {}; +else {} diff --git a/test/language/asi/S7.9_A4.js b/test/language/asi/S7.9_A4.js index 266bfbbf2a..5151bc5ed8 100644 --- a/test/language/asi/S7.9_A4.js +++ b/test/language/asi/S7.9_A4.js @@ -18,4 +18,3 @@ try { 1; } catch(e) { } -$ERROR('#1: Check throw statement for automatic semicolon insertion'); diff --git a/test/language/asi/S7.9_A5.1_T1.js b/test/language/asi/S7.9_A5.1_T1.js index 322bd7e4b0..4fe951cf75 100644 --- a/test/language/asi/S7.9_A5.1_T1.js +++ b/test/language/asi/S7.9_A5.1_T1.js @@ -12,8 +12,6 @@ negative: throw "Test262: This statement should not be evaluated."; -//CHECK#1 var x = 0; x ++; -$ERROR('#1: Check Postfix Increment Operator for automatic semicolon insertion'); diff --git a/test/language/asi/S7.9_A5.3_T1.js b/test/language/asi/S7.9_A5.3_T1.js index 97dbc6a6b8..32ccb5e9e8 100644 --- a/test/language/asi/S7.9_A5.3_T1.js +++ b/test/language/asi/S7.9_A5.3_T1.js @@ -16,4 +16,3 @@ throw "Test262: This statement should not be evaluated."; var x = 1; x --; -$ERROR('#1: Check Postfix Decrement Operator for automatic semicolon insertion'); diff --git a/test/language/module-code/early-strict-mode.js b/test/language/module-code/early-strict-mode.js index f510ff8186..d06a404080 100644 --- a/test/language/module-code/early-strict-mode.js +++ b/test/language/module-code/early-strict-mode.js @@ -12,5 +12,4 @@ negative: throw "Test262: This statement should not be evaluated."; -$ERROR('This statement should not be executed.'); var public; diff --git a/test/language/statements/break/S12.8_A8_T1.js b/test/language/statements/break/S12.8_A8_T1.js index 6f8284e7df..5691a0427a 100644 --- a/test/language/statements/break/S12.8_A8_T1.js +++ b/test/language/statements/break/S12.8_A8_T1.js @@ -14,19 +14,9 @@ negative: throw "Test262: This statement should not be evaluated."; -var x=0,y=0; - try{ - LABEL1 : do { - x++; - throw "gonna leave it"; - y++; - } while(0); - $ERROR('#1: throw "gonna leave it" lead to throwing exception'); } catch(e){ break LABEL2; LABEL2 : do { - x++; - y++; } while(0); } diff --git a/test/language/statements/break/S12.8_A8_T2.js b/test/language/statements/break/S12.8_A8_T2.js index afb8b71426..4a9aa5e902 100644 --- a/test/language/statements/break/S12.8_A8_T2.js +++ b/test/language/statements/break/S12.8_A8_T2.js @@ -14,19 +14,9 @@ negative: throw "Test262: This statement should not be evaluated."; -var x=0,y=0; - try{ - LABEL1 : do { - x++; - throw "gonna leave it"; - y++; - } while(0); - $ERROR('#1: throw "gonna leave it" lead to throwing exception'); } catch(e){ break; LABEL2 : do { - x++; - y++; } while(0); } diff --git a/test/language/statements/continue/S12.7_A8_T1.js b/test/language/statements/continue/S12.7_A8_T1.js index 829e536143..3e79fc9610 100644 --- a/test/language/statements/continue/S12.7_A8_T1.js +++ b/test/language/statements/continue/S12.7_A8_T1.js @@ -14,19 +14,9 @@ negative: throw "Test262: This statement should not be evaluated."; -var x=0,y=0; - try{ - LABEL1 : do { - x++; - throw "gonna leave it"; - y++; - } while(0); - $ERROR('#1: throw "gonna leave it" lead to throwing exception'); } catch(e){ continue LABEL2; LABEL2 : do { - x++; - y++; } while(0); }; diff --git a/test/language/statements/continue/S12.7_A8_T2.js b/test/language/statements/continue/S12.7_A8_T2.js index f52cc83afc..2141f33c29 100644 --- a/test/language/statements/continue/S12.7_A8_T2.js +++ b/test/language/statements/continue/S12.7_A8_T2.js @@ -12,19 +12,7 @@ negative: throw "Test262: This statement should not be evaluated."; -var x=0,y=0; - try{ - LABEL1 : do { - x++; - throw "gonna leave it"; - y++; - } while(0); - $ERROR('#1: throw "gonna leave it" lead to throwing exception'); } catch(e){ continue; - LABEL2 : do { - x++; - y++; - } while(0); };