rubyx/test/elf/test_hello.rb
Torsten Ruger 15b570f5cf removing passes (before arm)
collector becomes a function
minimizer unused
2015-10-18 19:27:02 +03:00

31 lines
733 B
Ruby

require_relative "../helper"
class HelloTest < MiniTest::Test
def check
machine = Virtual.machine.boot
Parfait::Space.object_space.get_class_by_name(:Integer).remove_instance_method :plus
#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