From ff07021f95a28628dae54fbf0974ac9b2f4ca4ef Mon Sep 17 00:00:00 2001 From: Max Korbel Date: Mon, 26 Feb 2024 08:15:55 -0800 Subject: [PATCH] fix future handling on end simulation --- test/pending_driver_test.dart | 4 ++-- test/test_test.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/pending_driver_test.dart b/test/pending_driver_test.dart index fe3818e..83d5899 100644 --- a/test/pending_driver_test.dart +++ b/test/pending_driver_test.dart @@ -140,7 +140,7 @@ void main() { group('end of test empty check', () { test('not empty at end of test fails', () async { // end the test prematurely - Simulator.registerAction(200, Simulator.endSimulation); + Simulator.registerAction(200, () => unawaited(Simulator.endSimulation())); final myTest = MyTest(clk: clk!)..printLevel = Level.OFF; try { @@ -152,7 +152,7 @@ void main() { test('disable end of test empty check', () async { // end the test prematurely - Simulator.registerAction(200, Simulator.endSimulation); + Simulator.registerAction(200, () => unawaited(Simulator.endSimulation())); final myTest = MyTest( clk: clk!, diff --git a/test/test_test.dart b/test/test_test.dart index 63ea30e..9bf1ede 100644 --- a/test/test_test.dart +++ b/test/test_test.dart @@ -21,7 +21,7 @@ class ForeverObjectionTest extends Test { unawaited(super.run(phase)); phase.raiseObjection('objectionNeverCloses'); SimpleClockGenerator(10); - Simulator.registerAction(100, Simulator.endSimulation); + Simulator.registerAction(100, () => unawaited(Simulator.endSimulation())); } }