From a8fb22054e2c44f24464a452e86a268a648450dc Mon Sep 17 00:00:00 2001 From: "Sergey G. Grekhov" Date: Wed, 10 Jan 2024 10:25:25 +0200 Subject: [PATCH] #2119. Fix typo and improve error messages in Timer tests (#2473) --- LibTest/async/Timer/Timer.periodic_A01_t01.dart | 2 +- LibTest/async/Timer/Timer.periodic_A02_t02.dart | 2 +- LibTest/async/Timer/Timer_A01_t01.dart | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/LibTest/async/Timer/Timer.periodic_A01_t01.dart b/LibTest/async/Timer/Timer.periodic_A01_t01.dart index 5560e7a173..943264cad2 100644 --- a/LibTest/async/Timer/Timer.periodic_A01_t01.dart +++ b/LibTest/async/Timer/Timer.periodic_A01_t01.dart @@ -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(); diff --git a/LibTest/async/Timer/Timer.periodic_A02_t02.dart b/LibTest/async/Timer/Timer.periodic_A02_t02.dart index 848d0b5946..2be13e7761 100644 --- a/LibTest/async/Timer/Timer.periodic_A02_t02.dart +++ b/LibTest/async/Timer/Timer.periodic_A02_t02.dart @@ -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 sgrekhov22@gmail.com diff --git a/LibTest/async/Timer/Timer_A01_t01.dart b/LibTest/async/Timer/Timer_A01_t01.dart index ee46018794..a61b725542 100644 --- a/LibTest/async/Timer/Timer_A01_t01.dart +++ b/LibTest/async/Timer/Timer_A01_t01.dart @@ -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(); }); }