Sha256: 5525d26d59176ae91ffe27235a6f39a95a9cbfbba7c81eb9a0f670b0af1fd912
Contents?: true
Size: 808 Bytes
Versions: 9
Compression:
Stored size: 808 Bytes
Contents
require 'spec_helper' module Finitio describe Type, "suppremum" do subject{ left.suppremum(right) } let(:left){ intType } context 'when both are equal' do let(:right){ intType } it 'works' do expect(subject).to be(left) end end context 'when they are different' do let(:right){ nilType } it 'works' do expect(subject).to be_a(UnionType) expect(subject.candidates).to eql([left, right]) end end context 'when one is any' do let(:right){ anyType } it 'works' do expect(subject).to eql(anyType) end it 'works the other way round' do expect(anyType.suppremum(left)).to eql(anyType) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems