# $Id: tc_marshal.rb,v 1.2 2002/12/10 13:16:01 knu Exp $

require 'test/unit'
begin
  require 'features/ruby18/marshal'
rescue LoadError; end

class TC_Marshal < Test::Unit::TestCase
  def test_version
    assert_equal(4, Marshal::MAJOR_VERSION)

    if RUBY_VERSION < '1.6.2'
      assert_equal(4, Marshal::MINOR_VERSION)
    elsif RUBY_VERSION < '1.6.5'
      assert_equal(5, Marshal::MINOR_VERSION)
    elsif RUBY_VERSION < '1.7.0'
      assert_equal(6, Marshal::MINOR_VERSION)
    elsif RUBY_VERSION < '1.7.3'
      assert_equal(7, Marshal::MINOR_VERSION)
    else
      assert_equal(8, Marshal::MINOR_VERSION)
    end
  end
end
