Improve argument type check tests.
This commit is contained in:
@@ -12,7 +12,7 @@ checkallerrors('coroutine.create',{notafunction},'bad argument')
|
||||
banner('coroutine.resume')
|
||||
local co = coroutine.create(function() while true do coroutine.yield() end end)
|
||||
checkallpass('coroutine.resume',{{co},anylua})
|
||||
checkallerrors('coroutine.resume',{anylua},'bad argument')
|
||||
checkallerrors('coroutine.resume',{notathread},'bad argument #1')
|
||||
|
||||
-- coroutine.running
|
||||
banner('coroutine.running')
|
||||
@@ -21,12 +21,12 @@ checkallpass('coroutine.running',{anylua})
|
||||
-- coroutine.status
|
||||
banner('coroutine.status')
|
||||
checkallpass('coroutine.status',{{co}})
|
||||
checkallerrors('coroutine.status',{anylua},'bad argument')
|
||||
checkallerrors('coroutine.status',{notathread},'bad argument #1')
|
||||
|
||||
-- coroutine.wrap
|
||||
banner('coroutine.wrap')
|
||||
checkallpass('coroutine.wrap',{somefunction})
|
||||
checkallerrors('coroutine.wrap',{notafunction},'bad argument')
|
||||
checkallerrors('coroutine.wrap',{notafunction},'bad argument #1')
|
||||
|
||||
-- coroutine.yield
|
||||
banner('coroutine.yield')
|
||||
|
||||
Reference in New Issue
Block a user