Annotation of embedaddon/php/ext/gmp/tests/027.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: gmp_sign() basic tests
                      3: --SKIPIF--
                      4: <?php if (!extension_loaded("gmp")) print "skip"; ?>
                      5: --FILE--
                      6: <?php
                      7: 
                      8: var_dump(gmp_sign(-1));
                      9: var_dump(gmp_sign(1));
                     10: var_dump(gmp_sign(0));
                     11: var_dump(gmp_sign("123718235123123"));
                     12: var_dump(gmp_sign("-34535345345"));
                     13: var_dump(gmp_sign("+34534573457345"));
                     14: $n = gmp_init("098909878976786545");
                     15: var_dump(gmp_sign($n));
                     16: var_dump(gmp_sign($n, $n));
                     17: var_dump(gmp_sign(array()));
                     18: var_dump(gmp_sign());
                     19: 
                     20: echo "Done\n";
                     21: ?>
                     22: --EXPECTF--    
                     23: int(-1)
                     24: int(1)
                     25: int(0)
                     26: int(1)
                     27: int(-1)
                     28: bool(false)
                     29: int(0)
                     30: 
                     31: Warning: gmp_sign() expects exactly 1 parameter, 2 given in %s on line %d
                     32: NULL
                     33: 
                     34: Warning: gmp_sign(): Unable to convert variable to GMP - wrong type in %s on line %d
                     35: bool(false)
                     36: 
                     37: Warning: gmp_sign() expects exactly 1 parameter, 0 given in %s on line %d
                     38: NULL
                     39: Done

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