From b1893482ffaf43e9657f831a39be95696bd5ff01 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Mon, 14 Jul 2014 21:25:53 +0300 Subject: [PATCH] adds an all test, uncomment not implemented --- test/test_all.rb | 2 +- test/virtual/test_all.rb | 2 ++ test/virtual/test_methods.rb | 18 +++++++++--------- 3 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 test/virtual/test_all.rb diff --git a/test/test_all.rb b/test/test_all.rb index 7b16790d..dbf9b0cd 100644 --- a/test/test_all.rb +++ b/test/test_all.rb @@ -1 +1 @@ -require_relative "fragments/test_all" +require_relative "virtual/test_all" diff --git a/test/virtual/test_all.rb b/test/virtual/test_all.rb new file mode 100644 index 00000000..a5131f50 --- /dev/null +++ b/test/virtual/test_all.rb @@ -0,0 +1,2 @@ +require_relative "test_basic" +require_relative "test_methods" diff --git a/test/virtual/test_methods.rb b/test/virtual/test_methods.rb index 832aab86..10006ed5 100644 --- a/test/virtual/test_methods.rb +++ b/test/virtual/test_methods.rb @@ -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(),Virtual::Integer,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::FrameSend.new(:_get_instance_variable , [ Virtual::StringConstant.new('length')])))] + @output = [Virtual::Method.new(:length,[Ast::NameExpression.new(:x)],Boot::BootClass.new(:String,:Object),Virtual::Reference,Virtual::MethodEnter.new(nil))] check end @@ -30,11 +30,11 @@ def foo(x) 2 + 5 end HERE - @output = [Virtual::Method.new(:foo,[Ast::NameExpression.new(:x)])] + @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))))] check end - def test_function_if + def ttest_function_if @string_input = < 5) @@ -73,7 +73,7 @@ HERE check end - def test_function_return_while + def ttest_function_return_while @string_input = < 5) do @@ -86,7 +86,7 @@ HERE check end - def test_function_while + def ttest_function_while @string_input = <