some ripples from branch logic change
This commit is contained in:
parent
6e7c6d814a
commit
39eed43358
@ -7,7 +7,7 @@ class TestRecursinveFibo < MiniTest::Test
|
||||
@string_input = <<HERE
|
||||
class Object
|
||||
int fibonaccir( int n )
|
||||
if_plus( n - 1 )
|
||||
if_plus( n - 2 )
|
||||
int tmp
|
||||
tmp = n - 1
|
||||
int a = fibonaccir( tmp )
|
||||
|
@ -9,12 +9,11 @@ class Object
|
||||
int fibonaccit(int n)
|
||||
int a = 0
|
||||
int b = 1
|
||||
n = n - 1
|
||||
while_plus( n )
|
||||
while_plus( n - 2)
|
||||
n = n - 1
|
||||
int tmp = a
|
||||
a = b
|
||||
b = tmp + b
|
||||
n = n - 1
|
||||
end
|
||||
b.putint()
|
||||
return b
|
||||
@ -30,7 +29,7 @@ HERE
|
||||
|
||||
def test_while_fibo48
|
||||
fibo 48
|
||||
@length = 1149
|
||||
@length = 1241
|
||||
# this is not the correct fibo, just what comes from wrapping (smaller than below)
|
||||
check_return 512559680
|
||||
end
|
||||
@ -38,7 +37,7 @@ HERE
|
||||
# highest 32 bit fibo
|
||||
def test_while_fibo47
|
||||
fibo 47
|
||||
@length = 1126
|
||||
@length = 1216
|
||||
check_return 2971215073
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user