rubyx/test/elf/test_hello.rb
Torsten Ruger f50d7b57a4 fix the putstring sys call indexing
index 0 is the marker word , so like in some, all indexes 1 based
works :-)
2015-11-15 22:03:06 +02:00

25 lines
422 B
Ruby

require_relative "../helper"
class HelloTest < MiniTest::Test
def check
machine = Register.machine.boot
machine.parse_and_compile @string_input
machine.collect
machine.translate_arm
writer = Elf::ObjectWriter.new
writer.save "hello.o"
end
def test_string_put
@string_input = <<HERE
class Object
int main()
return "Hello again\n".putstring()
end
end
HERE
check
end
end