Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2010-09

Patch for test tstrreal4.pp (Issue 13722)

7 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

zeljko

Hi,
Test haven't passed, so I fixed problem (was in currency negative format). Changes:
1.Use clocale under UNIX so various locales can be tested 2.Don't hardcode DecimalSeparator, now it's as it is. 3.Fix test unexpected halt on NegCurrFormat in [0, 4] when there's no minus sign but brackets.

thanks
zeljko

Reply by email

Jonas Maebe
to zeljko
zeljko wrote 5 lines
Test haven't passed, so I fixed problem (was in currency negative format). Changes: 1.Use clocale under UNIX so various locales can be tested 2.Don't hardcode DecimalSeparator, now it's as it is.

That's not a good idea. Tests for different functionality should be separated into different tests, so that the it's clear what's broken when the test fails. Simply set decimalseparator to a particular value on startup if you wish to test the float->string conversion.

Jonas

Reply by email

Marco van de Voort
to zeljko: Test haven't passed, so I fixed problem (was in currency negative format). Changes: 1.Use…

In our previous episode, zeljko said:

Show quoted text 6 lines
Test haven't passed, so I fixed problem (was in currency negative format). Changes: 1.Use clocale under UNIX so various locales can be tested 2.Don't hardcode DecimalSeparator, now it's as it is. 3.Fix test unexpected halt on NegCurrFormat in [0, 4] when there's no minus sign but brackets.

Under Windows it still fails with this output:

D:\repo\fpc\tests\test>tstrreal4
0,001
0,00
0,00
-0,00001
-1,00000000000E-05
0,00
0,00
� 0,00
0
0,00000000000E+00
0,00
0,00
� 0,00
-0,00001
-1,00000000000E-0005
-0,00001
-0,00001
0,00001

D:\repo\fpc\tests\test>echo %ERRORLEVEL%
1

D:\repo\fpc\tests\test>

Reply by email

zeljko
to Marco van de Voort
Marco van de Voort wrote 9 lines
In our previous episode, zeljko said: > Test haven't passed, so I fixed problem (was in currency negative > format). Changes: > 1.Use clocale under UNIX so various locales can be tested > 2.Don't hardcode DecimalSeparator, now it's as it is. > 3.Fix test unexpected halt on NegCurrFormat in [0, 4] when there's no > minus sign but brackets. Under Windows it still fails with this output:

hm..now my question : What windows ?
I've just tested under Win 7 and everything is fine. Probably NegCurFormat is bad under some other WinXX.

zeljko

Reply by email

Marco van de Voort
to zeljko

In our previous episode, zeljko said:

Show quoted text 8 lines
> > 1.Use clocale under UNIX so various locales can be tested > > 2.Don't hardcode DecimalSeparator, now it's as it is. > > 3.Fix test unexpected halt on NegCurrFormat in [0, 4] when there's no > > minus sign but brackets. > > Under Windows it still fails with this output: hm..now my question : What windows ?

Win7/32 with FPC 2.5.1 built this morning(r15946) using Dutch locale.

Reply by email

zeljko
to Jonas Maebe: That's not a good idea. Tests for different functionality should be separated into…
Jonas Maebe wrote 11 lines
On 07 Sep 2010, at 14:05, zeljko wrote: > Test haven't passed, so I fixed problem (was in currency negative > format). > Changes: > 1.Use clocale under UNIX so various locales can be tested > 2.Don't hardcode DecimalSeparator, now it's as it is. That's not a good idea. Tests for different functionality should be separated into different tests, so that the it's clear what's broken when the test fails. Simply set decimalseparator to a particular value on startup if you wish to test the float->string conversion.

Ok, then I'll create new patch (anyway have to do so because it doesn't pass on win32 yet).

Reply by email

zeljko
to Marco van de Voort: In our previous episode, zeljko said: Under Windows it still fails with this output:…
Marco van de Voort wrote 9 lines
In our previous episode, zeljko said: > Test haven't passed, so I fixed problem (was in currency negative > format). Changes: > 1.Use clocale under UNIX so various locales can be tested > 2.Don't hardcode DecimalSeparator, now it's as it is. > 3.Fix test unexpected halt on NegCurrFormat in [0, 4] when there's no > minus sign but brackets. Under Windows it still fails with this output:

Another patch is attached.
1.Removed clocale, DecimalSeparator hardcoded to '.' as Jonas suggested. 2.Fixed problem when NegCurrFormat > 10 (need implementation).

zeljko

Reply by email