View Issue Details

IDProjectCategoryView StatusLast Update
0036519FPCfpReportpublic2020-01-10 15:51
ReporterAndi FriessAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformDell XPSOSWin10 / 64 ProOS VersionWin10 / 64 Pro
Product Version3.3.1Product Build43861 
Target VersionFixed in Version3.3.1 
Summary0036519: test fails with some errors
DescriptionTest of fcl-report fails with error.
Steps To Reproducego into fpcsrc\packages\fcl-report\test and compile testfpcreport.lpr

Run the test and see attached Testresult.txt
Additional InformationNumber of run tests: 253
Number of errors: 8
Number of failures: 4
TagsNo tags attached.
Fixed in Revision43899
FPCOldBugId
FPCTarget3.2.0
Attached Files
  • Testresult.txt (14,007 bytes)
    D:\data\lazdev\trunk64\fpcsrc\packages\fcl-report\test>testfpreport.exe
     Time:00.273 N:253 E:8 F:4 I:0
      TTestReportComponent Time:00.000 N:3 E:0 F:0 I:0
        00.000  TestCreate
        00.000  TestLayoutState
        00.000  TestRenderState
      TReportElementTest Time:00.001 N:14 E:0 F:0 I:0
        00.000  TestCreate
        00.000  TestDoChange
        00.000  TestChangeCount
        00.000  TestChangeCountNested
        00.000  TestChangeCountNested2
        00.000  TestVisibleChanges
        00.000  TestLayoutChanges
        00.000  TestFrameChanges
        00.000  TestAssign
        00.001  TestEquals1
        00.000  TestEquals2
        00.000  TestEquals3
        00.000  TestEquals4
        00.000  TestEquals5
      TTestReportChildren Time:00.082 N:7 E:3 F:0 I:0
        00.000  TestCreate
        00.000  TestSetParent1
        00.000  TestSetParent2  Error: EAccessViolation
          Exception:   [TEARDOWN] Access violation
          at   $000000010000CE28
        00.000  TestSetParent3  Error: EAccessViolation
          Exception:   [TEARDOWN] Access violation
          at   $000000010000CE28
        00.000  TestSetParent4  Error: EAccessViolation
          Exception:   Access violation
          at   $000000010000CE28
        00.000  TestSetParent5
        00.000  TestSetParent6
      TTestReportFrame Time:00.000 N:14 E:0 F:0 I:0
        00.000  TestCreate
        00.000  TestWidthChange
        00.000  TestColorChange
        00.000  TestPenStyleChange
        00.000  TestShapeChange
        00.000  TestLinesChange
        00.000  TestAssign
        00.000  TestEquals1
        00.000  TestEquals2
        00.000  TestEquals3
        00.000  TestEquals4
        00.000  TestEquals5
        00.000  TestEquals6
        00.000  TestEquals7
      TTestReportLayout Time:00.001 N:12 E:0 F:0 I:0
        00.001  TestCreate
        00.000  TestTopChange
        00.000  TestLeftChange
        00.000  TestWidthChange
        00.000  TestHeightChange
        00.000  TestAssign
        00.000  TestEquals1
        00.000  TestEquals2
        00.000  TestEquals3
        00.000  TestEquals4
        00.000  TestEquals5
        00.000  TestEquals6
      TTestFPPageSize Time:00.000 N:1 E:0 F:0 I:0
        00.000  TestCreate
      TTestFPPaperManager Time:00.001 N:19 E:0 F:0 I:0
        00.000  TestCreate
        00.000  TestRegister1
        00.000  TestRegister2
        00.000  TestRegister3
        00.001  TestRegisterDuplicate
        00.000  TestClear
        00.000  TestFind1
        00.000  TestFind2
        00.000  TestFind3
        00.000  IllegalAccess1
        00.000  IllegalAccess2
        00.000  IllegalAccess3
        00.000  IllegalAccess4
        00.000  IllegalAccess5
        00.000  IllegalAccess6
        00.000  IllegalAccess7
        00.000  IllegalAccess8
        00.000  TestWidth
        00.000  TestHeight
      TTestFPReportPageSize Time:00.001 N:9 E:0 F:0 I:0
        00.000  TestCreate
        00.000  TestCreateWithPage
        00.001  TestCreateByPage
        00.000  TestChanged1
        00.000  TestChanged2
        00.000  TestChanged3
        00.000  TestPaperName1
        00.000  TestPaperName2
        00.000  TestAssign
      TTestReportPage Time:00.029 N:11 E:1 F:0 I:0
        00.000  TestCreate1
        00.000  TestCreate2
        00.000  TestCreate3
        00.000  TestPageSize1
        00.001  TestPageSize2
        00.000  TestPageSize3
        00.000  TestBand1
        00.000  TestBand2  Error: EAccessViolation
          Exception:   Access violation
          at   $000000010000CE28
        00.000  TestData
        00.000  TestAssign
        00.000  TestFindBand
      TTestReportData Time:00.002 N:18 E:0 F:0 I:0
        00.001  TestCreate
        00.000  TestOpen1
        00.000  TestNext
        00.000  TestInitFieldDefs
        00.000  TestInitFieldDefs_OnlyAllowedOnce
        00.000  TestEOF1
        00.000  TestAddDatafield
        00.000  TestDatafieldAdd
        00.000  TestCreateFields
        00.001  TestDatafieldIndexOf1
        00.000  TestDatafieldIndexOf2
        00.000  TestFindField1
        00.000  TestFindField2
        00.000  TestFindByName1
        00.000  TestFindByName2
        00.000  TestFieldAssign
        00.000  TestGetValue
        00.000  TestEasyAccessProperties
      TTestUserReportData Time:00.001 N:1 E:0 F:0 I:0
        00.001  TestGetValue
      TTestUserReportData2 Time:00.000 N:3 E:0 F:0 I:0
        00.000  TestGetValue
        00.000  TestOnGetEOF1
        00.000  TestOnGetEOF2
      TTestDataBand Time:00.000 N:2 E:0 F:0 I:0
        00.000  TestData
        00.000  TestDataPropertyAutoSet
      TTestCustomReport Time:00.090 N:18 E:3 F:3 I:0
        00.000  TestBeginReportEvent  Error: EInvalidReportError
          Exception:   Invalid report, detected 1 errors:
    Need at least 1 report page.
    
          at   $0000000100094271  VALIDATE,  line 8892 of ../src/fpreport.pp
        00.000  TestEndReportEvent  Error: EInvalidReportError
          Exception:   Invalid report, detected 1 errors:
    Need at least 1 report page.
    
          at   $0000000100094271  VALIDATE,  line 8892 of ../src/fpreport.pp
        00.001  TestPagePrepareObjects  Failed: "Failed on 4" expected: <1> but was: <2>
          Exception:   "Failed on 4" expected: <1> but was: <2>
          at   $000000010006611D  TESTPAGEPREPAREOBJECTS,  line 2817 of tcbasereport.pp
        00.001  TestBandPrepareObjects
        00.001  TestRTObjects1  Failed: "Failed on 2" expected: <3> but was: <6>
          Exception:   "Failed on 2" expected: <3> but was: <6>
          at   $00000001000664C1  TESTRTOBJECTS1,  line 2873 of tcbasereport.pp
        00.004  TestRTObjects2  Failed: "Failed on 2" expected: <1> but was: <2>
          Exception:   "Failed on 2" expected: <1> but was: <2>
          at   $0000000100066656  TESTRTOBJECTS2,  line 2898 of tcbasereport.pp
        00.004  TestRTObjects3
        00.003  TestRTObjects4_OneDataItem
        00.004  TestRTObjects5_TwoDataItems
        00.003  TestInternalFunction_Page
        00.004  TestInternalFunction_Page_with_text
        00.001  TestInternalFunction_RecNo  Error: EExprParser
          Exception:   Expected ( bracket at position 6, but got
          at   $000000010007657D
        00.004  TestInternalFunction_Today
        00.004  TestInternalFunction_Today_with_text
        00.003  TestInternalFunction_Author
        00.004  TestInternalFunction_Author_with_text
        00.004  TestInternalFunction_Title
        00.003  TestInternalFunction_Title_with_text
      TTestReportMemo Time:00.008 N:16 E:0 F:1 I:0
        00.000  TestCreate
        00.001  TestPrepareTextBlocks
        00.001  TestPrepareTextBlocks_multiline_data
        00.001  TestPrepareTextBlocks_multiline_wraptext  Failed: "Failed on 2" expected: <2> but was: <1>
          Exception:   "Failed on 2" expected: <2> but was: <1>
          at   $0000000100069053  TESTPREPARETEXTBLOCKS_MULTILINE_WRAPTEXT,  line 3409 of tcbasereport.pp
        00.001  TestPrepareTextBlocks_multiline_wraptext_oneword
        00.001  TestPrepareTextBlocks_multiline_wraptext_oneword_overflow
        00.001  TestPrepareTextBlocks_multiline_wraptext_oneword_split
        00.000  TestRGBToReportColor
        00.000  TestHTMLColorToReportColor_length7
        00.000  TestHTMLColorToReportColor_length6
        00.000  TestHTMLColorToReportColor_length3
        00.000  TestCreateTestBlock
        00.000  TestCreateTestBlock_IsURL
        00.001  TestSubStr
        00.000  TestTokenCount
        00.000  TestToken
      TTestBandList Time:00.001 N:6 E:0 F:0 I:0
        00.000  TestAdd
        00.000  TestItems
        00.000  TestClear
        00.000  TestDelete
        00.000  TestFind1
        00.001  TestFind2
      TTestVariable Time:00.028 N:8 E:1 F:0 I:0
        00.000  TestEmpty
        00.000  TestName
        00.000  TestBoolean
        00.000  TestInteger
        00.000  TestDateTime
        00.001  TestFloat  Error: EConvertError
          Exception:   " 0.0000000000000000E+000" is an invalid float
          at   $0000000100031C4A
        00.001  TestString
        00.000  TestExpressionResult
      TTestVariables Time:00.000 N:4 E:0 F:0 I:0
        00.000  TestEmpty
        00.000  TestAdd
        00.000  TestIndexOf
        00.000  TestFind
      TTestReportDOM Time:00.019 N:62 E:0 F:0 I:0
        00.000  TestCreate
        00.000  TestAdd
        00.001  TestFind1
        00.000  TestFind2
        00.000  TestPush
        00.000  TestPop1
        00.006  TestStreamToHex
        00.006  TestStreamToHex2
        00.000  TestStreamEquals1
        00.000  TestStreamEquals2
        00.000  TestStreamEquals3
        00.000  TestStreamEquals4
        00.000  TestHexToStream
        00.000  TestWriteInteger1
        00.000  TestWriteString1
        00.000  TestWriteString2
        00.001  TestWriteBoolean1
        00.000  TestWriteBoolean2
        00.000  TestWriteFloat1
        00.000  TestWriteFloat2
        00.000  TestWriteFloat3
        00.000  TestWriteDateTime1
        00.000  TestWriteDateTime2
        00.000  TestWriteDateTime3
        00.000  TestWriteStream1
        00.001  TestWriteIntegerDiff1
        00.000  TestWriteIntegerDiff2
        00.000  TestWriteStringDiff1
        00.000  TestWriteStringDiff2
        00.000  TestWriteBooleanDiff1
        00.000  TestWriteBooleanDiff2
        00.000  TestWriteFloatDiff1
        00.000  TestWriteFloatDiff2
        00.000  TestWriteDateTimeDiff1
        00.001  TestWriteDateTimeDiff2
        00.000  TestWriteDateTimeDiff3
        00.000  TestWriteStreamDiff1
        00.000  TestWriteStreamDiff2
        00.000  TestWriteStreamDiff3
        00.000  TestReadInteger1
        00.000  TestReadInteger2
        00.000  TestReadInteger3
        00.000  TestReadString1
        00.001  TestReadString2
        00.000  TestReadString3
        00.000  TestReadDateTime1
        00.000  TestReadDateTime2
        00.000  TestReadDateTime3
        00.000  TestReadDateTime4
        00.000  TestReadDateTime5
        00.000  TestReadBoolean1
        00.000  TestReadBoolean2
        00.000  TestReadBoolean3
        00.001  TestReadBoolean4
        00.000  TestReadFloat1
        00.000  TestReadFloat2
        00.000  TestReadFloat3
        00.000  TestReadFloat4
        00.000  TestReadStream1
        00.000  TestReadStream2
        00.000  TestReadStream3
        00.001  TestALL
      TTestReportFrameDom Time:00.001 N:3 E:0 F:0 I:0
        00.000  TestWrite
        00.000  TestWriteDiff
        00.001  TestRead
      TTestReportLayoutDom Time:00.000 N:3 E:0 F:0 I:0
        00.000  TestWrite
        00.000  TestWriteDiff
        00.000  TestRead
      TTestReportElementDOM Time:00.002 N:5 E:0 F:0 I:0
        00.000  TestWrite1
        00.000  TestWriteDiff1
        00.000  TestWriteDiff2
        00.000  TestRead1
        00.001  TestRead2
      TTestReportElementWithChildrenDOM Time:00.002 N:2 E:0 F:0 I:0
        00.000  TestWrite
        00.002  TestRead
      TTestReportPageHeader Time:00.003 N:3 E:0 F:0 I:0
        00.001  TestWrite
        00.000  TestWrite2
        00.002  TestRead
      TTestHTMLParser Time:00.001 N:9 E:0 F:0 I:0
        00.000  TestOneTagPair
        00.000  TestNoTags
        00.000  TestTagAndRemainingText
        00.000  TestRegularTextAndTag
        00.000  TestTagNoText
        00.000  TestGetTagName
        00.000  TestGetNameValPair
        00.001  TestGetValFromNameVal
        00.000  TestGetVal
    
    Number of run tests: 253
    Number of errors:    8
    Number of failures:  4
    
    List of errors:
      Error:
        Message:           TTestReportChildren.TestSetParent2: Access violation
        Exception class:   EAccessViolation
        Exception message: [TEARDOWN] Access violation
            at   $000000010000CE28
    
      Error:
        Message:           TTestReportChildren.TestSetParent3: Access violation
        Exception class:   EAccessViolation
        Exception message: [TEARDOWN] Access violation
            at   $000000010000CE28
    
      Error:
        Message:           TTestReportChildren.TestSetParent4: Access violation
        Exception class:   EAccessViolation
        Exception message: Access violation
            at   $000000010000CE28
    
      Error:
        Message:           TTestReportPage.TestBand2: Access violation
        Exception class:   EAccessViolation
        Exception message: Access violation
            at   $000000010000CE28
    
      Error:
        Message:           TTestCustomReport.TestBeginReportEvent: Invalid report, detected 1 errors:
    Need at least 1 report page.
    
        Exception class:   EInvalidReportError
        Exception message: Invalid report, detected 1 errors:
    Need at least 1 report page.
    
            at   $0000000100094271  VALIDATE,  line 8892 of ../src/fpreport.pp
    
      Error:
        Message:           TTestCustomReport.TestEndReportEvent: Invalid report, detected 1 errors:
    Need at least 1 report page.
    
        Exception class:   EInvalidReportError
        Exception message: Invalid report, detected 1 errors:
    Need at least 1 report page.
    
            at   $0000000100094271  VALIDATE,  line 8892 of ../src/fpreport.pp
    
      Error:
        Message:           TTestCustomReport.TestInternalFunction_RecNo: Expected ( bracket at position 6, but got
        Exception class:   EExprParser
        Exception message: Expected ( bracket at position 6, but got
            at   $000000010007657D
    
      Error:
        Message:           TTestVariable.TestFloat: " 0.0000000000000000E+000" is an invalid float
        Exception class:   EConvertError
        Exception message: " 0.0000000000000000E+000" is an invalid float
            at   $0000000100031C4A
    
    
    List of failures:
      Failure:
        Message:           TTestCustomReport.TestPagePrepareObjects: "Failed on 4" expected: <1> but was: <2>
        Exception class:   EAssertionFailedError
        Exception message: "Failed on 4" expected: <1> but was: <2>
            at   $000000010006611D  TESTPAGEPREPAREOBJECTS,  line 2817 of tcbasereport.pp
      Failure:
        Message:           TTestCustomReport.TestRTObjects1: "Failed on 2" expected: <3> but was: <6>
        Exception class:   EAssertionFailedError
        Exception message: "Failed on 2" expected: <3> but was: <6>
            at   $00000001000664C1  TESTRTOBJECTS1,  line 2873 of tcbasereport.pp
      Failure:
        Message:           TTestCustomReport.TestRTObjects2: "Failed on 2" expected: <1> but was: <2>
        Exception class:   EAssertionFailedError
        Exception message: "Failed on 2" expected: <1> but was: <2>
            at   $0000000100066656  TESTRTOBJECTS2,  line 2898 of tcbasereport.pp
      Failure:
        Message:           TTestReportMemo.TestPrepareTextBlocks_multiline_wraptext: "Failed on 2" expected: <2> but was: <1>
        Exception class:   EAssertionFailedError
        Exception message: "Failed on 2" expected: <2> but was: <1>
            at   $0000000100069053  TESTPREPARETEXTBLOCKS_MULTILINE_WRAPTEXT,  line 3409 of tcbasereport.pp
    
    
    Testresult.txt (14,007 bytes)
  • tcbasereport.pp.patch (6,711 bytes)
    Index: packages/fcl-report/test/tcbasereport.pp
    ===================================================================
    --- packages/fcl-report/test/tcbasereport.pp	(revision 43898)
    +++ packages/fcl-report/test/tcbasereport.pp	(working copy)
    @@ -239,7 +239,7 @@
     
       TTestReportChildren = class(TTestCase)
       private
    -    FC: TMyFPReportElementWithChildren;
    +    FC, FC2: TMyFPReportElementWithChildren;
         FChild: TFPReportElement;
       protected
         procedure SetUp; override;
    @@ -743,11 +743,11 @@
       Variable.DataType:=rtFloat;
       AssertEquals('Float type remains',rtFloat,Variable.DataType);
       AssertEquals('Float default value',0.0,Variable.AsFloat);
    -  AssertEquals('Float as string',0.0,StrToFloat(Variable.Value));
    +  AssertEquals('Float as string',' 0.0000000000000000E+000',Variable.Value);
       Variable.DataType:=rtBoolean;
       Variable.AsFloat:=1.23;
       AssertEquals('Float type remains',rtFloat,Variable.DataType);
    -  AssertEquals('Float as string',1.23,StrToFloat(Variable.Value));
    +  AssertEquals('Float as string',' 1.2300000000000000E+000',Variable.Value);
       AssertEquals('Float value',1.23,Variable.AsFloat);
       R:=Variable.AsExpressionResult;
       AssertEquals('Correct result',rtFloat,r.resulttype);
    @@ -1520,13 +1520,15 @@
     procedure TTestReportChildren.SetUp;
     begin
       FC := TMyFPReportElementWithChildren.Create(nil);
    +  FC2 := TMyFPReportElementWithChildren.Create(nil);
       FChild := TFPReportElement.Create(nil);
     end;
     
     procedure TTestReportChildren.TearDown;
     begin
    +  FreeAndNil(FChild);
       FreeAndNil(FC);
    -  FreeAndNil(FChild);
    +  FreeAndNil(FC2);
     end;
     
     procedure TTestReportChildren.WrongParent;
    @@ -1562,17 +1564,12 @@
       AssertEquals('Parent childcount is 1', 1, FC.ChildCount);
       AssertSame('Parent first child is OK', FChild, FC.Child[0]);
       FC.ResetChanged;
    -  E := TFPReportElementWithChildren.Create(nil);
    -  try
    -    FChild.Parent := E;
    -    AssertSame('Parent was saved', E, FChild.parent);
    -    AssertEquals('Changed was called', 1, FC.ChangedCalled);
    -    AssertEquals('Old Parent childcount is 0', 0, FC.ChildCount);
    -    AssertEquals('Parent childcount is 1', 1, E.ChildCount);
    -    AssertSame('Parent first child is OK', FChild, E.Child[0]);
    -  finally
    -    E.Free;
    -  end;
    +  FChild.Parent := FC2;
    +  AssertSame('Parent was saved', FC2, FChild.parent);
    +  AssertEquals('Changed was called', 1, FC.ChangedCalled);
    +  AssertEquals('Old Parent childcount is 0', 0, FC.ChildCount);
    +  AssertEquals('Parent childcount is 1', 1, FC2.ChildCount);
    +  AssertSame('Parent first child is OK', FChild, FC2.Child[0]);
     end;
     
     procedure TTestReportChildren.TestSetParent4;
    @@ -1582,7 +1579,9 @@
       AssertEquals('Parent childcount is 1', 1, FC.ChildCount);
       AssertSame('Parent first child is OK', FChild, FC.Child[0]);
       FreeAndNil(FC);
    -  AssertNull('Child parent was removed when parent is freed', FChild.Parent);
    +  //FChild is freed due to free of parent
    +  //AssertNull('Child parent was removed when parent is freed', FChild.Parent);
    +  FChild := Nil;
     end;
     
     procedure TTestReportChildren.TestSetParent6;
    @@ -2188,9 +2187,9 @@
       B: TFPReportCustomBand;
       P: TMyFPReportPage;
     begin
    -  B := TFPReportCustomBand.Create(nil);
    +  P := TMyFPReportPage.Create(nil);
       try
    -    P := TMyFPReportPage.Create(nil);
    +    B := TFPReportCustomBand.Create(nil);
         try
           B.Parent := P;
           AssertSame('Parent stored correctly', P, B.Page);
    @@ -2197,12 +2196,11 @@
           AssertEquals('Bandcount correct', 1, P.BandCount);
           AssertSame('Bands[0] correct', B, P.Bands[0]);
         finally
    -      P.Free;
    +      B.Free;
         end;
    -    AssertNull('Band notified that page is gone', B.Parent);
    -    AssertNull('Band notified that page is gone', B.Page);
    +    AssertEquals('Page notified that Band is gone', 0, P.BandCount);
       finally
    -    B.Free;
    +    P.Free;
       end;
     end;
     
    @@ -2775,6 +2773,7 @@
     
     procedure TTestCustomReport.TestBeginReportEvent;
     begin
    +  TMyFPReportPage.Create(Report); // add at least one page
       Report.OnBeginReport := @HandleOnBeginReport;
       AssertEquals('Failed on 1', 0, FBeginReportCount);
       Report.RunReport;
    @@ -2784,6 +2783,7 @@
     
     procedure TTestCustomReport.TestEndReportEvent;
     begin
    +  TMyFPReportPage.Create(Report); // add at least one page
       Report.OnEndReport := @HandleOnEndReport;
       AssertEquals('Failed on 1', 0, FEndReportCount);
       Report.RunReport;
    @@ -2814,9 +2814,10 @@
       AssertEquals('Failed on 3', 0, TMyFPReportPage(Report.Pages[2]).FPrepareObjectsCalled);
     
       Report.RunReport;
    -  AssertEquals('Failed on 4', 1, TMyFPReportPage(Report.Pages[0]).FPrepareObjectsCalled);
    -  AssertEquals('Failed on 5', 1, TMyFPReportPage(Report.Pages[1]).FPrepareObjectsCalled);
    -  AssertEquals('Failed on 6', 1, TMyFPReportPage(Report.Pages[2]).FPrepareObjectsCalled);
    +  // due to Re-interpret of Page.Data, page is prepared per record (r38906)
    +  AssertEquals('Failed on 4', 2, TMyFPReportPage(Report.Pages[0]).FPrepareObjectsCalled);
    +  AssertEquals('Failed on 5', 2, TMyFPReportPage(Report.Pages[1]).FPrepareObjectsCalled);
    +  AssertEquals('Failed on 6', 2, TMyFPReportPage(Report.Pages[2]).FPrepareObjectsCalled);
     end;
     
     procedure TTestCustomReport.TestBandPrepareObjects;
    @@ -2870,7 +2871,8 @@
       AssertEquals('Failed on 1', 0, Report.RTObjects.Count);
     
       Report.RunReport;
    -  AssertEquals('Failed on 2', 3, Report.RTObjects.Count);
    +  // due to Re-interpret of Page.Data, page is prepared per record (r38906)
    +  AssertEquals('Failed on 2', 6, Report.RTObjects.Count);
     end;
     
     procedure TTestCustomReport.TestRTObjects2;
    @@ -2895,7 +2897,8 @@
     
       AssertEquals('Failed on 1', 0, Report.RTObjects.Count);
       Report.RunReport;
    -  AssertEquals('Failed on 2', 1, Report.RTObjects.Count); // runtime objects adhere to same hierarchy as design time
    +  // due to Re-interpret of Page.Data, page is prepared per record (r38906)
    +  AssertEquals('Failed on 2', 2, Report.RTObjects.Count); // runtime objects adhere to same hierarchy as design time
       AssertEquals('Failed on 3', 'TFPReportCustomPage', TObject(Report.RTObjects[0]).ClassName);
       rtPage := TFPReportCustomPage(Report.RTObjects[0]);
       AssertEquals('Failed on 4', 1, rtPage.ChildCount);
    @@ -3104,7 +3107,7 @@
       Memo := TFPReportMemo.Create(DataBand);
       Memo.Layout.Top := 5;
       Memo.Layout.Left := 10;
    -  Memo.Text := '[recno]';
    +  Memo.Text := '[recno('''')]';
     
       AssertEquals('Failed on 1', 0, Report.RTObjects.Count);
       Report.RunReport;
    @@ -3404,6 +3407,7 @@
       FMemo.UseParentFont := False;
       FMemo.Font.Name := 'Calibri';
       FMemo.StretchMode := smActualHeight;
    +  FMemo.WordOverflow := woOverflow;
       TMemoFriend(FMemo).CreateRTLayout;
       TMemoFriend(FMemo).RecalcLayout;
       AssertEquals('Failed on 2', 2, FMemo.TextLines.Count);
    
    tcbasereport.pp.patch (6,711 bytes)
  • results.xml (25,138 bytes)

Activities

Andi Friess

2020-01-05 15:12

reporter  

Testresult.txt (14,007 bytes)
D:\data\lazdev\trunk64\fpcsrc\packages\fcl-report\test>testfpreport.exe
 Time:00.273 N:253 E:8 F:4 I:0
  TTestReportComponent Time:00.000 N:3 E:0 F:0 I:0
    00.000  TestCreate
    00.000  TestLayoutState
    00.000  TestRenderState
  TReportElementTest Time:00.001 N:14 E:0 F:0 I:0
    00.000  TestCreate
    00.000  TestDoChange
    00.000  TestChangeCount
    00.000  TestChangeCountNested
    00.000  TestChangeCountNested2
    00.000  TestVisibleChanges
    00.000  TestLayoutChanges
    00.000  TestFrameChanges
    00.000  TestAssign
    00.001  TestEquals1
    00.000  TestEquals2
    00.000  TestEquals3
    00.000  TestEquals4
    00.000  TestEquals5
  TTestReportChildren Time:00.082 N:7 E:3 F:0 I:0
    00.000  TestCreate
    00.000  TestSetParent1
    00.000  TestSetParent2  Error: EAccessViolation
      Exception:   [TEARDOWN] Access violation
      at   $000000010000CE28
    00.000  TestSetParent3  Error: EAccessViolation
      Exception:   [TEARDOWN] Access violation
      at   $000000010000CE28
    00.000  TestSetParent4  Error: EAccessViolation
      Exception:   Access violation
      at   $000000010000CE28
    00.000  TestSetParent5
    00.000  TestSetParent6
  TTestReportFrame Time:00.000 N:14 E:0 F:0 I:0
    00.000  TestCreate
    00.000  TestWidthChange
    00.000  TestColorChange
    00.000  TestPenStyleChange
    00.000  TestShapeChange
    00.000  TestLinesChange
    00.000  TestAssign
    00.000  TestEquals1
    00.000  TestEquals2
    00.000  TestEquals3
    00.000  TestEquals4
    00.000  TestEquals5
    00.000  TestEquals6
    00.000  TestEquals7
  TTestReportLayout Time:00.001 N:12 E:0 F:0 I:0
    00.001  TestCreate
    00.000  TestTopChange
    00.000  TestLeftChange
    00.000  TestWidthChange
    00.000  TestHeightChange
    00.000  TestAssign
    00.000  TestEquals1
    00.000  TestEquals2
    00.000  TestEquals3
    00.000  TestEquals4
    00.000  TestEquals5
    00.000  TestEquals6
  TTestFPPageSize Time:00.000 N:1 E:0 F:0 I:0
    00.000  TestCreate
  TTestFPPaperManager Time:00.001 N:19 E:0 F:0 I:0
    00.000  TestCreate
    00.000  TestRegister1
    00.000  TestRegister2
    00.000  TestRegister3
    00.001  TestRegisterDuplicate
    00.000  TestClear
    00.000  TestFind1
    00.000  TestFind2
    00.000  TestFind3
    00.000  IllegalAccess1
    00.000  IllegalAccess2
    00.000  IllegalAccess3
    00.000  IllegalAccess4
    00.000  IllegalAccess5
    00.000  IllegalAccess6
    00.000  IllegalAccess7
    00.000  IllegalAccess8
    00.000  TestWidth
    00.000  TestHeight
  TTestFPReportPageSize Time:00.001 N:9 E:0 F:0 I:0
    00.000  TestCreate
    00.000  TestCreateWithPage
    00.001  TestCreateByPage
    00.000  TestChanged1
    00.000  TestChanged2
    00.000  TestChanged3
    00.000  TestPaperName1
    00.000  TestPaperName2
    00.000  TestAssign
  TTestReportPage Time:00.029 N:11 E:1 F:0 I:0
    00.000  TestCreate1
    00.000  TestCreate2
    00.000  TestCreate3
    00.000  TestPageSize1
    00.001  TestPageSize2
    00.000  TestPageSize3
    00.000  TestBand1
    00.000  TestBand2  Error: EAccessViolation
      Exception:   Access violation
      at   $000000010000CE28
    00.000  TestData
    00.000  TestAssign
    00.000  TestFindBand
  TTestReportData Time:00.002 N:18 E:0 F:0 I:0
    00.001  TestCreate
    00.000  TestOpen1
    00.000  TestNext
    00.000  TestInitFieldDefs
    00.000  TestInitFieldDefs_OnlyAllowedOnce
    00.000  TestEOF1
    00.000  TestAddDatafield
    00.000  TestDatafieldAdd
    00.000  TestCreateFields
    00.001  TestDatafieldIndexOf1
    00.000  TestDatafieldIndexOf2
    00.000  TestFindField1
    00.000  TestFindField2
    00.000  TestFindByName1
    00.000  TestFindByName2
    00.000  TestFieldAssign
    00.000  TestGetValue
    00.000  TestEasyAccessProperties
  TTestUserReportData Time:00.001 N:1 E:0 F:0 I:0
    00.001  TestGetValue
  TTestUserReportData2 Time:00.000 N:3 E:0 F:0 I:0
    00.000  TestGetValue
    00.000  TestOnGetEOF1
    00.000  TestOnGetEOF2
  TTestDataBand Time:00.000 N:2 E:0 F:0 I:0
    00.000  TestData
    00.000  TestDataPropertyAutoSet
  TTestCustomReport Time:00.090 N:18 E:3 F:3 I:0
    00.000  TestBeginReportEvent  Error: EInvalidReportError
      Exception:   Invalid report, detected 1 errors:
Need at least 1 report page.

      at   $0000000100094271  VALIDATE,  line 8892 of ../src/fpreport.pp
    00.000  TestEndReportEvent  Error: EInvalidReportError
      Exception:   Invalid report, detected 1 errors:
Need at least 1 report page.

      at   $0000000100094271  VALIDATE,  line 8892 of ../src/fpreport.pp
    00.001  TestPagePrepareObjects  Failed: "Failed on 4" expected: <1> but was: <2>
      Exception:   "Failed on 4" expected: <1> but was: <2>
      at   $000000010006611D  TESTPAGEPREPAREOBJECTS,  line 2817 of tcbasereport.pp
    00.001  TestBandPrepareObjects
    00.001  TestRTObjects1  Failed: "Failed on 2" expected: <3> but was: <6>
      Exception:   "Failed on 2" expected: <3> but was: <6>
      at   $00000001000664C1  TESTRTOBJECTS1,  line 2873 of tcbasereport.pp
    00.004  TestRTObjects2  Failed: "Failed on 2" expected: <1> but was: <2>
      Exception:   "Failed on 2" expected: <1> but was: <2>
      at   $0000000100066656  TESTRTOBJECTS2,  line 2898 of tcbasereport.pp
    00.004  TestRTObjects3
    00.003  TestRTObjects4_OneDataItem
    00.004  TestRTObjects5_TwoDataItems
    00.003  TestInternalFunction_Page
    00.004  TestInternalFunction_Page_with_text
    00.001  TestInternalFunction_RecNo  Error: EExprParser
      Exception:   Expected ( bracket at position 6, but got
      at   $000000010007657D
    00.004  TestInternalFunction_Today
    00.004  TestInternalFunction_Today_with_text
    00.003  TestInternalFunction_Author
    00.004  TestInternalFunction_Author_with_text
    00.004  TestInternalFunction_Title
    00.003  TestInternalFunction_Title_with_text
  TTestReportMemo Time:00.008 N:16 E:0 F:1 I:0
    00.000  TestCreate
    00.001  TestPrepareTextBlocks
    00.001  TestPrepareTextBlocks_multiline_data
    00.001  TestPrepareTextBlocks_multiline_wraptext  Failed: "Failed on 2" expected: <2> but was: <1>
      Exception:   "Failed on 2" expected: <2> but was: <1>
      at   $0000000100069053  TESTPREPARETEXTBLOCKS_MULTILINE_WRAPTEXT,  line 3409 of tcbasereport.pp
    00.001  TestPrepareTextBlocks_multiline_wraptext_oneword
    00.001  TestPrepareTextBlocks_multiline_wraptext_oneword_overflow
    00.001  TestPrepareTextBlocks_multiline_wraptext_oneword_split
    00.000  TestRGBToReportColor
    00.000  TestHTMLColorToReportColor_length7
    00.000  TestHTMLColorToReportColor_length6
    00.000  TestHTMLColorToReportColor_length3
    00.000  TestCreateTestBlock
    00.000  TestCreateTestBlock_IsURL
    00.001  TestSubStr
    00.000  TestTokenCount
    00.000  TestToken
  TTestBandList Time:00.001 N:6 E:0 F:0 I:0
    00.000  TestAdd
    00.000  TestItems
    00.000  TestClear
    00.000  TestDelete
    00.000  TestFind1
    00.001  TestFind2
  TTestVariable Time:00.028 N:8 E:1 F:0 I:0
    00.000  TestEmpty
    00.000  TestName
    00.000  TestBoolean
    00.000  TestInteger
    00.000  TestDateTime
    00.001  TestFloat  Error: EConvertError
      Exception:   " 0.0000000000000000E+000" is an invalid float
      at   $0000000100031C4A
    00.001  TestString
    00.000  TestExpressionResult
  TTestVariables Time:00.000 N:4 E:0 F:0 I:0
    00.000  TestEmpty
    00.000  TestAdd
    00.000  TestIndexOf
    00.000  TestFind
  TTestReportDOM Time:00.019 N:62 E:0 F:0 I:0
    00.000  TestCreate
    00.000  TestAdd
    00.001  TestFind1
    00.000  TestFind2
    00.000  TestPush
    00.000  TestPop1
    00.006  TestStreamToHex
    00.006  TestStreamToHex2
    00.000  TestStreamEquals1
    00.000  TestStreamEquals2
    00.000  TestStreamEquals3
    00.000  TestStreamEquals4
    00.000  TestHexToStream
    00.000  TestWriteInteger1
    00.000  TestWriteString1
    00.000  TestWriteString2
    00.001  TestWriteBoolean1
    00.000  TestWriteBoolean2
    00.000  TestWriteFloat1
    00.000  TestWriteFloat2
    00.000  TestWriteFloat3
    00.000  TestWriteDateTime1
    00.000  TestWriteDateTime2
    00.000  TestWriteDateTime3
    00.000  TestWriteStream1
    00.001  TestWriteIntegerDiff1
    00.000  TestWriteIntegerDiff2
    00.000  TestWriteStringDiff1
    00.000  TestWriteStringDiff2
    00.000  TestWriteBooleanDiff1
    00.000  TestWriteBooleanDiff2
    00.000  TestWriteFloatDiff1
    00.000  TestWriteFloatDiff2
    00.000  TestWriteDateTimeDiff1
    00.001  TestWriteDateTimeDiff2
    00.000  TestWriteDateTimeDiff3
    00.000  TestWriteStreamDiff1
    00.000  TestWriteStreamDiff2
    00.000  TestWriteStreamDiff3
    00.000  TestReadInteger1
    00.000  TestReadInteger2
    00.000  TestReadInteger3
    00.000  TestReadString1
    00.001  TestReadString2
    00.000  TestReadString3
    00.000  TestReadDateTime1
    00.000  TestReadDateTime2
    00.000  TestReadDateTime3
    00.000  TestReadDateTime4
    00.000  TestReadDateTime5
    00.000  TestReadBoolean1
    00.000  TestReadBoolean2
    00.000  TestReadBoolean3
    00.001  TestReadBoolean4
    00.000  TestReadFloat1
    00.000  TestReadFloat2
    00.000  TestReadFloat3
    00.000  TestReadFloat4
    00.000  TestReadStream1
    00.000  TestReadStream2
    00.000  TestReadStream3
    00.001  TestALL
  TTestReportFrameDom Time:00.001 N:3 E:0 F:0 I:0
    00.000  TestWrite
    00.000  TestWriteDiff
    00.001  TestRead
  TTestReportLayoutDom Time:00.000 N:3 E:0 F:0 I:0
    00.000  TestWrite
    00.000  TestWriteDiff
    00.000  TestRead
  TTestReportElementDOM Time:00.002 N:5 E:0 F:0 I:0
    00.000  TestWrite1
    00.000  TestWriteDiff1
    00.000  TestWriteDiff2
    00.000  TestRead1
    00.001  TestRead2
  TTestReportElementWithChildrenDOM Time:00.002 N:2 E:0 F:0 I:0
    00.000  TestWrite
    00.002  TestRead
  TTestReportPageHeader Time:00.003 N:3 E:0 F:0 I:0
    00.001  TestWrite
    00.000  TestWrite2
    00.002  TestRead
  TTestHTMLParser Time:00.001 N:9 E:0 F:0 I:0
    00.000  TestOneTagPair
    00.000  TestNoTags
    00.000  TestTagAndRemainingText
    00.000  TestRegularTextAndTag
    00.000  TestTagNoText
    00.000  TestGetTagName
    00.000  TestGetNameValPair
    00.001  TestGetValFromNameVal
    00.000  TestGetVal

Number of run tests: 253
Number of errors:    8
Number of failures:  4

List of errors:
  Error:
    Message:           TTestReportChildren.TestSetParent2: Access violation
    Exception class:   EAccessViolation
    Exception message: [TEARDOWN] Access violation
        at   $000000010000CE28

  Error:
    Message:           TTestReportChildren.TestSetParent3: Access violation
    Exception class:   EAccessViolation
    Exception message: [TEARDOWN] Access violation
        at   $000000010000CE28

  Error:
    Message:           TTestReportChildren.TestSetParent4: Access violation
    Exception class:   EAccessViolation
    Exception message: Access violation
        at   $000000010000CE28

  Error:
    Message:           TTestReportPage.TestBand2: Access violation
    Exception class:   EAccessViolation
    Exception message: Access violation
        at   $000000010000CE28

  Error:
    Message:           TTestCustomReport.TestBeginReportEvent: Invalid report, detected 1 errors:
Need at least 1 report page.

    Exception class:   EInvalidReportError
    Exception message: Invalid report, detected 1 errors:
Need at least 1 report page.

        at   $0000000100094271  VALIDATE,  line 8892 of ../src/fpreport.pp

  Error:
    Message:           TTestCustomReport.TestEndReportEvent: Invalid report, detected 1 errors:
Need at least 1 report page.

    Exception class:   EInvalidReportError
    Exception message: Invalid report, detected 1 errors:
Need at least 1 report page.

        at   $0000000100094271  VALIDATE,  line 8892 of ../src/fpreport.pp

  Error:
    Message:           TTestCustomReport.TestInternalFunction_RecNo: Expected ( bracket at position 6, but got
    Exception class:   EExprParser
    Exception message: Expected ( bracket at position 6, but got
        at   $000000010007657D

  Error:
    Message:           TTestVariable.TestFloat: " 0.0000000000000000E+000" is an invalid float
    Exception class:   EConvertError
    Exception message: " 0.0000000000000000E+000" is an invalid float
        at   $0000000100031C4A


List of failures:
  Failure:
    Message:           TTestCustomReport.TestPagePrepareObjects: "Failed on 4" expected: <1> but was: <2>
    Exception class:   EAssertionFailedError
    Exception message: "Failed on 4" expected: <1> but was: <2>
        at   $000000010006611D  TESTPAGEPREPAREOBJECTS,  line 2817 of tcbasereport.pp
  Failure:
    Message:           TTestCustomReport.TestRTObjects1: "Failed on 2" expected: <3> but was: <6>
    Exception class:   EAssertionFailedError
    Exception message: "Failed on 2" expected: <3> but was: <6>
        at   $00000001000664C1  TESTRTOBJECTS1,  line 2873 of tcbasereport.pp
  Failure:
    Message:           TTestCustomReport.TestRTObjects2: "Failed on 2" expected: <1> but was: <2>
    Exception class:   EAssertionFailedError
    Exception message: "Failed on 2" expected: <1> but was: <2>
        at   $0000000100066656  TESTRTOBJECTS2,  line 2898 of tcbasereport.pp
  Failure:
    Message:           TTestReportMemo.TestPrepareTextBlocks_multiline_wraptext: "Failed on 2" expected: <2> but was: <1>
    Exception class:   EAssertionFailedError
    Exception message: "Failed on 2" expected: <2> but was: <1>
        at   $0000000100069053  TESTPREPARETEXTBLOCKS_MULTILINE_WRAPTEXT,  line 3409 of tcbasereport.pp

Testresult.txt (14,007 bytes)

Andi Friess

2020-01-06 12:08

reporter   ~0120230

About the EConverterror in TestFloat
See thread https://forum.lazarus.freepascal.org/index.php/topic,48025.0.html.

It looks fpreport have problems with the FormatSettings in some countries with not a dot for decimalseperation.

Andi Friess

2020-01-10 07:09

reporter   ~0120295

EConverterror is Bug 0036545 and there is a patch

The only TestSuit failing is TTestReportChildren and there TestSetParent2, TestSetParent3, TestSetParent4. always in the function TearDown !! The freeing of the Object fails because the FChild was free'd (unwanted ?!) on another place in one of the three test.

Pascal Riekenberg

2020-01-10 10:42

reporter   ~0120298

I'm at fixing them.

Pascal Riekenberg

2020-01-10 12:20

reporter   ~0120301

Here is the patch for the tests.

tcbasereport.pp.patch (6,711 bytes)
Index: packages/fcl-report/test/tcbasereport.pp
===================================================================
--- packages/fcl-report/test/tcbasereport.pp	(revision 43898)
+++ packages/fcl-report/test/tcbasereport.pp	(working copy)
@@ -239,7 +239,7 @@
 
   TTestReportChildren = class(TTestCase)
   private
-    FC: TMyFPReportElementWithChildren;
+    FC, FC2: TMyFPReportElementWithChildren;
     FChild: TFPReportElement;
   protected
     procedure SetUp; override;
@@ -743,11 +743,11 @@
   Variable.DataType:=rtFloat;
   AssertEquals('Float type remains',rtFloat,Variable.DataType);
   AssertEquals('Float default value',0.0,Variable.AsFloat);
-  AssertEquals('Float as string',0.0,StrToFloat(Variable.Value));
+  AssertEquals('Float as string',' 0.0000000000000000E+000',Variable.Value);
   Variable.DataType:=rtBoolean;
   Variable.AsFloat:=1.23;
   AssertEquals('Float type remains',rtFloat,Variable.DataType);
-  AssertEquals('Float as string',1.23,StrToFloat(Variable.Value));
+  AssertEquals('Float as string',' 1.2300000000000000E+000',Variable.Value);
   AssertEquals('Float value',1.23,Variable.AsFloat);
   R:=Variable.AsExpressionResult;
   AssertEquals('Correct result',rtFloat,r.resulttype);
@@ -1520,13 +1520,15 @@
 procedure TTestReportChildren.SetUp;
 begin
   FC := TMyFPReportElementWithChildren.Create(nil);
+  FC2 := TMyFPReportElementWithChildren.Create(nil);
   FChild := TFPReportElement.Create(nil);
 end;
 
 procedure TTestReportChildren.TearDown;
 begin
+  FreeAndNil(FChild);
   FreeAndNil(FC);
-  FreeAndNil(FChild);
+  FreeAndNil(FC2);
 end;
 
 procedure TTestReportChildren.WrongParent;
@@ -1562,17 +1564,12 @@
   AssertEquals('Parent childcount is 1', 1, FC.ChildCount);
   AssertSame('Parent first child is OK', FChild, FC.Child[0]);
   FC.ResetChanged;
-  E := TFPReportElementWithChildren.Create(nil);
-  try
-    FChild.Parent := E;
-    AssertSame('Parent was saved', E, FChild.parent);
-    AssertEquals('Changed was called', 1, FC.ChangedCalled);
-    AssertEquals('Old Parent childcount is 0', 0, FC.ChildCount);
-    AssertEquals('Parent childcount is 1', 1, E.ChildCount);
-    AssertSame('Parent first child is OK', FChild, E.Child[0]);
-  finally
-    E.Free;
-  end;
+  FChild.Parent := FC2;
+  AssertSame('Parent was saved', FC2, FChild.parent);
+  AssertEquals('Changed was called', 1, FC.ChangedCalled);
+  AssertEquals('Old Parent childcount is 0', 0, FC.ChildCount);
+  AssertEquals('Parent childcount is 1', 1, FC2.ChildCount);
+  AssertSame('Parent first child is OK', FChild, FC2.Child[0]);
 end;
 
 procedure TTestReportChildren.TestSetParent4;
@@ -1582,7 +1579,9 @@
   AssertEquals('Parent childcount is 1', 1, FC.ChildCount);
   AssertSame('Parent first child is OK', FChild, FC.Child[0]);
   FreeAndNil(FC);
-  AssertNull('Child parent was removed when parent is freed', FChild.Parent);
+  //FChild is freed due to free of parent
+  //AssertNull('Child parent was removed when parent is freed', FChild.Parent);
+  FChild := Nil;
 end;
 
 procedure TTestReportChildren.TestSetParent6;
@@ -2188,9 +2187,9 @@
   B: TFPReportCustomBand;
   P: TMyFPReportPage;
 begin
-  B := TFPReportCustomBand.Create(nil);
+  P := TMyFPReportPage.Create(nil);
   try
-    P := TMyFPReportPage.Create(nil);
+    B := TFPReportCustomBand.Create(nil);
     try
       B.Parent := P;
       AssertSame('Parent stored correctly', P, B.Page);
@@ -2197,12 +2196,11 @@
       AssertEquals('Bandcount correct', 1, P.BandCount);
       AssertSame('Bands[0] correct', B, P.Bands[0]);
     finally
-      P.Free;
+      B.Free;
     end;
-    AssertNull('Band notified that page is gone', B.Parent);
-    AssertNull('Band notified that page is gone', B.Page);
+    AssertEquals('Page notified that Band is gone', 0, P.BandCount);
   finally
-    B.Free;
+    P.Free;
   end;
 end;
 
@@ -2775,6 +2773,7 @@
 
 procedure TTestCustomReport.TestBeginReportEvent;
 begin
+  TMyFPReportPage.Create(Report); // add at least one page
   Report.OnBeginReport := @HandleOnBeginReport;
   AssertEquals('Failed on 1', 0, FBeginReportCount);
   Report.RunReport;
@@ -2784,6 +2783,7 @@
 
 procedure TTestCustomReport.TestEndReportEvent;
 begin
+  TMyFPReportPage.Create(Report); // add at least one page
   Report.OnEndReport := @HandleOnEndReport;
   AssertEquals('Failed on 1', 0, FEndReportCount);
   Report.RunReport;
@@ -2814,9 +2814,10 @@
   AssertEquals('Failed on 3', 0, TMyFPReportPage(Report.Pages[2]).FPrepareObjectsCalled);
 
   Report.RunReport;
-  AssertEquals('Failed on 4', 1, TMyFPReportPage(Report.Pages[0]).FPrepareObjectsCalled);
-  AssertEquals('Failed on 5', 1, TMyFPReportPage(Report.Pages[1]).FPrepareObjectsCalled);
-  AssertEquals('Failed on 6', 1, TMyFPReportPage(Report.Pages[2]).FPrepareObjectsCalled);
+  // due to Re-interpret of Page.Data, page is prepared per record (r38906)
+  AssertEquals('Failed on 4', 2, TMyFPReportPage(Report.Pages[0]).FPrepareObjectsCalled);
+  AssertEquals('Failed on 5', 2, TMyFPReportPage(Report.Pages[1]).FPrepareObjectsCalled);
+  AssertEquals('Failed on 6', 2, TMyFPReportPage(Report.Pages[2]).FPrepareObjectsCalled);
 end;
 
 procedure TTestCustomReport.TestBandPrepareObjects;
@@ -2870,7 +2871,8 @@
   AssertEquals('Failed on 1', 0, Report.RTObjects.Count);
 
   Report.RunReport;
-  AssertEquals('Failed on 2', 3, Report.RTObjects.Count);
+  // due to Re-interpret of Page.Data, page is prepared per record (r38906)
+  AssertEquals('Failed on 2', 6, Report.RTObjects.Count);
 end;
 
 procedure TTestCustomReport.TestRTObjects2;
@@ -2895,7 +2897,8 @@
 
   AssertEquals('Failed on 1', 0, Report.RTObjects.Count);
   Report.RunReport;
-  AssertEquals('Failed on 2', 1, Report.RTObjects.Count); // runtime objects adhere to same hierarchy as design time
+  // due to Re-interpret of Page.Data, page is prepared per record (r38906)
+  AssertEquals('Failed on 2', 2, Report.RTObjects.Count); // runtime objects adhere to same hierarchy as design time
   AssertEquals('Failed on 3', 'TFPReportCustomPage', TObject(Report.RTObjects[0]).ClassName);
   rtPage := TFPReportCustomPage(Report.RTObjects[0]);
   AssertEquals('Failed on 4', 1, rtPage.ChildCount);
@@ -3104,7 +3107,7 @@
   Memo := TFPReportMemo.Create(DataBand);
   Memo.Layout.Top := 5;
   Memo.Layout.Left := 10;
-  Memo.Text := '[recno]';
+  Memo.Text := '[recno('''')]';
 
   AssertEquals('Failed on 1', 0, Report.RTObjects.Count);
   Report.RunReport;
@@ -3404,6 +3407,7 @@
   FMemo.UseParentFont := False;
   FMemo.Font.Name := 'Calibri';
   FMemo.StretchMode := smActualHeight;
+  FMemo.WordOverflow := woOverflow;
   TMemoFriend(FMemo).CreateRTLayout;
   TMemoFriend(FMemo).RecalcLayout;
   AssertEquals('Failed on 2', 2, FMemo.TextLines.Count);
tcbasereport.pp.patch (6,711 bytes)

Andi Friess

2020-01-10 13:59

reporter   ~0120303

Patch applied and working. All test now green.

  <NumberOfRunTests>253</NumberOfRunTests>
  <NumberOfErrors>0</NumberOfErrors>
  <NumberOfFailures>0</NumberOfFailures>
  <NumberOfIgnoredTests>0</NumberOfIgnoredTests>

results.xml (25,138 bytes)

Michael Van Canneyt

2020-01-10 14:35

administrator   ~0120304

Applied the patch, thank you very much !

Andi Friess

2020-01-10 15:51

reporter   ~0120307

Thanks to all

Issue History

Date Modified Username Field Change
2020-01-05 15:12 Andi Friess New Issue
2020-01-05 15:12 Andi Friess Status new => assigned
2020-01-05 15:12 Andi Friess Assigned To => Michael Van Canneyt
2020-01-05 15:12 Andi Friess File Added: Testresult.txt
2020-01-06 12:08 Andi Friess Note Added: 0120230
2020-01-10 07:09 Andi Friess Note Added: 0120295
2020-01-10 10:42 Pascal Riekenberg Note Added: 0120298
2020-01-10 12:20 Pascal Riekenberg File Added: tcbasereport.pp.patch
2020-01-10 12:20 Pascal Riekenberg Note Added: 0120301
2020-01-10 13:59 Andi Friess File Added: results.xml
2020-01-10 13:59 Andi Friess Note Added: 0120303
2020-01-10 14:35 Michael Van Canneyt Status assigned => resolved
2020-01-10 14:35 Michael Van Canneyt Resolution open => fixed
2020-01-10 14:35 Michael Van Canneyt Fixed in Version => 3.3.1
2020-01-10 14:35 Michael Van Canneyt Fixed in Revision => 43899
2020-01-10 14:35 Michael Van Canneyt FPCTarget => 3.2.0
2020-01-10 14:35 Michael Van Canneyt Note Added: 0120304
2020-01-10 15:51 Andi Friess Status resolved => closed
2020-01-10 15:51 Andi Friess Note Added: 0120307