From ffa06648fdb759e29ddaba5a3dde54faff912422 Mon Sep 17 00:00:00 2001 From: Zoe Slattery Date: Sun, 30 Aug 2009 11:10:20 +0000 Subject: [PATCH] bc math tests from testfest 2009 --- ext/bcmath/tests/bcdiv_error1.phpt | 12 ++++++++++++ ext/bcmath/tests/bcdiv_error2.phpt | 11 +++++++++++ ext/bcmath/tests/bcmod_error1.phpt | 11 +++++++++++ ext/bcmath/tests/bcpowmod_error1.phpt | 11 +++++++++++ ext/bcmath/tests/bcpowmod_error2.phpt | 11 +++++++++++ ext/bcmath/tests/bcpowmod_error3.phpt | 11 +++++++++++ ext/bcmath/tests/bcsqrt_error1.phpt | 11 +++++++++++ 7 files changed, 78 insertions(+) create mode 100755 ext/bcmath/tests/bcdiv_error1.phpt create mode 100644 ext/bcmath/tests/bcdiv_error2.phpt create mode 100644 ext/bcmath/tests/bcmod_error1.phpt create mode 100755 ext/bcmath/tests/bcpowmod_error1.phpt create mode 100755 ext/bcmath/tests/bcpowmod_error2.phpt create mode 100644 ext/bcmath/tests/bcpowmod_error3.phpt create mode 100755 ext/bcmath/tests/bcsqrt_error1.phpt 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-- + +--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..a6a2d2024c --- /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-- + +--EXPECTF-- +Warning: Wrong parameter count for bcdiv() 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..8fb65275b5 --- /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-- + +--EXPECTF-- +Warning: Wrong parameter count for bcmod() 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-- + +--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-- + +--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-- + +--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-- + +--EXPECTF-- +Warning: bcsqrt(): Square root of negative number in %s.php on line %d -- 2.40.0