Debian Codegraph @

gcc/testsuite/gnat.dg/expect2.adb

raw
1 -- { dg-do compile }
2
3 with Text_IO; use Text_IO;
4 with Expect2_Pkg; use Expect2_Pkg;
5
6 procedure Expect2 is
7 begin
8 if Unlikely (I = 0) then
9 Put_Line ("Zero was passed");
10 return;
11 end if;
12
13 if Likely (I > 0) then
14 Put_Line ("A positive number was passed");
15 else
16 Put_Line ("A negative number was passed");
17 end if;
18
19 if Expect ((I rem 2) = 0, False) then
20 Put_Line ("An even number was passed");
21 else
22 Put_Line ("An odd number was passed");
23 end if;
24 end;