|
@@ -203,6 +203,7 @@ type
|
|
Procedure TestVarNoSemicolonBeginFail;
|
|
Procedure TestVarNoSemicolonBeginFail;
|
|
Procedure TestConstIntOperators;
|
|
Procedure TestConstIntOperators;
|
|
Procedure TestConstBitwiseOps;
|
|
Procedure TestConstBitwiseOps;
|
|
|
|
+ Procedure TestConstExternal;
|
|
Procedure TestIntegerTypeCast;
|
|
Procedure TestIntegerTypeCast;
|
|
Procedure TestConstFloatOperators;
|
|
Procedure TestConstFloatOperators;
|
|
Procedure TestFloatTypeCast;
|
|
Procedure TestFloatTypeCast;
|
|
@@ -317,6 +318,7 @@ type
|
|
Procedure TestForLoop_PassVarFail;
|
|
Procedure TestForLoop_PassVarFail;
|
|
Procedure TestStatements;
|
|
Procedure TestStatements;
|
|
Procedure TestCaseOfInt;
|
|
Procedure TestCaseOfInt;
|
|
|
|
+ Procedure TestCaseOfIntExtConst;
|
|
Procedure TestCaseIntDuplicateFail;
|
|
Procedure TestCaseIntDuplicateFail;
|
|
Procedure TestCaseOfStringDuplicateFail;
|
|
Procedure TestCaseOfStringDuplicateFail;
|
|
Procedure TestCaseOfStringRangeDuplicateFail;
|
|
Procedure TestCaseOfStringRangeDuplicateFail;
|
|
@@ -2584,6 +2586,15 @@ begin
|
|
CheckResolverUnexpectedHints;
|
|
CheckResolverUnexpectedHints;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TTestResolver.TestConstExternal;
|
|
|
|
+begin
|
|
|
|
+ Parser.Options:=Parser.Options+[po_ExtConstWithoutExpr];
|
|
|
|
+ StartProgram(false);
|
|
|
|
+ Add('const NaN: double; external name ''Global.Nan'';');
|
|
|
|
+ Add('begin');
|
|
|
|
+ ParseProgram;
|
|
|
|
+end;
|
|
|
|
+
|
|
procedure TTestResolver.TestIntegerTypeCast;
|
|
procedure TTestResolver.TestIntegerTypeCast;
|
|
begin
|
|
begin
|
|
StartProgram(false);
|
|
StartProgram(false);
|
|
@@ -4585,6 +4596,23 @@ begin
|
|
ParseProgram;
|
|
ParseProgram;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TTestResolver.TestCaseOfIntExtConst;
|
|
|
|
+begin
|
|
|
|
+ Parser.Options:=Parser.Options+[po_ExtConstWithoutExpr];
|
|
|
|
+ StartProgram(false);
|
|
|
|
+ Add([
|
|
|
|
+ 'const e: longint; external;',
|
|
|
|
+ 'var i: longint;',
|
|
|
|
+ 'begin',
|
|
|
|
+ ' case i of',
|
|
|
|
+ ' 2: ;',
|
|
|
|
+ ' e: ;',
|
|
|
|
+ ' 1: ;',
|
|
|
|
+ ' end;',
|
|
|
|
+ '']);
|
|
|
|
+ ParseProgram;
|
|
|
|
+end;
|
|
|
|
+
|
|
procedure TTestResolver.TestCaseIntDuplicateFail;
|
|
procedure TTestResolver.TestCaseIntDuplicateFail;
|
|
begin
|
|
begin
|
|
StartProgram(false);
|
|
StartProgram(false);
|