2018-06-23 15:58:43 +03:00
|
|
|
require_relative "../helper"
|
|
|
|
|
|
|
|
module Elf
|
|
|
|
|
|
|
|
class FullTest < MiniTest::Test
|
|
|
|
|
2018-06-25 20:21:15 +03:00
|
|
|
def in_space(input)
|
|
|
|
"class Space; #{input} ; end"
|
|
|
|
end
|
|
|
|
def as_main(input)
|
|
|
|
in_space("def main(arg);#{input};end")
|
|
|
|
end
|
2019-09-25 01:14:00 +03:00
|
|
|
def check(input)
|
2019-02-08 23:03:23 +02:00
|
|
|
linker = RubyX::RubyXCompiler.new(RubyX.default_test_options).ruby_to_binary( input , :arm )
|
2018-07-03 10:12:40 +03:00
|
|
|
writer = Elf::ObjectWriter.new(linker)
|
2019-09-25 01:14:00 +03:00
|
|
|
writer.save StringIO.new
|
2018-06-25 00:39:13 +03:00
|
|
|
end
|
2018-06-23 15:58:43 +03:00
|
|
|
end
|
|
|
|
end
|