summaryrefslogtreecommitdiff
path: root/ext/standard/tests
diff options
context:
space:
mode:
authorFerenc Kovacs <tyrael@php.net>2014-02-12 06:43:05 +0100
committerFerenc Kovacs <tyrael@php.net>2014-02-12 06:43:05 +0100
commit99bd2fd9c40b8766a73562297592a475a0b78023 (patch)
treed465ccbc464c2768825700edc4d48b67dee09f9a /ext/standard/tests
parent1f148f7ad99e78476ff20ef47c09082ae2861bc4 (diff)
parent06bbfe1e2a46d6c2eaf74b7c576b09114ee2e670 (diff)
downloadphp-git-99bd2fd9c40b8766a73562297592a475a0b78023.tar.gz
Merge branch 'PHP-5.6' into PHP-5.6.0
* PHP-5.6: (97 commits) update the alpha2 release date Fixed ZTS and added fix to NEWS. Implemented feature #45528: Allow the DateTimeZone constructor to accept timezones per offset too. Rename timelib_get_zone to timelib_parse_zone and export. fix regex to detect valgrind version New PCRE version got stricter fix regex to detect valgrind version New PCRE version got stricter Fixed memory leak in pow operator 5.5.9 now released Added information in NEWS and UPGRADING add T_POW (**) operator add NEWS block for 5.6.0alpha3 updated libs_version.txt updated libs_version.txt update libs_version.txt more tests for ICU >= 52.1 compat fix tests for ICU >= 52.1 Fix year adapt test to curl 7.35.0 upgrade move the NEWS entry into the right section Fixed SNI failure from missing Z_STRVAL_PP ...
Diffstat (limited to 'ext/standard/tests')
-rw-r--r--ext/standard/tests/math/pow-operator.phpt22
-rw-r--r--ext/standard/tests/math/pow_variation1.phpt2
-rw-r--r--ext/standard/tests/math/pow_variation1_64bit.phpt4
-rw-r--r--ext/standard/tests/math/pow_variation2.phpt4
-rw-r--r--ext/standard/tests/math/tan_basiclong_64bit.phpt37
5 files changed, 47 insertions, 22 deletions
diff --git a/ext/standard/tests/math/pow-operator.phpt b/ext/standard/tests/math/pow-operator.phpt
new file mode 100644
index 0000000000..f80cae1962
--- /dev/null
+++ b/ext/standard/tests/math/pow-operator.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Various pow() tests
+--FILE--
+<?php // $Id$
+
+$x = 2;
+$x **= 3;
+
+$tests = <<<TESTS
+ -3 ** 2 === -9
+ (-3) **2 === 9
+ 2 ** 3 ** 2 === 512
+ (2 ** 3) ** 2 === 64
+ $x === 8
+TESTS;
+
+ echo "On failure, please mail result to php-dev@lists.php.net\n";
+ include(dirname(__FILE__) . '/../../../../tests/quicktester.inc');
+
+--EXPECT--
+On failure, please mail result to php-dev@lists.php.net
+OK
diff --git a/ext/standard/tests/math/pow_variation1.phpt b/ext/standard/tests/math/pow_variation1.phpt
index df511906b0..5576e5b493 100644
--- a/ext/standard/tests/math/pow_variation1.phpt
+++ b/ext/standard/tests/math/pow_variation1.phpt
@@ -149,7 +149,7 @@ int(0)
int(0)
-- Iteration 19 --
-float(0)
+int(0)
-- Iteration 20 --
int(0)
diff --git a/ext/standard/tests/math/pow_variation1_64bit.phpt b/ext/standard/tests/math/pow_variation1_64bit.phpt
index 24b482680b..e1986ba858 100644
--- a/ext/standard/tests/math/pow_variation1_64bit.phpt
+++ b/ext/standard/tests/math/pow_variation1_64bit.phpt
@@ -149,7 +149,7 @@ int(0)
int(0)
-- Iteration 19 --
-float(0)
+int(0)
-- Iteration 20 --
int(0)
@@ -173,4 +173,4 @@ int(0)
-- Iteration 26 --
%s
-===Done=== \ No newline at end of file
+===Done===
diff --git a/ext/standard/tests/math/pow_variation2.phpt b/ext/standard/tests/math/pow_variation2.phpt
index b1800bb15f..f571936727 100644
--- a/ext/standard/tests/math/pow_variation2.phpt
+++ b/ext/standard/tests/math/pow_variation2.phpt
@@ -145,7 +145,7 @@ float(1)
float(1)
-- Iteration 19 --
-float(1)
+int(1)
-- Iteration 20 --
float(1)
@@ -169,4 +169,4 @@ float(1)
-- Iteration 26 --
%s
-===Done=== \ No newline at end of file
+===Done===
diff --git a/ext/standard/tests/math/tan_basiclong_64bit.phpt b/ext/standard/tests/math/tan_basiclong_64bit.phpt
index 8ab083d500..3c8abe9d27 100644
--- a/ext/standard/tests/math/tan_basiclong_64bit.phpt
+++ b/ext/standard/tests/math/tan_basiclong_64bit.phpt
@@ -1,5 +1,7 @@
--TEST--
Test tan function : 64bit long tests
+--INI--
+precision=5
--SKIPIF--
<?php
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
@@ -28,33 +30,34 @@ foreach ($longVals as $longVal) {
===DONE===
--EXPECT--
--- testing: 9223372036854775807 ---
-float(84.739312968756)
+float(84.739)
--- testing: -9223372036854775808 ---
-float(-84.739312968756)
+float(-84.739)
--- testing: 2147483647 ---
-float(1.0523779637351)
+float(1.0524)
--- testing: -2147483648 ---
-float(4.0842894552986)
+float(4.0843)
--- testing: 9223372034707292160 ---
-float(-0.25738520049439)
+float(-0.25739)
--- testing: -9223372034707292160 ---
-float(0.25738520049439)
+float(0.25739)
--- testing: 2147483648 ---
-float(-4.0842894552986)
+float(-4.0843)
--- testing: -2147483649 ---
-float(0.34328416030117)
+float(0.34328)
--- testing: 4294967294 ---
-float(-19.579238091943)
+float(-19.579)
--- testing: 4294967295 ---
-float(-0.57225137018055)
+float(-0.57225)
--- testing: 4294967293 ---
-float(0.71667000824652)
+float(0.71667)
--- testing: 9223372036854775806 ---
-float(84.739312968756)
---- testing: 9.2233720368548E+18 ---
-float(84.739312968756)
+float(84.739)
+--- testing: 9.2234E+18 ---
+float(84.739)
--- testing: -9223372036854775807 ---
-float(-84.739312968756)
---- testing: -9.2233720368548E+18 ---
-float(-84.739312968756)
+float(-84.739)
+--- testing: -9.2234E+18 ---
+float(-84.739)
===DONE===
+