Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/threads-ffi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdam Lerer <alerer@fb.com>2015-09-18 21:16:08 +0300
committerAdam Lerer <alerer@fb.com>2015-09-18 21:16:08 +0300
commitbad65805d5fca7d81f3e4e0062ac95915f556179 (patch)
tree6243ba6242bf52bfaf1fe7b192c54b269285aaca /test
parent1153921a624523ebfd11096b384ae193e83bc1cd (diff)
Fix return values with xpcall
Diffstat (limited to 'test')
-rw-r--r--test/test-traceback.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test-traceback.lua b/test/test-traceback.lua
index db50624..98bb815 100644
--- a/test/test-traceback.lua
+++ b/test/test-traceback.lua
@@ -17,3 +17,12 @@ my_threads:addjob(function()
ok, res = pcall(my_threads.synchronize, my_threads)
assert(ok == false)
assert(res:find("in function 'evil_func'"))
+
+my_threads:addjob(function()
+ return 10
+ end,
+ function(x)
+ assert(x == 10)
+ end)
+
+my_threads:synchronize()