fix binary code mixup
mixed get_word with get_internal_word
This commit is contained in:
parent
727069a306
commit
5c89884df9
@ -25,8 +25,8 @@ module Parfait
|
|||||||
end
|
end
|
||||||
def each_word
|
def each_word
|
||||||
index = 1
|
index = 1
|
||||||
while( index < 14)
|
while( index <= data_length)
|
||||||
yield get_internal_word(index)
|
yield get_word(index)
|
||||||
index += 1
|
index += 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -74,5 +74,16 @@ module Parfait
|
|||||||
@code.each_word{ len += 1}
|
@code.each_word{ len += 1}
|
||||||
assert_equal 13 , len
|
assert_equal 13 , len
|
||||||
end
|
end
|
||||||
|
def test_set_word
|
||||||
|
assert_equal 1 , @code.set_word(1 , 1)
|
||||||
|
end
|
||||||
|
def test_get_word
|
||||||
|
@code.set_word(1 , 1)
|
||||||
|
assert_equal 1, @code.get_word(1)
|
||||||
|
end
|
||||||
|
def test_get_internal_word
|
||||||
|
@code.set_word(1 , 1)
|
||||||
|
assert_equal 1, @code.get_internal_word(@code.data_start + 1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user