Annotation of embedaddon/php/ext/gmp/tests/009.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: gmp_div_q() tests
        !             3: --SKIPIF--
        !             4: <?php if (!extension_loaded("gmp")) print "skip"; ?>
        !             5: --FILE--
        !             6: <?php
        !             7: 
        !             8: var_dump(gmp_div_q());
        !             9: var_dump(gmp_div_q(""));
        !            10: 
        !            11: var_dump($r = gmp_div_q(0,1));
        !            12: var_dump(gmp_strval($r));
        !            13: var_dump($r = gmp_div_q(1,0));
        !            14: var_dump($r = gmp_div_q(12653,23482734));
        !            15: var_dump(gmp_strval($r));
        !            16: var_dump($r = gmp_div_q(12653,23482734, 10));
        !            17: var_dump(gmp_strval($r));
        !            18: var_dump($r = gmp_div_q(1123123,123));
        !            19: var_dump(gmp_strval($r));
        !            20: var_dump($r = gmp_div_q(1123123,123, 1));
        !            21: var_dump(gmp_strval($r));
        !            22: var_dump($r = gmp_div_q(1123123,123, 2));
        !            23: var_dump(gmp_strval($r));
        !            24: var_dump($r = gmp_div_q(1123123,123, GMP_ROUND_ZERO));
        !            25: var_dump(gmp_strval($r));
        !            26: var_dump($r = gmp_div_q(1123123,123, GMP_ROUND_PLUSINF));
        !            27: var_dump(gmp_strval($r));
        !            28: var_dump($r = gmp_div_q(1123123,123, GMP_ROUND_MINUSINF));
        !            29: var_dump(gmp_strval($r));
        !            30: 
        !            31: $fp = fopen(__FILE__, 'r');
        !            32: 
        !            33: var_dump(gmp_div_q($fp, $fp));
        !            34: var_dump(gmp_div_q(array(), array()));
        !            35: 
        !            36: echo "Done\n";
        !            37: ?>
        !            38: --EXPECTF--    
        !            39: Warning: gmp_div_q() expects at least 2 parameters, 0 given in %s on line %d
        !            40: NULL
        !            41: 
        !            42: Warning: gmp_div_q() expects at least 2 parameters, 1 given in %s on line %d
        !            43: NULL
        !            44: resource(%d) of type (GMP integer)
        !            45: string(1) "0"
        !            46: 
        !            47: Warning: gmp_div_q(): Zero operand not allowed in %s on line %d
        !            48: bool(false)
        !            49: resource(%d) of type (GMP integer)
        !            50: string(1) "0"
        !            51: NULL
        !            52: 
        !            53: Warning: gmp_strval(): Unable to convert variable to GMP - wrong type in %s on line %d
        !            54: bool(false)
        !            55: resource(%d) of type (GMP integer)
        !            56: string(4) "9131"
        !            57: resource(%d) of type (GMP integer)
        !            58: string(4) "9132"
        !            59: resource(%d) of type (GMP integer)
        !            60: string(4) "9131"
        !            61: resource(%d) of type (GMP integer)
        !            62: string(4) "9131"
        !            63: resource(%d) of type (GMP integer)
        !            64: string(4) "9132"
        !            65: resource(%d) of type (GMP integer)
        !            66: string(4) "9131"
        !            67: 
        !            68: Warning: gmp_div_q(): supplied resource is not a valid GMP integer resource in %s on line %d
        !            69: bool(false)
        !            70: 
        !            71: Warning: gmp_div_q(): Unable to convert variable to GMP - wrong type in %s on line %d
        !            72: bool(false)
        !            73: Done

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