Annotation of embedaddon/php/ext/standard/tests/math/srand_error.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test srand() function :  error conditions - incorrect number of args
        !             3: --FILE--
        !             4: <?php
        !             5: /* Prototype  : void srand  ([ int $seed  ] )
        !             6:  * Description: Seed the random number generator.
        !             7:  * Source code: ext/standard/rand.c
        !             8:  */
        !             9:  
        !            10: /*
        !            11:  * Pass incorrect number of arguments to srand() to test behaviour
        !            12:  */
        !            13:  
        !            14: echo "*** Testing srand() : error conditions ***\n";
        !            15: 
        !            16: var_dump(srand(500, true));
        !            17: var_dump(srand("fivehundred"));
        !            18: var_dump(srand("500ABC"));
        !            19: ?>
        !            20: ===Done===
        !            21: --EXPECTF--
        !            22: *** Testing srand() : error conditions ***
        !            23: 
        !            24: Warning: srand() expects at most 1 parameter, 2 given in %s on line %d
        !            25: NULL
        !            26: 
        !            27: Warning: srand() expects parameter 1 to be long, string given in %s on line %d
        !            28: NULL
        !            29: 
        !            30: Notice: A non well formed numeric value encountered in %s on line %d
        !            31: NULL
        !            32: ===Done===

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