fix fibs test to 32 bit maxs

This commit is contained in:
Torsten Ruger 2015-11-13 20:44:18 +02:00
parent f779b5d15f
commit c190f718ec
2 changed files with 10 additions and 9 deletions

View File

@ -28,17 +28,18 @@ HERE
@string_input.sub!( "100" , num.to_s ) @string_input.sub!( "100" , num.to_s )
end end
def test_while_fibo94 def test_while_fibo48
fibo 91 fibo 48
@length = 2138 @length = 1149
# this is not the correct fibo, just what comes from wrapping (smaller than below) # this is not the correct fibo, just what comes from wrapping (smaller than below)
check_return 48360591948142405 check_return 512559680
end end
def test_while_fibo90 # highest 32 bit fibo
fibo 90 def test_while_fibo47
@length = 2115 fibo 47
check_return 2880067194370816120 @length = 1126
check_return 2971215073
end end
end end

View File

@ -43,7 +43,7 @@ HERE
def check_return val def check_return val
check check
assert_equal Parfait::Message , @interpreter.get_register(:r0).class assert_equal Parfait::Message , @interpreter.get_register(:r0).class
assert_equal val , @interpreter.get_register(:r0).return_value assert_equal val , @interpreter.get_register(:r0).return_value , @string_input
end end
def check_return_class val def check_return_class val