diff --git a/ext/bz2/tests/with_strings.phpt b/ext/bz2/tests/with_strings.phpt index e04cc514a89ce..6815c1dae46fc 100644 --- a/ext/bz2/tests/with_strings.phpt +++ b/ext/bz2/tests/with_strings.phpt @@ -5,8 +5,6 @@ BZ2 with strings --FILE-- --EXPECT-- -OK +bool(true) diff --git a/ext/standard/tests/math/abs.phpt b/ext/standard/tests/math/abs.phpt index 2feb98965187a..505a93e3e5440 100644 --- a/ext/standard/tests/math/abs.phpt +++ b/ext/standard/tests/math/abs.phpt @@ -8,18 +8,21 @@ define('LONG_MIN', -LONG_MAX - 1); printf("%d,%d,%d,%d\n",is_int(LONG_MIN ),is_int(LONG_MAX ), is_int(LONG_MIN-1),is_int(LONG_MAX+1)); -$tests = << --EXPECT-- 1,1,0,0 -OK +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) diff --git a/ext/standard/tests/math/pow-operator.phpt b/ext/standard/tests/math/pow-operator.phpt index ad587dbb9ba49..88964509e7478 100644 --- a/ext/standard/tests/math/pow-operator.phpt +++ b/ext/standard/tests/math/pow-operator.phpt @@ -6,17 +6,16 @@ Various pow() tests $x = 2; $x **= 3; -$tests = << --EXPECT-- -On failure, please mail result to php-dev@lists.php.net -OK +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) diff --git a/ext/standard/tests/math/pow.phpt b/ext/standard/tests/math/pow.phpt index 18c0b9468c367..4b515ad882daf 100644 --- a/ext/standard/tests/math/pow.phpt +++ b/ext/standard/tests/math/pow.phpt @@ -8,142 +8,269 @@ define('LONG_MIN', -LONG_MAX - 1); printf("%d,%d,%d,%d\n",is_int(LONG_MIN ),is_int(LONG_MAX ), is_int(LONG_MIN-1),is_int(LONG_MAX+1)); -$tests = << --EXPECT-- 1,1,0,0 -On failure, please mail result to php-dev@lists.php.net -OK +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(true) +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(true) +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(true) +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(true) +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(true) +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(true) +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(true) +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(true) +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(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) diff --git a/ext/standard/tests/math/round.phpt b/ext/standard/tests/math/round.phpt index 90d120827f71b..6bcda70f14895 100644 --- a/ext/standard/tests/math/round.phpt +++ b/ext/standard/tests/math/round.phpt @@ -8,31 +8,51 @@ define('LONG_MIN', -LONG_MAX - 1); printf("%d,%d,%d,%d\n",is_int(LONG_MIN ),is_int(LONG_MAX ), is_int(LONG_MIN-1),is_int(LONG_MAX+1)); -$tests = << --EXPECT-- 1,1,0,0 -OK +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(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) diff --git a/ext/standard/tests/strings/trim.phpt b/ext/standard/tests/strings/trim.phpt index 71c56d986213e..fd0c26d7794aa 100644 --- a/ext/standard/tests/strings/trim.phpt +++ b/ext/standard/tests/strings/trim.phpt @@ -3,25 +3,36 @@ trim(), rtrim() and ltrim() functions --FILE-- --EXPECT-- -OK +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(true) +bool(true) +bool(true) diff --git a/ext/standard/tests/strings/wordwrap.phpt b/ext/standard/tests/strings/wordwrap.phpt index 7fefdb58c26b2..ff1d1fcbba593 100644 --- a/ext/standard/tests/strings/wordwrap.phpt +++ b/ext/standard/tests/strings/wordwrap.phpt @@ -3,35 +3,29 @@ wordwrap() function --FILE-- --EXPECT-- -OK +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(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) wordwrap(): Argument #3 ($break) cannot be empty diff --git a/tests/lang/bug24054.phpt b/tests/lang/bug24054.phpt index aa098fc5245bf..0b90ee3aff369 100644 --- a/tests/lang/bug24054.phpt +++ b/tests/lang/bug24054.phpt @@ -8,17 +8,13 @@ define('LONG_MIN', -LONG_MAX - 1); printf("%d,%d,%d,%d\n",is_int(LONG_MIN ),is_int(LONG_MAX ), is_int(LONG_MIN-1),is_int(LONG_MAX+1)); - $i = LONG_MAX; +$i = LONG_MAX; +$j = $i * 1001; +$i *= 1001; - $j = $i * 1001; - $i *= 1001; +var_dump($i === $j); -$tests = << --EXPECT-- 1,1,0,0 -OK +bool(true) diff --git a/tests/quicktester.inc b/tests/quicktester.inc deleted file mode 100644 index ba243beba01e3..0000000000000 --- a/tests/quicktester.inc +++ /dev/null @@ -1,74 +0,0 @@ -$test) -{ - // ignore empty lines - if (!$test) continue; - - // warn for trailing ; - if (substr(trim($test), -1, 1) === ';') { - echo "WARNING: trailing ';' found in test ".($n+1)."\n"; - exit; - } - - // try for operators - $operators = array('===', '~=='); - $operator = NULL; - foreach ($operators as $a_operator) { - if (strpos($test, $a_operator)!== FALSE) { - $operator = $a_operator; - list($left,$right) = explode($operator, $test); - break; - } - } - if (!$operator) { - echo "WARNING: unknown operator in '$test' (1)\n"; - exit; - } - - $left = eval("return ($left );"); - $right = eval("return ($right);"); - switch (@$operator) { - case '===': // exact match - $result = $left === $right; - break; - case '~==': // may differ after 12th significant number - if ( !is_float($left ) && !is_int($left ) - || !is_float($right) && !is_int($right)) { - $result = FALSE; - break; - } - $result = abs(($left-$right) / $left) < 1e-12; - break; - default: - echo "WARNING: unknown operator in '$test' (2)\n"; - exit; - } - - $success = $success && $result; - if (!$result) { - echo "\nAssert failed:\n"; - echo "$test\n"; - echo "Left: ";var_dump($left ); - echo "Right: ";var_dump($right); - } -} -if ($success) echo "OK";