bit of test cleaning

This commit is contained in:
Torsten Ruger
2015-05-18 10:51:37 +03:00
parent cfc2c474b2
commit c983b1cba5
3 changed files with 1 additions and 58 deletions

View File

@ -0,0 +1,43 @@
require_relative "virtual_helper"
class HelloTest < MiniTest::Test
include VirtualHelper
def check
machine = Virtual::Machine.boot
expressions = machine.compile_main @string_input
writer = Elf::ObjectWriter.new(machine)
writer.save "hello.o"
# puts Sof::Writer.write(expressions)
puts Sof::Writer.write(machine.space)
end
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