rubyx/test/ruby/test_yield_statement.rb

33 lines
711 B
Ruby
Raw Normal View History

2018-06-28 19:15:24 +02:00
require_relative "helper"
module Ruby
class TestYieldStatementVool < MiniTest::Test
include RubyTests
def setup()
input = "yield(0)"
@lst = compile( input ).to_vool
end
def test_block
assert_equal Vool::YieldStatement , @lst.class
end
def test_block_args
assert_equal Vool::IntegerConstant , @lst.arguments.first.class
end
end
2018-07-19 15:30:36 +02:00
class TestYieldStatement < MiniTest::Test
include RubyTests
2018-06-28 19:15:24 +02:00
def setup()
input = "yield(0)"
@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