Sha256: 9c7eec42f7ef788014489cc23eca54f10f35cb2937d422006ceaa7f5be7ab8d2

Contents?: true

Size: 716 Bytes

Versions: 2

Compression:

Stored size: 716 Bytes

Contents

# -*- coding: utf-8 -*-
require "minitest/autorun"
require "simplecov"
SimpleCov.start

require "sixarm_ruby_geometry/indexable/width"
require "sixarm_ruby_geometry_test/fake"

module Indexable
  class WidthTest < Minitest::Test

    def test_0
      assert(::Indexable::Width)
    end

    require "matrix"
    class C < Vector
      include ::Indexable::Width
    end

    def test_width
      width = fake_n
      o = C[width,0]
      assert_equal(width, o.width)
    end

    def test_width_equal
      width = fake_n
      o = fake_indexable
      refute_equal(width, o.width)
      o.width = width
      assert_equal(width, o.width)
    end

    protected

    def fake_indexable
      C[0]
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sixarm_ruby_geometry-3.1.1 test/sixarm_ruby_geometry_test/indexable/width_test.rb
sixarm_ruby_geometry-3.0.0 test/sixarm_ruby_geometry_test/indexable/width_test.rb