Torsten Rüger
b2260d856d
After having over 600 failing tests at one point, this does feel good. Even better, most of the risc/interpreter tests where i didn't change anything came gree without changing the tests. ie we have binary compatibility.
22 lines
488 B
Ruby
22 lines
488 B
Ruby
require_relative "../helper"
|
|
|
|
module Risc
|
|
class TestBlockAssign < MiniTest::Test
|
|
include Statements
|
|
|
|
def setup
|
|
super
|
|
@input = as_block("a = 5")
|
|
@expect = [LoadConstant, SlotToReg, RegToSlot]
|
|
end
|
|
def test_send_instructions
|
|
assert_nil msg = check_nil(:main_block) , msg
|
|
end
|
|
def test_load_5
|
|
produced = produce_block.next
|
|
assert_load( produced , Parfait::Integer)
|
|
assert_equal 5 , produced.constant.value
|
|
end
|
|
end
|
|
end
|