rubyx/test/mom/test_class_statement.rb
Torsten Rüger 213938075f fix most mom and risc apart
apart from things involving builtn, which is not yet conceptually solved (as it codes risc, not mom)
2019-08-10 21:30:00 +03:00

26 lines
551 B
Ruby

require_relative "helper"
module Vool
class TestClassStatement < MiniTest::Test
include MomCompile
def setup
Parfait.boot!(Parfait.default_test_options)
@ret = compile_mom( as_test_main("return 1"))
end
def test_return_class
assert_equal Mom::MomCollection , @ret.class
end
def test_has_compilers
assert_equal Mom::MethodCompiler , @ret.method_compilers.first.class
end
def test_constant
assert @ret.method_compilers.first.add_constant( Parfait::Integer.new(5) )
end
end
end