2015-10-14 12:48:42 +02:00
|
|
|
require_relative "../helper"
|
2014-08-21 21:57:20 +02:00
|
|
|
|
|
|
|
class HelloTest < MiniTest::Test
|
2015-05-16 11:53:10 +02:00
|
|
|
|
2018-05-05 19:25:10 +02:00
|
|
|
def setup
|
2018-05-30 13:55:17 +02:00
|
|
|
Risc.machine.boot
|
2018-05-05 19:25:10 +02:00
|
|
|
end
|
2014-08-21 21:57:20 +02:00
|
|
|
def check
|
2018-03-29 19:37:25 +02:00
|
|
|
Vool::VoolCompiler.ruby_to_binary( "class Space;def main(arg);#{@input};end;end" )
|
|
|
|
writer = Elf::ObjectWriter.new(Risc.machine)
|
2016-12-15 17:08:55 +01:00
|
|
|
writer.save "test/hello.o"
|
2014-08-21 21:57:20 +02:00
|
|
|
end
|
|
|
|
|
2018-03-29 19:37:25 +02:00
|
|
|
def test_string_put
|
2018-06-19 16:35:00 +02:00
|
|
|
@input = "return 'Hello World!\n'.putstring"
|
2016-12-31 14:08:32 +01:00
|
|
|
check
|
2014-08-21 21:57:20 +02:00
|
|
|
end
|
2015-05-16 11:53:10 +02:00
|
|
|
end
|