From bc8330cc57c6d0f8d35e25741a9785fbf36a6ca4 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Wed, 18 Apr 2007 21:04:05 +0000 Subject: [PATCH] add new tests for ext/gmp --- ext/gmp/tests/005.phpt | 35 +++++++++++ ext/gmp/tests/012.phpt | 61 ++++++++++++++++++ ext/gmp/tests/013.phpt | 65 +++++++++++++++++++ ext/gmp/tests/014.phpt | 84 +++++++++++++++++++++++++ ext/gmp/tests/015.phpt | 98 +++++++++++++++++++++++++++++ ext/gmp/tests/016.phpt | 93 +++++++++++++++++++++++++++ ext/gmp/tests/017.phpt | 72 +++++++++++++++++++++ ext/gmp/tests/018.phpt | 139 +++++++++++++++++++++++++++++++++++++++++ ext/gmp/tests/019.phpt | 45 +++++++++++++ ext/gmp/tests/020.phpt | 79 +++++++++++++++++++++++ ext/gmp/tests/021.phpt | 71 +++++++++++++++++++++ ext/gmp/tests/022.phpt | 83 ++++++++++++++++++++++++ ext/gmp/tests/023.phpt | 79 +++++++++++++++++++++++ ext/gmp/tests/024.phpt | 100 +++++++++++++++++++++++++++++ ext/gmp/tests/025.phpt | 100 +++++++++++++++++++++++++++++ ext/gmp/tests/026.phpt | 46 ++++++++++++++ ext/gmp/tests/027.phpt | 37 +++++++++++ ext/gmp/tests/028.phpt | 47 ++++++++++++++ ext/gmp/tests/029.phpt | 75 ++++++++++++++++++++++ ext/gmp/tests/030.phpt | 75 ++++++++++++++++++++++ ext/gmp/tests/031.phpt | 61 ++++++++++++++++++ ext/gmp/tests/032.phpt | 75 ++++++++++++++++++++++ ext/gmp/tests/033.phpt | 83 ++++++++++++++++++++++++ ext/gmp/tests/034.phpt | 73 ++++++++++++++++++++++ ext/gmp/tests/035.phpt | 31 +++++++++ ext/gmp/tests/036.phpt | 48 ++++++++++++++ ext/gmp/tests/037.phpt | 38 +++++++++++ ext/gmp/tests/038.phpt | 38 +++++++++++ 28 files changed, 1931 insertions(+) create mode 100644 ext/gmp/tests/012.phpt create mode 100644 ext/gmp/tests/013.phpt create mode 100644 ext/gmp/tests/014.phpt create mode 100644 ext/gmp/tests/015.phpt create mode 100644 ext/gmp/tests/016.phpt create mode 100644 ext/gmp/tests/017.phpt create mode 100644 ext/gmp/tests/018.phpt create mode 100644 ext/gmp/tests/019.phpt create mode 100644 ext/gmp/tests/020.phpt create mode 100644 ext/gmp/tests/021.phpt create mode 100644 ext/gmp/tests/022.phpt create mode 100644 ext/gmp/tests/023.phpt create mode 100644 ext/gmp/tests/024.phpt create mode 100644 ext/gmp/tests/025.phpt create mode 100644 ext/gmp/tests/026.phpt create mode 100644 ext/gmp/tests/027.phpt create mode 100644 ext/gmp/tests/028.phpt create mode 100644 ext/gmp/tests/029.phpt create mode 100644 ext/gmp/tests/030.phpt create mode 100644 ext/gmp/tests/031.phpt create mode 100644 ext/gmp/tests/032.phpt create mode 100644 ext/gmp/tests/033.phpt create mode 100644 ext/gmp/tests/034.phpt create mode 100644 ext/gmp/tests/035.phpt create mode 100644 ext/gmp/tests/036.phpt create mode 100644 ext/gmp/tests/037.phpt create mode 100644 ext/gmp/tests/038.phpt diff --git a/ext/gmp/tests/005.phpt b/ext/gmp/tests/005.phpt index 482e7217ad..51f0fb18a5 100644 --- a/ext/gmp/tests/005.phpt +++ b/ext/gmp/tests/005.phpt @@ -66,3 +66,38 @@ bool(false) Warning: gmp_strval(): Unable to convert variable to GMP - wrong type in %s on line %d bool(false) Done +--UEXPECTF-- +Warning: Wrong parameter count for gmp_strval() in %s on line %d +NULL +bool(false) +bool(false) +bool(false) + +Warning: gmp_strval(): Bad base for conversion: 0 in %s on line %d +bool(false) + +Warning: gmp_strval(): supplied resource is not a valid GMP integer resource in %s on line %d +bool(false) +unicode(7) "9765456" + +Warning: gmp_strval(): Bad base for conversion: -1 in %s on line %d +bool(false) + +Warning: gmp_strval(): Bad base for conversion: 100000 in %s on line %d +bool(false) +unicode(7) "9765456" +unicode(8) "-3373333" + +Warning: gmp_strval(): Bad base for conversion: -1 in %s on line %d +bool(false) + +Warning: gmp_strval(): Bad base for conversion: 100000 in %s on line %d +bool(false) +unicode(8) "-3373333" + +Warning: gmp_strval(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_strval(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +Done diff --git a/ext/gmp/tests/012.phpt b/ext/gmp/tests/012.phpt new file mode 100644 index 0000000000..22a2d3e178 --- /dev/null +++ b/ext/gmp/tests/012.phpt @@ -0,0 +1,61 @@ +--TEST-- +gmp_neg() basic tests +--FILE-- + +--EXPECTF-- +int(0) +int(-1) +int(1) +int(1) +int(0) +int(0) +int(0) +string(21) "-12345678901234567890" + +Warning: Wrong parameter count for gmp_neg() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_neg() in %s on line %d +NULL + +Warning: gmp_neg(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +Done +--UEXPECTF-- +int(0) +int(-1) +int(1) +int(1) +int(0) +int(0) +int(0) +unicode(21) "-12345678901234567890" + +Warning: Wrong parameter count for gmp_neg() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_neg() in %s on line %d +NULL + +Warning: gmp_neg(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +Done diff --git a/ext/gmp/tests/013.phpt b/ext/gmp/tests/013.phpt new file mode 100644 index 0000000000..a541591f5a --- /dev/null +++ b/ext/gmp/tests/013.phpt @@ -0,0 +1,65 @@ +--TEST-- +gmp_abs() basic tests +--FILE-- + +--EXPECTF-- +string(1) "0" +string(1) "0" +string(1) "0" + +Warning: gmp_abs(): Unable to convert variable to GMP - wrong type in %s on line %d +string(1) "0" +string(21) "111111111111111111111" +string(21) "111111111111111111111" +string(1) "0" +string(1) "0" +string(1) "0" + +Warning: Wrong parameter count for gmp_abs() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_abs() in %s on line %d +NULL + +Warning: gmp_abs(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +Done +--UEXPECTF-- +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" + +Warning: gmp_abs(): Unable to convert variable to GMP - wrong type in %s on line %d +unicode(1) "0" +unicode(21) "111111111111111111111" +unicode(21) "111111111111111111111" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" + +Warning: Wrong parameter count for gmp_abs() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_abs() in %s on line %d +NULL + +Warning: gmp_abs(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +Done diff --git a/ext/gmp/tests/014.phpt b/ext/gmp/tests/014.phpt new file mode 100644 index 0000000000..f8bf7384d1 --- /dev/null +++ b/ext/gmp/tests/014.phpt @@ -0,0 +1,84 @@ +--TEST-- +gmp_fact() basic tests +--FILE-- + +--EXPECTF-- +string(1) "1" +string(1) "1" +string(1) "1" + +Warning: gmp_fact(): Number has to be greater than or equal to 0 in %s on line %d +string(1) "0" + +Warning: gmp_fact(): Number has to be greater than or equal to 0 in %s on line %d +string(1) "0" +string(1) "1" +string(19) "2432902008176640000" +string(65) "30414093201713378043612608166064768844377641568960512000000000000" +string(7) "3628800" +string(1) "1" +string(11) "87178291200" + +Warning: gmp_fact(): Number has to be greater than or equal to 0 in %s on line %d +string(1) "0" + +Warning: Wrong parameter count for gmp_fact() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_fact() in %s on line %d +NULL +resource(%d) of type (GMP integer) +string(1) "1" +Done +--UEXPECTF-- +unicode(1) "1" +unicode(1) "1" +unicode(1) "1" + +Warning: gmp_fact(): Number has to be greater than or equal to 0 in %s on line %d +unicode(1) "0" + +Warning: gmp_fact(): Number has to be greater than or equal to 0 in %s on line %d +unicode(1) "0" +unicode(1) "1" +unicode(19) "2432902008176640000" +unicode(65) "30414093201713378043612608166064768844377641568960512000000000000" +unicode(7) "3628800" +unicode(1) "1" +unicode(11) "87178291200" + +Warning: gmp_fact(): Number has to be greater than or equal to 0 in %s on line %d +unicode(1) "0" + +Warning: Wrong parameter count for gmp_fact() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_fact() in %s on line %d +NULL +resource(%d) of type (GMP integer) +unicode(1) "1" +Done diff --git a/ext/gmp/tests/015.phpt b/ext/gmp/tests/015.phpt new file mode 100644 index 0000000000..8e049b2ce7 --- /dev/null +++ b/ext/gmp/tests/015.phpt @@ -0,0 +1,98 @@ +--TEST-- +gmp_pow() basic tests +--FILE-- + +--EXPECTF-- +string(4) "1024" +string(4) "1024" +string(5) "-2048" +string(4) "1024" +string(1) "1" + +Warning: gmp_pow(): Negative exponent not supported in %s on line %d +string(1) "0" +string(4) "1024" +string(14) "10240000000000" +string(17) "97656250000000000" + +Warning: gmp_pow(): Negative exponent not supported in %s on line %d +string(1) "0" +string(14) "10240000000000" +string(14) "10240000000000" + +Warning: Wrong parameter count for gmp_pow() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_pow() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_pow() in %s on line %d +NULL + +Warning: gmp_pow(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +resource(%d) of type (GMP integer) + +Warning: gmp_pow(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +Done +--UEXPECTF-- +unicode(4) "1024" +unicode(4) "1024" +unicode(5) "-2048" +unicode(4) "1024" +unicode(1) "1" + +Warning: gmp_pow(): Negative exponent not supported in %s on line %d +unicode(1) "0" +unicode(4) "1024" +unicode(14) "10240000000000" +unicode(17) "97656250000000000" + +Warning: gmp_pow(): Negative exponent not supported in %s on line %d +unicode(1) "0" +unicode(14) "10240000000000" +unicode(14) "10240000000000" + +Warning: Wrong parameter count for gmp_pow() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_pow() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_pow() in %s on line %d +NULL + +Warning: gmp_pow(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +resource(%d) of type (GMP integer) + +Warning: gmp_pow(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +Done diff --git a/ext/gmp/tests/016.phpt b/ext/gmp/tests/016.phpt new file mode 100644 index 0000000000..d3b3bdac51 --- /dev/null +++ b/ext/gmp/tests/016.phpt @@ -0,0 +1,93 @@ +--TEST-- +gmp_powm() basic tests +--FILE-- + +--EXPECTF-- +string(1) "0" +string(1) "5" +string(1) "5" +string(1) "5" +string(1) "5" +string(3) "533" +string(3) "331" +string(3) "171" +string(3) "371" + +Warning: gmp_powm(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_powm(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_powm(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_powm(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: Wrong parameter count for gmp_powm() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_powm() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_powm() in %s on line %d +NULL +Done +--UEXPECTF-- +unicode(1) "0" +unicode(1) "5" +unicode(1) "5" +unicode(1) "5" +unicode(1) "5" +unicode(3) "533" +unicode(3) "331" +unicode(3) "171" +unicode(3) "371" + +Warning: gmp_powm(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_powm(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_powm(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_powm(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: Wrong parameter count for gmp_powm() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_powm() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_powm() in %s on line %d +NULL +Done diff --git a/ext/gmp/tests/017.phpt b/ext/gmp/tests/017.phpt new file mode 100644 index 0000000000..487da8d9f6 --- /dev/null +++ b/ext/gmp/tests/017.phpt @@ -0,0 +1,72 @@ +--TEST-- +gmp_sqrt() basic tests +--FILE-- + +--EXPECTF-- +Warning: gmp_sqrt(): Number has to be greater than or equal to 0 in %s on line %d +string(1) "0" + +Warning: gmp_sqrt(): Number has to be greater than or equal to 0 in %s on line %d +string(1) "0" +string(1) "0" +string(1) "1" +string(2) "12" +string(1) "0" + +Warning: gmp_sqrt(): Number has to be greater than or equal to 0 in %s on line %d +string(1) "0" +string(2) "27" + +Warning: Wrong parameter count for gmp_sqrt() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_sqrt() in %s on line %d +NULL + +Warning: gmp_sqrt(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +Done +--UEXPECTF-- +Warning: gmp_sqrt(): Number has to be greater than or equal to 0 in %s on line %d +unicode(1) "0" + +Warning: gmp_sqrt(): Number has to be greater than or equal to 0 in %s on line %d +unicode(1) "0" +unicode(1) "0" +unicode(1) "1" +unicode(2) "12" +unicode(1) "0" + +Warning: gmp_sqrt(): Number has to be greater than or equal to 0 in %s on line %d +unicode(1) "0" +unicode(2) "27" + +Warning: Wrong parameter count for gmp_sqrt() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_sqrt() in %s on line %d +NULL + +Warning: gmp_sqrt(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +Done diff --git a/ext/gmp/tests/018.phpt b/ext/gmp/tests/018.phpt new file mode 100644 index 0000000000..6751dc678b --- /dev/null +++ b/ext/gmp/tests/018.phpt @@ -0,0 +1,139 @@ +--TEST-- +gmp_sqrtrem() basic tests +--FILE-- + +--EXPECTF-- +Warning: gmp_sqrtrem(): Number has to be greater than or equal to 0 in %s on line %d + +Warning: gmp_strval(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_strval(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +string(1) "0" +string(1) "0" +string(1) "1" +string(1) "1" +string(1) "3" +string(1) "1" +string(1) "2" +string(1) "3" +string(1) "1" +string(1) "2" +string(3) "316" +string(3) "144" +string(4) "1000" +string(1) "0" +string(4) "1000" +string(1) "1" + +Warning: gmp_sqrtrem(): Number has to be greater than or equal to 0 in %s on line %d + +Warning: gmp_strval(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_strval(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +string(4) "1000" +string(1) "1" + +Warning: gmp_sqrtrem(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: Wrong parameter count for gmp_sqrtrem() in %s on line %d +NULL +Done +--UEXPECTF-- +Warning: gmp_sqrtrem(): Number has to be greater than or equal to 0 in %s on line %d + +Warning: gmp_strval(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_strval(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +unicode(1) "0" +unicode(1) "0" +unicode(1) "1" +unicode(1) "1" +unicode(1) "3" +unicode(1) "1" +unicode(1) "2" +unicode(1) "3" +unicode(1) "1" +unicode(1) "2" +unicode(3) "316" +unicode(3) "144" +unicode(4) "1000" +unicode(1) "0" +unicode(4) "1000" +unicode(1) "1" + +Warning: gmp_sqrtrem(): Number has to be greater than or equal to 0 in %s on line %d + +Warning: gmp_strval(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_strval(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +unicode(4) "1000" +unicode(1) "1" + +Warning: gmp_sqrtrem(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: Wrong parameter count for gmp_sqrtrem() in %s on line %d +NULL +Done diff --git a/ext/gmp/tests/019.phpt b/ext/gmp/tests/019.phpt new file mode 100644 index 0000000000..d632d14003 --- /dev/null +++ b/ext/gmp/tests/019.phpt @@ -0,0 +1,45 @@ +--TEST-- +gmp_perfect_square() basic tests +--FILE-- + +--EXPECTF-- +bool(true) +bool(true) +bool(false) +bool(true) +bool(true) +bool(false) +bool(true) +bool(false) +bool(false) +bool(true) +bool(false) + +Warning: Wrong parameter count for gmp_perfect_square() in %s on line %d +NULL + +Warning: gmp_perfect_square(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +Done diff --git a/ext/gmp/tests/020.phpt b/ext/gmp/tests/020.phpt new file mode 100644 index 0000000000..37c3ebdc69 --- /dev/null +++ b/ext/gmp/tests/020.phpt @@ -0,0 +1,79 @@ +--TEST-- +gmp_prob_prime() basic tests +--FILE-- + +--EXPECTF-- +int(0) +int(2) +int(2) +int(2) +int(0) +int(0) +int(2) +int(2) +int(2) +int(0) +int(0) +int(0) +int(0) +int(0) +int(0) +int(0) +int(2) +int(0) +int(2) +int(0) +int(0) +int(0) +int(0) +int(0) +int(0) +int(0) +int(0) +int(0) +int(0) +int(0) +int(0) +int(0) +int(0) +int(0) +int(0) +int(0) +int(0) +int(0) + +Warning: Wrong parameter count for gmp_prob_prime() in %s on line %d +NULL + +Warning: gmp_prob_prime(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +Done diff --git a/ext/gmp/tests/021.phpt b/ext/gmp/tests/021.phpt new file mode 100644 index 0000000000..b1d9843563 --- /dev/null +++ b/ext/gmp/tests/021.phpt @@ -0,0 +1,71 @@ +--TEST-- +gmp_gcd() basic tests +--FILE-- + +--EXPECTF-- +string(1) "3" +string(5) "12387" +string(3) "224" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "2" +string(1) "1" +string(10) "8127346234" +string(1) "0" + +Warning: Wrong parameter count for gmp_gcd() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_gcd() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_gcd() in %s on line %d +NULL +Done +--UEXPECTF-- +unicode(1) "3" +unicode(5) "12387" +unicode(3) "224" +unicode(1) "1" +unicode(1) "1" +unicode(1) "1" +unicode(1) "1" +unicode(1) "2" +unicode(1) "1" +unicode(10) "8127346234" +unicode(1) "0" + +Warning: Wrong parameter count for gmp_gcd() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_gcd() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_gcd() in %s on line %d +NULL +Done diff --git a/ext/gmp/tests/022.phpt b/ext/gmp/tests/022.phpt new file mode 100644 index 0000000000..0df874dc7d --- /dev/null +++ b/ext/gmp/tests/022.phpt @@ -0,0 +1,83 @@ +--TEST-- +gmp_gcdext() basic tests +--FILE-- + +--EXPECTF-- +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: Wrong parameter count for gmp_gcdext() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_gcdext() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_gcdext() in %s on line %d +NULL +Done diff --git a/ext/gmp/tests/023.phpt b/ext/gmp/tests/023.phpt new file mode 100644 index 0000000000..88e89b300d --- /dev/null +++ b/ext/gmp/tests/023.phpt @@ -0,0 +1,79 @@ +--TEST-- +gmp_invert() basic tests +--FILE-- + +--EXPECTF-- +string(7) "2293131" +string(1) "0" +string(4) "5827" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(22) "3498273496234234523441" +string(1) "1" + +Warning: Wrong parameter count for gmp_invert() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_invert() in %s on line %d +NULL + +Warning: gmp_invert(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_invert(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_invert(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +Done +--UEXPECTF-- +unicode(7) "2293131" +unicode(1) "0" +unicode(4) "5827" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(22) "3498273496234234523441" +unicode(1) "1" + +Warning: Wrong parameter count for gmp_invert() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_invert() in %s on line %d +NULL + +Warning: gmp_invert(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_invert(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_invert(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +Done diff --git a/ext/gmp/tests/024.phpt b/ext/gmp/tests/024.phpt new file mode 100644 index 0000000000..27166aaa86 --- /dev/null +++ b/ext/gmp/tests/024.phpt @@ -0,0 +1,100 @@ +--TEST-- +gmp_jacobi() basic tests +--FILE-- + +--EXPECTF-- +string(1) "0" +string(2) "-1" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +int(0) + +Warning: gmp_jacobi(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_jacobi(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: Wrong parameter count for gmp_jacobi() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_jacobi() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_jacobi() in %s on line %d +NULL +Done +--UEXPECTF-- +unicode(1) "0" +unicode(2) "-1" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +int(0) + +Warning: gmp_jacobi(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_jacobi(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: Wrong parameter count for gmp_jacobi() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_jacobi() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_jacobi() in %s on line %d +NULL +Done diff --git a/ext/gmp/tests/025.phpt b/ext/gmp/tests/025.phpt new file mode 100644 index 0000000000..d462ae296d --- /dev/null +++ b/ext/gmp/tests/025.phpt @@ -0,0 +1,100 @@ +--TEST-- +gmp_legendre() basic tests +--FILE-- + +--EXPECTF-- +string(1) "0" +string(2) "-1" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +string(1) "0" +int(0) + +Warning: gmp_legendre(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_legendre(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: Wrong parameter count for gmp_legendre() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_legendre() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_legendre() in %s on line %d +NULL +Done +--UEXPECTF-- +unicode(1) "0" +unicode(2) "-1" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +unicode(1) "0" +int(0) + +Warning: gmp_legendre(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_legendre(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: Wrong parameter count for gmp_legendre() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_legendre() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_legendre() in %s on line %d +NULL +Done diff --git a/ext/gmp/tests/026.phpt b/ext/gmp/tests/026.phpt new file mode 100644 index 0000000000..39c18501fe --- /dev/null +++ b/ext/gmp/tests/026.phpt @@ -0,0 +1,46 @@ +--TEST-- +gmp_cmp() basic tests +--FILE-- + +--EXPECTF-- +int(2) +int(0) +int(-1) +int(0) +int(1) +int(-1) +int(-2) +int(0) + +Warning: Wrong parameter count for gmp_cmp() in %s on line %d +NULL + +Warning: gmp_cmp(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: Wrong parameter count for gmp_cmp() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_cmp() in %s on line %d +NULL +Done diff --git a/ext/gmp/tests/027.phpt b/ext/gmp/tests/027.phpt new file mode 100644 index 0000000000..b22fa2ac0a --- /dev/null +++ b/ext/gmp/tests/027.phpt @@ -0,0 +1,37 @@ +--TEST-- +gmp_sign() basic tests +--FILE-- + +--EXPECTF-- +int(-1) +int(1) +int(0) +int(1) +int(-1) +bool(false) +int(0) + +Warning: Wrong parameter count for gmp_sign() in %s on line %d +NULL + +Warning: gmp_sign(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: Wrong parameter count for gmp_sign() in %s on line %d +NULL +Done diff --git a/ext/gmp/tests/028.phpt b/ext/gmp/tests/028.phpt new file mode 100644 index 0000000000..d44c45db2d --- /dev/null +++ b/ext/gmp/tests/028.phpt @@ -0,0 +1,47 @@ +--TEST-- +gmp_random() basic tests +--FILE-- + +--EXPECTF-- +string(%d) "%d" +string(%d) "%d" +string(1) "%d" +string(%d) "%d" +string(%d) "%d" +string(%d) "%d" +resource(%d) of type (GMP integer) + +Warning: Wrong parameter count for gmp_random() in %s on line %d +NULL +resource(%d) of type (GMP integer) +resource(%d) of type (GMP integer) +Done +--UEXPECTF-- +unicode(%d) "%d" +unicode(%d) "%d" +unicode(1) "0" +unicode(%d) "%d" +unicode(%d) "%d" +unicode(%d) "%d" +resource(%d) of type (GMP integer) + +Warning: Wrong parameter count for gmp_random() in %s on line %d +NULL +resource(%d) of type (GMP integer) +resource(%d) of type (GMP integer) +Done diff --git a/ext/gmp/tests/029.phpt b/ext/gmp/tests/029.phpt new file mode 100644 index 0000000000..a8168cc877 --- /dev/null +++ b/ext/gmp/tests/029.phpt @@ -0,0 +1,75 @@ +--TEST-- +gmp_and() basic tests +--FILE-- + +--EXPECTF-- +string(6) "106502" +string(5) "40994" +string(3) "515" +string(4) "3333" +string(4) "4544" +string(1) "0" +string(4) "1536" +string(15) "424703623692768" + +Warning: Wrong parameter count for gmp_and() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_and() in %s on line %d +NULL + +Warning: gmp_and(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_and(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_and(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +Done +--UEXPECTF-- +unicode(6) "106502" +unicode(5) "40994" +unicode(3) "515" +unicode(4) "3333" +unicode(4) "4544" +unicode(1) "0" +unicode(4) "1536" +unicode(15) "424703623692768" + +Warning: Wrong parameter count for gmp_and() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_and() in %s on line %d +NULL + +Warning: gmp_and(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_and(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_and(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +Done diff --git a/ext/gmp/tests/030.phpt b/ext/gmp/tests/030.phpt new file mode 100644 index 0000000000..97d9bd4ef0 --- /dev/null +++ b/ext/gmp/tests/030.phpt @@ -0,0 +1,75 @@ +--TEST-- +gmp_or() basic tests +--FILE-- + +--EXPECTF-- +string(7) "2226831" +string(6) "517363" +string(10) "2342341163" +string(2) "-1" +string(3) "-19" +string(1) "0" +string(15) "987657876576252" +string(21) "987658441719689394144" + +Warning: Wrong parameter count for gmp_or() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_or() in %s on line %d +NULL + +Warning: gmp_or(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_or(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_or(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +Done +--UEXPECTF-- +unicode(7) "2226831" +unicode(6) "517363" +unicode(10) "2342341163" +unicode(2) "-1" +unicode(3) "-19" +unicode(1) "0" +unicode(15) "987657876576252" +unicode(21) "987658441719689394144" + +Warning: Wrong parameter count for gmp_or() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_or() in %s on line %d +NULL + +Warning: gmp_or(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_or(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_or(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +Done diff --git a/ext/gmp/tests/031.phpt b/ext/gmp/tests/031.phpt new file mode 100644 index 0000000000..620b111f16 --- /dev/null +++ b/ext/gmp/tests/031.phpt @@ -0,0 +1,61 @@ +--TEST-- +gmp_com() basic tests +--FILE-- + +--EXPECTF-- +string(2) "-1" +string(2) "-1" +string(1) "0" +string(14) "-2394876545679" +string(3) "110" +string(7) "-874654" +string(4) "9875" +string(9) "-98765468" +string(12) "-98765463338" + +Warning: gmp_com(): Unable to convert variable to GMP - wrong type in %s on line %d +string(1) "0" + +Warning: Wrong parameter count for gmp_com() in %s on line %d + +Warning: gmp_strval(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +Done +--UEXPECTF-- +unicode(2) "-1" +unicode(2) "-1" +unicode(1) "0" +unicode(14) "-2394876545679" +unicode(3) "110" +unicode(7) "-874654" +unicode(4) "9875" +unicode(9) "-98765468" +unicode(12) "-98765463338" + +Warning: gmp_com(): Unable to convert variable to GMP - wrong type in %s on line %d +unicode(1) "0" + +Warning: Wrong parameter count for gmp_com() in %s on line %d + +Warning: gmp_strval(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +Done diff --git a/ext/gmp/tests/032.phpt b/ext/gmp/tests/032.phpt new file mode 100644 index 0000000000..48880da63e --- /dev/null +++ b/ext/gmp/tests/032.phpt @@ -0,0 +1,75 @@ +--TEST-- +gmp_xor() basic tests +--FILE-- + +--EXPECTF-- +string(7) "2120329" +string(6) "476369" +string(10) "2342340648" +string(5) "-3334" +string(5) "-4563" +string(1) "0" +string(15) "987657876574716" +string(21) "987658017016065701376" + +Warning: Wrong parameter count for gmp_xor() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_xor() in %s on line %d +NULL + +Warning: gmp_xor(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_xor(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_xor(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +Done +--UEXPECTF-- +unicode(7) "2120329" +unicode(6) "476369" +unicode(10) "2342340648" +unicode(5) "-3334" +unicode(5) "-4563" +unicode(1) "0" +unicode(15) "987657876574716" +unicode(21) "987658017016065701376" + +Warning: Wrong parameter count for gmp_xor() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_xor() in %s on line %d +NULL + +Warning: gmp_xor(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_xor(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_xor(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) +Done diff --git a/ext/gmp/tests/033.phpt b/ext/gmp/tests/033.phpt new file mode 100644 index 0000000000..cdcaa27076 --- /dev/null +++ b/ext/gmp/tests/033.phpt @@ -0,0 +1,83 @@ +--TEST-- +gmp_setbit() basic tests +--FILE-- + +--EXPECTF-- +string(2) "-1" + +Warning: gmp_setbit(): Index must be greater than or equal to zero in %s on line %d +string(1) "5" +string(1) "1" +string(1) "7" +string(12) "100008388608" +string(12) "100000000000" +string(12) "100000000008" + +Warning: gmp_setbit(): supplied argument is not a valid GMP integer resource in %s on line %d + +Warning: Wrong parameter count for gmp_setbit() in %s on line %d + +Warning: Wrong parameter count for gmp_setbit() in %s on line %d + +Warning: gmp_setbit(): supplied argument is not a valid GMP integer resource in %s on line %d + +Warning: gmp_setbit(): supplied argument is not a valid GMP integer resource in %s on line %d +Done +--UEXPECTF-- +unicode(2) "-1" + +Warning: gmp_setbit(): Index must be greater than or equal to zero in %s on line %d +unicode(1) "5" +unicode(1) "1" +unicode(1) "7" +unicode(12) "100008388608" +unicode(12) "100000000000" +unicode(12) "100000000008" + +Warning: gmp_setbit(): supplied argument is not a valid GMP integer resource in %s on line %d + +Warning: Wrong parameter count for gmp_setbit() in %s on line %d + +Warning: Wrong parameter count for gmp_setbit() in %s on line %d + +Warning: gmp_setbit(): supplied argument is not a valid GMP integer resource in %s on line %d + +Warning: gmp_setbit(): supplied argument is not a valid GMP integer resource in %s on line %d +Done diff --git a/ext/gmp/tests/034.phpt b/ext/gmp/tests/034.phpt new file mode 100644 index 0000000000..4af5c462b5 --- /dev/null +++ b/ext/gmp/tests/034.phpt @@ -0,0 +1,73 @@ +--TEST-- +gmp_clrbit() basic tests +--FILE-- + +--EXPECTF-- +string(1) "0" + +Warning: gmp_clrbit(): Index must be greater than or equal to zero in %s on line %d +string(2) "-1" + +Warning: gmp_clrbit(): Index must be greater than or equal to zero in %s on line %d +string(7) "1000000" +string(7) "1000000" +string(30) "238462734628347239571822592658" + +Warning: gmp_clrbit(): supplied argument is not a valid GMP integer resource in %s on line %d + +Warning: Wrong parameter count for gmp_clrbit() in %s on line %d + +Warning: Wrong parameter count for gmp_clrbit() in %s on line %d + +Warning: Wrong parameter count for gmp_clrbit() in %s on line %d +Done +--UEXPECTF-- +unicode(1) "0" + +Warning: gmp_clrbit(): Index must be greater than or equal to zero in %s on line %d +unicode(2) "-1" + +Warning: gmp_clrbit(): Index must be greater than or equal to zero in %s on line %d +unicode(7) "1000000" +unicode(7) "1000000" +unicode(30) "238462734628347239571822592658" + +Warning: gmp_clrbit(): supplied argument is not a valid GMP integer resource in %s on line %d + +Warning: Wrong parameter count for gmp_clrbit() in %s on line %d + +Warning: Wrong parameter count for gmp_clrbit() in %s on line %d + +Warning: Wrong parameter count for gmp_clrbit() in %s on line %d +Done diff --git a/ext/gmp/tests/035.phpt b/ext/gmp/tests/035.phpt new file mode 100644 index 0000000000..81410b5c70 --- /dev/null +++ b/ext/gmp/tests/035.phpt @@ -0,0 +1,31 @@ +--TEST-- +gmp_popcount() basic tests +--FILE-- + +--EXPECTF-- +int(-1) +int(0) +int(10) +int(31) +int(-1) +int(20) + +Warning: gmp_popcount(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: Wrong parameter count for gmp_popcount() in %s on line %d +NULL +Done diff --git a/ext/gmp/tests/036.phpt b/ext/gmp/tests/036.phpt new file mode 100644 index 0000000000..2d429c40a2 --- /dev/null +++ b/ext/gmp/tests/036.phpt @@ -0,0 +1,48 @@ +--TEST-- +gmp_hamdist() basic tests +--FILE-- + +--EXPECTF-- +int(13) +int(-1) +int(36) +int(-1) +int(43) +int(0) +int(26) + +Warning: Wrong parameter count for gmp_hamdist() in %s on line %d +NULL + +Warning: gmp_hamdist(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_hamdist(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: gmp_hamdist(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: Wrong parameter count for gmp_hamdist() in %s on line %d +NULL +Done diff --git a/ext/gmp/tests/037.phpt b/ext/gmp/tests/037.phpt new file mode 100644 index 0000000000..90ba3558d2 --- /dev/null +++ b/ext/gmp/tests/037.phpt @@ -0,0 +1,38 @@ +--TEST-- +gmp_scan0() basic tests +--FILE-- + +--EXPECTF-- +Warning: gmp_scan0(): Starting index must be greater than or equal to zero in %s on line %d +bool(false) +int(2) +int(0) +int(5) +int(200) +int(13) + +Warning: gmp_scan0(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: Wrong parameter count for gmp_scan0() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_scan0() in %s on line %d +NULL +Done diff --git a/ext/gmp/tests/038.phpt b/ext/gmp/tests/038.phpt new file mode 100644 index 0000000000..c4764faff6 --- /dev/null +++ b/ext/gmp/tests/038.phpt @@ -0,0 +1,38 @@ +--TEST-- +gmp_scan1() basic tests +--FILE-- + +--EXPECTF-- +Warning: gmp_scan1(): Starting index must be greater than or equal to zero in %s on line %d +bool(false) +int(1) +int(12) +int(9) +int(-1) +int(10) + +Warning: gmp_scan1(): Unable to convert variable to GMP - wrong type in %s on line %d +bool(false) + +Warning: Wrong parameter count for gmp_scan1() in %s on line %d +NULL + +Warning: Wrong parameter count for gmp_scan1() in %s on line %d +NULL +Done -- 2.50.1