rubyx/test/virtual/hello.rb

43 lines
707 B
Ruby
Raw Normal View History

require_relative "virtual_helper"
class HelloTest < MiniTest::Test
include VirtualHelper
def check
machine = Virtual::Machine.boot
expressions = machine.compile_main @string_input
2014-08-30 13:17:00 +02:00
writer = Elf::ObjectWriter.new(Virtual::BootSpace.space)
writer.save "hello.o"
# puts Sof::Writer.write(expressions)
2014-08-24 20:32:21 +02:00
# puts Sof::Writer.write(Virtual::BootSpace.space)
end
2014-08-22 08:21:59 +02:00
def qtest_simplest_function
@string_input = <<HERE
def foo(x)
5
end
HERE
check
end
def ttest_puts_string
@string_input = <<HERE
def foo()
puts("Hello")
end
foo()
HERE
check
end
def test_string_put
@string_input = <<HERE
def foo()
"Hello".puts()
end
HERE
check
end
end