-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'topic/1070' into 'master'
Fix Depends aspect support Closes #1070 See merge request eng/libadalang/libadalang!1505
- Loading branch information
Showing
4 changed files
with
522 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
testsuite/tests/name_resolution/global_depends_aspects_2/test.adb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
-- All these tests have been derived from the SPARK documentation | ||
|
||
procedure Test is | ||
X, Y, Z, A, B, C, D, G : Integer; | ||
|
||
procedure P (X, Y, Z : in Integer; Result : out Boolean) | ||
with Depends => (Result => (X, Y, Z)); | ||
pragma Test_Block; | ||
|
||
procedure Q (X, Y, Z : in Integer; A, B, C, D, E : out Integer) | ||
with Depends => ((A, B) => (X, Y), | ||
C => (X, Z), | ||
D => null, | ||
E => Y); | ||
pragma Test_Block; | ||
|
||
procedure R (X, Y, Z : in Integer; A, B, C, D : in out Integer) | ||
with Depends => ((A, B) =>+ (A, X, Y), | ||
C =>+ Z, | ||
D =>+ null); | ||
pragma Test_Block; | ||
|
||
procedure S | ||
with Global => (Input => (X, Y, Z), | ||
In_Out => (A, B, C, D)), | ||
Depends => ((A, B) =>+ (A, X, Y, Z), | ||
C =>+ Y, | ||
D =>+ null); | ||
pragma Test_Block; | ||
|
||
function F (X, Y : Integer) return Integer | ||
with Global => G, | ||
Depends => (F'Result => (G, X), | ||
null => Y); | ||
pragma Test_Block; | ||
|
||
procedure P (X, Y, Z : in Integer; Result : out Boolean) is | ||
begin | ||
null; | ||
end; | ||
|
||
procedure Q (X, Y, Z : in Integer; A, B, C, D, E : out Integer) is | ||
begin | ||
null; | ||
end; | ||
|
||
procedure R (X, Y, Z : in Integer; A, B, C, D : in out Integer) is | ||
begin | ||
null; | ||
end; | ||
|
||
procedure S is | ||
begin | ||
null; | ||
end; | ||
|
||
function F (X, Y : Integer) return Integer is | ||
begin | ||
return 0; | ||
end; | ||
begin | ||
null; | ||
end Test; |
Oops, something went wrong.