#1 2016-07-20 23:34:43

dougwoodrow
Member
From: UK
Registered: 2012-10-04
Posts: 36

TestSQL3 failures in version 1.18.2790?

,----
| Using mORMot 1.18.2790 FTS3
| Running on Windows 10 64bit (10.0.10586) with code page 1252
| TSQLite3LibraryStatic 3.13.0 with internal MM
| Generated with: Delphi 7 compiler
`----

Several tests fail the following test:
    CheckSame(L.StartDateTime,40640.502882,1E-10);

because fStartDateTime is 0.

I traced the problem to the following code in procedure TSynLogFile.LoadFromMap(AverageLineLength: integer=32);

    if i>19 then begin
      SetString(fFramework,PAnsiChar(P),i-1);
      Iso8601ToDateTimePUTF8CharVar(P+i,19,fStartDateTime);
    end;

What is the significance of 19 in the i>19 condition?

If I change the condition to i>17 all tests complete with no failures.

    if i>17 then begin
      SetString(fFramework,PAnsiChar(P),i-1);
      Iso8601ToDateTimePUTF8CharVar(P+i,19,fStartDateTime);
    end;

I guess the condition should be

    if i>0 then begin

Last edited by dougwoodrow (2016-07-21 07:27:19)

Offline

#2 2016-07-21 15:45:53

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,666
Website

Re: TestSQL3 failures in version 1.18.2790?

Offline

Board footer

Powered by FluxBB