aboutsummaryrefslogtreecommitdiff
path: root/testes
diff options
context:
space:
mode:
Diffstat (limited to 'testes')
-rw-r--r--testes/coroutine.lua14
1 files changed, 12 insertions, 2 deletions
diff --git a/testes/coroutine.lua b/testes/coroutine.lua
index 0a4c2ef3..955f6776 100644
--- a/testes/coroutine.lua
+++ b/testes/coroutine.lua
@@ -407,7 +407,8 @@ assert(_G.f() == 12)
407 407
408 408
409if not T then 409if not T then
410 (Message or print)('\n >>> testC not active: skipping yield/hook tests <<<\n') 410 (Message or print)
411 ('\n >>> testC not active: skipping coroutine API tests <<<\n')
411else 412else
412 print "testing yields inside hooks" 413 print "testing yields inside hooks"
413 414
@@ -564,8 +565,17 @@ else
564 c == "ERRRUN" and d == 4) 565 c == "ERRRUN" and d == 4)
565 566
566 567
567 -- using a main thread as a coroutine 568 -- using a main thread as a coroutine (dubious use!)
568 local state = T.newstate() 569 local state = T.newstate()
570
571 -- check that yielddable is working correctly
572 assert(T.testC(state, "newthread; isyieldable -1; remove 1; return 1"))
573
574 -- main thread is not yieldable
575 assert(not T.testC(state, "rawgeti R 1; isyieldable -1; remove 1; return 1"))
576
577 T.testC(state, "settop 0")
578
569 T.loadlib(state) 579 T.loadlib(state)
570 580
571 assert(T.doremote(state, [[ 581 assert(T.doremote(state, [[