rubyx/test/elf/test_hello.rb
Torsten Ruger 6754518daf prune builtin
will need much less, many more things can be expressed in soml
2015-10-23 15:13:05 +03:00

30 lines
645 B
Ruby

require_relative "../helper"
class HelloTest < MiniTest::Test
def check
machine = Register.machine.boot
#TODO remove this hack: write proper aliases
statements = machine.parse_and_compile @string_input
output_at = "Register::CallImplementation"
#{}"Register::CallImplementation"
machine.collect
machine.run_before output_at
#puts Sof.write(machine.space)
machine.run_after output_at
writer = Elf::ObjectWriter.new(machine)
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