File tree Expand file tree Collapse file tree 4 files changed +24
-0
lines changed
testsuite/gnat2goto/tests/separate_subprog_assert_check Expand file tree Collapse file tree 4 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ -- Use *.asu file extension for a subunit so that it is not included as a
2+ -- a top level unit to be analysed using by the regression test system.
3+ -- The gnat front-end will automatically analyse the subunit when it
4+ -- encounters the sybprogram_body_stub.
5+ pragma Source_File_Name (
6+ Subunit_File_Name => " *.asu" ,
7+ Dot_Replacement => " -" );
8+
9+ procedure P (X : in out integer) is
10+ procedure Inc (N : in out Integer) is separate ;
11+ Old_X : constant Integer := X;
12+ begin
13+ Inc (X);
14+ -- The following assert should succeed if the possibility
15+ -- overflow is ignored.
16+ pragma Assert (X = Old_X + 1 );
17+ end P ;
Original file line number Diff line number Diff line change 1+ ALL XFAIL Assert statement in p.adb should succeed.
Original file line number Diff line number Diff line change 1+ [2] file p-inc.asu line 6 assertion: SUCCESS
2+ [1] file p.adb line 16 assertion: SUCCESS
3+ VERIFICATION SUCCEEDED
Original file line number Diff line number Diff line change 1+ from test_support import *
2+
3+ prove ()
You can’t perform that action at this time.
0 commit comments