diff options
| author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-12-20 12:26:29 +0100 |
|---|---|---|
| committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-12-20 12:26:29 +0100 |
| commit | fe8d396980f18bf09ee2717817cd795130cf64d1 (patch) | |
| tree | ada754952fba10d47caab89f57acbe65ab4c7e55 /tests | |
| parent | 48c99e29ae38db79522fb2833f3144ae58c7a906 (diff) | |
| download | lanes-fe8d396980f18bf09ee2717817cd795130cf64d1.tar.gz lanes-fe8d396980f18bf09ee2717817cd795130cf64d1.tar.bz2 lanes-fe8d396980f18bf09ee2717817cd795130cf64d1.zip | |
Migrated unit tests to Catch2 v3.7.1
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/cancel.lua | 10 |
1 files changed, 5 insertions, 5 deletions
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 | |||
| 165 | SLEEP(1) | 165 | SLEEP(1) |
| 166 | 166 | ||
| 167 | -- linda cancel: linda:receive() returns nil,cancel_error immediately | 167 | -- linda cancel: linda:receive() returns nil,cancel_error immediately |
| 168 | print "cancelling" | 168 | print "cancelling - both" |
| 169 | linda:cancel("both") | 169 | linda:cancel("both") |
| 170 | 170 | ||
| 171 | -- wait until cancellation is effective. | 171 | -- wait until cancellation is effective. |
| @@ -192,7 +192,7 @@ if not next(which_tests) or which_tests.soft then | |||
| 192 | waitCancellation(h, "waiting") | 192 | waitCancellation(h, "waiting") |
| 193 | 193 | ||
| 194 | -- soft cancel, this time awakens waiting linda operations, which returns cancel_error immediately, no timeout. | 194 | -- soft cancel, this time awakens waiting linda operations, which returns cancel_error immediately, no timeout. |
| 195 | print "cancelling" | 195 | print "cancelling - soft" |
| 196 | h:cancel("soft", true) | 196 | h:cancel("soft", true) |
| 197 | 197 | ||
| 198 | -- wait until cancellation is effective. the lane will interrupt its loop and print the exit message | 198 | -- 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 | |||
| 209 | SLEEP(2) | 209 | SLEEP(2) |
| 210 | 210 | ||
| 211 | -- count hook cancel after some instruction instructions | 211 | -- count hook cancel after some instruction instructions |
| 212 | print "cancelling" | 212 | print "cancelling - line" |
| 213 | h:cancel("line", 300, 5.0) | 213 | h:cancel("line", 300, 5.0) |
| 214 | 214 | ||
| 215 | -- wait until cancellation is effective. the lane will interrupt its loop and print the exit message | 215 | -- 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 | |||
| 228 | SLEEP(2) | 228 | SLEEP(2) |
| 229 | 229 | ||
| 230 | -- hard cancel: the lane will be interrupted from inside its current linda:receive() and won't return from it | 230 | -- hard cancel: the lane will be interrupted from inside its current linda:receive() and won't return from it |
| 231 | print "cancelling" | 231 | print "cancelling - hard" |
| 232 | h:cancel() | 232 | h:cancel() |
| 233 | 233 | ||
| 234 | -- wait until cancellation is effective. the lane will be stopped by the linda operation throwing an error | 234 | -- 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 | |||
| 247 | SLEEP(2) | 247 | SLEEP(2) |
| 248 | 248 | ||
| 249 | -- hard cancel: the lane will be interrupted from inside its current linda:receive() and won't return from it | 249 | -- hard cancel: the lane will be interrupted from inside its current linda:receive() and won't return from it |
| 250 | print "cancelling" | 250 | print "cancelling - hard" |
| 251 | h:cancel() | 251 | h:cancel() |
| 252 | 252 | ||
| 253 | -- wait until cancellation is effective. the lane will be stopped by the linda operation throwing an error | 253 | -- wait until cancellation is effective. the lane will be stopped by the linda operation throwing an error |
