2018-06-28 19:15:24 +02:00
|
|
|
require_relative "helper"
|
|
|
|
|
2018-07-19 13:46:51 +02:00
|
|
|
module Ruby
|
2018-07-19 15:30:36 +02:00
|
|
|
class TestYieldStatement < MiniTest::Test
|
2018-06-29 21:46:39 +02:00
|
|
|
include RubyTests
|
2018-06-28 19:15:24 +02:00
|
|
|
|
|
|
|
def setup()
|
2018-07-19 15:30:36 +02:00
|
|
|
input = "yield(0) "
|
2018-06-29 21:46:39 +02:00
|
|
|
@lst = compile( input )
|
2018-06-28 19:15:24 +02:00
|
|
|
end
|
|
|
|
def test_block
|
2018-07-19 15:30:36 +02:00
|
|
|
assert_equal YieldStatement , @lst.class
|
2018-06-28 19:15:24 +02:00
|
|
|
end
|
|
|
|
def test_block_args
|
2018-07-19 15:30:36 +02:00
|
|
|
assert_equal IntegerConstant , @lst.arguments.first.class
|
2018-06-28 19:15:24 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|