summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/expect2.adb
blob: fb50bd8c7f165ec865148b618d62e8b61928400e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-- { dg-do compile }

with Text_IO; use Text_IO;
with Expect2_Pkg; use Expect2_Pkg;

procedure Expect2 is
begin
  if Unlikely (I = 0) then
    Put_Line ("Zero was passed");
    return;
  end if;

  if Likely (I > 0) then
    Put_Line ("A positive number was passed");
  else
    Put_Line ("A negative number was passed");
  end if;

  if Expect ((I rem 2) = 0, False) then
    Put_Line ("An even number was passed");
  else
    Put_Line ("An odd number was passed");
  end if;
end;