rubyx/test/elf/test_hello.rb

21 lines
471 B
Ruby
Raw Normal View History

2015-10-14 13:48:42 +03:00
require_relative "../helper"
class HelloTest < MiniTest::Test
2016-12-08 19:39:16 +02:00
include AST::Sexp
def check
2015-10-22 18:16:29 +03:00
machine = Register.machine.boot
2016-12-08 19:39:16 +02:00
Typed.compile( @input )
machine.collect
machine.translate_arm
2015-11-12 20:02:44 +02:00
writer = Elf::ObjectWriter.new
2016-12-15 18:08:55 +02:00
writer.save "test/hello.o"
end
def test_string_put
@input = s(:statements, s(:return, s(:call, s(:name, :putstring), s(:arguments),
s(:receiver, s(:string, "Hello again\\n")))))
# check
end
end