Sha256: c2a4cc8c7fd2068e8ab0254f03d2a21669e167f85d7cdbafff11ed55e0017e59

Contents?: true

Size: 1.74 KB

Versions: 95

Compression:

Stored size: 1.74 KB

Contents

# Copyright (C) 2015  Ruby-GNOME2 Project Team
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

class TestRsvgVersion < Test::Unit::TestCase
  include Rsvg2TestUtils

  test "STRING" do
    major = Rsvg::Version::MAJOR
    minor = Rsvg::Version::MINOR
    micro = Rsvg::Version::MICRO
    assert_equal([major, minor, micro].join("."),
                 Rsvg::Version::STRING)
  end

  sub_test_case("#or_later?") do
    test "same" do
      assert_true(Rsvg::Version.or_later?(Rsvg::Version::MAJOR,
                                          Rsvg::Version::MINOR,
                                          Rsvg::Version::MICRO))
    end

    test "later" do
      assert_true(Rsvg::Version.or_later?(Rsvg::Version::MAJOR,
                                          Rsvg::Version::MINOR - 1,
                                          Rsvg::Version::MICRO))
    end

    test "earlier" do
      assert_false(Rsvg::Version.or_later?(Rsvg::Version::MAJOR,
                                           Rsvg::Version::MINOR + 1,
                                           Rsvg::Version::MICRO))
    end
  end
end

Version data entries

95 entries across 95 versions & 1 rubygems

Version Path
rsvg2-4.2.5 test/test-version.rb
rsvg2-4.2.4 test/test-version.rb
rsvg2-4.2.3 test/test-version.rb
rsvg2-4.2.2 test/test-version.rb
rsvg2-4.2.1 test/test-version.rb
rsvg2-4.2.0 test/test-version.rb
rsvg2-4.1.9 test/test-version.rb
rsvg2-4.1.8 test/test-version.rb
rsvg2-4.1.7 test/test-version.rb
rsvg2-4.1.6 test/test-version.rb
rsvg2-4.1.5 test/test-version.rb
rsvg2-4.1.4 test/test-version.rb
rsvg2-4.1.3 test/test-version.rb
rsvg2-4.1.2 test/test-version.rb
rsvg2-4.1.1 test/test-version.rb
rsvg2-4.1.0 test/test-version.rb
rsvg2-4.0.9 test/test-version.rb
rsvg2-4.0.8 test/test-version.rb
rsvg2-4.0.7 test/test-version.rb
rsvg2-4.0.6 test/test-version.rb