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

1.1       misho       1: --TEST--
                      2: gmp_invert() basic tests
                      3: --SKIPIF--
                      4: <?php if (!extension_loaded("gmp")) print "skip"; ?>
                      5: --FILE--
                      6: <?php
                      7: 
                      8: var_dump(gmp_strval(gmp_invert(123123,5467624)));
                      9: var_dump(gmp_strval(gmp_invert(123123,"3333334345467624")));
                     10: var_dump(gmp_strval(gmp_invert("12312323213123123",7624)));
                     11: var_dump(gmp_strval(gmp_invert(444,0)));
                     12: var_dump(gmp_strval(gmp_invert(0,28347)));
                     13: var_dump(gmp_strval(gmp_invert(-12,456456)));
                     14: var_dump(gmp_strval(gmp_invert(234234,-435345)));
                     15: 
                     16: $n = gmp_init("349827349623423452345");
                     17: $n1 = gmp_init("3498273496234234523451");
                     18: 
                     19: var_dump(gmp_strval(gmp_invert($n, $n1)));
                     20: var_dump(gmp_strval(gmp_invert($n1, $n)));
                     21: 
                     22: var_dump(gmp_invert($n1, $n, 10));
                     23: var_dump(gmp_invert($n1));
                     24: var_dump(gmp_invert(array(), 1));
                     25: var_dump(gmp_invert(1, array()));
                     26: var_dump(gmp_invert(array(), array()));
                     27: 
                     28: echo "Done\n";
                     29: ?>
                     30: --EXPECTF--    
                     31: string(7) "2293131"
                     32: string(1) "0"
                     33: string(4) "5827"
                     34: string(1) "0"
                     35: string(1) "0"
                     36: string(1) "0"
                     37: string(1) "0"
                     38: string(22) "3498273496234234523441"
                     39: string(1) "1"
                     40: 
                     41: Warning: gmp_invert() expects exactly 2 parameters, 3 given in %s on line %d
                     42: NULL
                     43: 
                     44: Warning: gmp_invert() expects exactly 2 parameters, 1 given in %s on line %d
                     45: NULL
                     46: 
                     47: Warning: gmp_invert(): Unable to convert variable to GMP - wrong type in %s on line %d
                     48: bool(false)
                     49: 
                     50: Warning: gmp_invert(): Unable to convert variable to GMP - wrong type in %s on line %d
                     51: bool(false)
                     52: 
                     53: Warning: gmp_invert(): Unable to convert variable to GMP - wrong type in %s on line %d
                     54: bool(false)
                     55: Done

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