rubyx/test/mom/test_assign_ivar_const.rb
Torsten Ruger dda2ff9049 more assignment tests
move to writing code to Test class
To use space as before one would have to implement re-opening classes
2018-03-19 13:30:14 +05:30

28 lines
558 B
Ruby

require_relative 'helper'
module Risc
class TestAssignIvarConst < MiniTest::Test
include Statements
def setup
super
@input = "@ivar = 5"
@expect = [LoadConstant, RegToSlot]
end
def test_local_assign_instructions
assert_nil msg = check_nil , msg
end
def test_constant_load
produced = produce_body
assert_equal 5 , produced.constant.known_object.value
end
def test_slot_move
produced = produce_body
assert_equal produced.next.register , produced.register
end
end
end