diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_interrupt.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_interrupt.lua b/test/test_interrupt.lua index 6a7a255..22c168e 100644 --- a/test/test_interrupt.lua +++ b/test/test_interrupt.lua | |||
@@ -18,7 +18,7 @@ do | |||
18 | 18 | ||
19 | local ok, err = thread:join() | 19 | local ok, err = thread:join() |
20 | print("thread1:join(): ", ok, err) | 20 | print("thread1:join(): ", ok, err) |
21 | assert(ok == false and err:match("interrupted!"), "thread1 result") | 21 | assert(ok == false and err:match(llthreads.interrupted_error), "thread1 result") |
22 | print("--- Done interrupt1!") | 22 | print("--- Done interrupt1!") |
23 | end | 23 | end |
24 | 24 | ||
@@ -27,7 +27,7 @@ do | |||
27 | local thread = llthreads.new(include .. [[ | 27 | local thread = llthreads.new(include .. [[ |
28 | local ok, err = pcall(function() for i = 1, 10 do sleep(1) end end) | 28 | local ok, err = pcall(function() for i = 1, 10 do sleep(1) end end) |
29 | print("thread2:", ok, err) | 29 | print("thread2:", ok, err) |
30 | assert(ok == false and err:match("interrupted!"), "interrupt2 result") | 30 | assert(ok == false and err:match(llthreads.interrupted_error), "interrupt2 result") |
31 | ]]) | 31 | ]]) |
32 | 32 | ||
33 | thread:start() | 33 | thread:start() |
@@ -52,7 +52,7 @@ do | |||
52 | 52 | ||
53 | local ok, err = thread:join() | 53 | local ok, err = thread:join() |
54 | print("thread3:join(): ", ok, err) | 54 | print("thread3:join(): ", ok, err) |
55 | assert(ok == false and err:match("interrupted!"), "thread3 result") | 55 | assert(ok == false and err:match(llthreads.interrupted_error), "thread3 result") |
56 | print("--- Done interrupt3!") | 56 | print("--- Done interrupt3!") |
57 | end | 57 | end |
58 | 58 | ||