Skip to content

Commit

Permalink
Merge pull request #544 from biinari/chore/143-Squiz_ForLoopDeclarati…
Browse files Browse the repository at this point in the history
…on_separate_parse_error

Squiz/ForLoopDeclaration: move js parse error to its own file
  • Loading branch information
jrfnl authored Jul 14, 2024
2 parents ac4987e + 53a5f79 commit fd065a7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,3 @@ for (
// Test with semicolon not belonging to for.
for (i = function() {self.widgetLoaded(widget.id) ; }; i < function() {self.widgetLoaded(widget.id);}; i++) {}
for (i = function() {self.widgetLoaded(widget.id);}; i < function() {self.widgetLoaded(widget.id);} ; i++) {}

// This test has to be the last one in the file! Intentional parse error check.
for
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,3 @@ for ( i = 0; i < 10; i++ ) {}
// Test with semicolon not belonging to for.
for (i = function() {self.widgetLoaded(widget.id) ; }; i < function() {self.widgetLoaded(widget.id);}; i++) {}
for (i = function() {self.widgetLoaded(widget.id);}; i < function() {self.widgetLoaded(widget.id);}; i++) {}

// This test has to be the last one in the file! Intentional parse error check.
for
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Intentional parse error check. Live coding resilience.
for
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function getErrorList($testFile='')
116 => 2,
];

case 'ForLoopDeclarationUnitTest.js':
case 'ForLoopDeclarationUnitTest.1.js':
return [
6 => 2,
9 => 2,
Expand Down Expand Up @@ -125,8 +125,8 @@ public function getWarningList($testFile='')
case 'ForLoopDeclarationUnitTest.3.inc':
return [6 => 1];

case 'ForLoopDeclarationUnitTest.js':
return [125 => 1];
case 'ForLoopDeclarationUnitTest.2.js':
return [2 => 1];

default:
return [];
Expand Down

0 comments on commit fd065a7

Please sign in to comment.