# $Id: tc_time.rb,v 1.1 2002/04/11 09:22:30 knu Exp $

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

class TC_Time < Test::Unit::TestCase
  def test_getgm
    time = Time::at(0).localtime
    assert_equal(false, time.gmt?)
    assert_equal(true, time.getgm.gmt?)
    assert_equal(false, time.gmt?)
    assert_equal(time, time.getgm)
  end

  def test_getlocal
    time = Time::at(0).gmtime
    assert_equal(true, time.gmt?)
    assert_equal(false, time.getlocal.gmt?)
    assert_equal(true, time.gmt?)
    assert_equal(time, time.getlocal)
  end

=begin
  def test_zone
    time = Time::at(0).gmtime
    assert_equal("UTC", time.zone)
  end

  def test_to_a
    time = Time::at(0).gmtime
    assert_equal([0, 0, 0, 1, 1, 1970, 4, 1, false, "UTC"], time.to_a)
  end
=end
end
