aboutsummaryrefslogtreecommitdiff
path: root/unit_tests/scripts/_utils.lua
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2026-02-26 11:02:55 +0100
committerBenoit Germain <benoit.germain@ubisoft.com>2026-02-26 11:02:55 +0100
commit4f97720e4c3944ccf9b9742028dc697c2dd94c5a (patch)
tree259ec6c30971f3ca0c7e0f38898ab7f7aa548af9 /unit_tests/scripts/_utils.lua
parent6b8c83b3bc44b0a1bc186f58de0fea6dfc214c4b (diff)
downloadlanes-4f97720e4c3944ccf9b9742028dc697c2dd94c5a.tar.gz
lanes-4f97720e4c3944ccf9b9742028dc697c2dd94c5a.tar.bz2
lanes-4f97720e4c3944ccf9b9742028dc697c2dd94c5a.zip
change cancel_test() to raise cancel_error on hard-cancels by default
Diffstat (limited to 'unit_tests/scripts/_utils.lua')
-rw-r--r--unit_tests/scripts/_utils.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/unit_tests/scripts/_utils.lua b/unit_tests/scripts/_utils.lua
index 9f46237..365fd10 100644
--- a/unit_tests/scripts/_utils.lua
+++ b/unit_tests/scripts/_utils.lua
@@ -76,7 +76,7 @@ local yield_one_by_one = function(...)
76 local _val = select(_i, ...) 76 local _val = select(_i, ...)
77 PRINT("yielding #", _i, _val) 77 PRINT("yielding #", _i, _val)
78 local _ack = coroutine.yield(_val) 78 local _ack = coroutine.yield(_val)
79 if cancel_test and cancel_test() then -- cancel_test does not exist when run immediately (not in a Lane) 79 if cancel_test and cancel_test(true) then -- cancel_test does not exist when run immediately (not in a Lane)
80 return "cancelled!" 80 return "cancelled!"
81 end 81 end
82 -- of course, if we are cancelled, we were not resumed, and yield() didn't return what we expect 82 -- of course, if we are cancelled, we were not resumed, and yield() didn't return what we expect