create return address as own class to hold return addresses

to distinguish from integer, which does not need adjusting
This commit is contained in:
Torsten Ruger
2018-05-30 23:49:01 +03:00
parent e86ca5ae9d
commit e39e96f646
9 changed files with 60 additions and 11 deletions

View File

@ -48,4 +48,18 @@ module Parfait
assert_equal 1 , @int.value
end
end
class AddressTest < ParfaitTest
def test_address
assert ReturnAddress.new(55)
end
def test_value
assert_equal 55 , ReturnAddress.new(55).value
end
def test_value_set
addr = ReturnAddress.new(55)
addr.set_value(33)
assert_equal 33 , addr.value
end
end
end