Skip to content

Commit

Permalink
add more cases to test
Browse files Browse the repository at this point in the history
Signed-off-by: Jade Abraham <[email protected]>
  • Loading branch information
jabraham17 committed Aug 29, 2024
1 parent 379842b commit eca8d83
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
9 changes: 9 additions & 0 deletions test/chplcheck/IncorrectIndentation.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,10 @@ module IncorrectIndentation {

if 1 < 2 {
writeln("hi");
if 2 < 3 {
writeln("hi");
writeln("??");
}
}
// since else statements aren't reported correctly only the misaligned child statements should warn
if 1 < 2 {
Expand All @@ -374,4 +378,9 @@ if 1 < 2 {
writeln("hi");
writeln("??");
}
if 1 < 2 {
if 3 < 4 {

}
}
}
7 changes: 4 additions & 3 deletions test/chplcheck/IncorrectIndentation.good
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ IncorrectIndentation.chpl:349: node violates rule IncorrectIndentation
IncorrectIndentation.chpl:353: node violates rule IncorrectIndentation
IncorrectIndentation.chpl:358: node violates rule IncorrectIndentation
IncorrectIndentation.chpl:363: node violates rule IncorrectIndentation
IncorrectIndentation.chpl:369: node violates rule IncorrectIndentation
IncorrectIndentation.chpl:372: node violates rule IncorrectIndentation
IncorrectIndentation.chpl:375: node violates rule IncorrectIndentation
IncorrectIndentation.chpl:373: node violates rule IncorrectIndentation
IncorrectIndentation.chpl:376: node violates rule IncorrectIndentation
IncorrectIndentation.chpl:379: node violates rule IncorrectIndentation
IncorrectIndentation.chpl:382: node violates rule IncorrectIndentation
[Success matching fixit for IncorrectIndentation]
9 changes: 9 additions & 0 deletions test/chplcheck/IncorrectIndentation.good-fixit
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,10 @@ module IncorrectIndentation {

if 1 < 2 {
writeln("hi");
if 2 < 3 {
writeln("hi");
writeln("??");
}
}
// since else statements aren't reported correctly only the misaligned child statements should warn
if 1 < 2 {
Expand All @@ -401,4 +405,9 @@ if 1 < 2 {
writeln("hi");
writeln("??");
}
if 1 < 2 {
if 3 < 4 {

}
}
}

0 comments on commit eca8d83

Please sign in to comment.