2017-01-11 18:18:04 +01:00
|
|
|
require_relative 'helper'
|
|
|
|
|
2017-01-17 23:05:36 +01:00
|
|
|
module Rubyx
|
2017-01-11 18:18:04 +01:00
|
|
|
class TestManyCalls < MiniTest::Test
|
2017-01-17 23:05:36 +01:00
|
|
|
include RubyxTests
|
2017-01-11 18:18:04 +01:00
|
|
|
|
|
|
|
def pest_ruby_calls_looping
|
|
|
|
@string_input = <<HERE
|
|
|
|
|
|
|
|
def fibo_r( n )
|
|
|
|
if( n < 2 )
|
|
|
|
return n
|
|
|
|
else
|
|
|
|
return fibo_r(n - 1) + fibo_r(n - 2)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
counter = 1000
|
|
|
|
|
|
|
|
while(counter > 0) do
|
|
|
|
fibo_r(20)
|
|
|
|
counter -= 1
|
|
|
|
end
|
|
|
|
HERE
|
|
|
|
@length = 37
|
|
|
|
@stdout = ""
|
|
|
|
check
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|