fixes the tests after fixing hierarchy
This commit is contained in:
@ -27,19 +27,19 @@ class TestBasic < MiniTest::Test
|
||||
|
||||
def test_name
|
||||
@string_input = 'foo '
|
||||
@output = [Virtual::Reference]
|
||||
@output = [Virtual::Return.new(Virtual::Mystery)]
|
||||
check
|
||||
end
|
||||
|
||||
def test_self
|
||||
@string_input = 'self '
|
||||
@output = [Virtual::SelfReference.new()]
|
||||
@output = [Virtual::Self.new(Virtual::Mystery.new())]
|
||||
check
|
||||
end
|
||||
|
||||
def test_instance_variable
|
||||
@string_input = '@foo_bar '
|
||||
@output = [Virtual::Reference]
|
||||
@output = [Virtual::Return.new( Virtual::Mystery.new())]
|
||||
check
|
||||
end
|
||||
|
||||
|
@ -9,7 +9,7 @@ def foo(x)
|
||||
5
|
||||
end
|
||||
HERE
|
||||
@output = [Virtual::Method.new(:foo,[Ast::NameExpression.new(:x)],Virtual::SelfReference.new(),Virtual::IntegerConstant.new(5),Virtual::MethodEnter.new(nil))]
|
||||
@output = [Virtual::Method.new(:foo,[Ast::NameExpression.new(:x)],Virtual::SelfReference.new(nil),Virtual::IntegerConstant.new(5),Virtual::MethodEnter.new(nil))]
|
||||
check
|
||||
end
|
||||
|
||||
@ -19,7 +19,7 @@ def String.length(x)
|
||||
@length
|
||||
end
|
||||
HERE
|
||||
@output = [Virtual::Method.new(:length,[Ast::NameExpression.new(:x)],Boot::BootClass.new(:String,:Object),Virtual::Reference,Virtual::MethodEnter.new(Virtual::ObjectGet.new(:length)))]
|
||||
@output = [Virtual::Method.new(:length,[Ast::NameExpression.new(:x)],Boot::BootClass.new(:String,:Object),Virtual::Return.new( Virtual::Mystery.new()),Virtual::MethodEnter.new(Virtual::ObjectGet.new(:length)))]
|
||||
check
|
||||
end
|
||||
|
||||
@ -30,7 +30,7 @@ def foo(x)
|
||||
2 + 5
|
||||
end
|
||||
HERE
|
||||
@output = [Virtual::Method.new(:foo,[Ast::NameExpression.new(:x)],Virtual::SelfReference.new(),Virtual::Reference,Virtual::MethodEnter.new(Virtual::FrameSet.new(:abba,Virtual::IntegerConstant.new(5))))]
|
||||
@output = [Virtual::Method.new(:foo,[Ast::NameExpression.new(:x)],Virtual::SelfReference.new(nil),Virtual::Return.new( Virtual::Mystery),Virtual::MethodEnter.new(Virtual::FrameSet.new(:abba,Virtual::IntegerConstant.new(5))))]
|
||||
check
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user