Bugzilla – Attachment 116336 Details for
Bug 27630
TestBuilder real number formatting is different to DBI(x)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27630: Add tests
Bug-27630-Add-tests.patch (text/plain), 1.64 KB, created by
Lari Taskula
on 2021-02-04 19:41:13 UTC
(
hide
)
Description:
Bug 27630: Add tests
Filename:
MIME Type:
Creator:
Lari Taskula
Created:
2021-02-04 19:41:13 UTC
Size:
1.64 KB
patch
obsolete
>From cb990f41d37ddb017ea7902c90a0beddc6afa44d Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@hypernova.fi> >Date: Thu, 4 Feb 2021 19:35:02 +0000 >Subject: [PATCH] Bug 27630: Add tests > >To test: >1. prove t/db_dependent/TestBuilder.t >2. Observe failing test > >t/db_dependent/TestBuilder.t .. 3/13 > Failed test 'There can be more decimals when the column size allows it.' > at t/db_dependent/TestBuilder.t line 101. > got: '67631.42' > expected: '67631.420000' > Looks like you failed 1 test of 4. > >Sponsored-by: The National Library of Finland >--- > t/db_dependent/TestBuilder.t | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/TestBuilder.t b/t/db_dependent/TestBuilder.t >index e2fbba7a9b..ddfd7e7a10 100755 >--- a/t/db_dependent/TestBuilder.t >+++ b/t/db_dependent/TestBuilder.t >@@ -84,7 +84,7 @@ subtest 'Build all sources' => sub { > > > subtest 'Test length of some generated fields' => sub { >- plan tests => 3; >+ plan tests => 4; > > # Test the length of a returned character field > my $bookseller = $builder->build({ source => 'Aqbookseller' }); >@@ -96,6 +96,11 @@ subtest 'Test length of some generated fields' => sub { > > my $item = $builder->build({ source => 'Item' }); > is( $item->{replacementprice}, sprintf("%.2f", $item->{replacementprice}), "The number of decimals for floats should not be more than 2" ); >+ my $accountline = $builder->build({ source => 'Accountline' }); >+ is( $accountline->{amountoutstanding}, >+ sprintf("%.6f", $accountline->{amountoutstanding}), >+ "There can be more decimals when the column size allows it." ); >+ > }; > > >-- >2.17.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27630
:
116336
|
116337
|
116340
|
116342
|
116426
|
116427
|
116440
|
116441