Tests zum Number-Helper
authorSven Schöling <s.schoeling@googlemail.com>
Sat, 13 Apr 2019 08:54:23 +0000 (10:54 +0200)
committerSven Schöling <s.schoeling@googlemail.com>
Fri, 23 Oct 2020 18:08:26 +0000 (20:08 +0200)
aus odyn-ce cd783c51c4

t/helper/round.t [new file with mode: 0644]

diff --git a/t/helper/round.t b/t/helper/round.t
new file mode 100644 (file)
index 0000000..a4c2b5e
--- /dev/null
@@ -0,0 +1,18 @@
+use Test::More tests => 9;
+
+use lib 't';
+
+use SL::Helper::Number qw(:all);
+
+use_ok 'Support::TestSetup';
+
+Support::TestSetup::login();
+
+is(_round_number('3.231',2),'3.23');
+is(_round_number('3.234',2),'3.23');
+is(_round_number('3.235',2),'3.24');
+is(_round_number('5.786',2),'5.79');
+is(_round_number('2.342',2),'2.34');
+is(_round_number('1.2345',2),'1.23');
+is(_round_number('8.2345',2),'8.23');
+is(_round_number('8.2350',2),'8.24');