rubyx/test/vool/statements/test_ivar.rb
Torsten Ruger be10e8c6af set up ivar_assignment correctly
for statement tests
and write mom tests
also implement to_mom
and fix local (self) bug
2017-04-12 20:29:45 +03:00

27 lines
570 B
Ruby

require_relative "helper"
module Vool
class TestAssignment < MiniTest::Test
def test_local
lst = RubyCompiler.compile( "foo = bar")
assert_equal LocalAssignment , lst.class
end
def test_local_name
lst = RubyCompiler.compile( "foo = bar")
assert_equal :foo , lst.name
end
def test_instance
lst = RubyCompiler.compile( "@foo = bar")
assert_equal IvarAssignment , lst.class
end
def test_instance_name
lst = RubyCompiler.compile( "@foo = bar")
assert_equal :foo , lst.name
end
end
end