2018-07-19 19:59:15 +02:00
|
|
|
require_relative "helper"
|
|
|
|
|
|
|
|
module Ruby
|
|
|
|
class TestStatement < MiniTest::Test
|
|
|
|
include RubyTests
|
|
|
|
|
|
|
|
def test_class_name
|
|
|
|
assert_equal "Statement" , Statement.new.class_name
|
|
|
|
end
|
|
|
|
def test_brother
|
2019-10-03 23:36:49 +02:00
|
|
|
assert_equal Sol::Statement , Statement.new.sol_brother
|
2018-07-19 19:59:15 +02:00
|
|
|
end
|
|
|
|
def test_yield
|
|
|
|
lst = compile( "yield")
|
2019-10-03 23:36:49 +02:00
|
|
|
assert_equal Sol::YieldStatement , lst.sol_brother
|
2018-07-19 19:59:15 +02:00
|
|
|
end
|
|
|
|
def test_assign
|
|
|
|
lst = compile( "a = 4")
|
2019-10-03 23:36:49 +02:00
|
|
|
assert_equal Sol::LocalAssignment , lst.sol_brother
|
2018-07-19 19:59:15 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|