getter by position

extract and expand position testing
never return labels (that have the same position as their target)
This commit is contained in:
Torsten Ruger
2018-05-17 20:13:33 +03:00
parent 37d62d298e
commit 8966a50a8a
6 changed files with 78 additions and 15 deletions

View File

@ -42,6 +42,11 @@ module Risc
def test_raises_set_nil
assert_raises { Position.set(self,nil)}
end
def test_at
pos = Position.set(self , 5)
pos = Position.at(5)
assert_equal 5 , pos.at
end
end
end
end