Skip to content
This repository was archived by the owner on Dec 27, 2023. It is now read-only.

Commit 9840210

Browse files
committed
added missing scale tests
1 parent 38dc1f8 commit 9840210

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/Decimal/DecimalFromFloatTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public function floatProvider()
4747
[1.1234567890, "1.123456789"],
4848
[-1.1234567890, "-1.123456789"],
4949
[0.000001, "0.0000010"],
50+
[0.000001, "0.00", 2],
5051
[0.000001, "0.000001", null, !!'removeZeroes'],
5152
[90.05, "90.05"],
5253
];
@@ -60,10 +61,20 @@ public function floatProvider()
6061
1230123074129038740129734907810923874017283094.1,
6162
"1230123074129038665578332283019326242900934656.0000000000000000"
6263
];
64+
$tests[] = [
65+
1230123074129038740129734907810923874017283094.1,
66+
"1230123074129038665578332283019326242900934656",
67+
0
68+
];
6369
$tests[] = [
6470
0.0000000000000000000000000000000000000000000000123412351234,
6571
"0.0000000000000000000000000000000000000000000000123412351234",
6672
];
73+
$tests[] = [
74+
0.0000000000000000000000000000000000000000000000123412351234,
75+
"0.00",
76+
2
77+
];
6778
}
6879
return $tests;
6980
}

0 commit comments

Comments
 (0)