Sha256: 703c55e0f335622f4ed3c12351aa48db784cc127d6677590c339e823e6db28e5
Contents?: true
Size: 588 Bytes
Versions: 2
Compression:
Stored size: 588 Bytes
Contents
require 'spec_helper' module Finitio describe Syntax, "type_ref" do subject{ Syntax.parse(input, root: "type_ref") } let(:sys){ system } let(:compiled){ subject.compile(sys) } let(:ast){ subject.to_ast } before do sys.add_type(BuiltinType.new(Integer, "Int")) end let(:input){ 'Int' } it 'compiles to a the BuiltinType' do compiled.should be_a(BuiltinType) compiled.name.should eq("Int") end it 'has the expected AST' do ast.should eq([:type_ref, "Int"]) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
finitio-0.4.1 | spec/unit/syntax/nodes/test_type_ref.rb |
finitio-0.4.0 | spec/unit/syntax/nodes/test_type_ref.rb |