Sha256: 3435803f6458281a745b6f4f9976e5d522dcf5d77e823eaf38995c50fcfc3c80
Contents?: true
Size: 625 Bytes
Versions: 2
Compression:
Stored size: 625 Bytes
Contents
require 'spec_helper' module Finitio describe AnyType, "equality" do let(:anyType) { AnyType.new } let(:anyType2){ AnyType.new("foo") } let(:fltType) { BuiltinType.new(Float) } it 'should apply structural equality' do (anyType == anyType2).should be_true end it 'should apply distinguish different types' do (anyType == fltType).should be_false end it 'should be a total function, with nil for non types' do (anyType == 12).should be_false end it 'should implement hash accordingly' do (anyType.hash == anyType2.hash).should be_true end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
finitio-0.4.1 | spec/unit/type/any_type/test_equality.rb |
finitio-0.4.0 | spec/unit/type/any_type/test_equality.rb |