Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Unified Diff: tests/isolate/multiple_timer_test.dart

Issue 12209098: Unbreak build. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/isolate/timer_isolate_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/isolate/multiple_timer_test.dart
diff --git a/tests/isolate/multiple_timer_test.dart b/tests/isolate/multiple_timer_test.dart
index 7315e4e550051e9ec46052abf0eebd07d90fc88e..db2248a0b0ca31bac958b2f1782fbfce2898959a 100644
--- a/tests/isolate/multiple_timer_test.dart
+++ b/tests/isolate/multiple_timer_test.dart
@@ -22,28 +22,36 @@ main() {
int _message;
void timeoutHandler1() {
- expect(_stopwatch1.elapsedMilliseconds,
+ // The stopwatch is more precise than the Timer. It can happen that
+ // the TIMEOUT triggers *slightly* too early.
+ expect(_stopwatch1.elapsedMilliseconds + 1,
greaterThanOrEqualTo(TIMEOUT1.inMilliseconds));
expect(_order[_message], 0);
_message++;
}
void timeoutHandler2() {
- expect(_stopwatch2.elapsedMilliseconds,
+ // The stopwatch is more precise than the Timer. It can happen that
+ // the TIMEOUT triggers *slightly* too early.
+ expect(_stopwatch2.elapsedMilliseconds + 1,
greaterThanOrEqualTo(TIMEOUT2.inMilliseconds));
expect(_order[_message], 1);
_message++;
}
void timeoutHandler3() {
- expect(_stopwatch3.elapsedMilliseconds,
+ // The stopwatch is more precise than the Timer. It can happen that
+ // the TIMEOUT triggers *slightly* too early.
+ expect(_stopwatch3.elapsedMilliseconds + 1,
greaterThanOrEqualTo(TIMEOUT3.inMilliseconds));
expect(_order[_message], 2);
_message++;
}
void timeoutHandler4() {
- expect(_stopwatch4.elapsedMilliseconds,
+ // The stopwatch is more precise than the Timer. It can happen that
+ // the TIMEOUT triggers *slightly* too early.
+ expect(_stopwatch4.elapsedMilliseconds + 1,
greaterThanOrEqualTo(TIMEOUT4.inMilliseconds));
expect(_order[_message], 3);
_message++;
« no previous file with comments | « no previous file | tests/isolate/timer_isolate_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698