Browse Source

bc math tests from testfest 2009

PHP-5.2.1RC1
Zoe Slattery 17 years ago
parent
commit
ffa06648fd
  1. 12
      ext/bcmath/tests/bcdiv_error1.phpt
  2. 11
      ext/bcmath/tests/bcdiv_error2.phpt
  3. 11
      ext/bcmath/tests/bcmod_error1.phpt
  4. 11
      ext/bcmath/tests/bcpowmod_error1.phpt
  5. 11
      ext/bcmath/tests/bcpowmod_error2.phpt
  6. 11
      ext/bcmath/tests/bcpowmod_error3.phpt
  7. 11
      ext/bcmath/tests/bcsqrt_error1.phpt

12
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

11
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: Wrong parameter count for bcdiv() in %s.php on line %d

11
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: Wrong parameter count for bcmod() in %s.php on line %d

11
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

11
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

11
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

11
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
Loading…
Cancel
Save