Sha256: 2b2b0257ecf4c44dfae0b6c29db2036e85354c4a66c9cc907c344685466fa4fd

Contents?: true

Size: 466 Bytes

Versions: 2

Compression:

Stored size: 466 Bytes

Contents

require 'spec_helper'
module Qrb
  describe Syntax, "set_type" do

    subject{
      Syntax.parse(input, root: "set_type")
    }

    let(:compiled){
      subject.compile(type_factory)
    }

    context '{.Integer}' do
      let(:input){ '{.Integer}' }

      it 'compiles to a SeqType' do
        compiled.should be_a(SetType)
        compiled.elm_type.should be_a(BuiltinType)
        compiled.elm_type.ruby_type.should be(Integer)
      end
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
qrb-0.2.0 spec/unit/syntax/nodes/test_set_type.rb
qrb-0.1.0 spec/unit/syntax/nodes/test_set_type.rb