felipe          Sat May 16 14:41:27 2009 UTC

  Added files:                 (Branch: PHP_5_3)
    /php-src/ext/standard/tests/misc    time_nanosleep_basic.phpt 
                                        time_nanosleep_error1.phpt 
                                        time_nanosleep_error2.phpt 
                                        time_nanosleep_error3.phpt 
                                        time_nanosleep_error4.phpt 
                                        time_nanosleep_error5.phpt 
  Log:
  - New tests (testfest CataloniaUG)
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/misc/time_nanosleep_basic.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/misc/time_nanosleep_basic.phpt
+++ php-src/ext/standard/tests/misc/time_nanosleep_basic.phpt
--TEST--
time_nanosleep — Delay for a number of seconds and nanoseconds
--SKIPIF--
<?php if (!function_exists('time_nanosleep')) die("skip"); ?>
--CREDITS--
Àlex Corretgé - a...@corretge.cat
--FILE--
<?php
$nano = time_nanosleep(2, 100000);

if ($nano === true) {
    echo "Slept for 2 seconds, 100 milliseconds.\n";
} elseif ($nano === false) {
    echo "Sleeping failed.\n";
} elseif (is_array($nano)) {
    $seconds = $nano['seconds'];
    $nanoseconds = $nano['nanoseconds'];
    echo "Interrupted by a signal.\n";
    echo "Time remaining: $seconds seconds, $nanoseconds nanoseconds.";
}
?>
--EXPECT--
Slept for 2 seconds, 100 milliseconds.

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/misc/time_nanosleep_error1.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/misc/time_nanosleep_error1.phpt
+++ php-src/ext/standard/tests/misc/time_nanosleep_error1.phpt
--TEST--
time_nanosleep — Delay for a number of seconds and nanoseconds
--SKIPIF--
<?php if (!function_exists('time_nanosleep')) die("skip"); ?>
--CREDITS--
Àlex Corretgé - a...@corretge.cat
--FILE--
<?php

$nano = time_nanosleep('A', 100000);

?>
--EXPECTF--
Warning: time_nanosleep() expects parameter 1 to be long, 
%unicode_string_optional% given in %s.php on line %d

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/misc/time_nanosleep_error2.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/misc/time_nanosleep_error2.phpt
+++ php-src/ext/standard/tests/misc/time_nanosleep_error2.phpt
--TEST--
time_nanosleep — Delay for a number of seconds and nanoseconds
--SKIPIF--
<?php if (!function_exists('time_nanosleep')) die("skip"); ?>
--CREDITS--
Àlex Corretgé - a...@corretge.cat
--FILE--
<?php

$nano = time_nanosleep(2, 'B');

?>
--EXPECTF--
Warning: time_nanosleep() expects parameter 2 to be long, 
%unicode_string_optional% given in %s.php on line %d

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/misc/time_nanosleep_error3.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/misc/time_nanosleep_error3.phpt
+++ php-src/ext/standard/tests/misc/time_nanosleep_error3.phpt
--TEST--
time_nanosleep — Delay for a number of seconds and nanoseconds
--SKIPIF--
<?php if (!function_exists('time_nanosleep')) die("skip"); ?>
--CREDITS--
Àlex Corretgé - a...@corretge.cat
--FILE--
<?php

$nano = time_nanosleep(-2, 1000);

?>
--EXPECTF--
Warning: time_nanosleep(): nanoseconds was not in the range 0 to 999 999 999 or 
seconds was negative in %s.php on line %d

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt
+++ php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt
--TEST--
time_nanosleep — Delay for a number of seconds and nanoseconds
--SKIPIF--
<?php if (!function_exists('time_nanosleep')) die("skip"); ?>
--CREDITS--
Àlex Corretgé - a...@corretge.cat
--FILE--
<?php

$nano = time_nanosleep(0, -10);

?>
--EXPECTF--
Warning: time_nanosleep(): nanoseconds was not in the range 0 to 999 999 999 or 
seconds was negative in %s.php on line %d

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/misc/time_nanosleep_error5.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/misc/time_nanosleep_error5.phpt
+++ php-src/ext/standard/tests/misc/time_nanosleep_error5.phpt
--TEST--
time_nanosleep — Delay for a number of seconds and nanoseconds
--SKIPIF--
<?php if (!function_exists('time_nanosleep')) die("skip"); ?>
--CREDITS--
Àlex Corretgé - a...@corretge.cat
--FILE--
<?php

$nano = time_nanosleep(0, 1000000000);

?>
--EXPECTF--
Warning: time_nanosleep(): nanoseconds was not in the range 0 to 999 999 999 or 
seconds was negative in %s.php on line %d



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to