summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/test/tset7.pp
blob: b31c5dba4e8481e07d52ab0195ce5cc17400f335 (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
25
26
27
28
29
30
31
32
33
34
35
36
{ test for subsetreg sets }

{$packset 1}

type
  ta = 0..7;
  tr = record
    b: byte;
    a: set of ta;
    w: word;
  end;


procedure test(r: tr);
var
  b: ta;
begin
  b := 6;
  if (r.b<>101) or
     (r.w<>$abcd) or
     (5 in r.a) or
     (b in r.a) or
     not(7 in r.a) or
     ([1..3] * r.a <> [2..3]) then
    halt(1);
end;

var
  r: tr;
begin
  r.b:=101;
  r.w:=$abcd;
  r.a:=[2..3];
  include(r.a,7);
  test(r);
end.