2018-07-02 16:01:07 +02:00
|
|
|
require_relative "helper"
|
2016-12-30 12:15:08 +01:00
|
|
|
|
2018-07-02 16:01:07 +02:00
|
|
|
module Elf
|
2016-12-30 12:15:08 +01:00
|
|
|
|
2018-07-02 16:01:07 +02:00
|
|
|
class TestZeroCode < FullTest
|
2016-12-31 14:08:32 +01:00
|
|
|
|
2018-07-02 16:01:07 +02:00
|
|
|
def setup
|
|
|
|
super
|
2019-08-14 10:11:26 +02:00
|
|
|
@linker = RubyX::RubyXCompiler.new(RubyX.default_test_options).ruby_to_binary(as_main("return 1"),:arm)
|
2018-07-02 16:01:07 +02:00
|
|
|
end
|
2016-12-31 14:08:32 +01:00
|
|
|
|
2018-07-02 16:01:07 +02:00
|
|
|
def test_empty_translate
|
|
|
|
writer = Elf::ObjectWriter.new(@linker )
|
2019-09-25 00:14:00 +02:00
|
|
|
writer.save StringIO.new
|
2016-12-31 14:08:32 +01:00
|
|
|
end
|
2018-07-02 16:01:07 +02:00
|
|
|
|
2019-09-25 00:14:00 +02:00
|
|
|
def test_empty_translate_with_debug
|
|
|
|
writer = Elf::ObjectWriter.new(@linker , debug: true )
|
|
|
|
writer.save StringIO.new
|
|
|
|
end
|
2016-12-30 12:15:08 +01:00
|
|
|
end
|
|
|
|
end
|