rubyx/stash/test_vm/method_compiler/test_name_expression.rb

35 lines
650 B
Ruby
Raw Normal View History

2016-12-10 15:28:42 +01:00
require_relative "helper"
module Risc
2016-12-10 15:28:42 +01:00
class TestFields < MiniTest::Test
include ExpressionHelper
include AST::Sexp
def setup
Risc.machine.boot
2016-12-10 15:28:42 +01:00
end
def test_local
Parfait.object_space.get_main.add_local(:bar , :Integer)
@input = s(:local, :bar)
@output = Risc::RiscValue
2016-12-10 15:28:42 +01:00
check
end
def test_space
@root = :name
@input = s(:known, :space)
@output = Risc::RiscValue
2016-12-10 15:28:42 +01:00
check
end
def test_args
Parfait.object_space.get_main.add_argument(:bar , :Integer)
@input = s(:arg, :bar)
@output = Risc::RiscValue
2016-12-10 15:28:42 +01:00
check
end
end
end