Browse Source

* Correct test

git-svn-id: trunk@47020 -
michael 4 years ago
parent
commit
8775fac416
1 changed files with 3 additions and 1 deletions
  1. 3 1
      packages/fcl-passrc/tests/tcstatements.pas

+ 3 - 1
packages/fcl-passrc/tests/tcstatements.pas

@@ -739,7 +739,9 @@ begin
   I2:=I.Ifbranch as TPasImplIfElse;
   I2:=I.Ifbranch as TPasImplIfElse;
   AssertExpression('IF condition',I2.ConditionExpr,pekIdent,'b');
   AssertExpression('IF condition',I2.ConditionExpr,pekIdent,'b');
   AssertNotNull('Have then for inner if',I2.ifBranch);
   AssertNotNull('Have then for inner if',I2.ifBranch);
-  AssertNull('Empty else for inner if',I2.ElseBranch);
+  AssertnotNull('Empty else for inner if',I2.ElseBranch);
+  AssertEquals('Have a commend for inner if else',TPasImplCommand,I2.ElseBranch.ClassType);
+  AssertEquals('... an empty command','',TPasImplCommand(I2.ElseBranch).Command);
 end;
 end;
 
 
 procedure TTestStatementParser.TestIfIfElseElseBlock;
 procedure TTestStatementParser.TestIfIfElseElseBlock;