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