fpc/tests/test/jvm/tlowercaseproc.pp
Jonas Maebe b70e64dc67 * fixed some bugs in the camelCase conversion performed on the JVM target by
-CTlowercaseprocstart
   o convert all consecutive uppercase characters at the start to lowercase
     instead of only the first one. Exception: if there is more than one
     such character and the last one is followed by a lowercase character,
     assume the last uppercase character belongs to the second word (like
     in FPCIsGreat) and don't lowercase that one
 + test

git-svn-id: trunk@25845 -
2013-10-23 22:44:45 +00:00

56 lines
946 B
ObjectPascal

{$namespace org.freepascal.test.lcproc}
unit tlowercaseproc;
{$mode delphi}
{$targetswitch lowercaseprocstart}
interface
procedure DoIt;
type
tc = class
procedure MethodName;
class procedure ClassMethodName; static;
procedure XToY; // should become xToY
procedure PREFIXThingToTest; // should become prefixThingToTest
procedure RC64Encode; // should become rc64Encode;
end;
implementation
procedure DoIt;
var
a: ansistringclass;
begin
{ this routine is declared with uppercase C at the start in the system unit,
check that we don't lowercase this one as well }
a:=AnsistringClass(AnsistringClass.CreateFromLiteralStringBytes('abcdef',DefaultSystemCodePage));
end;
procedure tc.MethodName;
begin
doit;
classmethodname;
end;
class procedure tc.ClassMethodName; static;
begin
doit;
end;
procedure tc.xtoy;
begin
end;
procedure tc.PREFIXThingToTest;
begin
end;
procedure tc.RC64Encode;
begin
end;
end.