|
@@ -69,6 +69,8 @@ type
|
|
Procedure TestFunctionOneOutArg;
|
|
Procedure TestFunctionOneOutArg;
|
|
procedure TestProcedureOneConstRefArg;
|
|
procedure TestProcedureOneConstRefArg;
|
|
Procedure TestFunctionOneConstRefArg;
|
|
Procedure TestFunctionOneConstRefArg;
|
|
|
|
+ procedure TestFunctionOneConstRefAttributeArg;
|
|
|
|
+ procedure TestFunctionOneConstRefAttributeArgReversed;
|
|
procedure TestProcedureTwoArgs;
|
|
procedure TestProcedureTwoArgs;
|
|
Procedure TestFunctionTwoArgs;
|
|
Procedure TestFunctionTwoArgs;
|
|
procedure TestProcedureTwoArgsSeparate;
|
|
procedure TestProcedureTwoArgsSeparate;
|
|
@@ -515,7 +517,7 @@ begin
|
|
AssertArg(ProcType,0,'B',argDefault,'^Integer','');
|
|
AssertArg(ProcType,0,'B',argDefault,'^Integer','');
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure TTestProcedureFunction.TestFunctionPointerResult;
|
|
|
|
|
|
+procedure TTestProcedureFunction.TestFUnctionPointerResult;
|
|
begin
|
|
begin
|
|
ParseFunction('()','^LongInt');
|
|
ParseFunction('()','^LongInt');
|
|
AssertFunc([],[],ccDefault,0);
|
|
AssertFunc([],[],ccDefault,0);
|
|
@@ -556,6 +558,24 @@ begin
|
|
AssertArg(FuncType,0,'B',argConst,'Integer','');
|
|
AssertArg(FuncType,0,'B',argConst,'Integer','');
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+
|
|
|
|
+procedure TTestProcedureFunction.TestFunctionOneConstRefAttributeArg;
|
|
|
|
+begin
|
|
|
|
+ Parser.CurrentModeswitches:=Parser.CurrentModeswitches+[msPrefixedAttributes];
|
|
|
|
+ ParseFunction('([ref] Const B : Integer)');
|
|
|
|
+ AssertFunc([],[],ccDefault,1);
|
|
|
|
+ AssertArg(FuncType,0,'B',argConstRef,'Integer','');
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+procedure TTestProcedureFunction.TestFunctionOneConstRefAttributeArgReversed;
|
|
|
|
+begin
|
|
|
|
+ Parser.CurrentModeswitches:=Parser.CurrentModeswitches+[msPrefixedAttributes];
|
|
|
|
+ ParseFunction('(Const [ref] B : Integer)');
|
|
|
|
+ AssertFunc([],[],ccDefault,1);
|
|
|
|
+ AssertArg(FuncType,0,'B',argConstRef,'Integer','');
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+
|
|
procedure TTestProcedureFunction.TestProcedureOneOutArg;
|
|
procedure TTestProcedureFunction.TestProcedureOneOutArg;
|
|
begin
|
|
begin
|
|
Parser.CurrentModeswitches:=[msObjfpc];
|
|
Parser.CurrentModeswitches:=[msObjfpc];
|
|
@@ -1491,7 +1511,7 @@ end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-Procedure TTestProcedureFunction.TestFunctionSyscallSingleNumber;
|
|
|
|
|
|
+procedure TTestProcedureFunction.TestFunctionSyscallSingleNumber;
|
|
begin
|
|
begin
|
|
// function Something : Someresult; syscall 12
|
|
// function Something : Someresult; syscall 12
|
|
AddDeclaration('function A : Integer; syscall 12');
|
|
AddDeclaration('function A : Integer; syscall 12');
|
|
@@ -1500,7 +1520,7 @@ begin
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
-Procedure TTestProcedureFunction.TestFunctionSyscallDoubleNumber;
|
|
|
|
|
|
+procedure TTestProcedureFunction.TestFunctionSyscallDoubleNumber;
|
|
|
|
|
|
begin
|
|
begin
|
|
// function Something : Someresult; syscall 12 13
|
|
// function Something : Someresult; syscall 12 13
|
|
@@ -1510,7 +1530,7 @@ begin
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
-Procedure TTestProcedureFunction.TestFunctionSysCallSysTrapIdentifier;
|
|
|
|
|
|
+procedure TTestProcedureFunction.TestFunctionSysCallSysTrapIdentifier;
|
|
|
|
|
|
begin
|
|
begin
|
|
// function Something : Someresult; syscall systrapNNN
|
|
// function Something : Someresult; syscall systrapNNN
|