Fix vool assignments after call rework
also small fix for if and return, as they need to execute sneds and yields (not just sends), so testing for Call not SendStatement
This commit is contained in:
@ -8,8 +8,26 @@ module Ruby
|
||||
def setup
|
||||
@lst = compile( "@foo = a.call(b)").to_vool
|
||||
end
|
||||
def test_s
|
||||
assert_equal "" , @lst.to_s
|
||||
def test_class
|
||||
assert_equal Vool::Statements , @lst.class
|
||||
end
|
||||
def test_first_class
|
||||
assert_equal Vool::LocalAssignment , @lst[0].class
|
||||
end
|
||||
def test_first_name
|
||||
assert @lst[0].name.to_s.start_with?("tmp_")
|
||||
end
|
||||
def test_second_class
|
||||
assert_equal Vool::LocalAssignment , @lst[1].class
|
||||
end
|
||||
def test_second_name
|
||||
assert @lst[1].name.to_s.start_with?("tmp_")
|
||||
end
|
||||
def test_last_class
|
||||
assert_equal Vool::IvarAssignment , @lst[2].class
|
||||
end
|
||||
def test_second_name
|
||||
assert_equal :foo, @lst[2].name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user