Fix bad test coverage
One typo, one debug test Also stop producing those object files, use in memory io
This commit is contained in:
@ -10,10 +10,10 @@ module Elf
|
||||
def as_main(input)
|
||||
in_space("def main(arg);#{input};end")
|
||||
end
|
||||
def check(input, file)
|
||||
def check(input)
|
||||
linker = RubyX::RubyXCompiler.new(RubyX.default_test_options).ruby_to_binary( input , :arm )
|
||||
writer = Elf::ObjectWriter.new(linker)
|
||||
writer.save "test/#{file}.o"
|
||||
writer.save StringIO.new
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -23,7 +23,7 @@ module Elf
|
||||
end
|
||||
HERE
|
||||
@exit_code = 4
|
||||
check get_preload("Integer.lt;Integer.plus") + in_space(input) , "fibo"
|
||||
check get_preload("Integer.lt;Integer.plus") + in_space(input)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -9,7 +9,7 @@ module Elf
|
||||
preload = "class Word < Data8;def putstring;X.putstring;end;end;"
|
||||
@stdout = hello
|
||||
@exit_code = hello.length
|
||||
check preload + as_main(input), "hello"
|
||||
check preload + as_main(input)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -11,8 +11,12 @@ module Elf
|
||||
|
||||
def test_empty_translate
|
||||
writer = Elf::ObjectWriter.new(@linker )
|
||||
writer.save "test/zero.o"
|
||||
writer.save StringIO.new
|
||||
end
|
||||
|
||||
def test_empty_translate_with_debug
|
||||
writer = Elf::ObjectWriter.new(@linker , debug: true )
|
||||
writer.save StringIO.new
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user