rubyx/test/soml/fragments/test_recursive_fibo.rb
Torsten Ruger 7daaec6a0a unify fragment and parfait test code
so that we can test fragments remotely too
2015-11-18 13:04:57 +02:00

35 lines
555 B
Ruby

require_relative 'helper'
class TestRecursinveFibo < MiniTest::Test
include Fragments
def test_recursive_fibo
@string_input = <<HERE
class Object
int fibonaccir( int n )
if_plus( n - 2 )
int tmp
tmp = n - 1
int a = fibonaccir( tmp )
tmp = n - 2
int b = fibonaccir( tmp )
return a + b
else
return n
end
end
int fib_print(int n)
int fib = fibonaccir( n )
fib.putint()
return fib
end
int main()
return fib_print(8)
end
end
HERE
@length = 2525
check 21
end
end