PHP  
 PHP_5_5
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/gmp/tests/022.phpt ('gmp_gcdext() basic tests')

Script

1: <?php
2:
3: $n 
gmp_init("34293864345");
4:
$n1 gmp_init("23434293864345");
5:
6:
$a = array(
7:     array(
123,45),
8:     array(
4341,9734),
9:     array(
23487,333),
10:     array(-
234234,-123123),
11:     array(-
100,-2234),
12:     array(
345,"34587345"),
13:     array(
345,"0"),
14:     array(
"345556456",345873),
15:     array(
"34545345556456","323432445873"),
16:     array(
$n$n1),
17:     );
18:
19: foreach (
$a as $val) {
20:     
$r gmp_gcdext($val[0],$val[1]);
21:     
var_dump(gmp_strval($r['g']));
22:     
var_dump(gmp_strval($r['s']));
23:     
var_dump(gmp_strval($r['t']));
24: }
25:
26:
var_dump(gmp_gcdext($val[0],array()));
27:
var_dump(gmp_gcdext(array(),array()));
28:
var_dump(gmp_gcdext(array(),array(),1));
29:
var_dump(gmp_gcdext(array()));
30:
var_dump(gmp_gcdext());
31:
32: echo 
"Done\n";
33:
?>
34:

Expected

string(1) "3"
string(2) "-4"
string(2) "11"
string(1) "1"
string(4) "-805"
string(3) "359"
string(1) "3"
string(2) "32"
string(5) "-2257"
string(4) "3003"
string(3) "-10"
string(2) "19"
string(1) "2"
string(2) "67"
string(2) "-3"
string(2) "15"
string(7) "-601519"
string(1) "6"
string(3) "345"
string(1) "1"
string(1) "0"
string(1) "1"
string(5) "84319"
string(9) "-84241831"
string(1) "1"
string(13) "-156252240050"
string(14) "16689072773537"
string(3) "195"
string(11) "46994884483"
string(9) "-68772552"

Warning: gmp_gcdext(): Unable to convert variable to GMP - wrong type in %s on line %d
bool(false)

Warning: gmp_gcdext(): Unable to convert variable to GMP - wrong type in %s on line %d
bool(false)

Warning: gmp_gcdext() expects exactly 2 parameters, 3 given in %s on line %d
NULL

Warning: gmp_gcdext() expects exactly 2 parameters, 1 given in %s on line %d
NULL

Warning: gmp_gcdext() expects exactly 2 parameters, 0 given in %s on line %d
NULL
Done

Output

string(1) "3"
string(2) "11"
string(3) "-30"
string(1) "1"
string(4) "-805"
string(3) "359"
string(1) "3"
string(3) "254"
string(6) "-17915"
string(4) "3003"
string(6) "-92342"
string(6) "175675"
string(1) "2"
string(2) "67"
string(2) "-3"
string(2) "15"
string(9) "-14436457"
string(3) "144"
string(3) "345"
string(1) "1"
string(1) "0"
string(1) "1"
string(5) "84319"
string(9) "-84241831"
string(1) "1"
string(12) "167180205823"
string(15) "-17856272782919"
string(3) "195"
string(15) "-20983781660442"
string(11) "30707772373"

Warning: gmp_gcdext(): Unable to convert variable to GMP - wrong type in /var/php_gcov/PHP_5_5/ext/gmp/tests/022.php on line 26
bool(false)

Warning: gmp_gcdext(): Unable to convert variable to GMP - wrong type in /var/php_gcov/PHP_5_5/ext/gmp/tests/022.php on line 27
bool(false)

Warning: gmp_gcdext() expects exactly 2 parameters, 3 given in /var/php_gcov/PHP_5_5/ext/gmp/tests/022.php on line 28
NULL

Warning: gmp_gcdext() expects exactly 2 parameters, 1 given in /var/php_gcov/PHP_5_5/ext/gmp/tests/022.php on line 29
NULL

Warning: gmp_gcdext() expects exactly 2 parameters, 0 given in /var/php_gcov/PHP_5_5/ext/gmp/tests/022.php on line 30
NULL
Done

Diff

002- string(2) "-4"
003+ string(3) "-30"
008+ string(3) "254"
009+ string(6) "-17915"
008- string(2) "32"
009- string(5) "-2257"
011+ string(6) "-92342"
012+ string(6) "175675"
011- string(3) "-10"
012- string(2) "19"
017+ string(9) "-14436457"
018+ string(3) "144"
017- string(7) "-601519"
018- string(1) "6"
026+ string(12) "167180205823"
027+ string(15) "-17856272782919"
026- string(13) "-156252240050"
027- string(14) "16689072773537"
029+ string(15) "-20983781660442"
030+ string(11) "30707772373"
029- string(11) "46994884483"
030- string(9) "-68772552"

 

Generated at Tue, 19 Aug 2014 16:41:26 +0000 (3 days ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.