Revision 8c44628b
Von Sven Schöling vor etwa 4 Jahren hinzugefügt
t/helper/round.t | ||
---|---|---|
1 |
use Test::More tests => 9; |
|
2 |
|
|
3 |
use lib 't'; |
|
4 |
|
|
5 |
use SL::Helper::Number qw(:all); |
|
6 |
|
|
7 |
use_ok 'Support::TestSetup'; |
|
8 |
|
|
9 |
Support::TestSetup::login(); |
|
10 |
|
|
11 |
is(_round_number('3.231',2),'3.23'); |
|
12 |
is(_round_number('3.234',2),'3.23'); |
|
13 |
is(_round_number('3.235',2),'3.24'); |
|
14 |
is(_round_number('5.786',2),'5.79'); |
|
15 |
is(_round_number('2.342',2),'2.34'); |
|
16 |
is(_round_number('1.2345',2),'1.23'); |
|
17 |
is(_round_number('8.2345',2),'8.23'); |
|
18 |
is(_round_number('8.2350',2),'8.24'); |
Auch abrufbar als: Unified diff
Tests zum Number-Helper
aus odyn-ce cd783c51c4