Skip to content

Add test for enumeration out parameters #262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions testsuite/gnat2goto/tests/enum_out_param/enum_out.adb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
procedure Enum_Out is
type Enum is (One, Two, Three);

procedure P_Out (E : out Enum) is
begin
E := Two;
end P_Out;

Var_E : Enum;

begin
P_Out (Var_E);
pragma Assert (Var_E = Two);
end Enum_Out;
1 change: 1 addition & 0 deletions testsuite/gnat2goto/tests/enum_out_param/test.opt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALL XFAIL gnat2goto fails with "raised SYSTEM.ASSERTIONS.ASSERT_FAILURE : failed precondition from ireps.ads:1875"
2 changes: 2 additions & 0 deletions testsuite/gnat2goto/tests/enum_out_param/test.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[1] file enum_out.adb line 13 assertion: SUCCESS
VERIFICATION SUCCESSFUL
3 changes: 3 additions & 0 deletions testsuite/gnat2goto/tests/enum_out_param/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from test_support import *

prove()