Torsten Rüger
d1f8733623
Simple is really the descriptive name for the layer Sure, it is "virtual" but that is not as important as the fact that it is simple (or simplified) Also objct (based really) is better, since orientated implies it is a little like that, but only orientated, not really it. Sol only has objects, nothing else Just cause i was renaming anyway
36 lines
774 B
Ruby
36 lines
774 B
Ruby
require_relative "helper"
|
|
|
|
module Ruby
|
|
class TestYieldStatement < MiniTest::Test
|
|
include RubyTests
|
|
|
|
def setup()
|
|
input = "yield(0)"
|
|
@lst = compile( input )
|
|
end
|
|
def test_block
|
|
assert_equal YieldStatement , @lst.class
|
|
end
|
|
def test_block_args
|
|
assert_equal IntegerConstant , @lst.arguments.first.class
|
|
end
|
|
def test_tos
|
|
assert_equal "yield(0)" , @lst.to_s
|
|
end
|
|
end
|
|
class TestYieldStatementSol < MiniTest::Test
|
|
include RubyTests
|
|
|
|
def setup()
|
|
input = "yield(0)"
|
|
@lst = compile( input ).to_sol
|
|
end
|
|
def test_block
|
|
assert_equal Sol::YieldStatement , @lst.class
|
|
end
|
|
def test_block_args
|
|
assert_equal Sol::IntegerConstant , @lst.arguments.first.class
|
|
end
|
|
end
|
|
end
|