Annotation of embedaddon/php/ext/standard/tests/math/floor_error.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test floor() - error conditions - incorrect number of args
                      3: --FILE--
                      4: <?php
                      5: /* Prototype  : float floor  ( float $value  )
                      6:  * Description: Round fractions down.
                      7:  * Source code: ext/standard/math.c
                      8:  */
                      9: 
                     10: echo "*** Testing floor() :  error conditions ***\n";
                     11: $arg_0 = 1.0;
                     12: $extra_arg = 1;
                     13: 
                     14: echo "\n-- Too many arguments --\n";
                     15: var_dump(floor($arg_0, $extra_arg));
                     16: 
                     17: echo "\n-- Too few arguments --\n";
                     18: var_dump(floor());
                     19: ?>
                     20: ===Done===
                     21: --EXPECTF--
                     22: *** Testing floor() :  error conditions ***
                     23: 
                     24: -- Too many arguments --
                     25: 
                     26: Warning: floor() expects exactly 1 parameter, 2 given in %s on line %d
                     27: NULL
                     28: 
                     29: -- Too few arguments --
                     30: 
                     31: Warning: floor() expects exactly 1 parameter, 0 given in %s on line %d
                     32: NULL
                     33: ===Done===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>