fpc/tests/test/jvm/classlist.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

31 lines
399 B
ObjectPascal

program classlist;
{$mode delphi}
uses
{$ifdef java}jdk15{$else}androidr14{$endif};
type
T1 = class
end;
CT1 = class of T1;
function test : string;
var
T : T1;
C : CT1;
L : JUArrayList;
begin
T := T1.Create;
C := CT1(JLObject(T).getClass);
L := JUArrayList.Create;
L.add(JLObject(C)); // ???
if ct1(l.get(0))<>t1 then
raise JLException.create('error');
end;
begin
test;
end.