2018-06-25 19:21:15 +02:00
|
|
|
require_relative "helper"
|
|
|
|
|
|
|
|
module Elf
|
|
|
|
class SomethingTest < FullTest
|
2019-09-13 13:07:12 +02:00
|
|
|
include Preloader
|
2018-06-25 19:21:15 +02:00
|
|
|
|
|
|
|
def test_add
|
|
|
|
input = <<HERE
|
|
|
|
def fibo( n)
|
|
|
|
a = 0
|
|
|
|
b = 1
|
|
|
|
i = 1
|
|
|
|
while( i < n ) do
|
|
|
|
result = a + b
|
|
|
|
a = b
|
|
|
|
b = result
|
|
|
|
i += 1
|
|
|
|
end
|
|
|
|
return result
|
|
|
|
end
|
|
|
|
def main(arg)
|
2018-09-02 12:58:42 +02:00
|
|
|
return fibo(8)
|
2018-06-25 19:21:15 +02:00
|
|
|
end
|
|
|
|
HERE
|
|
|
|
@exit_code = 4
|
2019-09-25 00:14:00 +02:00
|
|
|
check get_preload("Integer.lt;Integer.plus") + in_space(input)
|
2018-06-25 19:21:15 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|