mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 19:59:31 +02:00

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 -
20 lines
272 B
ObjectPascal
20 lines
272 B
ObjectPascal
program tbyte;
|
|
|
|
{$mode delphi}
|
|
|
|
uses
|
|
{$ifdef java}jdk15{$else}androidr14{$endif};
|
|
|
|
function test: longint;
|
|
var
|
|
a : longword;
|
|
begin
|
|
a := 123456789;
|
|
result := JLInteger.Create(Byte(a)).intValue;
|
|
end;
|
|
|
|
begin
|
|
if test<>21 then
|
|
raise JLException.create('boe!');
|
|
end.
|