rubyx/test/virtual/test_machine.rb
2014-08-07 15:37:32 +03:00

18 lines
4.5 KiB
Ruby

require_relative "virtual_helper"
class TestMethods < MiniTest::Test
include VirtualHelper
def test_object
@string_input = <<HERE
class Object
def get_class()
@layout.get_class()
end
end
HERE
@output = "---RETURN_MARKER- &12 !ruby/object:Boot::BootClassRETURN_MARKER method_definitions:RETURN_MARKER - !ruby/object:Virtual::MethodDefinitionRETURN_MARKER name: :index_ofRETURN_MARKER args: &1 !ruby/class 'Virtual::Reference'RETURN_MARKER locals: []RETURN_MARKER tmps: []RETURN_MARKER receiver:RETURN_MARKER - *1RETURN_MARKER return_type: &7 !ruby/class 'Virtual::Integer'RETURN_MARKER start: &2 !ruby/object:Virtual::MethodEnterRETURN_MARKER next: !ruby/object:Virtual::MethodReturnRETURN_MARKER next: RETURN_MARKER current: *2RETURN_MARKER - !ruby/object:Virtual::MethodDefinitionRETURN_MARKER name: :_get_instance_variableRETURN_MARKER args:RETURN_MARKER - *1RETURN_MARKER locals: []RETURN_MARKER tmps: []RETURN_MARKER receiver: *1RETURN_MARKER return_type: &4 !ruby/class 'Virtual::Mystery'RETURN_MARKER start: &3 !ruby/object:Virtual::MethodEnterRETURN_MARKER next: !ruby/object:Virtual::MethodReturnRETURN_MARKER next: RETURN_MARKER current: *3RETURN_MARKER - !ruby/object:Virtual::MethodDefinitionRETURN_MARKER name: :_set_instance_variableRETURN_MARKER args:RETURN_MARKER - *1RETURN_MARKER - *1RETURN_MARKER locals: []RETURN_MARKER tmps: []RETURN_MARKER receiver: *1RETURN_MARKER return_type: *4RETURN_MARKER start: &5 !ruby/object:Virtual::MethodEnterRETURN_MARKER next: !ruby/object:Virtual::MethodReturnRETURN_MARKER next: RETURN_MARKER current: *5RETURN_MARKER - !ruby/object:Virtual::MethodDefinitionRETURN_MARKER name: :putstringRETURN_MARKER args: []RETURN_MARKER locals: []RETURN_MARKER tmps: []RETURN_MARKER receiver: !ruby/object:Virtual::SelfReferenceRETURN_MARKER clazz: RETURN_MARKER return_type: *4RETURN_MARKER start: &6 !ruby/object:Virtual::MethodEnterRETURN_MARKER next: !ruby/object:Virtual::MethodReturnRETURN_MARKER next: RETURN_MARKER current: *6RETURN_MARKER - !ruby/object:Virtual::MethodDefinitionRETURN_MARKER name: :putintRETURN_MARKER args: []RETURN_MARKER locals: []RETURN_MARKER tmps: []RETURN_MARKER receiver: *7RETURN_MARKER return_type: *7RETURN_MARKER start: &8 !ruby/object:Virtual::MethodEnterRETURN_MARKER next: !ruby/object:Virtual::MethodReturnRETURN_MARKER next: RETURN_MARKER current: *8RETURN_MARKER - !ruby/object:Virtual::MethodDefinitionRETURN_MARKER name: :fiboRETURN_MARKER args: []RETURN_MARKER locals: []RETURN_MARKER tmps: []RETURN_MARKER receiver: *7RETURN_MARKER return_type: *7RETURN_MARKER start: &9 !ruby/object:Virtual::MethodEnterRETURN_MARKER next: !ruby/object:Virtual::MethodReturnRETURN_MARKER next: RETURN_MARKER current: *9RETURN_MARKER - !ruby/object:Virtual::MethodDefinitionRETURN_MARKER name: :exitRETURN_MARKER args: []RETURN_MARKER locals: []RETURN_MARKER tmps: []RETURN_MARKER receiver: *7RETURN_MARKER return_type: *4RETURN_MARKER start: &10 !ruby/object:Virtual::MethodEnterRETURN_MARKER next: !ruby/object:Virtual::MethodReturnRETURN_MARKER next: RETURN_MARKER current: *10RETURN_MARKER - !ruby/object:Virtual::MethodDefinitionRETURN_MARKER name: :get_classRETURN_MARKER args: []RETURN_MARKER locals: []RETURN_MARKER tmps: []RETURN_MARKER receiver: !ruby/object:Virtual::SelfReferenceRETURN_MARKER clazz: RETURN_MARKER return_type: !ruby/object:Virtual::ReturnRETURN_MARKER name: :returnRETURN_MARKER type: *4RETURN_MARKER start: !ruby/object:Virtual::MethodEnterRETURN_MARKER next: !ruby/object:Virtual::ObjectGetRETURN_MARKER name: :layoutRETURN_MARKER next: !ruby/object:Virtual::LoadSelfRETURN_MARKER value: !ruby/object:Virtual::ReturnRETURN_MARKER name: :returnRETURN_MARKER type: !ruby/object:Virtual::Mystery {}RETURN_MARKER next: &11 !ruby/object:Virtual::MessageSendRETURN_MARKER name: :get_classRETURN_MARKER args: []RETURN_MARKER next: !ruby/object:Virtual::MethodReturnRETURN_MARKER next: RETURN_MARKER current: *11RETURN_MARKER name: :ObjectRETURN_MARKER super_class_name: :ObjectRETURN_MARKER meta_class: !ruby/object:Boot::MetaClassRETURN_MARKER layout: !ruby/object:Virtual::LayoutRETURN_MARKER members: []RETURN_MARKER functions: []RETURN_MARKER me_self: *12RETURN_MARKER"
check
end
end