wrap in register module for shorter result names

This commit is contained in:
Torsten Ruger 2015-10-15 10:24:10 +03:00
parent 90ed4dd73b
commit 398ec513f4
2 changed files with 19 additions and 15 deletions

View File

@ -1,5 +1,6 @@
require_relative 'helper' require_relative 'helper'
module Register
class TestIfStatement < MiniTest::Test class TestIfStatement < MiniTest::Test
include Statements include Statements
@ -15,9 +16,9 @@ class Object
end end
end end
HERE HERE
@expect = [[Virtual::MethodEnter,Register::LoadConstant,Register::LoadConstant, @expect = [[Virtual::MethodEnter,LoadConstant,LoadConstant,
Register::OperatorInstruction,Register::IsZeroBranch] , OperatorInstruction,IsZeroBranch] ,
[Register::LoadConstant,Register::AlwaysBranch] ,[Register::LoadConstant] ,[] , [LoadConstant,AlwaysBranch] ,[LoadConstant] ,[] ,
[Virtual::MethodReturn]] [Virtual::MethodReturn]]
check check
end end
@ -33,9 +34,9 @@ class Object
end end
end end
HERE HERE
@expect = [[Virtual::MethodEnter,Register::LoadConstant,Register::LoadConstant, @expect = [[Virtual::MethodEnter,LoadConstant,LoadConstant,
Register::OperatorInstruction,Register::IsZeroBranch] , OperatorInstruction,IsZeroBranch] ,
[Register::AlwaysBranch] ,[Register::LoadConstant] ,[] , [AlwaysBranch] ,[LoadConstant] ,[] ,
[Virtual::MethodReturn]] [Virtual::MethodReturn]]
check check
end end
@ -53,9 +54,10 @@ class Object
end end
end end
HERE HERE
@expect = [ [Virtual::MethodEnter,Register::GetSlot,Register::SetSlot,Register::LoadConstant, @expect = [ [Virtual::MethodEnter,GetSlot,SetSlot,LoadConstant,
Register::SetSlot,Register::LoadConstant,Register::SetSlot,Virtual::MethodCall, SetSlot,LoadConstant,SetSlot,Virtual::MethodCall,
Register::GetSlot] ,[Virtual::MethodReturn] ] GetSlot] ,[Virtual::MethodReturn] ]
check check
end end
end end
end

View File

@ -1,5 +1,6 @@
require_relative 'helper' require_relative 'helper'
module Register
class TestReturnStatement < MiniTest::Test class TestReturnStatement < MiniTest::Test
include Statements include Statements
@ -12,7 +13,7 @@ class Object
end end
end end
HERE HERE
@expect = [[Virtual::MethodEnter,Register::LoadConstant] , [Virtual::MethodReturn]] @expect = [[Virtual::MethodEnter,LoadConstant] , [Virtual::MethodReturn]]
check check
end end
@ -25,7 +26,7 @@ class Object
end end
end end
HERE HERE
@expect = [[Virtual::MethodEnter,Register::GetSlot] , [Virtual::MethodReturn]] @expect = [[Virtual::MethodEnter,GetSlot] , [Virtual::MethodReturn]]
check check
end end
@ -38,7 +39,7 @@ class Object
end end
end end
HERE HERE
@expect = [[Virtual::MethodEnter,Register::LoadConstant, Register::GetSlot] , [Virtual::MethodReturn]] @expect = [[Virtual::MethodEnter,LoadConstant, GetSlot] , [Virtual::MethodReturn]]
check check
end end
@ -51,7 +52,7 @@ class Object
end end
end end
HERE HERE
@expect = [[Virtual::MethodEnter,Register::GetSlot] , [Virtual::MethodReturn]] @expect = [[Virtual::MethodEnter,GetSlot] , [Virtual::MethodReturn]]
check check
end end
@ -63,8 +64,9 @@ class Object
end end
end end
HERE HERE
@expect = [[Virtual::MethodEnter,Register::GetSlot,Register::SetSlot, Register::LoadConstant, @expect = [[Virtual::MethodEnter,GetSlot,SetSlot, LoadConstant,
Register::SetSlot,Virtual::MethodCall,Register::GetSlot] , [Virtual::MethodReturn]] SetSlot,Virtual::MethodCall,GetSlot] , [Virtual::MethodReturn]]
check check
end end
end end
end