#1 2013-01-04 01:52:14

mingda
Member
Registered: 2013-01-04
Posts: 121

some TestSQL3 not pass

Just foud the great opensource framework, download the newest source, followed Readme.txt, run TestSQL3, found below not passed, under XE, Chinese windows 2003 server, search forum also find a topic, is this can just ignore or need correct?

1.1. Low level common:

!  - IdemPropName: 1 / 10 FAILED  2.28ms
!  - Soundex: 1 / 35 FAILED  175us

1.6. Synopse PDF:
!  - TPdfDocument: 1 / 2 FAILED  50.62ms
!  - TPdfDocumentGDI: 1 / 3 FAILED  690.91ms


2.1. Basic classes:
!  - TSQLRecord: 7 / 52 FAILED  1.22ms


2.6. Service oriented architecture:
!  - Mocks and stubs: 1 / 30,031 FAILED  115.39ms


thanks!

Last edited by mingda (2013-01-04 02:03:19)

Offline

#2 2013-01-04 05:32:14

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

Re: some TestSQL3 not pass

I suspect this is because your system has Mbcs encoding and regression tests target one byte encoding.

Framework itself should be ok.

What are the failing lines?

Online

#3 2013-01-04 09:55:08

mingda
Member
Registered: 2013-01-04
Posts: 121

Re: some TestSQL3 not pass

!  - IdemPropName: 1 / 10 FAILED  2.28ms
  Check(UpperCaseU(WinAnsiToUTF8('a殓D'))='AECD');  ==> Failed at 2121

!  - Soundex: 1 / 35 FAILED  175us
  Check(SoundExAnsi(' 123 bonjourtr'+chr(232)+'slongmotquid'+chr(233)+'passe  m',@PC)<>0);
  Check((PC<>nil) and (PC^=' '));  ==> Failed at 881, here PC^ is #168

!  - TPdfDocument: 1 / 2 FAILED  50.62ms
      Check(Hash32(MS.Memory,MS.Position)=Hash[embed]);  ==> Failed at 3971, left Hash32 is 3879243249, right hash is 394327692

!  - TPdfDocumentGDI: 1 / 3 FAILED  690.91ms

    i := PosEx('/FontBBox [',s);
    if CheckFailed(i=5650) then exit;  ==> Failed at 4132, here i is 5654

!  - TSQLRecord: 7 / 52 FAILED  1.22ms

    s := T.GetSQLValues;
    Check(s='Int,Test,Unicode,Ansi,ValFloat,ValWord,ValDate,Next,ValVariant '+
      'VALUES (0,'''','''','''',0,0,'''',0,null)');  ==> Failed at: 3304,  s is 'Int,Test,Unicode,Ansi,ValFloat,ValWord,ValDate,Next VALUES (0,'''','''','''',0,0,'''',0)'

    s := ObjectToJSON(T);
    Check(s='{"ID":0,"Int":0,"Test":"","Unicode":"","Ansi":"","ValFloat":0,'+
      '"ValWord":0,"ValDate":"","Next":0,"Data":"","ValVariant":null}');  ==>Failed at: 3308, s is '{"ID":0,"Int":0,"Test":"","Unicode":"","Ansi":"","ValFloat":0,"ValWord":0,"ValDate":"","Next":0,"Data":""}'

    T.ValDate := 39882.888612; // a fixed date and time
    T.Ansi := 'abcde'+chr(233)+'ef'+chr(224)+chr(233);
    T.Test := WinAnsiToUTF8('abcde'+chr(233)+'ef'+chr(224)+chr(233));
    T.Unicode := Utf8DecodeToRawUnicode(T.fTest);
    Check(RawUnicodeToWinAnsi(T.fUnicode)=T.fAnsi);  ==> Failed at:3315, here T.fUnicode is 'a'#0'b'#0'c'#0'd'#0'e'#0#$E9#0'e'#0'f'#0#$E0#0#$E9#0#0#0#0#0#$A8#0#0, T.fAnsi is 'abcdeéefàé'

    s := T.GetSQLSet;
    Check(s='Int=0, Test='''+T.Test+''', Unicode='''+T.Test+
      ''', Ansi='''+T.Test+''', ValFloat=3.141592653, ValWord=1203, '+
      'ValDate=''2009-03-10T21:19:36'', Next=0'{$ifdef USEVARIANTS}+
      ', ValVariant=''3.1416'''{$endif});  ==>Failed at:3324, s is 'Int=0, Test=''abcde茅ef脿茅'', Unicode=''abcde茅ef脿茅'', Ansi=''abcde茅ef脿茅'', ValFloat=3.141592653, ValWord=1203, ValDate=''2009-03-10T21:19:36'', Next=0'

    s := T.GetSQLValues;
    Check(Hash32(s)=$2D344A5E);  ==>Failed at 3329: s is 'Int,Test,Unicode,Ansi,ValFloat,ValWord,ValDate,Next VALUES (0,''abcde茅ef脿茅'',''abcde茅ef脿茅'',''abcde茅ef脿茅'',3.141592653,1203,''2009-03-10T21:19:36'',0)'

    s := T.GetJSONValues(false,true,soSelect);
    Check(s='{"fieldCount":10,"values":["RowID","Int","Test","Unicode","Ansi",'+
      '"ValFloat","ValWord","ValDate","Next"'{$ifdef USEVARIANTS}+
      ',"ValVariant"'{$endif}+',0,0,"'+T.Test+'","'+
      T.Test+'","'+T.Test+'",3.141592653,1203,"2009-03-10T21:19:36",0,'
      {$ifdef USEVARIANTS}+'3.1416'{$endif}+']}');  ==> Falied at 3331: s is '{"fieldCount":9,"values":["RowID","Int","Test","Unicode","Ansi","ValFloat","ValWord","ValDate","Next",0,0,"abcde茅ef脿茅","abcde茅ef脿茅","abcde茅ef脿茅",3.141592653,1203,"2009-03-10T21:19:36",0]}'

    s := ObjectToJSON(T);
    Check(s='{"ID":10,"Int":0,"Test":"'+T.Test+'","Unicode":"'+T.Test+
      '","Ansi":"'+T.Test+'","ValFloat":3.141592653,"ValWord":1203,'+
      '"ValDate":"2009-03-10T21:19:36","Next":0,"Data":""'{$ifdef USEVARIANTS}
        +',"ValVariant":3.1416'{$endif}+'}');  ==Failed at 3351:  s is '{"ID":10,"Int":0,"Test":"abcde茅ef脿茅","Unicode":"abcde茅ef脿茅","Ansi":"abcde茅ef脿茅","ValFloat":3.141592653,"ValWord":1203,"ValDate":"2009-03-10T21:19:36","Next":0,"Data":""}'

    T.Int := 1234567890123456;
    s := T.GetJSONValues(true,true,soSelect);
    Check(s='{"RowID":10,"Int":1234567890123456,"Test":"'+T.Test+'","Unicode":"'+T.Test+
      '","Ansi":"'+T.Test+'","ValFloat":3.141592653,"ValWord":1203,'+
      '"ValDate":"2009-03-10T21:19:36","Next":0,"ValVariant":3.1416}');  ==> Failed at 3363: s is '{"RowID":10,"Int":1234567890123456,"Test":"abcde茅ef脿茅","Unicode":"abcde茅ef脿茅","Ansi":"abcde茅ef脿茅","ValFloat":3.141592653,"ValWord":1203,"ValDate":"2009-03-10T21:19:36","Next":0}'

    s := T.GetJSONValues(true,true,soSelect);
    Check(s='{"RowID":10,"Int":1234567890123456,"Test":"'+T.Test+'","Unicode":"'+T.Test+
      '","Ansi":"'+T.Test+'","ValFloat":3.141592653,"ValWord":1203,'+
      '"ValDate":"2009-03-10T21:19:36","Next":0'{$ifdef USEVARIANTS}
      +',"ValVariant":"'+T.Test+'"'{$endif}+'}');  == Failed at: 3376, s is '{"RowID":10,"Int":1234567890123456,"Test":"abcde茅ef脿茅","Unicode":"abcde茅ef脿茅","Ansi":"abcde茅ef脿茅","ValFloat":3.141592653,"ValWord":1203,"ValDate":"2009-03-10T21:19:36","Next":0}'

    s := T.GetSQLSet;
    Check(s='Int=1234567890123456, Test='''+T.Test+''', Unicode='''+T.Test+
      ''', Ansi='''+T.Test+''', ValFloat=3.141592653, ValWord=1203, '+
      'ValDate=''2009-03-10T21:19:36'', Next=0'{$ifdef USEVARIANTS}+
      ', ValVariant='''+T.Test+''''{$endif});  ==> Failed at 3381, s is 'Int=1234567890123456, Test=''abcde茅ef脿茅'', Unicode=''abcde茅ef脿茅'', Ansi=''abcde茅ef脿茅'', ValFloat=3.141592653, ValWord=1203, ValDate=''2009-03-10T21:19:36'', Next=0'

Offline

#4 2013-01-04 12:31:47

mingda
Member
Registered: 2013-01-04
Posts: 121

Re: some TestSQL3 not pass

!  - Mocks and stubs: 1 / 30,031 FAILED  115.39ms

When run TestSQL3 from IDE, Mocks and stubs will all pass, but if run TestSQL3 not from IDE, then 1 FAILED, not know where it occur.

Offline

#5 2013-01-04 12:36:47

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

Re: some TestSQL3 not pass

mingda wrote:

!  - Mocks and stubs: 1 / 30,031 FAILED  115.39ms

When run TestSQL3 from IDE, Mocks and stubs will all pass, but if run TestSQL3 not from IDE, then 1 FAILED, not know where it occur.

This one is common to current implementation.
I've something to fix here.

About ValVariant missing field, it is strange, since I'm not able to reproduce it.
Are you sure you retrieved the latest version from http://synopse.info/fossil - see http://synopse.info/fossil/wiki?name=Get+the+source ?
Are you sure you did not define the LVCL conditional?
If have fixed LVCL expectation by http://synopse.info/fossil/info/5dc09927e3

Other problems comes directly from the fact that the system is MBCS, so ANSI functions are not consistent, and regression tests fail.

Online

#6 2013-01-04 13:15:24

mingda
Member
Registered: 2013-01-04
Posts: 121

Re: some TestSQL3 not pass

<<About ValVariant missing field, it is strange, since I'm not able to reproduce it.
Are you sure you retrieved the latest version from http://synopse.info/fossil - see http://synopse.info/fossil/wiki?name=Get+the+source ?>>

Yes, I get the latest version, from 2013-01-03 [2a15d8630c], Just download from 2013-01-04 [5dc09927e3], test result is same.

<<Are you sure you did not define the LVCL conditional?>>
Yes, Just download and Extract File, not change anything.

<<Other problems comes directly from the fact that the system is MBCS, so ANSI functions are not consistent, and regression tests fail.>>

So this will not affect the real application, we can ignore these?

Offline

#7 2013-01-04 13:56:51

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

Re: some TestSQL3 not pass

mingda wrote:

<<Are you sure you did not define the LVCL conditional?>>
Yes, Just download and Extract File, not change anything.

LVCL should NOT be defined, nor available in the library path, unless you need it (only for Delphi 6 or 7).

mingda wrote:

So this will not affect the real application, we can ignore these?

Yes, you can.

Online

#8 2013-01-05 12:05:30

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

Re: some TestSQL3 not pass

ab wrote:
mingda wrote:

!  - Mocks and stubs: 1 / 30,031 FAILED  115.39ms

When run TestSQL3 from IDE, Mocks and stubs will all pass, but if run TestSQL3 not from IDE, then 1 FAILED, not know where it occur.

This one is common to current implementation.
I've something to fix here.

Fixed by http://synopse.info/fossil/info/3f8f2ae935
Thanks for the report.

Online

#9 2013-01-06 01:09:52

mingda
Member
Registered: 2013-01-04
Posts: 121

Re: some TestSQL3 not pass

Thank you very much, download and confirm Mocks and stubs is passed. Very Excellent!

Offline

Board footer

Powered by FluxBB