@@ -27,14 +27,14 @@ class DiagnosticProviderSuite extends PcAssertions {
2727 .asScala
2828
2929 val actual = diagnostics.map(d => TestDiagnostic (d.getRange().getStart().getOffset(text), d.getRange().getEnd().getOffset(text), d.getMessage(), d.getSeverity()))
30- // NOTE IF those tests turn out to be flaky, consider just checking the beginning of the message
3130 assertEquals(expected, actual, s " Expected [ ${expected.mkString(" , " )}] but got [ ${actual.mkString(" , " )}] " )
3231
3332 @ Test def error =
3433 check(
35- """ |class Bar(i: It)
34+ """ |object M:
35+ | Int.maaxValue
3636 |""" .stripMargin,
37- List (TestDiagnostic (13 , 15 , " Not found: type It - did you mean Int? or perhaps Int.type ?" , DiagnosticSeverity .Error ))
37+ List (TestDiagnostic (12 , 25 , " value maaxValue is not a member of object Int - did you mean Int.MaxValue ?" , DiagnosticSeverity .Error ))
3838 )
3939
4040 @ Test def warning =
@@ -47,13 +47,13 @@ class DiagnosticProviderSuite extends PcAssertions {
4747
4848 @ Test def mixed =
4949 check(
50- """ |class Bar(i: It)
51- |object M:
50+ """ object M:
51+ | Int.maaxValue
5252 | 1 + 1
5353 |""" .stripMargin,
5454 List (
55- TestDiagnostic (13 , 15 , " Not found: type It - did you mean Int? or perhaps Int.type ?" , DiagnosticSeverity .Error ),
56- TestDiagnostic (29 , 34 , " A pure expression does nothing in statement position" , DiagnosticSeverity .Warning )
55+ TestDiagnostic (12 , 25 , " value maaxValue is not a member of object Int - did you mean Int.MaxValue ?" , DiagnosticSeverity .Error ),
56+ TestDiagnostic (28 , 33 , " A pure expression does nothing in statement position" , DiagnosticSeverity .Warning )
5757 )
5858 )
5959
0 commit comments