Torsten Rüger
12b29285d7
so many relied (implicitly( on some builtin function after all can't do much in ruby without calling Now all those dependencies are explicit Small risc changes come because the macro version has a return label and unreachable label
30 lines
516 B
Ruby
30 lines
516 B
Ruby
require_relative "helper"
|
|
|
|
module Elf
|
|
class SomethingTest < FullTest
|
|
include Preloader
|
|
|
|
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)
|
|
end
|
|
HERE
|
|
@exit_code = 4
|
|
check get_preload("Integer.lt;Integer.plus") + in_space(input) , "fibo"
|
|
end
|
|
end
|
|
end
|