rubyx/test/elf/helper.rb
Torsten Rüger 701890f625 Fix bad test coverage
One typo, one debug test
Also stop producing those object files, use in memory io
2019-09-25 01:14:00 +03:00

20 lines
435 B
Ruby

require_relative "../helper"
module Elf
class FullTest < MiniTest::Test
def in_space(input)
"class Space; #{input} ; end"
end
def as_main(input)
in_space("def main(arg);#{input};end")
end
def check(input)
linker = RubyX::RubyXCompiler.new(RubyX.default_test_options).ruby_to_binary( input , :arm )
writer = Elf::ObjectWriter.new(linker)
writer.save StringIO.new
end
end
end