Sha256: c94aaae472f01654a9f9d158cb789fe4d60d11a82e3df6524e0bde584afd67be
Contents?: true
Size: 529 Bytes
Versions: 2
Compression:
Stored size: 529 Bytes
Contents
require 'spec_helper' module Finitio describe Syntax, "type_def" do subject{ Syntax.parse(input, root: "type_def") } let(:sys){ system } let(:compiled){ subject.compile(sys) } let(:ast){ subject.to_ast } let(:input){ 'Int = .Integer' } it 'add the type to the system' do compiled sys["Int"].should be_a(BuiltinType) end it 'has the expected AST' do ast.should eq([:type_def, "Int", [:builtin_type, "Integer"]]) 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_def.rb |
finitio-0.4.0 | spec/unit/syntax/nodes/test_type_def.rb |