From fdc2b8a4baa9ef213be1a7fc4e871c3d6b012ee4 Mon Sep 17 00:00:00 2001 From: Jade Abraham Date: Thu, 26 Sep 2024 14:08:50 -0700 Subject: [PATCH] update tests Signed-off-by: Jade Abraham --- test/chplcheck/DoKeywordAndBlock.chpl | 10 +++--- test/chplcheck/DoKeywordAndBlock.good-fixit | 10 +++--- test/chplcheck/IncorrectIndentation.good | 12 +++++++ .../chplcheck/IncorrectIndentation.good-fixit | 32 +++++++------------ test/chplcheck/SimpleDomainAsRange.chpl | 8 ++--- test/chplcheck/SimpleDomainAsRange.good-fixit | 8 ++--- test/chplcheck/UnusedTaskIntent.chpl | 3 ++ test/chplcheck/UnusedTaskIntent.good-fixit | 3 ++ 8 files changed, 48 insertions(+), 38 deletions(-) diff --git a/test/chplcheck/DoKeywordAndBlock.chpl b/test/chplcheck/DoKeywordAndBlock.chpl index 4d35730d9da7..5b8bd4355ade 100644 --- a/test/chplcheck/DoKeywordAndBlock.chpl +++ b/test/chplcheck/DoKeywordAndBlock.chpl @@ -12,15 +12,15 @@ module DoKeywordAndBlock { var A: [1..10] int; @chplcheck.ignore("UnusedLoopIndex") - forall i in 1..10 with (ref A) do {} + forall i in 1..10 with (ref A) do { A; } @chplcheck.ignore("UnusedLoopIndex") forall i in 1..10 with (ref A) do - {} + { A; } @chplcheck.ignore("UnusedLoopIndex") forall i in 1..10 with (ref A) do { - + A; } @chplcheck.ignore("UnusedLoopIndex") @@ -49,8 +49,8 @@ module DoKeywordAndBlock { do {} for 1..10 do{ } - forall 1..10 with (ref A)do{} - forall 1..10 with (ref A)do {} + forall 1..10 with (ref A)do{ A; } + forall 1..10 with (ref A)do { A; } on Locales[0] do {} diff --git a/test/chplcheck/DoKeywordAndBlock.good-fixit b/test/chplcheck/DoKeywordAndBlock.good-fixit index 2f065d15f852..dd905609e660 100644 --- a/test/chplcheck/DoKeywordAndBlock.good-fixit +++ b/test/chplcheck/DoKeywordAndBlock.good-fixit @@ -12,15 +12,15 @@ module DoKeywordAndBlock { var A: [1..10] int; @chplcheck.ignore("UnusedLoopIndex") - forall i in 1..10 with (ref A) {} + forall i in 1..10 with (ref A) { A; } @chplcheck.ignore("UnusedLoopIndex") forall i in 1..10 with (ref A) - {} + { A; } @chplcheck.ignore("UnusedLoopIndex") forall i in 1..10 with (ref A) { - + A; } @chplcheck.ignore("UnusedLoopIndex") @@ -49,8 +49,8 @@ module DoKeywordAndBlock { {} for 1..10 { } - forall 1..10 with (ref A) {} - forall 1..10 with (ref A) {} + forall 1..10 with (ref A) { A; } + forall 1..10 with (ref A) { A; } on Locales[0] {} diff --git a/test/chplcheck/IncorrectIndentation.good b/test/chplcheck/IncorrectIndentation.good index 0d55d7678bd6..8adc50490e8f 100644 --- a/test/chplcheck/IncorrectIndentation.good +++ b/test/chplcheck/IncorrectIndentation.good @@ -24,10 +24,16 @@ IncorrectIndentation.chpl:137: node violates rule IncorrectIndentation IncorrectIndentation.chpl:142: node violates rule IncorrectIndentation IncorrectIndentation.chpl:146: node violates rule IncorrectIndentation IncorrectIndentation.chpl:151: node violates rule IncorrectIndentation +IncorrectIndentation.chpl:156: node violates rule UnusedTaskIntent +IncorrectIndentation.chpl:162: node violates rule UnusedTaskIntent IncorrectIndentation.chpl:164: node violates rule IncorrectIndentation +IncorrectIndentation.chpl:167: node violates rule UnusedTaskIntent IncorrectIndentation.chpl:168: node violates rule IncorrectIndentation +IncorrectIndentation.chpl:171: node violates rule UnusedTaskIntent IncorrectIndentation.chpl:173: node violates rule IncorrectIndentation +IncorrectIndentation.chpl:176: node violates rule UnusedTaskIntent IncorrectIndentation.chpl:177: node violates rule IncorrectIndentation +IncorrectIndentation.chpl:180: node violates rule UnusedTaskIntent IncorrectIndentation.chpl:182: node violates rule IncorrectIndentation IncorrectIndentation.chpl:196: node violates rule IncorrectIndentation IncorrectIndentation.chpl:197: node violates rule IncorrectIndentation @@ -36,16 +42,22 @@ IncorrectIndentation.chpl:202: node violates rule IncorrectIndentation IncorrectIndentation.chpl:207: node violates rule IncorrectIndentation IncorrectIndentation.chpl:211: node violates rule IncorrectIndentation IncorrectIndentation.chpl:217: node violates rule IncorrectIndentation +IncorrectIndentation.chpl:220: node violates rule UnusedTaskIntent IncorrectIndentation.chpl:222: node violates rule IncorrectIndentation IncorrectIndentation.chpl:223: node violates rule IncorrectIndentation +IncorrectIndentation.chpl:226: node violates rule UnusedTaskIntent IncorrectIndentation.chpl:228: node violates rule IncorrectIndentation IncorrectIndentation.chpl:229: node violates rule IncorrectIndentation +IncorrectIndentation.chpl:232: node violates rule UnusedTaskIntent IncorrectIndentation.chpl:233: node violates rule IncorrectIndentation IncorrectIndentation.chpl:234: node violates rule IncorrectIndentation +IncorrectIndentation.chpl:237: node violates rule UnusedTaskIntent IncorrectIndentation.chpl:238: node violates rule IncorrectIndentation IncorrectIndentation.chpl:239: node violates rule IncorrectIndentation +IncorrectIndentation.chpl:242: node violates rule UnusedTaskIntent IncorrectIndentation.chpl:243: node violates rule IncorrectIndentation IncorrectIndentation.chpl:243: node violates rule IncorrectIndentation +IncorrectIndentation.chpl:246: node violates rule UnusedTaskIntent IncorrectIndentation.chpl:247: node violates rule IncorrectIndentation IncorrectIndentation.chpl:248: node violates rule IncorrectIndentation IncorrectIndentation.chpl:249: node violates rule IncorrectIndentation diff --git a/test/chplcheck/IncorrectIndentation.good-fixit b/test/chplcheck/IncorrectIndentation.good-fixit index 74ca4d36c0a6..8546595e2072 100644 --- a/test/chplcheck/IncorrectIndentation.good-fixit +++ b/test/chplcheck/IncorrectIndentation.good-fixit @@ -107,13 +107,11 @@ module IncorrectIndentation { writeln("??"); } - @chplcheck.ignore("IncorrectIndentation") on here { writeln("hi"); } - @chplcheck.ignore("IncorrectIndentation") on here { writeln("hi"); } @@ -139,13 +137,11 @@ module IncorrectIndentation { writeln("??"); } - @chplcheck.ignore("IncorrectIndentation") begin { writeln("hi"); } - @chplcheck.ignore("IncorrectIndentation") begin { writeln("hi"); } @@ -167,33 +163,31 @@ module IncorrectIndentation { var dummy: int; - begin with (ref dummy) + begin { writeln("hi"); writeln("??"); } - @chplcheck.ignore("IncorrectIndentation") - begin with (ref dummy) + begin { writeln("hi"); } - @chplcheck.ignore("IncorrectIndentation") - begin with (ref dummy) { + begin { writeln("hi"); } - begin with (ref dummy) { + begin { writeln("hi"); writeln("hi"); } - begin with (ref dummy) { + begin { writeln("hi"); writeln("hi"); } - begin with (ref dummy) { + begin { @chplcheck.ignore("IncorrectIndentation") for 1..10 do writeln("hi"); @@ -208,14 +202,12 @@ module IncorrectIndentation { writeln("??"); } - @chplcheck.ignore("IncorrectIndentation") cobegin { writeln("hi"); writeln("hi"); } - @chplcheck.ignore("IncorrectIndentation") cobegin { writeln("hi"); writeln("hi"); @@ -237,33 +229,33 @@ module IncorrectIndentation { writeln("hi"); } - cobegin with (ref dummy) + cobegin { writeln("hi"); writeln("??"); } - cobegin with (ref dummy) + cobegin { writeln("hi"); writeln("hi"); } - cobegin with (ref dummy) { + cobegin { writeln("hi"); writeln("hi"); } - cobegin with (ref dummy) { + cobegin { writeln("hi"); writeln("hi"); } - cobegin with (ref dummy) { + cobegin { writeln("hi"); writeln("hi"); } - cobegin with (ref dummy) { + cobegin { writeln("hi"); @chplcheck.ignore("IncorrectIndentation") for 1..10 do diff --git a/test/chplcheck/SimpleDomainAsRange.chpl b/test/chplcheck/SimpleDomainAsRange.chpl index 3249c8cdb3cd..397090ba5ed0 100644 --- a/test/chplcheck/SimpleDomainAsRange.chpl +++ b/test/chplcheck/SimpleDomainAsRange.chpl @@ -61,19 +61,19 @@ module SimpleDomainAsRange { @chplcheck.ignore("UnusedLoopIndex") forall i in {1..#10 by 2 align 2} with (ref A) { - + A; } forall {1..10} with (ref A) { - + A; } forall {1..<10} with (ref A) { - + A; } foreach {1..#10 by 2 align 2} with (ref A) { - + A; } foreach {1..10, 1..10 by 2} {} diff --git a/test/chplcheck/SimpleDomainAsRange.good-fixit b/test/chplcheck/SimpleDomainAsRange.good-fixit index 7b3a1faebc47..f48662fd6360 100644 --- a/test/chplcheck/SimpleDomainAsRange.good-fixit +++ b/test/chplcheck/SimpleDomainAsRange.good-fixit @@ -61,19 +61,19 @@ module SimpleDomainAsRange { @chplcheck.ignore("UnusedLoopIndex") forall i in 1..#10 by 2 align 2 with (ref A) { - + A; } forall 1..10 with (ref A) { - + A; } forall 1..<10 with (ref A) { - + A; } foreach 1..#10 by 2 align 2 with (ref A) { - + A; } foreach {1..10, 1..10 by 2} {} diff --git a/test/chplcheck/UnusedTaskIntent.chpl b/test/chplcheck/UnusedTaskIntent.chpl index f933230f5a20..6326d48156c0 100644 --- a/test/chplcheck/UnusedTaskIntent.chpl +++ b/test/chplcheck/UnusedTaskIntent.chpl @@ -26,4 +26,7 @@ module UnusedTaskIntent { [1..10 with (in A, const in B)] { ; } + @chplcheck.ignore("UnusedTaskIntent") + [1..10 with(ref A)] { ; } + } diff --git a/test/chplcheck/UnusedTaskIntent.good-fixit b/test/chplcheck/UnusedTaskIntent.good-fixit index b9f12dc2aae2..8ecd3e3b4cfe 100644 --- a/test/chplcheck/UnusedTaskIntent.good-fixit +++ b/test/chplcheck/UnusedTaskIntent.good-fixit @@ -26,4 +26,7 @@ module UnusedTaskIntent { [1..10 with (in A, const in B)] { ; } + @chplcheck.ignore("UnusedTaskIntent") + [1..10 with(ref A)] { ; } + }