Annotation of embedaddon/php/ext/gmp/tests/010.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: gmp_mod tests()
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("gmp")) print "skip"; ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: var_dump(gmp_mod());
! 9: var_dump(gmp_mod(""));
! 10: var_dump(gmp_mod("",""));
! 11: var_dump(gmp_mod(0,1));
! 12: var_dump(gmp_mod(0,-1));
! 13: var_dump(gmp_mod(-1,0));
! 14:
! 15: var_dump(gmp_mod(array(), array()));
! 16:
! 17: $a = gmp_init("-100000000");
! 18: $b = gmp_init("353467");
! 19:
! 20: var_dump(gmp_mod($a, $b));
! 21:
! 22: echo "Done\n";
! 23: ?>
! 24: --EXPECTF--
! 25: Warning: gmp_mod() expects exactly 2 parameters, 0 given in %s on line %d
! 26: NULL
! 27:
! 28: Warning: gmp_mod() expects exactly 2 parameters, 1 given in %s on line %d
! 29: NULL
! 30: bool(false)
! 31: int(0)
! 32: resource(%d) of type (GMP integer)
! 33:
! 34: Warning: gmp_mod(): Zero operand not allowed in %s on line %d
! 35: bool(false)
! 36:
! 37: Warning: gmp_mod(): Unable to convert variable to GMP - wrong type in %s on line %d
! 38: bool(false)
! 39: resource(%d) of type (GMP integer)
! 40: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>