aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorosch <oliver at luced de>2018-08-27 19:06:15 +0200
committerosch <oliver at luced de>2018-08-27 19:06:15 +0200
commitcd91518d79388d5d42820a2b48918a7bf1e6d1a2 (patch)
tree07d166e87c2f294a0864501756e48d3c313309bb /test
parent99e9a506b4f0f2dcefb1844092553ca4ffa81087 (diff)
downloadlua-llthreads2-cd91518d79388d5d42820a2b48918a7bf1e6d1a2.tar.gz
lua-llthreads2-cd91518d79388d5d42820a2b48918a7bf1e6d1a2.tar.bz2
lua-llthreads2-cd91518d79388d5d42820a2b48918a7bf1e6d1a2.zip
interrupted error message now contains llthreads module name as prefix and
is also available in the public api
Diffstat (limited to 'test')
-rw-r--r--test/test_interrupt.lua6
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!")
23end 23end
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!")
57end 57end
58 58