summaryrefslogtreecommitdiff
path: root/ext/bcmath/tests
diff options
context:
space:
mode:
authorEdgar R. Sandi <edgar.r.sandi@gmail.com>2017-03-26 14:16:29 -0300
committerNikita Popov <nikita.ppv@gmail.com>2017-03-27 18:48:58 +0200
commit0608761438bc04d2db45c702b1774a6fe1c8eca6 (patch)
treeb3fe955217c7dce829ab439234d4ace778a65853 /ext/bcmath/tests
parent33ee02252508aaaad3f6328fbbe2512ff2c1b28e (diff)
downloadphp-git-0608761438bc04d2db45c702b1774a6fe1c8eca6.tar.gz
Increased bcmath functions coverage tests using scale option parameter
Diffstat (limited to 'ext/bcmath/tests')
-rw-r--r--ext/bcmath/tests/bcmul.phpt2
-rw-r--r--ext/bcmath/tests/bcpow.phpt2
-rw-r--r--ext/bcmath/tests/bcsqrt.phpt2
-rw-r--r--ext/bcmath/tests/bcsub.phpt2
4 files changed, 8 insertions, 0 deletions
diff --git a/ext/bcmath/tests/bcmul.phpt b/ext/bcmath/tests/bcmul.phpt
index 0ff322fe32..20893552da 100644
--- a/ext/bcmath/tests/bcmul.phpt
+++ b/ext/bcmath/tests/bcmul.phpt
@@ -10,9 +10,11 @@ echo bcmul("1", "2"),"\n";
echo bcmul("-3", "5"),"\n";
echo bcmul("1234567890", "9876543210"),"\n";
echo bcmul("2.5", "1.5", 2),"\n";
+echo bcmul("2.555", "1.555", 2),"\n";
?>
--EXPECT--
2
-15
12193263111263526900
3.75
+3.97
diff --git a/ext/bcmath/tests/bcpow.phpt b/ext/bcmath/tests/bcpow.phpt
index bdd4e08cab..141ec61d92 100644
--- a/ext/bcmath/tests/bcpow.phpt
+++ b/ext/bcmath/tests/bcpow.phpt
@@ -9,8 +9,10 @@ bcmath.scale=0
echo bcpow("1", "2"),"\n";
echo bcpow("-2", "5", 4),"\n";
echo bcpow("2", "64"),"\n";
+echo bcpow("-2.555", "5", 2),"\n";
?>
--EXPECT--
1
-32
18446744073709551616
+-108.88
diff --git a/ext/bcmath/tests/bcsqrt.phpt b/ext/bcmath/tests/bcsqrt.phpt
index 46d92fd5ed..9f4a8ec6a5 100644
--- a/ext/bcmath/tests/bcsqrt.phpt
+++ b/ext/bcmath/tests/bcsqrt.phpt
@@ -7,8 +7,10 @@ bcmath.scale=0
--FILE--
<?php
echo bcsqrt("9"),"\n";
+echo bcsqrt("9.444", 2),"\n";
echo bcsqrt("1928372132132819737213", 5),"\n";
?>
--EXPECT--
3
+3.07
43913234134.28826
diff --git a/ext/bcmath/tests/bcsub.phpt b/ext/bcmath/tests/bcsub.phpt
index 71726492f7..8d85d23233 100644
--- a/ext/bcmath/tests/bcsub.phpt
+++ b/ext/bcmath/tests/bcsub.phpt
@@ -8,9 +8,11 @@ bcmath.scale=0
<?php
echo bcsub("1", "2"),"\n";
echo bcsub("-1", "5", 4),"\n";
+echo bcsub("1.555", "2.555", 2),"\n";
echo bcsub("8728932001983192837219398127471", "1928372132132819737213", 2),"\n";
?>
--EXPECT--
-1
-6.0000
+-1.00
8728932000054820705086578390258.00