rubyx/test/vool/to_mom/test_assignemnt.rb
Torsten Ruger 9c499c7a19 actually start doing something in to_mom
though still dummy
2017-04-12 11:53:02 +03:00

25 lines
550 B
Ruby

require_relative "helper"
module Vool
class TestAssignemnt < MiniTest::Test
include CompilerHelper
def setup
Risc.machine.boot
end
def compile_first_method input
lst = VoolCompiler.compile as_main( input )
assert_equal Parfait::Class , lst.clazz.class , input
method = lst.clazz.get_method(:main)
assert method
lst.to_mom( nil ).first
end
def test_class_compiles
meth = compile_first_method( "a = 5")
assert_equal Mom::SlotLoad , meth.first.class , meth
end
end
end