aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/case_character.adb
blob: 59c9b66987d5ce099f1341064045870daf1b2d7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- { dg-do run }

procedure Case_Character is

  function Test (C : Character) return Integer is
  begin
    case C is
      when ASCII.HT | ' ' .. Character'Last => return 1;
      when others => return 0;
    end case;
  end;

begin

  if Test ('A') /= 1 then
    raise Program_Error;
  end if;

end;