From 4da92843b9adc6a8bd9ec63fa4602a6fc818b8dc Mon Sep 17 00:00:00 2001 From: Zoe Slattery Date: Wed, 6 Feb 2008 08:39:23 +0000 Subject: [PATCH] Tests for assorted Maths functions --- ext/standard/tests/math/dechex_basic.phpt | 52 +++++ ext/standard/tests/math/dechex_error.phpt | 13 ++ ext/standard/tests/math/decoct_basic.phpt | 52 +++++ ext/standard/tests/math/decoct_error.phpt | 12 + ext/standard/tests/math/deg2rad_basic.phpt | 67 ++++++ ext/standard/tests/math/deg2rad_error.phpt | 31 +++ .../tests/math/deg2rad_variation.phpt | 76 +++++++ ext/standard/tests/math/exp_error.phpt | 13 ++ ext/standard/tests/math/fmod_basic.phpt | 209 ++++++++++++++++++ ext/standard/tests/math/fmod_error.phpt | 17 ++ ext/standard/tests/math/getrandmax_basic.phpt | 9 + ext/standard/tests/math/getrandmax_error.phpt | 9 + ext/standard/tests/math/hexdec_basic.phpt | 46 ++++ ext/standard/tests/math/hexdec_error.phpt | 12 + ext/standard/tests/math/hypot_error.phpt | 17 ++ ext/standard/tests/math/is_finite_basic.phpt | 41 ++++ ext/standard/tests/math/is_finite_error.phpt | 13 ++ .../tests/math/is_infinite_basic.phpt | 42 ++++ .../tests/math/is_infinite_error.phpt | 12 + ext/standard/tests/math/is_nan_basic.phpt | 45 ++++ ext/standard/tests/math/is_nan_error.phpt | 16 ++ ext/standard/tests/math/lcg_value_basic.phpt | 56 +++++ ext/standard/tests/math/log10_basic.phpt | 55 +++++ ext/standard/tests/math/log10_error.phpt | 31 +++ ext/standard/tests/math/log10_variation.phpt | 76 +++++++ ext/standard/tests/math/log_basic.phpt | 60 +++++ ext/standard/tests/math/log_error.phpt | 17 ++ .../tests/math/mt_getrandmax_basic.phpt | 8 + .../tests/math/mt_getrandmax_error.phpt | 9 + ext/standard/tests/math/mt_rand_basic.phpt | 102 +++++++++ ext/standard/tests/math/mt_rand_error.phpt | 28 +++ ext/standard/tests/math/mt_srand_basic.phpt | 24 ++ ext/standard/tests/math/mt_srand_error.phpt | 26 +++ .../tests/math/number_format_basic.phpt | 153 +++++++++++++ ext/standard/tests/math/octdec_basic.phpt | 45 ++++ ext/standard/tests/math/octdec_error.phpt | 12 + ext/standard/tests/math/pi_basic.phpt | 14 ++ ext/standard/tests/math/pow_basic.phpt | 37 ++++ ext/standard/tests/math/pow_error.phpt | 19 ++ ext/standard/tests/math/rad2deg_basic.phpt | 65 ++++++ ext/standard/tests/math/rad2deg_error.phpt | 31 +++ .../tests/math/rad2deg_variation.phpt | 76 +++++++ ext/standard/tests/math/rand_basic.phpt | 103 +++++++++ ext/standard/tests/math/rand_error.phpt | 26 +++ ext/standard/tests/math/sqrt_basic.phpt | 18 ++ ext/standard/tests/math/sqrt_error.phpt | 31 +++ ext/standard/tests/math/srand_basic.phpt | 24 ++ ext/standard/tests/math/srand_error.phpt | 26 +++ 48 files changed, 1976 insertions(+) create mode 100644 ext/standard/tests/math/dechex_basic.phpt create mode 100644 ext/standard/tests/math/dechex_error.phpt create mode 100644 ext/standard/tests/math/decoct_basic.phpt create mode 100644 ext/standard/tests/math/decoct_error.phpt create mode 100644 ext/standard/tests/math/deg2rad_basic.phpt create mode 100644 ext/standard/tests/math/deg2rad_error.phpt create mode 100644 ext/standard/tests/math/deg2rad_variation.phpt create mode 100644 ext/standard/tests/math/exp_error.phpt create mode 100644 ext/standard/tests/math/fmod_basic.phpt create mode 100644 ext/standard/tests/math/fmod_error.phpt create mode 100644 ext/standard/tests/math/getrandmax_basic.phpt create mode 100644 ext/standard/tests/math/getrandmax_error.phpt create mode 100644 ext/standard/tests/math/hexdec_basic.phpt create mode 100644 ext/standard/tests/math/hexdec_error.phpt create mode 100644 ext/standard/tests/math/hypot_error.phpt create mode 100644 ext/standard/tests/math/is_finite_basic.phpt create mode 100644 ext/standard/tests/math/is_finite_error.phpt create mode 100644 ext/standard/tests/math/is_infinite_basic.phpt create mode 100644 ext/standard/tests/math/is_infinite_error.phpt create mode 100644 ext/standard/tests/math/is_nan_basic.phpt create mode 100644 ext/standard/tests/math/is_nan_error.phpt create mode 100644 ext/standard/tests/math/lcg_value_basic.phpt create mode 100644 ext/standard/tests/math/log10_basic.phpt create mode 100644 ext/standard/tests/math/log10_error.phpt create mode 100644 ext/standard/tests/math/log10_variation.phpt create mode 100644 ext/standard/tests/math/log_basic.phpt create mode 100644 ext/standard/tests/math/log_error.phpt create mode 100644 ext/standard/tests/math/mt_getrandmax_basic.phpt create mode 100644 ext/standard/tests/math/mt_getrandmax_error.phpt create mode 100644 ext/standard/tests/math/mt_rand_basic.phpt create mode 100644 ext/standard/tests/math/mt_rand_error.phpt create mode 100644 ext/standard/tests/math/mt_srand_basic.phpt create mode 100644 ext/standard/tests/math/mt_srand_error.phpt create mode 100644 ext/standard/tests/math/number_format_basic.phpt create mode 100644 ext/standard/tests/math/octdec_basic.phpt create mode 100644 ext/standard/tests/math/octdec_error.phpt create mode 100644 ext/standard/tests/math/pi_basic.phpt create mode 100644 ext/standard/tests/math/pow_basic.phpt create mode 100644 ext/standard/tests/math/pow_error.phpt create mode 100644 ext/standard/tests/math/rad2deg_basic.phpt create mode 100644 ext/standard/tests/math/rad2deg_error.phpt create mode 100644 ext/standard/tests/math/rad2deg_variation.phpt create mode 100644 ext/standard/tests/math/rand_basic.phpt create mode 100644 ext/standard/tests/math/rand_error.phpt create mode 100644 ext/standard/tests/math/sqrt_basic.phpt create mode 100644 ext/standard/tests/math/sqrt_error.phpt create mode 100644 ext/standard/tests/math/srand_basic.phpt create mode 100644 ext/standard/tests/math/srand_error.phpt diff --git a/ext/standard/tests/math/dechex_basic.phpt b/ext/standard/tests/math/dechex_basic.phpt new file mode 100644 index 0000000000..f76d7d535b --- /dev/null +++ b/ext/standard/tests/math/dechex_basic.phpt @@ -0,0 +1,52 @@ +--TEST-- +Test dechex() - basic function dechex() +--FILE-- + +--EXPECTF-- +string(1) "a" +string(3) "f6e" +string(3) "f6e" +string(1) "3" +string(2) "5f" +string(1) "a" +string(3) "f6e" +string(1) "3" +string(2) "27" +string(1) "0" +string(1) "1" +string(1) "0" +string(1) "0" +--UEXPECTF-- +unicode(1) "a" +unicode(3) "f6e" +unicode(3) "f6e" +unicode(1) "3" +unicode(2) "5f" +unicode(1) "a" +unicode(3) "f6e" +unicode(1) "3" +unicode(2) "27" +unicode(1) "0" +unicode(1) "1" +unicode(1) "0" +unicode(1) "0" diff --git a/ext/standard/tests/math/dechex_error.phpt b/ext/standard/tests/math/dechex_error.phpt new file mode 100644 index 0000000000..81492a49c6 --- /dev/null +++ b/ext/standard/tests/math/dechex_error.phpt @@ -0,0 +1,13 @@ +--TEST-- +Test dechex() - wrong params dechex() +--FILE-- + + +--EXPECTF-- + +Warning: dechex() expects exactly 1 parameter, 0 given in %s on line %d + +Warning: dechex() expects exactly 1 parameter, 3 given in %s on line %d diff --git a/ext/standard/tests/math/decoct_basic.phpt b/ext/standard/tests/math/decoct_basic.phpt new file mode 100644 index 0000000000..52e1feaa1e --- /dev/null +++ b/ext/standard/tests/math/decoct_basic.phpt @@ -0,0 +1,52 @@ +--TEST-- +Test decoct() - basic function test decoct() +--FILE-- + +--EXPECTF-- +string(2) "12" +string(4) "7556" +string(4) "7556" +string(1) "3" +string(3) "137" +string(2) "12" +string(4) "7556" +string(1) "3" +string(2) "47" +string(1) "0" +string(1) "1" +string(1) "0" +string(1) "0" +--UEXPECTF-- +unicode(2) "12" +unicode(4) "7556" +unicode(4) "7556" +unicode(1) "3" +unicode(3) "137" +unicode(2) "12" +unicode(4) "7556" +unicode(1) "3" +unicode(2) "47" +unicode(1) "0" +unicode(1) "1" +unicode(1) "0" +unicode(1) "0" diff --git a/ext/standard/tests/math/decoct_error.phpt b/ext/standard/tests/math/decoct_error.phpt new file mode 100644 index 0000000000..44212afb07 --- /dev/null +++ b/ext/standard/tests/math/decoct_error.phpt @@ -0,0 +1,12 @@ +--TEST-- +Test decoct() - wrong params decoct() +--FILE-- + +--EXPECTF-- + +Warning: decoct() expects exactly 1 parameter, 0 given in %s on line %d + +Warning: decoct() expects exactly 1 parameter, 3 given in %s on line %d diff --git a/ext/standard/tests/math/deg2rad_basic.phpt b/ext/standard/tests/math/deg2rad_basic.phpt new file mode 100644 index 0000000000..64771b9980 --- /dev/null +++ b/ext/standard/tests/math/deg2rad_basic.phpt @@ -0,0 +1,67 @@ +--TEST-- +Test return type and value for expected input deg2rad() +--INI-- +precision = 14 +--FILE-- + +--EXPECTF-- +deg2rad 0 = float(%f) +Pass +deg2rad 90 = float(%f) +Pass +deg2rad 180 = float(%f) +Pass +deg2rad 360 = float(%f) +Pass diff --git a/ext/standard/tests/math/deg2rad_error.phpt b/ext/standard/tests/math/deg2rad_error.phpt new file mode 100644 index 0000000000..eb9156af49 --- /dev/null +++ b/ext/standard/tests/math/deg2rad_error.phpt @@ -0,0 +1,31 @@ +--TEST-- +Test wrong number of arguments for deg2rad() +--INI-- +precision = 14 +--FILE-- + +--EXPECTF-- +Too many arguments + +Warning: deg2rad() expects exactly 1 parameter, 2 given in %s on line 11 +NULL + +Too few arguments + +Warning: deg2rad() expects exactly 1 parameter, 0 given in %s on line 14 +NULL diff --git a/ext/standard/tests/math/deg2rad_variation.phpt b/ext/standard/tests/math/deg2rad_variation.phpt new file mode 100644 index 0000000000..ad2fa279a9 --- /dev/null +++ b/ext/standard/tests/math/deg2rad_variation.phpt @@ -0,0 +1,76 @@ +--TEST-- +Test variations in usage of deg2rad() +--INI-- +precision = 10 +--FILE-- + +--EXPECTF-- +float(0.401425728) +float(-0.401425728) +float(0.4092797096) +float(-0.4092797096) +float(0.401425728) +float(0.401425728) +float(0.401425728) +float(0.4092797096) +float(0.4092797096) + +Warning: deg2rad() expects parameter 1 to be double, string given in %s on line 27 +NULL +float(17.45329252) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(17.45329252) +float(0) +float(0.01745329252) +float(0) +--UEXPECTF-- +float(0.401425728) +float(-0.401425728) +float(0.4092797096) +float(-0.4092797096) +float(0.401425728) +float(0.401425728) +float(0.401425728) +float(0.4092797096) +float(0.4092797096) + +Warning: deg2rad() expects parameter 1 to be double, Unicode string given in %s on line 27 +NULL +float(17.45329252) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(17.45329252) +float(0) +float(0.01745329252) +float(0) diff --git a/ext/standard/tests/math/exp_error.phpt b/ext/standard/tests/math/exp_error.phpt new file mode 100644 index 0000000000..6c8de64ddd --- /dev/null +++ b/ext/standard/tests/math/exp_error.phpt @@ -0,0 +1,13 @@ +--TEST-- +Test exp() - wrong params for exp() +--INI-- +precision=14 +--FILE-- + +--EXPECTF-- +Warning: exp() expects exactly 1 parameter, 0 given in %s on line %d + +Warning: exp() expects exactly 1 parameter, 2 given in %s on line %d diff --git a/ext/standard/tests/math/fmod_basic.phpt b/ext/standard/tests/math/fmod_basic.phpt new file mode 100644 index 0000000000..c29abca9d2 --- /dev/null +++ b/ext/standard/tests/math/fmod_basic.phpt @@ -0,0 +1,209 @@ +--TEST-- +Test fmod() - basic function test fmod() +--INI-- +precision=14 +--FILE-- + +--EXPECTF-- + +iteration 0 +float(0) +float(0) +float(4) +float(4) +float(0) +float(0) +float(0) +float(1.7) +float(4) +float(NAN) +float(0) +float(NAN) + +iteration 1 +float(-0) +float(-0) +float(-4) +float(-4) +float(-0) +float(-0) +float(-0) +float(-1.7) +float(-4) +float(NAN) +float(-0) +float(NAN) + +iteration 2 +float(0.5) +float(0.5) +float(4.5) +float(4.5) +float(0.5) +float(0.5) +float(0.5) +float(2.2) +float(4.5) +float(NAN) +float(0.5) +float(NAN) + +iteration 3 +float(-0.5) +float(-0.5) +float(-4.5) +float(-4.5) +float(-0.5) +float(-0.5) +float(-0.5) +float(-2.2) +float(-4.5) +float(NAN) +float(-0.5) +float(NAN) + +iteration 4 +float(0) +float(0) +float(4) +float(4) +float(0) +float(0) +float(0) +float(1.7) +float(4) +float(NAN) +float(0) +float(NAN) + +iteration 5 +float(0) +float(0) +float(4) +float(4) +float(0) +float(0) +float(0) +float(1.7) +float(4) +float(NAN) +float(0) +float(NAN) + +iteration 6 +float(0) +float(0) +float(4) +float(4) +float(0) +float(0) +float(0) +float(1.7) +float(4) +float(NAN) +float(0) +float(NAN) + +iteration 7 +float(0.5) +float(0.5) +float(4.5) +float(4.5) +float(0.5) +float(0.5) +float(0.5) +float(2.2) +float(4.5) +float(NAN) +float(0.5) +float(NAN) + +iteration 8 +float(0.5) +float(0.5) +float(4.5) +float(4.5) +float(0.5) +float(0.5) +float(0.5) +float(2.2) +float(4.5) +float(NAN) +float(0.5) +float(NAN) + +iteration 9 +float(0) +float(0) +float(0) +float(0) +float(0) +float(0) +float(0) +float(0) +float(0) +float(NAN) +float(0) +float(NAN) + +iteration 10 +float(1) +float(1) +float(1) +float(1) +float(1) +float(1) +float(1) +float(1) +float(1) +float(NAN) +float(0) +float(NAN) + +iteration 11 +float(0) +float(0) +float(0) +float(0) +float(0) +float(0) +float(0) +float(0) +float(0) +float(NAN) +float(0) +float(NAN) diff --git a/ext/standard/tests/math/fmod_error.phpt b/ext/standard/tests/math/fmod_error.phpt new file mode 100644 index 0000000000..42a6ad1a02 --- /dev/null +++ b/ext/standard/tests/math/fmod_error.phpt @@ -0,0 +1,17 @@ +--TEST-- +Test fmod() - wrong params test fmod() +--INI-- +precision=14 +--FILE-- + +--EXPECTF-- + +Warning: fmod() expects exactly 2 parameters, 0 given in %s on line 2 + +Warning: fmod() expects exactly 2 parameters, 1 given in %s on line 3 + +Warning: fmod() expects exactly 2 parameters, 3 given in %s on line 4 diff --git a/ext/standard/tests/math/getrandmax_basic.phpt b/ext/standard/tests/math/getrandmax_basic.phpt new file mode 100644 index 0000000000..4e52c192d8 --- /dev/null +++ b/ext/standard/tests/math/getrandmax_basic.phpt @@ -0,0 +1,9 @@ +--TEST-- +Test getrandmax() - basic function test getrandmax() +--FILE-- + +--EXPECTF-- +int(%d) \ No newline at end of file diff --git a/ext/standard/tests/math/getrandmax_error.phpt b/ext/standard/tests/math/getrandmax_error.phpt new file mode 100644 index 0000000000..9f244a2a6a --- /dev/null +++ b/ext/standard/tests/math/getrandmax_error.phpt @@ -0,0 +1,9 @@ +--TEST-- +Test getrandmax() - wrong params test getrandmax() +--FILE-- + +--EXPECTF-- +Warning: Wrong parameter count for getrandmax() in %s on line 2 +NULL diff --git a/ext/standard/tests/math/hexdec_basic.phpt b/ext/standard/tests/math/hexdec_basic.phpt new file mode 100644 index 0000000000..d1da737141 --- /dev/null +++ b/ext/standard/tests/math/hexdec_basic.phpt @@ -0,0 +1,46 @@ +--TEST-- +Test hexdec() - basic function test hexdec() +--FILE-- + +--EXPECTF-- +int(18433668) +int(126895953) +float(142929835591) +float(142929835592) +int(1194684) +int(7904751) +int(2147483647) +float(2147483648) +int(1194684) +int(3215381) +int(3215381) +int(3215379) +int(51446064) +int(18279) +int(70199) +int(1) +int(0) +int(0) diff --git a/ext/standard/tests/math/hexdec_error.phpt b/ext/standard/tests/math/hexdec_error.phpt new file mode 100644 index 0000000000..47c75f397f --- /dev/null +++ b/ext/standard/tests/math/hexdec_error.phpt @@ -0,0 +1,12 @@ +--TEST-- +Test hexdec() - wrong params test hexdec() +--FILE-- + +--EXPECTF-- + +Warning: hexdec() expects exactly 1 parameter, 0 given in %s on line %d + +Warning: hexdec() expects exactly 1 parameter, 2 given in %s on line %d diff --git a/ext/standard/tests/math/hypot_error.phpt b/ext/standard/tests/math/hypot_error.phpt new file mode 100644 index 0000000000..95e1a2b17b --- /dev/null +++ b/ext/standard/tests/math/hypot_error.phpt @@ -0,0 +1,17 @@ +--TEST-- +Test hypot() - wrong params test hypot() +--INI-- +precision=14 +--FILE-- + +--EXPECTF-- + +Warning: hypot() expects exactly 2 parameters, 0 given in %s on line %d + +Warning: hypot() expects exactly 2 parameters, 1 given in %s on line %d + +Warning: hypot() expects exactly 2 parameters, 3 given in %s on line %d diff --git a/ext/standard/tests/math/is_finite_basic.phpt b/ext/standard/tests/math/is_finite_basic.phpt new file mode 100644 index 0000000000..85d2685273 --- /dev/null +++ b/ext/standard/tests/math/is_finite_basic.phpt @@ -0,0 +1,41 @@ +--TEST-- +Test is_finite() - basic function test is_finite() +--FILE-- + +--EXPECTF-- +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(false) +bool(false) + + diff --git a/ext/standard/tests/math/is_finite_error.phpt b/ext/standard/tests/math/is_finite_error.phpt new file mode 100644 index 0000000000..e26563079e --- /dev/null +++ b/ext/standard/tests/math/is_finite_error.phpt @@ -0,0 +1,13 @@ +--TEST-- +Test is_finite() - wrong params test is_finite() +--FILE-- + +--EXPECTF-- + +Warning: is_finite() expects exactly 1 parameter, 0 given in %s on line 2 + +Warning: is_finite() expects exactly 1 parameter, 3 given in %s on line 3 + diff --git a/ext/standard/tests/math/is_infinite_basic.phpt b/ext/standard/tests/math/is_infinite_basic.phpt new file mode 100644 index 0000000000..ca79922287 --- /dev/null +++ b/ext/standard/tests/math/is_infinite_basic.phpt @@ -0,0 +1,42 @@ +--TEST-- +Test is_infinite() - basic function test is_infinite() +--FILE-- + +--EXPECTF-- +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(true) +bool(false) + + + diff --git a/ext/standard/tests/math/is_infinite_error.phpt b/ext/standard/tests/math/is_infinite_error.phpt new file mode 100644 index 0000000000..5d6ad9d42c --- /dev/null +++ b/ext/standard/tests/math/is_infinite_error.phpt @@ -0,0 +1,12 @@ +--TEST-- +Test is_infinite() - wrong params test is_infinite() +--FILE-- + +--EXPECTF-- + +Warning: is_infinite() expects exactly 1 parameter, 0 given in %s on line 2 + +Warning: is_infinite() expects exactly 1 parameter, 3 given in %s on line 3 diff --git a/ext/standard/tests/math/is_nan_basic.phpt b/ext/standard/tests/math/is_nan_basic.phpt new file mode 100644 index 0000000000..fb10737cea --- /dev/null +++ b/ext/standard/tests/math/is_nan_basic.phpt @@ -0,0 +1,45 @@ +--TEST-- +Test is_nan() - basic function test is_nan() +--FILE-- + + +--EXPECTF-- +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(true) + + + diff --git a/ext/standard/tests/math/is_nan_error.phpt b/ext/standard/tests/math/is_nan_error.phpt new file mode 100644 index 0000000000..7749e4e406 --- /dev/null +++ b/ext/standard/tests/math/is_nan_error.phpt @@ -0,0 +1,16 @@ +--TEST-- +Test is_nan() - wrong params test is_nan() +--FILE-- + +--EXPECTF-- + +Warning: is_nan() expects exactly 1 parameter, 0 given in %s on line 2 + +Warning: is_nan() expects exactly 1 parameter, 3 given in %s on line 3 + + + + diff --git a/ext/standard/tests/math/lcg_value_basic.phpt b/ext/standard/tests/math/lcg_value_basic.phpt new file mode 100644 index 0000000000..6d624d84ab --- /dev/null +++ b/ext/standard/tests/math/lcg_value_basic.phpt @@ -0,0 +1,56 @@ +--TEST-- +Maths test for xapic versions of lcg_value() +--FILE-- + 1) { + break; + } +} + +if ($i != 100) { + echo "FAILED\n"; +} else { + echo "PASSED\n"; +} + +echo "\n lcg_value error cases..spurious args get ignored\n"; +$res = lcg_value(23); + +if (!is_float($res) || $res < 0 || $res > 1) { + echo "FAILED\n"; +} else { + echo "PASSED\n"; +} + +$res = lcg_value(10,false); +if (!is_float($res) || $res < 0 || $res > 1) { + echo "FAILED\n"; +} else { + echo "PASSED\n"; +} + +echo "MATHS test script completed\n"; + +?> + +--EXPECT-- +MATHS test script started + + lcg_value tests... +PASSED + + lcg_value error cases..spurious args get ignored +PASSED +PASSED +MATHS test script completed + + + diff --git a/ext/standard/tests/math/log10_basic.phpt b/ext/standard/tests/math/log10_basic.phpt new file mode 100644 index 0000000000..0877df23d7 --- /dev/null +++ b/ext/standard/tests/math/log10_basic.phpt @@ -0,0 +1,55 @@ +--TEST-- +Test return type and value for expected input log10() +--INI-- +precision = 14 +--FILE-- + +--EXPECTF-- +log10 1 = float(%f) +Pass +log10 10 = float(%f) +Pass +log10 100 = float(%f) +Pass diff --git a/ext/standard/tests/math/log10_error.phpt b/ext/standard/tests/math/log10_error.phpt new file mode 100644 index 0000000000..d0245de507 --- /dev/null +++ b/ext/standard/tests/math/log10_error.phpt @@ -0,0 +1,31 @@ +--TEST-- +Test wrong number of arguments for log10() +--INI-- +precision = 14 +--FILE-- + +--EXPECTF-- +Too many arguments + +Warning: log10() expects exactly 1 parameter, 2 given in %s on line 11 +NULL + +Too few arguments + +Warning: log10() expects exactly 1 parameter, 0 given in %s on line 14 +NULL diff --git a/ext/standard/tests/math/log10_variation.phpt b/ext/standard/tests/math/log10_variation.phpt new file mode 100644 index 0000000000..31987f1854 --- /dev/null +++ b/ext/standard/tests/math/log10_variation.phpt @@ -0,0 +1,76 @@ +--TEST-- +Test variations in usage of log10() +--INI-- +precision = 10 +--FILE-- + +--EXPECTF-- +float(1.361727836) +float(NAN) +float(1.370142847) +float(NAN) +float(1.361727836) +float(1.361727836) +float(1.361727836) +float(1.370142847) +float(1.370142847) + +Warning: log10() expects parameter 1 to be double, string given in %s on line 27 +NULL +float(3) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(3) +float(-INF) +float(0) +float(-INF) +--UEXPECTF-- +float(1.361727836) +float(NAN) +float(1.370142847) +float(NAN) +float(1.361727836) +float(1.361727836) +float(1.361727836) +float(1.370142847) +float(1.370142847) + +Warning: log10() expects parameter 1 to be double, Unicode string given in %s on line 27 +NULL +float(3) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(3) +float(-INF) +float(0) +float(-INF) diff --git a/ext/standard/tests/math/log_basic.phpt b/ext/standard/tests/math/log_basic.phpt new file mode 100644 index 0000000000..e2f9c9fe7d --- /dev/null +++ b/ext/standard/tests/math/log_basic.phpt @@ -0,0 +1,60 @@ +--TEST-- +Test log() - basic function test log() +--INI-- +precision=14 +--FILE-- + + +--EXPECTF-- + LOG tests...no base +float(3.1354942159291) +float(NAN) +float(3.1548704948923) +float(NAN) +float(3.1354942159291) +float(3.1354942159291) +float(3.1354942159291) +float(3.1548704948923) +float(3.1548704948923) +float(-INF) +float(0) +float(-INF) + + LOG tests...base +float(2.2617809780285) +float(NAN) +float(2.275758008814) +float(NAN) +float(2.2617809780285) +float(2.2617809780285) +float(2.2617809780285) +float(2.275758008814) +float(2.275758008814) +float(-INF) +float(0) +float(-INF) diff --git a/ext/standard/tests/math/log_error.phpt b/ext/standard/tests/math/log_error.phpt new file mode 100644 index 0000000000..84877287ec --- /dev/null +++ b/ext/standard/tests/math/log_error.phpt @@ -0,0 +1,17 @@ +--TEST-- +Test log() - wrong params test log() +--INI-- +precision=14 +--FILE-- + +--EXPECTF-- + +Warning: log() expects at least 1 parameter, 0 given in %s on line %d + +Warning: log() expects at most 2 parameters, 3 given in %s on line %d + +Warning: log(): base must be greater than 0 in %s on line %d diff --git a/ext/standard/tests/math/mt_getrandmax_basic.phpt b/ext/standard/tests/math/mt_getrandmax_basic.phpt new file mode 100644 index 0000000000..29a30d088f --- /dev/null +++ b/ext/standard/tests/math/mt_getrandmax_basic.phpt @@ -0,0 +1,8 @@ +--TEST-- +Test mt_getrandmax() - basic function test mt_getrandmax() +--FILE-- + +--EXPECTF-- +int(%d) \ No newline at end of file diff --git a/ext/standard/tests/math/mt_getrandmax_error.phpt b/ext/standard/tests/math/mt_getrandmax_error.phpt new file mode 100644 index 0000000000..b30da3a91c --- /dev/null +++ b/ext/standard/tests/math/mt_getrandmax_error.phpt @@ -0,0 +1,9 @@ +--TEST-- +Test mt_getrandmax() - wrong paramas mt_getrandmax() +--FILE-- + +--EXPECTF-- +Warning: Wrong parameter count for mt_getrandmax() in %s on line 2 +NULL \ No newline at end of file diff --git a/ext/standard/tests/math/mt_rand_basic.phpt b/ext/standard/tests/math/mt_rand_basic.phpt new file mode 100644 index 0000000000..8b6b3cb2ce --- /dev/null +++ b/ext/standard/tests/math/mt_rand_basic.phpt @@ -0,0 +1,102 @@ +--TEST-- +Test mt_rand() - basic function test mt_rand() +--FILE-- + $default_max) { + break; + } +} + +if ($i != 100) { + echo "FAILED: res = ", $res, " min = 0 max = ", $default_max, "\n"; +} else { + echo "PASSED: range min = 0 max = ", $default_max, "\n"; +} + +echo "\nmt_rand() tests with defined min and max value\n"; + +$min = array(10, + 100, + 10.5, + 10.5e3, + 0x10, + 0400); + +$max = array(100, + 1000, + 19.5, + 10.5e5, + 0x10000, + 0700); + +for ($x = 0; $x < count($min); $x++) { + for ($i = 0; $i < 100; $i++) { + $res = mt_rand($min[$x], $max[$x]); + + if (!is_int($res) || $res < intval($min[$x]) || $res > intval($max[$x])) { + echo "FAILED: res = ", $res, " min = ", intval($min[$x]), " max = ", intval($max[$x]), "\n"; + break; + } + } + + if ($i == 100) { + echo "PASSED: range min = ", intval($min[$x]), " max = ", intval($max[$x]), "\n"; + } +} + +echo "\nNon-numeric cases\n"; +$min = array(true, + false, + null, + "10", + "0x10", + "10.5"); + +// Eexepcted numerical equivalent of above non-numerics +$minval = array(1, + 0, + 0, + 10, + 0, + 10); +for ($x = 0; $x < count($min); $x++) { + for ($i = 0; $i < 100; $i++) { + $res = mt_rand($min[$x], 100); + + if (!is_int($res) || $res < intval($minval[$x]) || $res > 100) { + echo "FAILED: res = ", $res, " min = ", intval($min[$x]), " max = ", intval($max[$x]), "\n"; + break; + } + } + + if ($i == 100) { + echo "PASSED range min = ", intval($min[$x]), " max = 100\n"; + } +} +?> +--EXPECTF-- +mt_rand() tests with default min and max value (i.e 0 thru 2147483647) +PASSED: range min = 0 max = 2147483647 + +mt_rand() tests with defined min and max value +PASSED: range min = 10 max = 100 +PASSED: range min = 100 max = 1000 +PASSED: range min = 10 max = 19 +PASSED: range min = 10500 max = 1050000 +PASSED: range min = 16 max = 65536 +PASSED: range min = 256 max = 448 + +Non-numeric cases +PASSED range min = 1 max = 100 +PASSED range min = 0 max = 100 +PASSED range min = 0 max = 100 +PASSED range min = 10 max = 100 +PASSED range min = 0 max = 100 +PASSED range min = 10 max = 100 diff --git a/ext/standard/tests/math/mt_rand_error.phpt b/ext/standard/tests/math/mt_rand_error.phpt new file mode 100644 index 0000000000..03b1ecd6f9 --- /dev/null +++ b/ext/standard/tests/math/mt_rand_error.phpt @@ -0,0 +1,28 @@ +--TEST-- +Test mt_rand() - wrong params test mt_rand() +--FILE-- + + +--EXPECTF-- + +Warning: mt_rand() expects exactly 2 parameters, 1 given in %s on line %d + +Warning: mt_rand() expects exactly 2 parameters, 3 given in %s on line %d + +Warning: mt_rand() expects parameter 1 to be long, string given in %s on line %d + +Warning: mt_rand() expects parameter 2 to be long, string given in %s on line %d +--UEXPECTF-- + +Warning: mt_rand() expects exactly 2 parameters, 1 given in %s on line %d + +Warning: mt_rand() expects exactly 2 parameters, 3 given in %s on line %d + +Warning: mt_rand() expects parameter 1 to be long, Unicode string given in %s on line %d + +Warning: mt_rand() expects parameter 2 to be long, Unicode string given in %s on line %d diff --git a/ext/standard/tests/math/mt_srand_basic.phpt b/ext/standard/tests/math/mt_srand_basic.phpt new file mode 100644 index 0000000000..e28b1b9eae --- /dev/null +++ b/ext/standard/tests/math/mt_srand_basic.phpt @@ -0,0 +1,24 @@ +--TEST-- +Test mt_srand() - basic function (return values) mt_srand() +--FILE-- + +--EXPECTF-- +NULL +NULL +NULL +NULL +NULL +NULL +NULL +NULL \ No newline at end of file diff --git a/ext/standard/tests/math/mt_srand_error.phpt b/ext/standard/tests/math/mt_srand_error.phpt new file mode 100644 index 0000000000..53fcf6a8ff --- /dev/null +++ b/ext/standard/tests/math/mt_srand_error.phpt @@ -0,0 +1,26 @@ +--TEST-- +Test mt_srand() - wrong params test mt_srand() +--FILE-- + +--EXPECTF-- +Warning: mt_srand() expects at most 1 parameter, 2 given in %s on line %d +NULL + +Warning: mt_srand() expects parameter 1 to be long, string given in %s on line %d +NULL + +Notice: A non well formed numeric value encountered in %s on line %d +NULL +--UEXPECTF-- +Warning: mt_srand() expects at most 1 parameter, 2 given in %s on line %d +NULL + +Warning: mt_srand() expects parameter 1 to be long, Unicode string given in %s on line %d +NULL + +Notice: A non well formed numeric value encountered in %s on line %d +NULL diff --git a/ext/standard/tests/math/number_format_basic.phpt b/ext/standard/tests/math/number_format_basic.phpt new file mode 100644 index 0000000000..9a17dfc8e7 --- /dev/null +++ b/ext/standard/tests/math/number_format_basic.phpt @@ -0,0 +1,153 @@ +--TEST-- +Test number_format() - basic function test number_format() +--FILE-- + +--EXPECTF-- + number_format tests.....default +string(5) "1,235" +string(6) "-1,235" +string(10) "12,346,578" +string(11) "-12,345,679" +string(11) "305,450,479" +string(11) "402,653,183" +string(11) "123,456,789" +string(3) "123" +string(3) "123" +string(1) "0" +string(1) "1" +string(1) "0" + + number_format tests.....with two dp +string(8) "1,234.57" +string(9) "-1,234.57" +string(13) "12,346,578.00" +string(14) "-12,345,678.90" +string(14) "305,450,479.00" +string(14) "402,653,183.00" +string(14) "123,456,789.00" +string(6) "123.46" +string(6) "123.46" +string(4) "0.00" +string(4) "1.00" +string(4) "0.00" + + number_format tests.....English format +string(8) "1 234.57" +string(9) "-1 234.57" +string(13) "12 346 578.00" +string(14) "-12 345 678.90" +string(14) "305 450 479.00" +string(14) "402 653 183.00" +string(14) "123 456 789.00" +string(6) "123.46" +string(6) "123.46" +string(4) "0.00" +string(4) "1.00" +string(4) "0.00" + + number_format tests.....French format +string(8) "1 234,57" +string(9) "-1 234,57" +string(13) "12 346 578,00" +string(14) "-12 345 678,90" +string(14) "305 450 479,00" +string(14) "402 653 183,00" +string(14) "123 456 789,00" +string(6) "123,46" +string(6) "123,46" +string(4) "0,00" +string(4) "1,00" +string(4) "0,00" +--UEXPECTF-- +number_format tests.....default +unicode(5) "1,235" +unicode(6) "-1,235" +unicode(10) "12,346,578" +unicode(11) "-12,345,679" +unicode(11) "305,450,479" +unicode(11) "402,653,183" +unicode(11) "123,456,789" +unicode(3) "123" +unicode(3) "123" +unicode(1) "0" +unicode(1) "1" +unicode(1) "0" + + number_format tests.....with two dp +unicode(8) "1,234.57" +unicode(9) "-1,234.57" +unicode(13) "12,346,578.00" +unicode(14) "-12,345,678.90" +unicode(14) "305,450,479.00" +unicode(14) "402,653,183.00" +unicode(14) "123,456,789.00" +unicode(6) "123.46" +unicode(6) "123.46" +unicode(4) "0.00" +unicode(4) "1.00" +unicode(4) "0.00" + + number_format tests.....English format +unicode(8) "1 234.57" +unicode(9) "-1 234.57" +unicode(13) "12 346 578.00" +unicode(14) "-12 345 678.90" +unicode(14) "305 450 479.00" +unicode(14) "402 653 183.00" +unicode(14) "123 456 789.00" +unicode(6) "123.46" +unicode(6) "123.46" +unicode(4) "0.00" +unicode(4) "1.00" +unicode(4) "0.00" + + number_format tests.....French format +unicode(8) "1 234,57" +unicode(9) "-1 234,57" +unicode(13) "12 346 578,00" +unicode(14) "-12 345 678,90" +unicode(14) "305 450 479,00" +unicode(14) "402 653 183,00" +unicode(14) "123 456 789,00" +unicode(6) "123,46" +unicode(6) "123,46" +unicode(4) "0,00" +unicode(4) "1,00" +unicode(4) "0,00" diff --git a/ext/standard/tests/math/octdec_basic.phpt b/ext/standard/tests/math/octdec_basic.phpt new file mode 100644 index 0000000000..5412bd8bab --- /dev/null +++ b/ext/standard/tests/math/octdec_basic.phpt @@ -0,0 +1,45 @@ +--TEST-- +Test octdec() - basic function test octdec() +--FILE-- + +--EXPECTF-- +int(14489) +int(253) +int(36947879) +int(4618484) +int(4104) +int(5349) +int(342391) +int(375) +int(2147483647) +float(2147483648) +int(668) +int(5349) +int(102923) +int(823384) +int(1) +int(0) +int(0) \ No newline at end of file diff --git a/ext/standard/tests/math/octdec_error.phpt b/ext/standard/tests/math/octdec_error.phpt new file mode 100644 index 0000000000..d933ac290d --- /dev/null +++ b/ext/standard/tests/math/octdec_error.phpt @@ -0,0 +1,12 @@ +--TEST-- +Test octdec() - wrong params test octdec() +--FILE-- + +--EXPECTF-- + +Warning: octdec() expects exactly 1 parameter, 0 given in %s on line %d + +Warning: octdec() expects exactly 1 parameter, 2 given in %s on line %d diff --git a/ext/standard/tests/math/pi_basic.phpt b/ext/standard/tests/math/pi_basic.phpt new file mode 100644 index 0000000000..fec5691371 --- /dev/null +++ b/ext/standard/tests/math/pi_basic.phpt @@ -0,0 +1,14 @@ +--TEST-- +Test pi() - basic function test pi() +--INI-- +precision=14 +--FILE-- + +--EXPECTF-- +3.1415926535898 +3.1415926535898 diff --git a/ext/standard/tests/math/pow_basic.phpt b/ext/standard/tests/math/pow_basic.phpt new file mode 100644 index 0000000000..96864e0abc --- /dev/null +++ b/ext/standard/tests/math/pow_basic.phpt @@ -0,0 +1,37 @@ +--TEST-- +Test pow() - basic function test pow() +--INI-- +precision=14 +--FILE-- + +--EXPECTF-- +int(279841) +int(279841) +float(302392.75950625) +float(302392.75950625) +int(279841) +int(279841) +int(279841) +float(302392.75950625) +float(302392.75950625) +int(0) +int(1) +int(0) \ No newline at end of file diff --git a/ext/standard/tests/math/pow_error.phpt b/ext/standard/tests/math/pow_error.phpt new file mode 100644 index 0000000000..d00173eb48 --- /dev/null +++ b/ext/standard/tests/math/pow_error.phpt @@ -0,0 +1,19 @@ +--TEST-- +Test pow() - wrong params test pow() +--INI-- +precision=14 +--FILE-- + +--EXPECTF-- + +Warning: pow() expects exactly 2 parameters, 0 given in %s line 2 + +Warning: pow() expects exactly 2 parameters, 1 given in %s line 3 + +Warning: pow() expects exactly 2 parameters, 3 given in %s line 4 + + diff --git a/ext/standard/tests/math/rad2deg_basic.phpt b/ext/standard/tests/math/rad2deg_basic.phpt new file mode 100644 index 0000000000..0256ffbd90 --- /dev/null +++ b/ext/standard/tests/math/rad2deg_basic.phpt @@ -0,0 +1,65 @@ +--TEST-- +Test return type and value for expected input rad2deg() +--INI-- +precision = 14 +--FILE-- + +--EXPECTF-- +rad2deg 0= float(%f) +Pass +rad2deg 1.570796327 = float(%f) +Pass +rad2deg 3.141592654 = float(%f) +Pass +rad2deg 6.283185307 = float(%f) +Pass diff --git a/ext/standard/tests/math/rad2deg_error.phpt b/ext/standard/tests/math/rad2deg_error.phpt new file mode 100644 index 0000000000..931c60d023 --- /dev/null +++ b/ext/standard/tests/math/rad2deg_error.phpt @@ -0,0 +1,31 @@ +--TEST-- +Test wrong number of arguments for rad2deg() +--INI-- +precision = 14 +--FILE-- + +--EXPECTF-- +Too many arguments + +Warning: rad2deg() expects exactly 1 parameter, 2 given in %s on line 11 +NULL + +Too few arguments + +Warning: rad2deg() expects exactly 1 parameter, 0 given in %s on line 14 +NULL diff --git a/ext/standard/tests/math/rad2deg_variation.phpt b/ext/standard/tests/math/rad2deg_variation.phpt new file mode 100644 index 0000000000..96cc615631 --- /dev/null +++ b/ext/standard/tests/math/rad2deg_variation.phpt @@ -0,0 +1,76 @@ +--TEST-- +Test variations in usage of rad2deg() +--INI-- +precision = 10 +--FILE-- + +--EXPECTF-- +float(1317.802929) +float(-1317.802929) +float(1343.58603) +float(-1343.58603) +float(1317.802929) +float(1317.802929) +float(1317.802929) +float(1343.58603) +float(1343.58603) + +Warning: rad2deg() expects parameter 1 to be double, string given in %s on line 27 +NULL +float(57295.77951) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(57295.77951) +float(0) +float(57.29577951) +float(0) +--UEXPECTF-- +float(1317.802929) +float(-1317.802929) +float(1343.58603) +float(-1343.58603) +float(1317.802929) +float(1317.802929) +float(1317.802929) +float(1343.58603) +float(1343.58603) + +Warning: rad2deg() expects parameter 1 to be double, Unicode string given in %s on line 27 +NULL +float(57295.77951) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(57295.77951) +float(0) +float(57.29577951) +float(0) diff --git a/ext/standard/tests/math/rand_basic.phpt b/ext/standard/tests/math/rand_basic.phpt new file mode 100644 index 0000000000..525956017e --- /dev/null +++ b/ext/standard/tests/math/rand_basic.phpt @@ -0,0 +1,103 @@ +--TEST-- +Test rand() - basic function test rand() +--FILE-- + $default_max) { + break; + } +} + +if ($i != 100) { + echo "FAILED: res = ", $res, " min = 0 max = ", $default_max, "\n"; +} else { + echo "PASSED: range min = 0 max = ", $default_max, "\n"; +} + +echo "\nrand() tests with defined min and max value\n"; + +$min = array(10, + 100, + 10.5, + 10.5e3, + 0x10, + 0400); + +$max = array(100, + 1000, + 19.5, + 10.5e5, + 0x10000, + 0700); + +for ($x = 0; $x < count($min); $x++) { + for ($i = 0; $i < 100; $i++) { + $res = rand($min[$x], $max[$x]); + + if (!is_int($res) || $res < intval($min[$x]) || $res > intval($max[$x])) { + echo "FAILED: res = ", $res, " min = ", intval($min[$x]), " max = ", intval($max[$x]), "\n"; + break; + } + } + + if ($i == 100) { + echo "PASSED: range min = ", intval($min[$x]), " max = ", intval($max[$x]), "\n"; + } +} + +echo "\nNon-numeric cases\n"; +$min = array(true, + false, + null, + "10", + "0x10", + "10.5"); + +// Eexepcted numerical equivalent of above non-numerics +$minval = array(1, + 0, + 0, + 10, + 0, + 10); +for ($x = 0; $x < count($min); $x++) { + for ($i = 0; $i < 100; $i++) { + $res = rand($min[$x], 100); + + if (!is_int($res) || $res < intval($minval[$x]) || $res > 100) { + echo "FAILED: res = ", $res, " min = ", intval($min[$x]), " max = ", intval($max[$x]), "\n"; + break; + } + } + + if ($i == 100) { + echo "PASSED range min = ", intval($min[$x]), " max = 100\n"; + } +} +?> +--EXPECTF-- + +rand() tests with default min and max value (i.e 0 thru %i) +PASSED: range min = 0 max = %i + +rand() tests with defined min and max value +PASSED: range min = 10 max = 100 +PASSED: range min = 100 max = 1000 +PASSED: range min = 10 max = 19 +PASSED: range min = 10500 max = 1050000 +PASSED: range min = 16 max = 65536 +PASSED: range min = 256 max = 448 + +Non-numeric cases +PASSED range min = 1 max = 100 +PASSED range min = 0 max = 100 +PASSED range min = 0 max = 100 +PASSED range min = 10 max = 100 +PASSED range min = 0 max = 100 +PASSED range min = 10 max = 100 diff --git a/ext/standard/tests/math/rand_error.phpt b/ext/standard/tests/math/rand_error.phpt new file mode 100644 index 0000000000..7622644100 --- /dev/null +++ b/ext/standard/tests/math/rand_error.phpt @@ -0,0 +1,26 @@ +--TEST-- +Test rand() - wrong params test rand() +--FILE-- + +--EXPECTF-- + +Warning: rand() expects exactly 2 parameters, 1 given in %s on line %d + +Warning: rand() expects exactly 2 parameters, 3 given in %s on line %d + +Warning: rand() expects parameter 1 to be long, string given in %s on line %d + +Warning: rand() expects parameter 2 to be long, string given in %s on line %d +--UEXPECTF-- +Warning: rand() expects exactly 2 parameters, 1 given in %s on line %d + +Warning: rand() expects exactly 2 parameters, 3 given in %s on line %d + +Warning: rand() expects parameter 1 to be long, Unicode string given in %s on line %d + +Warning: rand() expects parameter 2 to be long, Unicode string given in %s on line %d diff --git a/ext/standard/tests/math/sqrt_basic.phpt b/ext/standard/tests/math/sqrt_basic.phpt new file mode 100644 index 0000000000..076a113016 --- /dev/null +++ b/ext/standard/tests/math/sqrt_basic.phpt @@ -0,0 +1,18 @@ +--TEST-- +Test return type and value for expected input sqrt() +--INI-- +precision = 14 +--FILE-- + +--EXPECT-- +float(3) diff --git a/ext/standard/tests/math/sqrt_error.phpt b/ext/standard/tests/math/sqrt_error.phpt new file mode 100644 index 0000000000..66d6d27355 --- /dev/null +++ b/ext/standard/tests/math/sqrt_error.phpt @@ -0,0 +1,31 @@ +--TEST-- +Test wrong number of arguments for sqrt() +--INI-- +precision = 14 +--FILE-- + +--EXPECTF-- +Too many arguments + +Warning: sqrt() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +Too few arguments + +Warning: sqrt() expects exactly 1 parameter, 0 given in %s on line %d +NULL diff --git a/ext/standard/tests/math/srand_basic.phpt b/ext/standard/tests/math/srand_basic.phpt new file mode 100644 index 0000000000..16aa2dd69e --- /dev/null +++ b/ext/standard/tests/math/srand_basic.phpt @@ -0,0 +1,24 @@ +--TEST-- +Maths test for xapic versions of srand() +--FILE-- + +--EXPECTF-- +NULL +NULL +NULL +NULL +NULL +NULL +NULL +NULL \ No newline at end of file diff --git a/ext/standard/tests/math/srand_error.phpt b/ext/standard/tests/math/srand_error.phpt new file mode 100644 index 0000000000..43f6369ff8 --- /dev/null +++ b/ext/standard/tests/math/srand_error.phpt @@ -0,0 +1,26 @@ +--TEST-- +Test srand() - wrong params test srand() +--FILE-- + +--EXPECTF-- +Warning: mt_srand() expects at most 1 parameter, 2 given in %s on line %d +NULL + +Warning: mt_srand() expects parameter 1 to be long, string given in %s on line %d +NULL + +Notice: A non well formed numeric value encountered in %s on line %d +NULL +--UEXPECTF-- +Warning: mt_srand() expects at most 1 parameter, 2 given in %s on line %d +NULL + +Warning: mt_srand() expects parameter 1 to be long, Unicode string given in %s on line %d +NULL + +Notice: A non well formed numeric value encountered in %s on line %d +NULL -- 2.40.0