Annotation of embedaddon/php/ext/standard/tests/math/round_error.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test round() function : error conditions - incorrect number of args
3: --FILE--
4: <?php
5: /* Prototype : float round ( float $val [, int $precision ] )
6: * Description: Returns the rounded value of val to specified precision (number of digits
7: * after the decimal point)
8: * Source code: ext/standard/math.c
9: */
10:
11: /*
12: * Pass incorrect number of arguments to round() to test behaviour
13: */
14:
15: echo "*** Testing round() : error conditions ***\n";
16:
17: echo "\n-- Wrong nmumber of arguments --\n";
18: var_dump(round());
19: var_dump(round(500, 10, true));
20:
21: ?>
22: ===Done===
23: --EXPECTF--
24: *** Testing round() : error conditions ***
25:
26: -- Wrong nmumber of arguments --
27:
28: Warning: round() expects at least 1 parameter, 0 given in %s on line %d
29: NULL
30: float(500)
31: ===Done===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>