2014-06-25 15:20:46 +03:00
|
|
|
require_relative '../helper'
|
|
|
|
require 'parslet/convenience'
|
2014-08-21 22:57:20 +03:00
|
|
|
require "yaml"
|
2014-06-25 15:20:46 +03:00
|
|
|
|
2014-06-26 11:34:48 +03:00
|
|
|
module VirtualHelper
|
2015-05-05 14:04:37 +03:00
|
|
|
# need a code generator, for arm
|
2014-06-25 15:20:46 +03:00
|
|
|
def setup
|
2015-05-12 15:36:44 +03:00
|
|
|
# @object_space = Boot::Space.new "Arm"
|
2014-06-25 15:20:46 +03:00
|
|
|
end
|
|
|
|
|
2014-07-30 21:07:48 +03:00
|
|
|
def check
|
2015-05-16 20:16:49 +03:00
|
|
|
machine = Virtual::Machine.reboot
|
2014-07-30 21:43:12 +03:00
|
|
|
expressions = machine.compile_main @string_input
|
2015-05-05 15:11:09 +03:00
|
|
|
is = Sof::Writer.write(expressions)
|
2015-05-06 08:38:29 +03:00
|
|
|
#puts is
|
2015-05-05 15:11:09 +03:00
|
|
|
is.gsub!("\n" , "*^*")
|
2015-05-05 14:04:37 +03:00
|
|
|
assert_equal is , @output
|
2014-06-25 15:20:46 +03:00
|
|
|
end
|
2015-05-05 14:04:37 +03:00
|
|
|
|
2014-06-25 15:20:46 +03:00
|
|
|
end
|