Skip to content

Commit

Permalink
[tests] Update test for 5306
Browse files Browse the repository at this point in the history
  • Loading branch information
kLabz committed May 16, 2023
1 parent 5c17432 commit e9f34b0
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions tests/display/src/cases/Issue5306.hx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ class Issue5306 extends DisplayTestCase {
class Main {
static function main() {
var ib:Array<Int>;
ib[0] = 0; ib[1] = 1; ib[2]
{-5-}trace{-6-}("test");
{-5-}ib{-6-}[0] = 0; ib[1] = 1; ib[2]
{-7-}trace{-8-}("test");
}
}
**/
Expand All @@ -22,7 +22,7 @@ class Issue5306 extends DisplayTestCase {
// },
{
kind: DKParserError,
range: diagnosticsRange(pos(5), pos(6)),
range: diagnosticsRange(pos(7), pos(8)),
severity: Error,
code: null,
relatedInformation: [],
Expand All @@ -35,6 +35,14 @@ class Issue5306 extends DisplayTestCase {
code: null,
relatedInformation: [],
args: "Type not found : InvalidType"
},
{
kind: DKCompilerError,
range: diagnosticsRange(pos(5), pos(6)),
severity: Error,
code: null,
relatedInformation: [],
args: "Local variable ib used without being initialized"
}
];
arrayEq(expected, diagnostics());
Expand Down

0 comments on commit e9f34b0

Please sign in to comment.