From: Zoe Slattery Date: Tue, 4 Sep 2007 11:18:35 +0000 (+0000) Subject: Test cases for sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh. X-Git-Tag: RELEASE_2_0_0a1~1885 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8e59bf05cb0095f19a36799126729f623ce53ee0;p=php Test cases for sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh. --- diff --git a/ext/standard/tests/math/acos_basic.phpt b/ext/standard/tests/math/acos_basic.phpt new file mode 100644 index 0000000000..150eb975ad --- /dev/null +++ b/ext/standard/tests/math/acos_basic.phpt @@ -0,0 +1,69 @@ +--TEST-- +Test return type and value for expected input acos() +--INI-- +precision = 14 +--FILE-- + +--EXPECTF-- +acos .5 = float(%f) +Pass +acos 0.86602540378444 = float(%f) +Pass +acos 1.0 = float(%f) +Pass +acos 0.0 = float(%f) +Pass diff --git a/ext/standard/tests/math/acos_error.phpt b/ext/standard/tests/math/acos_error.phpt new file mode 100644 index 0000000000..0b34a9b779 --- /dev/null +++ b/ext/standard/tests/math/acos_error.phpt @@ -0,0 +1,30 @@ +--TEST-- +Test wrong number of arguments for acos() +--INI-- +--FILE-- + +--EXPECTF-- +Too many arguments + +Warning: acos() expects exactly 1 parameter, 2 given in %s on line 11 +NULL + +Too few arguments + +Warning: acos() expects exactly 1 parameter, 0 given in %s on line 14 +NULL diff --git a/ext/standard/tests/math/acos_variation.phpt b/ext/standard/tests/math/acos_variation.phpt new file mode 100644 index 0000000000..ecc2dc243d --- /dev/null +++ b/ext/standard/tests/math/acos_variation.phpt @@ -0,0 +1,76 @@ +--TEST-- +Test variations in usage of acos() +--INI-- +precision=10 +--FILE-- + +--EXPECTF-- +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) + +Warning: acos() expects parameter 1 to be double, string given in %s on line 27 +NULL +float(NAN) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(NAN) +float(1.570796327) +float(0) +float(1.570796327) +--UEXPECTF-- +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) + +Warning: acos() expects parameter 1 to be double, Unicode string given in %s on line 27 +NULL +float(NAN) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(NAN) +float(1.570796327) +float(0) +float(1.570796327) diff --git a/ext/standard/tests/math/acosh_basic.phpt b/ext/standard/tests/math/acosh_basic.phpt new file mode 100644 index 0000000000..34839ee2fd --- /dev/null +++ b/ext/standard/tests/math/acosh_basic.phpt @@ -0,0 +1,46 @@ +--TEST-- +Test return type and value for expected input acosh() +--SKIPIF-- + +--INI-- +precision = 14 +--FILE-- + +--EXPECTF-- +acosh 1.1276259652064= float(%f) +Pass +acosh 10.067661995778= float(%f) +Pass diff --git a/ext/standard/tests/math/acosh_error.phpt b/ext/standard/tests/math/acosh_error.phpt new file mode 100644 index 0000000000..8c95fc5172 --- /dev/null +++ b/ext/standard/tests/math/acosh_error.phpt @@ -0,0 +1,35 @@ +--TEST-- +Test wrong number of arguments for acosh() +--SKIPIF-- + +--INI-- +--FILE-- + +--EXPECTF-- +Too many arguments + +Warning: acosh() expects exactly 1 parameter, 2 given in %s on line 11 +NULL + +Too few arguments + +Warning: acosh() expects exactly 1 parameter, 0 given in %s on line 14 +NULL diff --git a/ext/standard/tests/math/acosh_variation.phpt b/ext/standard/tests/math/acosh_variation.phpt new file mode 100644 index 0000000000..f166a4753a --- /dev/null +++ b/ext/standard/tests/math/acosh_variation.phpt @@ -0,0 +1,81 @@ +--TEST-- +Test variations in usage of acosh() +--SKIPIF-- + +--INI-- +precision = 10 +--FILE-- + +--EXPECTF-- +float(3.828168471) +float(NAN) +float(3.847562739) +float(NAN) +float(3.828168471) +float(3.828168471) +float(3.828168471) +float(3.847562739) +float(3.847562739) + +Warning: acosh() expects parameter 1 to be double, string given in %s on line 27 +NULL +float(7.60090221) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(7.60090221) +float(NAN) +float(0) +float(NAN) +--UEXPECTF-- +float(3.828168471) +float(NAN) +float(3.847562739) +float(NAN) +float(3.828168471) +float(3.828168471) +float(3.828168471) +float(3.847562739) +float(3.847562739) + +Warning: acosh() expects parameter 1 to be double, Unicode string given in %s on line 27 +NULL +float(7.60090221) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(7.60090221) +float(NAN) +float(0) +float(NAN) diff --git a/ext/standard/tests/math/allowed_rounding_error.inc b/ext/standard/tests/math/allowed_rounding_error.inc new file mode 100644 index 0000000000..71dbf9af4a --- /dev/null +++ b/ext/standard/tests/math/allowed_rounding_error.inc @@ -0,0 +1,18 @@ + $min ) { + return true; + } + else { + return false; + } +} +?> \ No newline at end of file diff --git a/ext/standard/tests/math/asin_basic.phpt b/ext/standard/tests/math/asin_basic.phpt new file mode 100644 index 0000000000..183f7449bb --- /dev/null +++ b/ext/standard/tests/math/asin_basic.phpt @@ -0,0 +1,68 @@ +--TEST-- +Test return type and value for expected input asin() +--INI-- +precision = 14 +--FILE-- + +--EXPECTF-- +asin .5 = float(%f) +Pass +asin 0.86602540378444 = float(%f) +Pass +asin 1.0 = float(%f) +Pass +asin 0.0 = float(%f) +Pass diff --git a/ext/standard/tests/math/asin_error.phpt b/ext/standard/tests/math/asin_error.phpt new file mode 100644 index 0000000000..e7bfebc6b9 --- /dev/null +++ b/ext/standard/tests/math/asin_error.phpt @@ -0,0 +1,30 @@ +--TEST-- +Test wrong number of arguments for asin() +--INI-- +--FILE-- + +--EXPECTF-- +Too many arguments + +Warning: asin() expects exactly 1 parameter, 2 given in %s on line 11 +NULL + +Too few arguments + +Warning: asin() expects exactly 1 parameter, 0 given in %s on line 14 +NULL diff --git a/ext/standard/tests/math/asin_variation.phpt b/ext/standard/tests/math/asin_variation.phpt new file mode 100644 index 0000000000..0a14f43818 --- /dev/null +++ b/ext/standard/tests/math/asin_variation.phpt @@ -0,0 +1,76 @@ +--TEST-- +Test variations in usage of asin() +--INI-- +precision = 10 +--FILE-- + +--EXPECTF-- +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) + +Warning: asin() expects parameter 1 to be double, string given in %s on line 27 +NULL +float(NAN) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(NAN) +float(0) +float(1.570796327) +float(0) +--UEXPECTF-- +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) + +Warning: asin() expects parameter 1 to be double, Unicode string given in %s on line 27 +NULL +float(NAN) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(NAN) +float(0) +float(1.570796327) +float(0) diff --git a/ext/standard/tests/math/asinh_basic.phpt b/ext/standard/tests/math/asinh_basic.phpt new file mode 100644 index 0000000000..61f1731553 --- /dev/null +++ b/ext/standard/tests/math/asinh_basic.phpt @@ -0,0 +1,45 @@ +--TEST-- +Test return type and value for expected input asinh() +--SKIPIF-- + +--INI-- +precision = 14 +--FILE-- + +--EXPECTF-- +asinh 0.52109530549375= float(%f) +Pass +asinh 10.01787492741= float(%f) +Pass diff --git a/ext/standard/tests/math/asinh_error.phpt b/ext/standard/tests/math/asinh_error.phpt new file mode 100644 index 0000000000..2cea6ed073 --- /dev/null +++ b/ext/standard/tests/math/asinh_error.phpt @@ -0,0 +1,35 @@ +--TEST-- +Test wrong number of arguments for asinh() +--SKIPIF-- + +--INI-- +--FILE-- + +--EXPECTF-- +Too many arguments + +Warning: asinh() expects exactly 1 parameter, 2 given in %s on line 11 +NULL + +Too few arguments + +Warning: asinh() expects exactly 1 parameter, 0 given in %s on line 14 +NULL diff --git a/ext/standard/tests/math/asinh_variation.phpt b/ext/standard/tests/math/asinh_variation.phpt new file mode 100644 index 0000000000..aae658dd74 --- /dev/null +++ b/ext/standard/tests/math/asinh_variation.phpt @@ -0,0 +1,81 @@ +--TEST-- +Test variations in usage of asinh() +--SKIPIF-- + +--INI-- +precision = 10 +--FILE-- + +--EXPECTF-- +float(3.829113652) +float(-3.829113652) +float(3.848471992) +float(-3.848471992) +float(3.829113652) +float(3.829113652) +float(3.829113652) +float(3.848471992) +float(3.848471992) + +Warning: asinh() expects parameter 1 to be double, string given in %s on line 27 +NULL +float(7.60090271) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(7.60090271) +float(0) +float(0.881373587) +float(0) +--UEXPECTF-- +float(3.829113652) +float(-3.829113652) +float(3.848471992) +float(-3.848471992) +float(3.829113652) +float(3.829113652) +float(3.829113652) +float(3.848471992) +float(3.848471992) + +Warning: asinh() expects parameter 1 to be double, Unicode string given in %s on line 27 +NULL +float(7.60090271) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(7.60090271) +float(0) +float(0.881373587) +float(0) diff --git a/ext/standard/tests/math/atan_basic.phpt b/ext/standard/tests/math/atan_basic.phpt new file mode 100644 index 0000000000..f4a2bedf76 --- /dev/null +++ b/ext/standard/tests/math/atan_basic.phpt @@ -0,0 +1,40 @@ +--TEST-- +Test return type and value for expected input atan() +--INI-- +precision = 14 +--FILE-- + +--EXPECTF-- +atan 1.7320508075689 = float(%f) +Pass +atan 0.57735026918963 = float(%f) +Pass diff --git a/ext/standard/tests/math/atan_error.phpt b/ext/standard/tests/math/atan_error.phpt new file mode 100644 index 0000000000..052743fedf --- /dev/null +++ b/ext/standard/tests/math/atan_error.phpt @@ -0,0 +1,30 @@ +--TEST-- +Test wrong number of arguments for atan() +--INI-- +--FILE-- + +--EXPECTF-- +Too many arguments + +Warning: atan() expects exactly 1 parameter, 2 given in %s on line 11 +NULL + +Too few arguments + +Warning: atan() expects exactly 1 parameter, 0 given in %s on line 14 +NULL diff --git a/ext/standard/tests/math/atan_variation.phpt b/ext/standard/tests/math/atan_variation.phpt new file mode 100644 index 0000000000..de12f2cc1a --- /dev/null +++ b/ext/standard/tests/math/atan_variation.phpt @@ -0,0 +1,76 @@ +--TEST-- +Test variations in usage of atan() +--INI-- +precision = 10 +--FILE-- + +--EXPECTF-- +float(1.527345431) +float(-1.527345431) +float(1.528178225) +float(-1.528178225) +float(1.527345431) +float(1.527345431) +float(1.527345431) +float(1.528178225) +float(1.528178225) + +Warning: atan() expects parameter 1 to be double, string given in %s on line 27 +NULL +float(1.569796327) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(1.569796327) +float(0) +float(0.7853981634) +float(0) +--UEXPECTF-- +float(1.527345431) +float(-1.527345431) +float(1.528178225) +float(-1.528178225) +float(1.527345431) +float(1.527345431) +float(1.527345431) +float(1.528178225) +float(1.528178225) + +Warning: atan() expects parameter 1 to be double, Unicode string given in %s on line 27 +NULL +float(1.569796327) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(1.569796327) +float(0) +float(0.7853981634) +float(0) diff --git a/ext/standard/tests/math/atanh_basic.phpt b/ext/standard/tests/math/atanh_basic.phpt new file mode 100644 index 0000000000..c259bdb82b --- /dev/null +++ b/ext/standard/tests/math/atanh_basic.phpt @@ -0,0 +1,46 @@ +--TEST-- +Test return type and value for expected input atanh() +--SKIPIF-- + +--INI-- +precision = 14 +--FILE-- + +--EXPECTF-- +atanh 0.46211715726001 = float(%f) +Pass +atanh 0.99505475368673 = float(%f) +Pass diff --git a/ext/standard/tests/math/atanh_error.phpt b/ext/standard/tests/math/atanh_error.phpt new file mode 100644 index 0000000000..9759610b44 --- /dev/null +++ b/ext/standard/tests/math/atanh_error.phpt @@ -0,0 +1,35 @@ +--TEST-- +Test wrong number of arguments for atanh() +--SKIPIF-- + +--INI-- +--FILE-- + +--EXPECTF-- +Too many arguments + +Warning: atanh() expects exactly 1 parameter, 2 given in %s on line 11 +NULL + +Too few arguments + +Warning: atanh() expects exactly 1 parameter, 0 given in %s on line 14 +NULL diff --git a/ext/standard/tests/math/atanh_variation.phpt b/ext/standard/tests/math/atanh_variation.phpt new file mode 100644 index 0000000000..acde006980 --- /dev/null +++ b/ext/standard/tests/math/atanh_variation.phpt @@ -0,0 +1,81 @@ +--TEST-- +Test variations in usage of atanh() +--SKIPIF-- + +--INI-- +precision = 10 +--FILE-- + +--EXPECTF-- +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) + +Warning: atanh() expects parameter 1 to be double, string given in %s on line 27 +NULL +float(NAN) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(NAN) +float(0) +float(INF) +float(0) +--UEXPECTF-- +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) +float(NAN) + +Warning: atanh() expects parameter 1 to be double, Unicode string given in %s on line 27 +NULL +float(NAN) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(NAN) +float(0) +float(INF) +float(0) diff --git a/ext/standard/tests/math/cos_basic.phpt b/ext/standard/tests/math/cos_basic.phpt new file mode 100644 index 0000000000..f0cfa66ee5 --- /dev/null +++ b/ext/standard/tests/math/cos_basic.phpt @@ -0,0 +1,92 @@ +--TEST-- +Test return type and value for expected input cos() +--INI-- +precision = 14 +--FILE-- + +--EXPECTF-- +cos 30 = float(%f) +Pass +cos 60 = float(%f) +Pass +cos 90 = float(%f) +Pass +cos 180 = float(%f) +Pass +cos 270 = float(%f) +Pass +cos 360 = float(%f) +Pass diff --git a/ext/standard/tests/math/cos_error.phpt b/ext/standard/tests/math/cos_error.phpt new file mode 100644 index 0000000000..ddd6c876cf --- /dev/null +++ b/ext/standard/tests/math/cos_error.phpt @@ -0,0 +1,30 @@ +--TEST-- +Test wrong number of arguments for cos() +--INI-- +--FILE-- + +--EXPECTF-- +Too many arguments + +Warning: cos() expects exactly 1 parameter, 2 given in %s on line 11 +NULL + +Too few arguments + +Warning: cos() expects exactly 1 parameter, 0 given in %s on line 14 +NULL diff --git a/ext/standard/tests/math/cos_variation.phpt b/ext/standard/tests/math/cos_variation.phpt new file mode 100644 index 0000000000..9a2327323d --- /dev/null +++ b/ext/standard/tests/math/cos_variation.phpt @@ -0,0 +1,76 @@ +--TEST-- +Test variations in usage of cos() +--INI-- +precision = 10 +--FILE-- + +--EXPECTF-- +float(-0.5328330203) +float(-0.5328330203) +float(-0.1117112391) +float(-0.1117112391) +float(-0.5328330203) +float(-0.5328330203) +float(-0.5328330203) +float(-0.1117112391) +float(-0.1117112391) + +Warning: cos() expects parameter 1 to be double, string given in %s on line 27 +NULL +float(0.5623790763) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(0.5623790763) +float(1) +float(0.5403023059) +float(1) +--UEXPECTF-- +float(-0.5328330203) +float(-0.5328330203) +float(-0.1117112391) +float(-0.1117112391) +float(-0.5328330203) +float(-0.5328330203) +float(-0.5328330203) +float(-0.1117112391) +float(-0.1117112391) + +Warning: cos() expects parameter 1 to be double, Unicode string given in %s on line 27 +NULL +float(0.5623790763) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(0.5623790763) +float(1) +float(0.5403023059) +float(1) diff --git a/ext/standard/tests/math/cosh_basic.phpt b/ext/standard/tests/math/cosh_basic.phpt new file mode 100644 index 0000000000..5f70334a07 --- /dev/null +++ b/ext/standard/tests/math/cosh_basic.phpt @@ -0,0 +1,60 @@ +--TEST-- +Test return type and value for expected input cosh() +--INI-- +precision = 14 +--FILE-- + +--EXPECTF-- +cosh .5 = float(%f) +Pass +cosh -0.5 = float(%f) +Pass +cosh 3 = float(%f) +Pass +cosh -3 = float(%f) +Pass diff --git a/ext/standard/tests/math/cosh_error.phpt b/ext/standard/tests/math/cosh_error.phpt new file mode 100644 index 0000000000..7246ed4a9a --- /dev/null +++ b/ext/standard/tests/math/cosh_error.phpt @@ -0,0 +1,30 @@ +--TEST-- +Test wrong number of arguments for cosh() +--INI-- +--FILE-- + +--EXPECTF-- +Too many arguments + +Warning: cosh() expects exactly 1 parameter, 2 given in %s on line 11 +NULL + +Too few arguments + +Warning: cosh() expects exactly 1 parameter, 0 given in %s on line 14 +NULL diff --git a/ext/standard/tests/math/cosh_variation.phpt b/ext/standard/tests/math/cosh_variation.phpt new file mode 100644 index 0000000000..a98aceb5cc --- /dev/null +++ b/ext/standard/tests/math/cosh_variation.phpt @@ -0,0 +1,76 @@ +--TEST-- +Test variations in usage of cosh() +--INI-- +precision = 10 +--FILE-- + +--EXPECTF-- +float(4872401723) +float(4872401723) +float(7641446995) +float(7641446995) +float(4872401723) +float(4872401723) +float(4872401723) +float(7641446995) +float(7641446995) + +Warning: cosh() expects parameter 1 to be double, string given in %s on line 27 +NULL +float(INF) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(INF) +float(1) +float(1.543080635) +float(1) +--UEXPECTF-- +float(4872401723) +float(4872401723) +float(7641446995) +float(7641446995) +float(4872401723) +float(4872401723) +float(4872401723) +float(7641446995) +float(7641446995) + +Warning: cosh() expects parameter 1 to be double, Unicode string given in %s on line 27 +NULL +float(INF) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(INF) +float(1) +float(1.543080635) +float(1) diff --git a/ext/standard/tests/math/sin_basic.phpt b/ext/standard/tests/math/sin_basic.phpt new file mode 100644 index 0000000000..2b55ad7355 --- /dev/null +++ b/ext/standard/tests/math/sin_basic.phpt @@ -0,0 +1,92 @@ +--TEST-- +Test return type and value for expected input sin() +--INI-- +precision = 14 +--FILE-- + +--EXPECTF-- +sin 30 = float(%f) +Pass +sin 60 = float(%f) +Pass +sin 90 = float(%f) +Pass +sin 180 = float(%f) +Pass +sin 270 = float(%f) +Pass +sin 360 = float(%f) +Pass diff --git a/ext/standard/tests/math/sin_error.phpt b/ext/standard/tests/math/sin_error.phpt new file mode 100644 index 0000000000..3dac223f80 --- /dev/null +++ b/ext/standard/tests/math/sin_error.phpt @@ -0,0 +1,30 @@ +--TEST-- +Test wrong number of arguments for sin() +--INI-- +--FILE-- + +--EXPECTF-- +Too many arguments + +Warning: sin() expects exactly 1 parameter, 2 given in %s on line 11 +NULL + +Too few arguments + +Warning: sin() expects exactly 1 parameter, 0 given in %s on line 14 +NULL diff --git a/ext/standard/tests/math/sin_variation.phpt b/ext/standard/tests/math/sin_variation.phpt new file mode 100644 index 0000000000..32f55caa4f --- /dev/null +++ b/ext/standard/tests/math/sin_variation.phpt @@ -0,0 +1,76 @@ +--TEST-- +Test variations in usage of sin() +--INI-- +precision = 10 +--FILE-- + +--EXPECTF-- +float(-0.8462204042) +float(0.8462204042) +float(-0.9937407102) +float(0.9937407102) +float(-0.8462204042) +float(-0.8462204042) +float(-0.8462204042) +float(-0.9937407102) +float(-0.9937407102) + +Warning: sin() expects parameter 1 to be double, string given in %s on line 27 +NULL +float(0.8268795405) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(0.8268795405) +float(0) +float(0.8414709848) +float(0) +--UEXPECTF-- +float(-0.8462204042) +float(0.8462204042) +float(-0.9937407102) +float(0.9937407102) +float(-0.8462204042) +float(-0.8462204042) +float(-0.8462204042) +float(-0.9937407102) +float(-0.9937407102) + +Warning: sin() expects parameter 1 to be double, Unicode string given in %s on line 27 +NULL +float(0.8268795405) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(0.8268795405) +float(0) +float(0.8414709848) +float(0) diff --git a/ext/standard/tests/math/sinh_basic.phpt b/ext/standard/tests/math/sinh_basic.phpt new file mode 100644 index 0000000000..79bef6314c --- /dev/null +++ b/ext/standard/tests/math/sinh_basic.phpt @@ -0,0 +1,60 @@ +--TEST-- +Test return type and value for expected input sinh() +--INI-- +precision = 14 +--FILE-- + +--EXPECTF-- +sinh .5 = float(%f) +Pass +sinh -0.5 = float(%f) +Pass +sinh 3 = float(%f) +Pass +sinh -3 = float(%f) +Pass diff --git a/ext/standard/tests/math/sinh_error.phpt b/ext/standard/tests/math/sinh_error.phpt new file mode 100644 index 0000000000..5278262616 --- /dev/null +++ b/ext/standard/tests/math/sinh_error.phpt @@ -0,0 +1,30 @@ +--TEST-- +Test wrong number of arguments for sinh() +--INI-- +--FILE-- + +--EXPECTF-- +Too many arguments + +Warning: sinh() expects exactly 1 parameter, 2 given in %s on line 11 +NULL + +Too few arguments + +Warning: sinh() expects exactly 1 parameter, 0 given in %s on line 14 +NULL diff --git a/ext/standard/tests/math/sinh_variation.phpt b/ext/standard/tests/math/sinh_variation.phpt new file mode 100644 index 0000000000..9d495d24b8 --- /dev/null +++ b/ext/standard/tests/math/sinh_variation.phpt @@ -0,0 +1,76 @@ +--TEST-- +Test variations in usage of sinh() +--INI-- +precision = 10 +--FILE-- + +--EXPECTF-- +float(4872401723) +float(-4872401723) +float(7641446995) +float(-7641446995) +float(4872401723) +float(4872401723) +float(4872401723) +float(7641446995) +float(7641446995) + +Warning: sinh() expects parameter 1 to be double, string given in %s on line 27 +NULL +float(INF) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(INF) +float(0) +float(1.175201194) +float(0) +--UEXPECTF-- +float(4872401723) +float(-4872401723) +float(7641446995) +float(-7641446995) +float(4872401723) +float(4872401723) +float(4872401723) +float(7641446995) +float(7641446995) + +Warning: sinh() expects parameter 1 to be double, Unicode string given in %s on line 27 +NULL +float(INF) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(INF) +float(0) +float(1.175201194) +float(0) diff --git a/ext/standard/tests/math/tan_basic.phpt b/ext/standard/tests/math/tan_basic.phpt new file mode 100644 index 0000000000..e2934fb388 --- /dev/null +++ b/ext/standard/tests/math/tan_basic.phpt @@ -0,0 +1,41 @@ +--TEST-- +Test return type and value for expected input tan() +--INI-- +precision = 14 +--FILE-- + +--EXPECTF-- +tan 60 = float(%f) +Pass +tan 30 = float(%f) +Pass diff --git a/ext/standard/tests/math/tan_error.phpt b/ext/standard/tests/math/tan_error.phpt new file mode 100644 index 0000000000..afc76a2be2 --- /dev/null +++ b/ext/standard/tests/math/tan_error.phpt @@ -0,0 +1,30 @@ +--TEST-- +Test wrong number of arguments for tan() +--INI-- +--FILE-- + +--EXPECTF-- +Too many arguments + +Warning: tan() expects exactly 1 parameter, 2 given in %s on line 11 +NULL + +Too few arguments + +Warning: tan() expects exactly 1 parameter, 0 given in %s on line 14 +NULL diff --git a/ext/standard/tests/math/tan_variation.phpt b/ext/standard/tests/math/tan_variation.phpt new file mode 100644 index 0000000000..a15bf74ddb --- /dev/null +++ b/ext/standard/tests/math/tan_variation.phpt @@ -0,0 +1,76 @@ +--TEST-- +Test variations in usage of tan() +--INI-- +precision = 10 +--FILE-- + +--EXPECTF-- +float(1.588153083) +float(-1.588153083) +float(8.895619796) +float(-8.895619796) +float(1.588153083) +float(1.588153083) +float(1.588153083) +float(8.895619796) +float(8.895619796) + +Warning: tan() expects parameter 1 to be double, string given in %s on line 27 +NULL +float(1.470324156) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(1.470324156) +float(0) +float(1.557407725) +float(0) +--UEXPECTF-- +float(1.588153083) +float(-1.588153083) +float(8.895619796) +float(-8.895619796) +float(1.588153083) +float(1.588153083) +float(1.588153083) +float(8.895619796) +float(8.895619796) + +Warning: tan() expects parameter 1 to be double, Unicode string given in %s on line 27 +NULL +float(1.470324156) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(1.470324156) +float(0) +float(1.557407725) +float(0) diff --git a/ext/standard/tests/math/tanh_basic.phpt b/ext/standard/tests/math/tanh_basic.phpt new file mode 100644 index 0000000000..6b6a9dff7d --- /dev/null +++ b/ext/standard/tests/math/tanh_basic.phpt @@ -0,0 +1,60 @@ +--TEST-- +Test return type and value for expected input tanh() +--INI-- +precision = 14 +--FILE-- + +--EXPECTF-- +tanh .5 = float(%f) +Pass +tanh -0.5 = float(%f) +Pass +tanh 3 = float(%f) +Pass +tanh -3 = float(%f) +Pass diff --git a/ext/standard/tests/math/tanh_error.phpt b/ext/standard/tests/math/tanh_error.phpt new file mode 100644 index 0000000000..c72e9a8dca --- /dev/null +++ b/ext/standard/tests/math/tanh_error.phpt @@ -0,0 +1,30 @@ +--TEST-- +Test wrong number of arguments for tanh() +--INI-- +--FILE-- + +--EXPECTF-- +Too many arguments + +Warning: tanh() expects exactly 1 parameter, 2 given in %s on line 11 +NULL + +Too few arguments + +Warning: tanh() expects exactly 1 parameter, 0 given in %s on line 14 +NULL diff --git a/ext/standard/tests/math/tanh_variation.phpt b/ext/standard/tests/math/tanh_variation.phpt new file mode 100644 index 0000000000..9eb21102fb --- /dev/null +++ b/ext/standard/tests/math/tanh_variation.phpt @@ -0,0 +1,76 @@ +--TEST-- +Test variations in usage of tanh() +--INI-- +precision = 10 +--FILE-- + +--EXPECTF-- +float(1) +float(-1) +float(1) +float(-1) +float(1) +float(1) +float(1) +float(1) +float(1) + +Warning: tanh() expects parameter 1 to be double, string given in %s on line 27 +NULL +float(1) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(1) +float(0) +float(0.761594156) +float(0) +--UEXPECTF-- +float(1) +float(-1) +float(1) +float(-1) +float(1) +float(1) +float(1) +float(1) +float(1) + +Warning: tanh() expects parameter 1 to be double, Unicode string given in %s on line 27 +NULL +float(1) + +Notice: A non well formed numeric value encountered in %s on line 27 +float(1) +float(0) +float(0.761594156) +float(0)