summaryrefslogtreecommitdiff
path: root/ext/bcmath/tests/bccomp_variation002.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bcmath/tests/bccomp_variation002.phpt')
-rw-r--r--ext/bcmath/tests/bccomp_variation002.phpt16
1 files changed, 16 insertions, 0 deletions
diff --git a/ext/bcmath/tests/bccomp_variation002.phpt b/ext/bcmath/tests/bccomp_variation002.phpt
new file mode 100644
index 0000000000..73fbc82179
--- /dev/null
+++ b/ext/bcmath/tests/bccomp_variation002.phpt
@@ -0,0 +1,16 @@
+--TEST--
+bccomp() with negative value
+--SKIPIF--
+<?php if(!extension_loaded("bcmath")) print "skip"; ?>
+--INI--
+bcmath.scale=0
+--FILE--
+<?php
+echo bccomp("-2", "-2")."\n";
+echo bccomp("-2", "2", "1")."\n";
+echo bccomp("-2.29", "-2.3", "2");
+?>
+--EXPECTF--
+0
+-1
+1 \ No newline at end of file