2018-07-19 20:59:15 +03: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-04 00:36:49 +03:00
|
|
|
assert_equal Sol::Statement , Statement.new.sol_brother
|
2018-07-19 20:59:15 +03:00
|
|
|
end
|
|
|
|
def test_yield
|
|
|
|
lst = compile( "yield")
|
2019-10-04 00:36:49 +03:00
|
|
|
assert_equal Sol::YieldStatement , lst.sol_brother
|
2018-07-19 20:59:15 +03:00
|
|
|
end
|
|
|
|
def test_assign
|
|
|
|
lst = compile( "a = 4")
|
2019-10-04 00:36:49 +03:00
|
|
|
assert_equal Sol::LocalAssignment , lst.sol_brother
|
2018-07-19 20:59:15 +03:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|