diff --git a/ext/bcmath/tests/bcadd_error1.phpt b/ext/bcmath/tests/bcadd_error1.phpt new file mode 100644 index 00000000000..c7d526eec74 --- /dev/null +++ b/ext/bcmath/tests/bcadd_error1.phpt @@ -0,0 +1,12 @@ +--TEST-- +bcadd() incorrect argument count +--SKIPIF-- + +--INI-- +bcmath.scale=0 +--FILE-- + +--EXPECTF-- +Warning: bcadd() expects at least 2 parameters, 0 given in %s on line %d \ No newline at end of file diff --git a/ext/bcmath/tests/bcadd_variation001.phpt b/ext/bcmath/tests/bcadd_variation001.phpt new file mode 100644 index 00000000000..a0a64f63433 --- /dev/null +++ b/ext/bcmath/tests/bcadd_variation001.phpt @@ -0,0 +1,16 @@ +--TEST-- +bcadd() with non-integers +--SKIPIF-- + +--INI-- +bcmath.scale=5 +--FILE-- + +--EXPECTF-- +6.50 +-5.1 +3.03000 \ No newline at end of file diff --git a/ext/bcmath/tests/bccomp_variation001.phpt b/ext/bcmath/tests/bccomp_variation001.phpt new file mode 100644 index 00000000000..456f235ef78 --- /dev/null +++ b/ext/bcmath/tests/bccomp_variation001.phpt @@ -0,0 +1,16 @@ +--TEST-- +bccomp() with non-integers +--SKIPIF-- + +--INI-- +bcmath.scale=0 +--FILE-- + +--EXPECTF-- +0 +1 +-1 \ No newline at end of file diff --git a/ext/bcmath/tests/bccomp_variation002.phpt b/ext/bcmath/tests/bccomp_variation002.phpt new file mode 100644 index 00000000000..73fbc82179d --- /dev/null +++ b/ext/bcmath/tests/bccomp_variation002.phpt @@ -0,0 +1,16 @@ +--TEST-- +bccomp() with negative value +--SKIPIF-- + +--INI-- +bcmath.scale=0 +--FILE-- + +--EXPECTF-- +0 +-1 +1 \ No newline at end of file diff --git a/ext/bcmath/tests/bcmod_error2.phpt b/ext/bcmath/tests/bcmod_error2.phpt new file mode 100644 index 00000000000..bac49c8e920 --- /dev/null +++ b/ext/bcmath/tests/bcmod_error2.phpt @@ -0,0 +1,12 @@ +--TEST-- +bcmod() - mod by 0 +--SKIPIF-- + +--INI-- +bcmath.scale=0 +--FILE-- + +--EXPECTF-- +Warning: bcmod(): Division by zero in %s on line %d \ No newline at end of file diff --git a/ext/bcmath/tests/bcmul_error1.phpt b/ext/bcmath/tests/bcmul_error1.phpt new file mode 100644 index 00000000000..ec366336c2a --- /dev/null +++ b/ext/bcmath/tests/bcmul_error1.phpt @@ -0,0 +1,12 @@ +--TEST-- +bcmul() incorrect argument count +--SKIPIF-- + +--INI-- +bcmath.scale=0 +--FILE-- + +--EXPECTF-- +Warning: bcmul() expects at least 2 parameters, 0 given in %s on line %d \ No newline at end of file diff --git a/ext/bcmath/tests/bcpow_error3.phpt b/ext/bcmath/tests/bcpow_error3.phpt new file mode 100644 index 00000000000..4b937a180bd --- /dev/null +++ b/ext/bcmath/tests/bcpow_error3.phpt @@ -0,0 +1,12 @@ +--TEST-- +bcpow() incorrect argument count +--SKIPIF-- + +--INI-- +bcmath.scale=0 +--FILE-- + +--EXPECTF-- +Warning: bcpow() expects at least 2 parameters, 0 given in %s on line %d \ No newline at end of file diff --git a/ext/bcmath/tests/bcpow_variation001.phpt b/ext/bcmath/tests/bcpow_variation001.phpt new file mode 100644 index 00000000000..58e96b3c66a --- /dev/null +++ b/ext/bcmath/tests/bcpow_variation001.phpt @@ -0,0 +1,12 @@ +--TEST-- +bcpow() with a negative exponent +--SKIPIF-- + +--INI-- +bcmath.scale=0 +--FILE-- + +--EXPECTF-- +0 \ No newline at end of file diff --git a/ext/bcmath/tests/bcpowmod.phpt b/ext/bcmath/tests/bcpowmod.phpt new file mode 100644 index 00000000000..6b1f30e5770 --- /dev/null +++ b/ext/bcmath/tests/bcpowmod.phpt @@ -0,0 +1,16 @@ +--TEST-- +bcpowmod() - Raise an arbitrary precision number to another, reduced by a specified modulus +--SKIPIF-- + +--INI-- +bcmath.scale=0 +--FILE-- + +--EXPECT-- +4 +-4 +790 \ No newline at end of file diff --git a/ext/bcmath/tests/bcscale_variation001.phpt b/ext/bcmath/tests/bcscale_variation001.phpt new file mode 100644 index 00000000000..8b161e926f4 --- /dev/null +++ b/ext/bcmath/tests/bcscale_variation001.phpt @@ -0,0 +1,14 @@ +--TEST-- +bcscale() with negative argument +--SKIPIF-- + +--INI-- +bcmath.scale=0 +--FILE-- + +--EXPECTF-- +Notice: bcscale(): Invalid scale given, using zero in %s on line %d +5 \ No newline at end of file diff --git a/ext/bcmath/tests/bcscale_variation002.phpt b/ext/bcmath/tests/bcscale_variation002.phpt new file mode 100644 index 00000000000..0db6cff9f28 --- /dev/null +++ b/ext/bcmath/tests/bcscale_variation002.phpt @@ -0,0 +1,12 @@ +--TEST-- +bcadd() incorrect argument count +--SKIPIF-- + +--INI-- +bcmath.scale=-2 +--FILE-- + +--EXPECTF-- +3 \ No newline at end of file diff --git a/ext/bcmath/tests/bcsqrt_error2.phpt b/ext/bcmath/tests/bcsqrt_error2.phpt new file mode 100644 index 00000000000..c52e2f3cf5e --- /dev/null +++ b/ext/bcmath/tests/bcsqrt_error2.phpt @@ -0,0 +1,12 @@ +--TEST-- +bcsqrt() incorrect argument count +--SKIPIF-- + +--INI-- +bcmath.scale=0 +--FILE-- + +--EXPECTF-- +Warning: bcsqrt() expects at least 1 parameter, 0 given in %s on line %d \ No newline at end of file diff --git a/ext/bcmath/tests/bcsqrt_variation001.phpt b/ext/bcmath/tests/bcsqrt_variation001.phpt new file mode 100644 index 00000000000..5e9ec1edb98 --- /dev/null +++ b/ext/bcmath/tests/bcsqrt_variation001.phpt @@ -0,0 +1,12 @@ +--TEST-- +bcsqrt() with argument of 0 +--SKIPIF-- + +--INI-- +bcmath.scale=0 +--FILE-- + +--EXPECTF-- +0 \ No newline at end of file diff --git a/ext/bcmath/tests/bcsub_error1.phpt b/ext/bcmath/tests/bcsub_error1.phpt new file mode 100644 index 00000000000..51c020e785e --- /dev/null +++ b/ext/bcmath/tests/bcsub_error1.phpt @@ -0,0 +1,12 @@ +--TEST-- +bcsub() incorrect argument count +--SKIPIF-- + +--INI-- +bcmath.scale=0 +--FILE-- + +--EXPECTF-- +Warning: bcsub() expects at least 2 parameters, 0 given in %s on line %d \ No newline at end of file