passing values to macros
conceptually still a bit open, leaving the hack in for now passing values to the macro instead of sol instances
This commit is contained in:
@ -26,12 +26,12 @@ module Sol
|
||||
assert_equal SlotMachine::PlusEquals , @ins.class , @ins
|
||||
end
|
||||
def test_arg1
|
||||
assert_equal Sol::LocalVariable , @ins.a.class
|
||||
assert_equal :arg , @ins.a.name
|
||||
assert_equal Symbol , @ins.a.class
|
||||
assert_equal :arg , @ins.a
|
||||
end
|
||||
def test_arg2
|
||||
assert_equal Sol::IntegerConstant , @ins.b.class
|
||||
assert_equal 1 , @ins.b.value
|
||||
assert_equal Integer , @ins.b.class
|
||||
assert_equal 1 , @ins.b
|
||||
end
|
||||
def test_to_risc
|
||||
comp = @compiler.to_risc
|
||||
|
Reference in New Issue
Block a user