rubyx/test/elf/test_something.rb

30 lines
508 B
Ruby
Raw Normal View History

2018-06-25 19:21:15 +02:00
require_relative "helper"
module Elf
class SomethingTest < FullTest
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)
return fibo(8)
2018-06-25 19:21:15 +02:00
end
HERE
@exit_code = 4
check get_preload("Integer.lt;Integer.plus") + in_space(input)
2018-06-25 19:21:15 +02:00
end
end
end