fix tests for NameExpression split
also necessitates giving method name without the wrapping expression which is simpler anyway
This commit is contained in:
@ -22,24 +22,24 @@ module Register
|
||||
end
|
||||
def test_local_int
|
||||
Parfait.object_space.get_main.add_local(:bar , :Integer)
|
||||
@input = s(:operator_value, :+, s(:name, :bar), s(:int, 3))
|
||||
@input = s(:operator_value, :+, s(:local, :bar), s(:int, 3))
|
||||
check
|
||||
end
|
||||
def test_int_local
|
||||
Parfait.object_space.get_main.add_local(:bar , :Integer)
|
||||
@input = s(:operator_value, :+, s(:int, 3), s(:name, :bar))
|
||||
@input = s(:operator_value, :+, s(:int, 3), s(:local, :bar))
|
||||
check
|
||||
end
|
||||
|
||||
def test_field_int
|
||||
add_space_field(:bro,:Integer)
|
||||
@input = s(:operator_value, :+, s(:field_access,s(:receiver, s(:name, :self)), s(:field, s(:name, :bro))), s(:int, 3))
|
||||
@input = s(:operator_value, :+, s(:field_access,s(:receiver, s(:known, :self)), s(:field, s(:ivar, :bro))), s(:int, 3))
|
||||
check
|
||||
end
|
||||
|
||||
def test_int_field
|
||||
add_space_field(:bro,:Integer)
|
||||
@input = s(:operator_value, :+, s(:int, 3), s(:field_access, s(:receiver, s(:name, :self)), s(:field,s(:name, :bro))))
|
||||
@input = s(:operator_value, :+, s(:int, 3), s(:field_access, s(:receiver, s(:known, :self)), s(:field,s(:ivar, :bro))))
|
||||
check
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user