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

1.1       misho       1: --TEST--
                      2: gmp_sub() tests
                      3: --SKIPIF--
                      4: <?php if (!extension_loaded("gmp")) print "skip"; ?>
                      5: --FILE--
                      6: <?php
                      7: 
                      8: var_dump(gmp_sub());
                      9: var_dump(gmp_sub(""));
                     10: var_dump(gmp_sub("", ""));
                     11: var_dump(gmp_sub("", "", ""));
                     12: var_dump(gmp_sub(array(), array()));
                     13: 
                     14: var_dump($g = gmp_sub(10000, 10001));
                     15: var_dump(gmp_strval($g));
                     16: var_dump($g = gmp_sub(10000, -1));
                     17: var_dump(gmp_strval($g));
                     18: var_dump($g = gmp_sub(10000, new stdclass));
                     19: var_dump(gmp_strval($g));
                     20: var_dump($g = gmp_sub(new stdclass, 100));
                     21: var_dump(gmp_strval($g));
                     22: 
                     23: echo "Done\n";
                     24: ?>
                     25: --EXPECTF--    
                     26: Warning: gmp_sub() expects exactly 2 parameters, 0 given in %s on line %d
                     27: NULL
                     28: 
                     29: Warning: gmp_sub() expects exactly 2 parameters, 1 given in %s on line %d
                     30: NULL
                     31: bool(false)
                     32: 
                     33: Warning: gmp_sub() expects exactly 2 parameters, 3 given in %s on line %d
                     34: NULL
                     35: 
                     36: Warning: gmp_sub(): Unable to convert variable to GMP - wrong type in %s on line %d
                     37: bool(false)
                     38: resource(%d) of type (GMP integer)
                     39: string(2) "-1"
                     40: resource(%d) of type (GMP integer)
                     41: string(5) "10001"
                     42: 
                     43: Warning: gmp_sub(): Unable to convert variable to GMP - wrong type in %s on line %d
                     44: bool(false)
                     45: string(1) "0"
                     46: 
                     47: Warning: gmp_sub(): Unable to convert variable to GMP - wrong type in %s on line %d
                     48: bool(false)
                     49: string(1) "0"
                     50: Done

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