Sha256: 61bc8249ad1e1729ea666671b2e4a30cb5d95a5d0b9743b83015aac346cde23e

Contents?: true

Size: 442 Bytes

Versions: 6

Compression:

Stored size: 442 Bytes

Contents

require 'test_helper'

module Tins
  class BijectionTest < Test::Unit::TestCase
    def test_bijection
      assert_equal [ [ 1, 2 ], [ 3, 4 ] ], Tins::Bijection[ 1, 2, 3, 4 ].to_a.sort
      assert_raise(ArgumentError) do
        Tins::Bijection[1,2,3]
      end
      assert_raise(ArgumentError) do
        Tins::Bijection[1,2,3,2]
      end
      assert_raise(ArgumentError) do
        Tins::Bijection[1,2,1,3]
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tins-1.38.0 tests/bijection_test.rb
tins-1.37.1 tests/bijection_test.rb
tins-1.37.0 tests/bijection_test.rb
tins-1.36.1 tests/bijection_test.rb
tins-1.36.0 tests/bijection_test.rb
tins-1.35.0 tests/bijection_test.rb