com php-src: Increased bcmath functions coverage tests using scale option parameter: ext/bcmath/tests/bcmul.phpt ext/bcmath/tests/bcpow.phpt ext/bcmath/tests/bcsqrt.phpt ext/bcmath/tests/bcsub.phpt

[email protected] (Nikita Popov)
Newsgroups php.cvs
Message-ID <[email protected]>
Commit:    0608761438bc04d2db45c702b1774a6fe1c8eca6
Author:    Edgar R. Sandi <[email protected]>         Sun, 26 Mar 2017 14:16:29 -0300
Committer: Nikita Popov <[email protected]>      Mon, 27 Mar 2017 18:48:58 +0200
Parents:   33ee02252508aaaad3f6328fbbe2512ff2c1b28e
Branches:  master

Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=0608761438bc04d2db45c702b1774a6fe1c8eca6

Log:
Increased bcmath functions coverage tests using scale option parameter

Changed paths:
  M  ext/bcmath/tests/bcmul.phpt
  M  ext/bcmath/tests/bcpow.phpt
  M  ext/bcmath/tests/bcsqrt.phpt
  M  ext/bcmath/tests/bcsub.phpt


Diff:
diff --git a/ext/bcmath/tests/bcmul.phpt b/ext/bcmath/tests/bcmul.phpt
index 0ff322f..2089355 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 bdd4e08..141ec61 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 46d92fd..9f4a8ec 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 7172649..8d85d23 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.