[Koha-bugs] [Bug 27630] TestBuilder real number formatting is different to DBI(x)
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Feb 5 18:48:39 CET 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27630
Lari Taskula <lari.taskula at hypernova.fi> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #116336|0 |1
is obsolete| |
--- Comment #8 from Lari Taskula <lari.taskula at hypernova.fi> ---
Created attachment 116426
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116426&action=edit
Bug 27630: Add tests
This proves different behavior between floats and decimals for values
built by TestBuilder vs values returned by DBI/DBIx.
To test:
1. prove t/db_dependent/TestBuilder.t
2. Observe failure
Subtest: _gen_real formatting
1..4
not ok 1 - There can be more decimals when the column size allows it.
Failed test 'There can be more decimals when the column size allows
it.'
at t/db_dependent/TestBuilder.t line 112.
got: '10.10'
expected: '10.100000'
not ok 2 - decimal - Builder builds same format as DBIx returns.
Failed test 'decimal - Builder builds same format as DBIx returns.'
at t/db_dependent/TestBuilder.t line 118.
got: '10.10'
expected: '10.100000'
not ok 3 - float - Builder builds same precision as DBIx returns.
Failed test 'float - Builder builds same precision as DBIx returns.'
at t/db_dependent/TestBuilder.t line 124.
got: '10.10'
expected: '10.1'
not ok 4 - double - Builder builds same precision as DBIx returns.
Failed test 'double - Builder builds same precision as DBIx
returns.'
at t/db_dependent/TestBuilder.t line 131.
got: '10.10'
expected: '10.1'
Looks like you failed 4 tests of 4.
not ok 4 - _gen_real formatting
Failed test '_gen_real formatting'
Sponsored-by: The National Library of Finland
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list