diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2025-04-18 10:26:19 +0200 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2025-04-18 10:26:19 +0200 |
commit | 022e40cc71beda874d0bad2cec227e472d5dd4af (patch) | |
tree | 7f0e03815217dd2e329a2ade1ed346247d5db884 /unit_tests/embedded_tests.cpp | |
parent | 1bff784b474261212a996ac9fc59389d53a69590 (diff) | |
download | lanes-022e40cc71beda874d0bad2cec227e472d5dd4af.tar.gz lanes-022e40cc71beda874d0bad2cec227e472d5dd4af.tar.bz2 lanes-022e40cc71beda874d0bad2cec227e472d5dd4af.zip |
New feature: Linda periodical cancellation checks
* lanes.linda() api change: takes all settings in a single table argument
* new linda creation argument wake_period
* new lanes.configure setting linda_wake_period
* adjusted all unit tests (one TODO test fails on purpose)
Diffstat (limited to 'unit_tests/embedded_tests.cpp')
-rw-r--r-- | unit_tests/embedded_tests.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unit_tests/embedded_tests.cpp b/unit_tests/embedded_tests.cpp index 0991a4c..a0a7bb2 100644 --- a/unit_tests/embedded_tests.cpp +++ b/unit_tests/embedded_tests.cpp | |||
@@ -157,7 +157,7 @@ TEST_CASE("lanes.embedding.with default allocator") | |||
157 | // function with an upvalue | 157 | // function with an upvalue |
158 | std::string_view const _script{ | 158 | std::string_view const _script{ |
159 | " local lanes = require 'lanes'.configure{with_timers = false}" | 159 | " local lanes = require 'lanes'.configure{with_timers = false}" |
160 | " local l = lanes.linda'gleh'" | 160 | " local l = lanes.linda{name = 'gleh'}" |
161 | " local upvalue = 'oeauaoeuoeuaoeuaoeujaoefubycfjbycfybcfjybcfjybcfjbcf'" | 161 | " local upvalue = 'oeauaoeuoeuaoeuaoeujaoefubycfjbycfybcfjybcfjybcfjbcf'" |
162 | " local upvalued = function()" | 162 | " local upvalued = function()" |
163 | " return upvalue" | 163 | " return upvalue" |
@@ -183,7 +183,7 @@ TEST_CASE("lanes.embedding.with default allocator") | |||
183 | // try to send io.open into a linda, which fails if io base library is not loaded | 183 | // try to send io.open into a linda, which fails if io base library is not loaded |
184 | std::string_view const _script{ | 184 | std::string_view const _script{ |
185 | " local lanes = require 'lanes'" | 185 | " local lanes = require 'lanes'" |
186 | " local l = lanes.linda'gleh'" | 186 | " local l = lanes.linda{name = 'gleh'}" |
187 | " l:set('yo', io.open)" | 187 | " l:set('yo', io.open)" |
188 | " return 'SUCCESS'" | 188 | " return 'SUCCESS'" |
189 | }; | 189 | }; |