Sha256: 9cedc83747a5a443bd3cc4d2e9049ad23bfaafd5c3a842bde8eff4d0b8f53e8e
Contents?: true
Size: 669 Bytes
Versions: 3
Compression:
Stored size: 669 Bytes
Contents
require "spec_helper" require "hamster/set" describe Hamster::Set do describe "#disjoint?" do [ [[], [], true], [["A"], [], true], [[], ["A"], true], [["A"], ["A"], false], [%w[A B C], ["B"], false], [["B"], %w[A B C], false], [%w[A B C], %w[D E], true], [%w[F G H I], %w[A B C], true], [%w[A B C], %w[A B C], false], [%w[A B C], %w[A B C D], false], [%w[D E F G], %w[A B C], true], ].each do |a, b, expected| describe "for #{a.inspect} and #{b.inspect}" do it "returns #{expected}" do S[*a].disjoint?(S[*b]).should be(expected) end end end end end
Version data entries
3 entries across 3 versions & 2 rubygems