Chromium Code Reviews| Index: tests/standalone/io/sleep_test.dart |
| diff --git a/tests/standalone/io/process_set_exit_code_script.dart b/tests/standalone/io/sleep_test.dart |
| similarity index 50% |
| copy from tests/standalone/io/process_set_exit_code_script.dart |
| copy to tests/standalone/io/sleep_test.dart |
| index 9a34f052a14619eff51b43f7b0e620f0ee8dbf41..d953bf9f1a29536b9cc5652ebbb4380f91448304 100644 |
| --- a/tests/standalone/io/process_set_exit_code_script.dart |
| +++ b/tests/standalone/io/sleep_test.dart |
| @@ -4,8 +4,16 @@ |
| import "dart:io"; |
| +test(int milliseconds) { |
| + var watch = new Stopwatch(); |
| + watch.start(); |
| + sleep(new Duration(milliseconds: milliseconds)); |
|
Bob Nystrom
2013/04/05 15:51:57
How about a test for passing a zero duration? Nega
Søren Gjesse
2013/04/08 08:05:59
Good point. See https://codereview.chromium.org/13
|
| + watch.stop(); |
| + Expect.isTrue(watch.elapsedMilliseconds + 1 >= milliseconds); |
| +} |
| + |
| main() { |
| - stdout.write("standard out"); |
| - stderr.write("standard error"); |
| - exitCode = 25; |
| + test(1); |
| + test(10); |
| + test(100); |
| } |