change to position objects complete

This commit is contained in:
Torsten Ruger
2018-05-05 20:25:10 +03:00
parent 3244c7d633
commit 40f4bfc287
6 changed files with 25 additions and 12 deletions

View File

@@ -17,10 +17,17 @@ module Risc
res = Position.new(5) - 1
assert_equal 4 , res
end
def test_sub_pos
res = Position.new(5) - Position.new(1)
assert_equal 4 , res
end
def test_set
pos = Position.set_position(self , 5)
assert_equal 5 , pos.at
end
def tet_tos
assert_equal "0x10" , Position.set_position(self).to_s
end
def test_reset_ok
pos = Position.set_position(self , 5)
pos = Position.set_position(self , 10)