diff options
| author | Ondřej Surý <ondrej@sury.org> | 2010-01-07 13:31:53 +0100 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2010-01-07 13:31:53 +0100 |
| commit | 0fab6db7cac8d2be99579dd049f812a8ff98e74f (patch) | |
| tree | 91f01b0d06916c78262404096bfd466b8e95e5b5 /ext/bcmath/tests | |
| parent | d3a8757891280dc6650ca7eead67830c794b0e7b (diff) | |
| download | php-upstream/5.3.1.tar.gz | |
Imported Upstream version 5.3.1upstream/5.3.1
Diffstat (limited to 'ext/bcmath/tests')
| -rwxr-xr-x | ext/bcmath/tests/bcdiv_error1.phpt | 14 | ||||
| -rw-r--r-- | ext/bcmath/tests/bcdiv_error2.phpt | 13 | ||||
| -rw-r--r-- | ext/bcmath/tests/bcmod_error1.phpt | 13 | ||||
| -rwxr-xr-x | ext/bcmath/tests/bcpowmod_error1.phpt | 13 | ||||
| -rwxr-xr-x | ext/bcmath/tests/bcpowmod_error2.phpt | 13 | ||||
| -rw-r--r-- | ext/bcmath/tests/bcpowmod_error3.phpt | 13 | ||||
| -rwxr-xr-x | ext/bcmath/tests/bcsqrt_error1.phpt | 13 |
7 files changed, 92 insertions, 0 deletions
diff --git a/ext/bcmath/tests/bcdiv_error1.phpt b/ext/bcmath/tests/bcdiv_error1.phpt new file mode 100755 index 000000000..c69d36bb9 --- /dev/null +++ b/ext/bcmath/tests/bcdiv_error1.phpt @@ -0,0 +1,14 @@ +--TEST-- +bcdiv — Divide two arbitrary precision numbers +--CREDITS-- +TestFest2009 +Antoni Torrents +antoni@solucionsinternet.com +--SKIPIF-- +<?php if(!extension_loaded("bcmath")) print "skip"; ?> +--FILE-- +<?php +echo bcdiv('10.99', '0'); +?> +--EXPECTF-- +Warning: bcdiv(): Division by zero in %s.php on line %d diff --git a/ext/bcmath/tests/bcdiv_error2.phpt b/ext/bcmath/tests/bcdiv_error2.phpt new file mode 100644 index 000000000..a90c79e45 --- /dev/null +++ b/ext/bcmath/tests/bcdiv_error2.phpt @@ -0,0 +1,13 @@ +--TEST-- +bcdiv — Divide two arbitrary precision numbers +--CREDITS-- +Antoni Torrents +antoni@solucionsinternet.com +--SKIPIF-- +<?php if(!extension_loaded("bcmath")) print "skip"; ?> +--FILE-- +<?php +echo bcdiv('1', '2', '3', '4'); +?> +--EXPECTF-- +Warning: bcdiv() expects at most 3 parameters, 4 given in %s.php on line %d diff --git a/ext/bcmath/tests/bcmod_error1.phpt b/ext/bcmath/tests/bcmod_error1.phpt new file mode 100644 index 000000000..e36dce285 --- /dev/null +++ b/ext/bcmath/tests/bcmod_error1.phpt @@ -0,0 +1,13 @@ +--TEST-- +bcmod — Get modulus of an arbitrary precision number +--CREDITS-- +Antoni Torrents +antoni@solucionsinternet.com +--SKIPIF-- +<?php if(!extension_loaded("bcmath")) print "skip"; ?> +--FILE-- +<?php +echo bcmod('1', '2', '3'); +?> +--EXPECTF-- +Warning: bcmod() expects exactly 2 parameters, 3 given in %s.php on line %d diff --git a/ext/bcmath/tests/bcpowmod_error1.phpt b/ext/bcmath/tests/bcpowmod_error1.phpt new file mode 100755 index 000000000..2dc292eb5 --- /dev/null +++ b/ext/bcmath/tests/bcpowmod_error1.phpt @@ -0,0 +1,13 @@ +--TEST-- +bcpowmod — Raise an arbitrary precision number to another, reduced by a specified modulus +--CREDITS-- +Antoni Torrents +antoni@solucionsinternet.com +--SKIPIF-- +<?php if(!extension_loaded("bcmath")) print "skip"; ?> +--FILE-- +<?php +echo bcpowmod('1'); +?> +--EXPECTF-- +Warning: bcpowmod() expects at least 3 parameters, 1 given in %s.php on line %d diff --git a/ext/bcmath/tests/bcpowmod_error2.phpt b/ext/bcmath/tests/bcpowmod_error2.phpt new file mode 100755 index 000000000..e0a99637c --- /dev/null +++ b/ext/bcmath/tests/bcpowmod_error2.phpt @@ -0,0 +1,13 @@ +--TEST-- +bcpowmod — Raise an arbitrary precision number to another, reduced by a specified modulus +--CREDITS-- +Antoni Torrents +antoni@solucionsinternet.com +--SKIPIF-- +<?php if(!extension_loaded("bcmath")) print "skip"; ?> +--FILE-- +<?php +echo bcpowmod('1', '2'); +?> +--EXPECTF-- +Warning: bcpowmod() expects at least 3 parameters, 2 given in %s.php on line %d diff --git a/ext/bcmath/tests/bcpowmod_error3.phpt b/ext/bcmath/tests/bcpowmod_error3.phpt new file mode 100644 index 000000000..c3f8df826 --- /dev/null +++ b/ext/bcmath/tests/bcpowmod_error3.phpt @@ -0,0 +1,13 @@ +--TEST-- +bcpowmod — Raise an arbitrary precision number to another, reduced by a specified modulus +--CREDITS-- +Antoni Torrents +antoni@solucionsinternet.com +--SKIPIF-- +<?php if(!extension_loaded("bcmath")) print "skip"; ?> +--FILE-- +<?php +echo bcpowmod('1', '2', '3', '4', '5'); +?> +--EXPECTF-- +Warning: bcpowmod() expects at most 4 parameters, 5 given in %s.php on line %d diff --git a/ext/bcmath/tests/bcsqrt_error1.phpt b/ext/bcmath/tests/bcsqrt_error1.phpt new file mode 100755 index 000000000..1f213dbc8 --- /dev/null +++ b/ext/bcmath/tests/bcsqrt_error1.phpt @@ -0,0 +1,13 @@ +--TEST-- +bcsqrt — Get the square root of an arbitrary precision number +--CREDITS-- +Antoni Torrents +antoni@solucionsinternet.com +--SKIPIF-- +<?php if(!extension_loaded("bcmath")) print "skip"; ?> +--FILE-- +<?php +echo bcsqrt('-9'); +?> +--EXPECTF-- +Warning: bcsqrt(): Square root of negative number in %s.php on line %d |
