Skip to content

Commit

Permalink
#2119. Fix typo and improve error messages in Timer tests (#2473)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrekhov authored Jan 10, 2024
1 parent 720cc61 commit a8fb220
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion LibTest/async/Timer/Timer.periodic_A01_t01.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ main() {
Duration expected = delay * count;
Duration actual = sw.elapsed;
Expect.isTrue(expected <= actual + safetyMargin,
"expected=$expected, actual=${actual + safetyMargin}");
"expected=$expected, actual=$actual");
if (count == maxCount) {
timer.cancel();
asyncEnd();
Expand Down
2 changes: 1 addition & 1 deletion LibTest/async/Timer/Timer.periodic_A02_t02.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/// A negative duration is treated the same as [Duration.zero]
///
/// @description Checks that negative duration is accepted and treated as
/// [Duration.zero]. Test that timer waits for microtasks queue before
/// [Duration.zero]. Test that timer waits for microtask queue before
/// triggering
/// @author [email protected]
Expand Down
2 changes: 1 addition & 1 deletion LibTest/async/Timer/Timer_A01_t01.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ check(int delayms) {
new Timer(delay, () {
Duration actual = sw.elapsed;
Expect.isTrue(delay <= actual + safetyMargin,
"expected=$delay, actual=${actual + safetyMargin}");
"expected=$delay, actual=$actual");
asyncEnd();
});
}
Expand Down

0 comments on commit a8fb220

Please sign in to comment.