fix variable expression tests

This commit is contained in:
Torsten Ruger 2016-12-10 16:28:42 +02:00
parent 4f7110ef04
commit f688611416
2 changed files with 36 additions and 1 deletions

View File

@ -1,4 +1,5 @@
require_relative "test_basic"
require_relative "test_call"
require_relative "test_field_access"
require_relative "test_ops"
require_relative "test_call"
require_relative "test_vars"

View File

@ -0,0 +1,34 @@
require_relative "helper"
module Register
class TestFields < MiniTest::Test
include ExpressionHelper
include AST::Sexp
def setup
Register.machine.boot
end
def test_local
Register.machine.space.get_main.ensure_local(:bar , :Integer)
@input = s(:name, :bar)
@output = Register::RegisterValue
check
end
def test_space
@root = :name
@input = s(:name, :space)
@output = Register::RegisterValue
check
end
def test_args
Register.machine.space.get_main.arguments.push Parfait::Variable.new(:Integer , :bar)
@input = s(:name, :bar)
@output = Register::RegisterValue
check
end
end
end