rubyx/test/elf/test_hello.rb

25 lines
424 B
Ruby
Raw Normal View History

2015-10-14 12:48:42 +02:00
require_relative "../helper"
class HelloTest < MiniTest::Test
def check
2015-10-22 17:16:29 +02:00
machine = Register.machine.boot
machine.parse_and_compile @string_input
machine.collect
machine.translate_arm
writer = Elf::ObjectWriter.new(machine)
2014-08-30 13:17:00 +02:00
writer.save "hello.o"
end
def test_string_put
@string_input = <<HERE
class Object
int main()
"Hello again\n".putstring()
end
end
HERE
check
end
end