From fe8d396980f18bf09ee2717817cd795130cf64d1 Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Fri, 20 Dec 2024 12:26:29 +0100 Subject: Migrated unit tests to Catch2 v3.7.1 --- tests/cancel.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/cancel.lua b/tests/cancel.lua index 9b65ad3..84203f1 100644 --- a/tests/cancel.lua +++ b/tests/cancel.lua @@ -165,7 +165,7 @@ if not next(which_tests) or which_tests.linda then SLEEP(1) -- linda cancel: linda:receive() returns nil,cancel_error immediately - print "cancelling" + print "cancelling - both" linda:cancel("both") -- wait until cancellation is effective. @@ -192,7 +192,7 @@ if not next(which_tests) or which_tests.soft then waitCancellation(h, "waiting") -- soft cancel, this time awakens waiting linda operations, which returns cancel_error immediately, no timeout. - print "cancelling" + print "cancelling - soft" h:cancel("soft", true) -- wait until cancellation is effective. the lane will interrupt its loop and print the exit message @@ -209,7 +209,7 @@ if not next(which_tests) or which_tests.hook then SLEEP(2) -- count hook cancel after some instruction instructions - print "cancelling" + print "cancelling - line" h:cancel("line", 300, 5.0) -- wait until cancellation is effective. the lane will interrupt its loop and print the exit message @@ -228,7 +228,7 @@ if not next(which_tests) or which_tests.hard then SLEEP(2) -- hard cancel: the lane will be interrupted from inside its current linda:receive() and won't return from it - print "cancelling" + print "cancelling - hard" h:cancel() -- wait until cancellation is effective. the lane will be stopped by the linda operation throwing an error @@ -247,7 +247,7 @@ if not next(which_tests) or which_tests.hard_unprotected then SLEEP(2) -- hard cancel: the lane will be interrupted from inside its current linda:receive() and won't return from it - print "cancelling" + print "cancelling - hard" h:cancel() -- wait until cancellation is effective. the lane will be stopped by the linda operation throwing an error -- cgit v1.2.3-55-g6feb