fold last of the virtual into register
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
require_relative "compiler_helper"
|
||||
|
||||
module Virtual
|
||||
module Register
|
||||
class TestOps < MiniTest::Test
|
||||
include CompilerHelper
|
||||
|
||||
def setup
|
||||
Virtual.machine.boot
|
||||
Register.machine.boot
|
||||
@root = :operator_value
|
||||
@output = Register::RegisterValue
|
||||
end
|
||||
@ -20,24 +20,24 @@ module Virtual
|
||||
end
|
||||
end
|
||||
def test_local_int
|
||||
Virtual.machine.space.get_main.ensure_local(:bar , :Integer)
|
||||
Register.machine.space.get_main.ensure_local(:bar , :Integer)
|
||||
@string_input = 'bar + 3'
|
||||
check
|
||||
end
|
||||
def test_int_local
|
||||
Virtual.machine.space.get_main.ensure_local(:bar , :Integer)
|
||||
Register.machine.space.get_main.ensure_local(:bar , :Integer)
|
||||
@string_input = '3 + bar'
|
||||
check
|
||||
end
|
||||
|
||||
def test_field_int
|
||||
Virtual.machine.space.get_class_by_name(:Object).object_layout.add_instance_variable(:bro)
|
||||
Register.machine.space.get_class_by_name(:Object).object_layout.add_instance_variable(:bro)
|
||||
@string_input = "self.bro + 3"
|
||||
check
|
||||
end
|
||||
|
||||
def test_int_field
|
||||
Virtual.machine.space.get_class_by_name(:Object).object_layout.add_instance_variable(:bro)
|
||||
Register.machine.space.get_class_by_name(:Object).object_layout.add_instance_variable(:bro)
|
||||
@string_input = "3 + self.bro"
|
||||
check
|
||||
end
|
||||
|
Reference in New Issue
Block a user