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

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

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