diff options
author | Zoe Slattery <zoe@php.net> | 2009-08-30 11:10:20 +0000 |
---|---|---|
committer | Zoe Slattery <zoe@php.net> | 2009-08-30 11:10:20 +0000 |
commit | d84163c639170b3a57f312f8f262360d72287238 (patch) | |
tree | 4490bd4398cd43e8c819ba974bebf7f008360a5a /ext/bcmath/tests | |
parent | c0c141d0cf67e759c4d64f1b9bbbafc8ec191a8e (diff) | |
download | php-git-d84163c639170b3a57f312f8f262360d72287238.tar.gz |
bc math tests from testfest 2009
Diffstat (limited to 'ext/bcmath/tests')
-rwxr-xr-x | ext/bcmath/tests/bcdiv_error1.phpt | 12 | ||||
-rw-r--r-- | ext/bcmath/tests/bcdiv_error2.phpt | 11 | ||||
-rw-r--r-- | ext/bcmath/tests/bcmod_error1.phpt | 11 | ||||
-rwxr-xr-x | ext/bcmath/tests/bcpowmod_error1.phpt | 11 | ||||
-rwxr-xr-x | ext/bcmath/tests/bcpowmod_error2.phpt | 11 | ||||
-rw-r--r-- | ext/bcmath/tests/bcpowmod_error3.phpt | 11 | ||||
-rwxr-xr-x | ext/bcmath/tests/bcsqrt_error1.phpt | 11 |
7 files changed, 78 insertions, 0 deletions
diff --git a/ext/bcmath/tests/bcdiv_error1.phpt b/ext/bcmath/tests/bcdiv_error1.phpt new file mode 100755 index 0000000000..823689a41b --- /dev/null +++ b/ext/bcmath/tests/bcdiv_error1.phpt @@ -0,0 +1,12 @@ +--TEST-- +bcdiv — Divide two arbitrary precision numbers +--CREDITS-- +TestFest2009 +Antoni Torrents +antoni@solucionsinternet.com +--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 0000000000..05e5fd2ee1 --- /dev/null +++ b/ext/bcmath/tests/bcdiv_error2.phpt @@ -0,0 +1,11 @@ +--TEST-- +bcdiv — Divide two arbitrary precision numbers +--CREDITS-- +Antoni Torrents +antoni@solucionsinternet.com +--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 0000000000..2a3f3e4cd0 --- /dev/null +++ b/ext/bcmath/tests/bcmod_error1.phpt @@ -0,0 +1,11 @@ +--TEST-- +bcmod — Get modulus of an arbitrary precision number +--CREDITS-- +Antoni Torrents +antoni@solucionsinternet.com +--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 0000000000..e6253fe431 --- /dev/null +++ b/ext/bcmath/tests/bcpowmod_error1.phpt @@ -0,0 +1,11 @@ +--TEST-- +bcpowmod — Raise an arbitrary precision number to another, reduced by a specified modulus +--CREDITS-- +Antoni Torrents +antoni@solucionsinternet.com +--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 0000000000..64b1e64de4 --- /dev/null +++ b/ext/bcmath/tests/bcpowmod_error2.phpt @@ -0,0 +1,11 @@ +--TEST-- +bcpowmod — Raise an arbitrary precision number to another, reduced by a specified modulus +--CREDITS-- +Antoni Torrents +antoni@solucionsinternet.com +--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 0000000000..87c5c5bcd5 --- /dev/null +++ b/ext/bcmath/tests/bcpowmod_error3.phpt @@ -0,0 +1,11 @@ +--TEST-- +bcpowmod — Raise an arbitrary precision number to another, reduced by a specified modulus +--CREDITS-- +Antoni Torrents +antoni@solucionsinternet.com +--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 0000000000..b02d6813b1 --- /dev/null +++ b/ext/bcmath/tests/bcsqrt_error1.phpt @@ -0,0 +1,11 @@ +--TEST-- +bcsqrt — Get the square root of an arbitrary precision number +--CREDITS-- +Antoni Torrents +antoni@solucionsinternet.com +--FILE-- +<?php +echo bcsqrt('-9'); +?> +--EXPECTF-- +Warning: bcsqrt(): Square root of negative number in %s.php on line %d |