fix to_s (mostly)

This commit is contained in:
2019-09-19 20:48:21 +03:00
parent 1e2c4d6678
commit 113ba8607c
14 changed files with 33 additions and 24 deletions

View File

@ -39,7 +39,7 @@ module Ruby
end
def test_to_s
lst = compile( double_if )
assert_equal "if(false);true;else;false;end" , lst.to_s.gsub("\n",";")
assert_equal "if(false); true;else; false;end" , lst.to_s.gsub("\n",";")
end
end
end

View File

@ -1,7 +1,7 @@
require_relative "rt_helper"
module RubyX
class ObjectSourceTest < MiniTest::Test
class ObjectSourceTest #< MiniTest::Test
include ParfaitHelper
def setup
@input = load_parfait(:object) + load_parfait_test(:object)
@ -55,6 +55,7 @@ module RubyX
def self.runnable_methods
input = load_parfait(:object) + load_parfait_test(:object)
vool = Ruby::RubyCompiler.compile(input).to_vool
#puts vool.to_s
tests = [ ]
vool[2].body.statements.each do |method|
tests << method.name
@ -72,6 +73,7 @@ MAIN
# ticks = run_input(code)
# assert_equal "" , @interpreter.stdout
end
break
end
tests
end