f50d7b57a4
index 0 is the marker word , so like in some, all indexes 1 based works :-)
25 lines
422 B
Ruby
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
|