Skip to content

Commit fd065a7

Browse files
authored
Merge pull request #544 from biinari/chore/143-Squiz_ForLoopDeclaration_separate_parse_error
Squiz/ForLoopDeclaration: move js parse error to its own file
2 parents ac4987e + 53a5f79 commit fd065a7

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.js renamed to src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.1.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,3 @@ for (
120120
// Test with semicolon not belonging to for.
121121
for (i = function() {self.widgetLoaded(widget.id) ; }; i < function() {self.widgetLoaded(widget.id);}; i++) {}
122122
for (i = function() {self.widgetLoaded(widget.id);}; i < function() {self.widgetLoaded(widget.id);} ; i++) {}
123-
124-
// This test has to be the last one in the file! Intentional parse error check.
125-
for

src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.js.fixed renamed to src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.1.js.fixed

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,3 @@ for ( i = 0; i < 10; i++ ) {}
8686
// Test with semicolon not belonging to for.
8787
for (i = function() {self.widgetLoaded(widget.id) ; }; i < function() {self.widgetLoaded(widget.id);}; i++) {}
8888
for (i = function() {self.widgetLoaded(widget.id);}; i < function() {self.widgetLoaded(widget.id);}; i++) {}
89-
90-
// This test has to be the last one in the file! Intentional parse error check.
91-
for
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Intentional parse error check. Live coding resilience.
2+
for

src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function getErrorList($testFile='')
6767
116 => 2,
6868
];
6969

70-
case 'ForLoopDeclarationUnitTest.js':
70+
case 'ForLoopDeclarationUnitTest.1.js':
7171
return [
7272
6 => 2,
7373
9 => 2,
@@ -125,8 +125,8 @@ public function getWarningList($testFile='')
125125
case 'ForLoopDeclarationUnitTest.3.inc':
126126
return [6 => 1];
127127

128-
case 'ForLoopDeclarationUnitTest.js':
129-
return [125 => 1];
128+
case 'ForLoopDeclarationUnitTest.2.js':
129+
return [2 => 1];
130130

131131
default:
132132
return [];

0 commit comments

Comments
 (0)