Lots of preloading for tests
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
This commit is contained in:
@ -2,6 +2,7 @@ require_relative "helper"
|
||||
|
||||
module Elf
|
||||
class SomethingTest < FullTest
|
||||
include Preloader
|
||||
|
||||
def test_add
|
||||
input = <<HERE
|
||||
@ -22,7 +23,7 @@ module Elf
|
||||
end
|
||||
HERE
|
||||
@exit_code = 4
|
||||
check in_space(input) , "fibo"
|
||||
check get_preload("Integer.lt;Integer.plus") + in_space(input) , "fibo"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -6,9 +6,10 @@ module Elf
|
||||
def test_string_put
|
||||
hello = "Hello World!\n"
|
||||
input = "return '#{hello}'.putstring"
|
||||
preload = "class Word;def putstring;X.putstring;end;end;"
|
||||
@stdout = hello
|
||||
@exit_code = hello.length
|
||||
check as_main(input), "hello"
|
||||
check preload + as_main(input), "hello"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user