mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
add root fiber resume test to know double resume checking is working
This commit is contained in:
@@ -105,3 +105,13 @@ assert('Recursive resume of Fiber') do
|
||||
assert_false f2.alive?
|
||||
assert_false f3.alive?
|
||||
end
|
||||
|
||||
assert('Root fiber resume') do
|
||||
root = Fiber.current
|
||||
assert_raise(RuntimeError) { root.resume }
|
||||
f = Fiber.new {
|
||||
assert_raise(RuntimeError) { root.resume }
|
||||
}
|
||||
f.resume
|
||||
assert_false f.alive?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user