Skip to content

Commit

Permalink
langkit_support/slocs: extend testcase
Browse files Browse the repository at this point in the history
For GitHub issue AdaCore#492
  • Loading branch information
pmderodat authored and Roldak committed May 7, 2021
1 parent 121b40f commit 3ee2d23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions testsuite/tests/langkit_support/slocs/main.adb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ begin
Check_Sloc ("a:2");

Check_Sloc_Range ("1:2-3:4");
Check_Sloc_Range ("");
Check_Sloc_Range ("1:2");
Check_Sloc_Range ("1:2-3:");
Check_Sloc_Range (":2-3:4");
Check_Sloc_Range ("1:-3:4");
Expand Down
2 changes: 2 additions & 0 deletions testsuite/tests/langkit_support/slocs/test.out
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"-1:2" -> error: invalid line number: "-1"
"a:2" -> error: invalid line number: "a"
"1:2-3:4" -> 1:2-3:4
"" -> error: invalid source location
"1:2" -> error: invalid source location
"1:2-3:" -> error: invalid column number: ""
":2-3:4" -> error: invalid line number: ""
"1:-3:4" -> error: invalid column number: ""
Expand Down

0 comments on commit 3ee2d23

Please sign in to comment.