rubyx/test/vool/test_class_statement.rb
Torsten Ruger 22408b86c6 return the linker from mom_compiler
linker holds assemblers
assemblers come from method compilation
and so the layers come into focus
2018-07-01 21:51:48 +03:00

26 lines
542 B
Ruby

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