fpc/tests/test/jvm/tnestedset.pp
Jonas Maebe 71068ae7eb * made the tests Android-compatible (use the androidr14 unit instead
of the jdk15 unit in that case)
  * adjusted testall.sh script so it can also be used to test class
    files compiled for Android (still with the JVM though)

git-svn-id: branches/jvmbackend@19835 -
2011-12-12 20:34:02 +00:00

32 lines
460 B
ObjectPascal

program tnestedset;
{$mode delphi}
uses
{$ifdef java}jdk15{$else}androidr14{$endif};
type
tnestedfpstructenum = (ea,eb,ec);
tnestedfpstructenumset = set of tnestedfpstructenum;
procedure test(var s: tnestedfpstructenumset);
procedure sub;
begin
s:=s+[eb];
end;
begin
sub
end;
var
s: tnestedfpstructenumset;
begin
test(s);
if s<>[eb] then
raise jlexception.create;
jlsystem.fout.println(jlstring(juenumset(@s).toString));
end.