dynamic call green
This commit is contained in:
parent
ba3ec9b1a2
commit
f50327eb94
@ -9,38 +9,19 @@ module Vool
|
||||
Risc.machine.boot
|
||||
@ins = compile_first_method_flat( "a = 5; a.mod4")
|
||||
end
|
||||
def test_if_first
|
||||
assert_equal IfStatement , @ins.class , @ins
|
||||
def test_check_type
|
||||
assert_equal NotSameCheck , @ins.next.class , @ins
|
||||
end
|
||||
def test_if_condition_set
|
||||
assert_equal NotSameCheck , @ins.condition.class , @ins
|
||||
def test_type_update
|
||||
load = @ins.next(2)
|
||||
assert_equal :receiver , load.right.known_object , load
|
||||
assert_equal :type , load.right.slots[0] , load
|
||||
end
|
||||
def test_if_true_moves_type
|
||||
assert_equal @ins.if_true[0].class, SlotLoad , @ins.if_true.to_rxf
|
||||
def test_check_resolve_call
|
||||
assert_equal SimpleCall , @ins.next(6).class , @ins
|
||||
end
|
||||
def test_if_true_resolves_setup
|
||||
assert_equal @ins.if_true[1].class , MessageSetup, @ins.if_true.to_rxf
|
||||
end
|
||||
def test_if_true_resolves_transfer
|
||||
assert_equal @ins.if_true[2].class , ArgumentTransfer, @ins.if_true.to_rxf
|
||||
end
|
||||
def test_if_true_resolves_call
|
||||
assert_equal @ins.if_true[3].class , SimpleCall, @ins.if_true.to_rxf
|
||||
end
|
||||
def test_if_true_resolves_move
|
||||
assert_equal @ins.if_true[4].class , SlotLoad, @ins.if_true.to_rxf
|
||||
end
|
||||
|
||||
def test_setup_second
|
||||
assert_equal MessageSetup , @ins.next.class , @second.to_rxf
|
||||
end
|
||||
|
||||
def test_transfer_third
|
||||
assert_equal ArgumentTransfer , @ins.next(2).class , @third.to_rxf
|
||||
end
|
||||
|
||||
def test_call_third
|
||||
assert_equal DynamicCall , @ins.last.class , @fourth.to_rxf
|
||||
def test_dynamic_call_last
|
||||
assert_equal DynamicCall , @ins.last.class , @ins
|
||||
end
|
||||
|
||||
def test_array
|
||||
|
Loading…
Reference in New Issue
Block a user