-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed curly with comments, fixes #445
- Loading branch information
Showing
3 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
test/testcases/lineends/issue_445_curly_with_comment.hxtest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{} | ||
|
||
--- | ||
|
||
class Main | ||
{ | ||
static function main() | ||
{ | ||
if (foo) | ||
{ // comment | ||
bar; | ||
} // comment | ||
if (foo) | ||
{ | ||
// comment | ||
bar; | ||
} // comment | ||
} | ||
} | ||
|
||
--- | ||
|
||
class Main { | ||
static function main() { | ||
if (foo) { // comment | ||
bar; | ||
} // comment | ||
if (foo) { | ||
// comment | ||
bar; | ||
} // comment | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
test/testcases/lineends/issue_445_curly_with_comment_both.hxtest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"lineEnds": { | ||
"leftCurly": "both", | ||
"rightCurly": "both" | ||
} | ||
} | ||
|
||
--- | ||
|
||
class Main | ||
{ | ||
static function main() | ||
{ | ||
if (foo) | ||
{ // comment | ||
bar; | ||
} // comment | ||
if (foo) | ||
{ | ||
// comment | ||
bar; | ||
} // comment | ||
} | ||
} | ||
|
||
--- | ||
|
||
class Main | ||
{ | ||
static function main() | ||
{ | ||
if (foo) | ||
{ // comment | ||
bar; | ||
} // comment | ||
if (foo) | ||
{ | ||
// comment | ||
bar; | ||
} // comment | ||
} | ||
} |