rubyx/test/elf/test_hello.rb

21 lines
501 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
machine = Risc.machine.boot
2017-01-14 19:52:16 +02:00
Vm.compile_ast( @input )
objects = Risc::Collector.collect_space
machine.translate_arm
writer = Elf::ObjectWriter.new(machine , objects )
2016-12-15 18:08:55 +02:00
writer.save "test/hello.o"
end
def pest_string_put
@input = s(:statements, s(:return, s(:call, :putstring, s(:arguments),
s(:receiver, s(:string, "Hello again\\n")))))
2016-12-31 15:08:32 +02:00
check
end
end