start rewriting for parfait #25

just some infrastructure for now.
This commit is contained in:
Torsten Ruger
2019-03-05 20:36:40 +02:00
parent 11c5389e24
commit b4b1e6e13b
4 changed files with 76 additions and 3 deletions

View File

@ -20,4 +20,22 @@ module RubyX
assert_equal 23 , @linker.assemblers.length
end
end
class TestRubyXCompilerParfait < MiniTest::Test
include ScopeHelper
include RubyXHelper
def setup
super
code = "class Space ; def self.class_method; return 1; end;def main(arg);return Space.class_method;end; end"
@comp = RubyXCompiler.ruby_to_binary(code , load_parfait: true , platform: :interpreter)
end
def test_load
object = Parfait.object_space.get_class_by_name(:Object)
assert_equal Parfait::Class , object.class
object = object.instance_type
object.methods.each_method {|m| puts m.name}
assert_equal Parfait::Type , object.get_method(:set_type)
end
end
end