2015-12-01 10:55:33 +01:00
|
|
|
require_relative '../helper'
|
|
|
|
require "register/interpreter"
|
|
|
|
require "parser/ruby22"
|
|
|
|
|
2017-01-11 18:18:04 +01:00
|
|
|
module Melon
|
|
|
|
module MelonTests
|
2017-01-15 19:30:47 +01:00
|
|
|
include CompilerHelper
|
2017-01-16 16:43:39 +01:00
|
|
|
include Register::InterpreterHelpers
|
|
|
|
|
2017-01-11 18:18:04 +01:00
|
|
|
def setup
|
2017-01-12 19:38:04 +01:00
|
|
|
Register.machine.boot
|
2017-01-11 18:18:04 +01:00
|
|
|
end
|
2015-12-01 10:55:33 +01:00
|
|
|
|
2017-01-16 16:43:39 +01:00
|
|
|
def check_nil
|
2017-01-14 19:30:19 +01:00
|
|
|
RubyCompiler.compile @string_input
|
2017-01-12 19:38:04 +01:00
|
|
|
Register::Collector.collect_space
|
|
|
|
@interpreter = Register::Interpreter.new
|
|
|
|
@interpreter.start Register.machine.init
|
|
|
|
nil
|
2017-01-11 18:18:04 +01:00
|
|
|
end
|
2015-12-01 10:55:33 +01:00
|
|
|
end
|
|
|
|
end
|