[前][次][番号順一覧][スレッド一覧]

ruby-changes:34943

From: hsbt <ko1@a...>
Date: Fri, 1 Aug 2014 18:42:15 +0900 (JST)
Subject: [ruby-changes:34943] hsbt:r47025 (trunk): * test/date/test_date.rb: remove commented-out code.

hsbt	2014-08-01 18:41:59 +0900 (Fri, 01 Aug 2014)

  New Revision: 47025

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47025

  Log:
    * test/date/test_date.rb: remove commented-out code.
    * test/date/test_date_arith.rb: ditto.
    * test/date/test_date_attr.rb: ditto.
    * test/date/test_date_parse.rb: ditto.

  Modified files:
    trunk/ChangeLog
    trunk/test/date/test_date.rb
    trunk/test/date/test_date_arith.rb
    trunk/test/date/test_date_attr.rb
    trunk/test/date/test_date_parse.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 47024)
+++ ChangeLog	(revision 47025)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Aug  1 18:39:57 2014  SHIBATA Hiroshi  <shibata.hiroshi@g...>
+
+	* test/date/test_date.rb: remove commented-out code.
+	* test/date/test_date_arith.rb: ditto.
+	* test/date/test_date_attr.rb: ditto.
+	* test/date/test_date_parse.rb: ditto.
+
 Fri Aug  1 16:35:32 2014  Evan Miller  <evan@s...>
 
 	* numeric.c (flodivmod): all results are NaN if divisor is NaN.
Index: test/date/test_date_arith.rb
===================================================================
--- test/date/test_date_arith.rb	(revision 47024)
+++ test/date/test_date_arith.rb	(revision 47025)
@@ -261,26 +261,4 @@ class TestDateArith < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/date/test_date_arith.rb#L261
     assert_equal(8, e.to_a.size)
   end
 
-=begin
-  def test_step__inf
-    p = Date.new(2001,1,14)
-    q = Date.new(2001,1,21)
-    inf = 1.0/0
-
-    if inf.infinite?
-      [p, q].each do |a|
-	[p, q].each do |b|
-	  [inf, -inf].each do |c|
-	    i = 0
-	    a.step(b, c) do |d|
-	      i += 1
-	    end
-	    assert_equal(0, i)
-	  end
-	end
-      end
-    end
-  end
-=end
-
 end
Index: test/date/test_date_attr.rb
===================================================================
--- test/date/test_date_attr.rb	(revision 47024)
+++ test/date/test_date_attr.rb	(revision 47025)
@@ -8,15 +8,6 @@ class TestDateAttr < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/date/test_date_attr.rb#L8
     datetime = DateTime.new(1965, 5, 23, 22, 31, 59)
 
     [date, datetime].each_with_index do |d, i|
-=begin
-      if i == 0
-	assert_match(/\#<Date\d?: 1965-05-23 \(4877807\/2,0,2299161\)>/,
-		     d.inspect)
-      else
-	assert_match(/\#<DateTime\d?: 1965-05-23T22:31:59\+00:00 \(210721343519\/86400,0,2299161\)>/,
-		     d.inspect)
-      end
-=end
 
       if i == 0
 	assert_equal('1965-05-23', d.to_s)
Index: test/date/test_date_parse.rb
===================================================================
--- test/date/test_date_parse.rb	(revision 47024)
+++ test/date/test_date_parse.rb	(revision 47025)
@@ -37,7 +37,6 @@ class TestDateParse < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/date/test_date_parse.rb#L37
      [['Sat Aug 28 02:29:34 Mountain Standard Time 2000',false],[2000,8,28,2,29,34,'Mountain Standard Time',-7*3600,6], __LINE__],
      [['Sat Aug 28 02:29:34 Mountain Daylight Time 2000',false],[2000,8,28,2,29,34,'Mountain Daylight Time',-6*3600,6], __LINE__],
      [['Sat Aug 28 02:29:34 Mexico Standard Time 2000',false],[2000,8,28,2,29,34,'Mexico Standard Time',-6*3600,6], __LINE__],
-#     [['Sat Aug 28 02:29:34 Mexico Standard Time 2 2000',false],[2000,8,28,2,29,34,'Mexico Standard Time 2',-7*3600,6], __LINE__], # cp
      [['Sat Aug 28 02:29:34 E. Australia Standard Time 2000',false],[2000,8,28,2,29,34,'E. Australia Standard Time',10*3600,6], __LINE__],
 
      # part of iso 8601
@@ -109,7 +108,6 @@ class TestDateParse < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/date/test_date_parse.rb#L108
      [["23-05-'99",true],[1999,5,23,nil,nil,nil,nil,nil,nil], __LINE__],
 
      # broken iso 8601 (?)
-#     [['1999-05-23T235521Z',false],[1999,5,23,23,55,21,'Z',0,nil], __LINE__], # cp
      [['19990523T23:55:21Z',false],[1999,5,23,23,55,21,'Z',0,nil], __LINE__],
      [['19990523235521.1234-100',true],[1999,5,23,23,55,21,'-100',-1*3600,nil], __LINE__],
      [['19990523235521.1234-10',true],[1999,5,23,23,55,21,'-10',-10*3600,nil], __LINE__],
@@ -134,7 +132,6 @@ class TestDateParse < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/date/test_date_parse.rb#L132
      [['19990523235521.123[-5:EST]',false],[1999,5,23,23,55,21,'EST',-5*3600,nil], __LINE__],
      [['19990523235521.123[+9:JST]',false],[1999,5,23,23,55,21,'JST',9*3600,nil], __LINE__],
      [['19990523235521.123[+12:XXX YYY ZZZ]',false],[1999,5,23,23,55,21,'XXX YYY ZZZ',12*3600,nil], __LINE__],
-#     [['235521',false],[nil,nil,nil,23,55,21,nil,nil,nil], __LINE__], # cp
      [['235521.123',false],[nil,nil,nil,23,55,21,nil,nil,nil], __LINE__],
      [['235521.123[-9]',false],[nil,nil,nil,23,55,21,'-9',-9*3600,nil], __LINE__],
      [['235521.123[+9]',false],[nil,nil,nil,23,55,21,'+9',+9*3600,nil], __LINE__],
@@ -147,8 +144,6 @@ class TestDateParse < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/date/test_date_parse.rb#L144
      [['Sun, 22 Aug 1999 00:45:29 +9959',false],[1999,8,22,0,45,29,'+9959',+(99*3600+59*60),0], __LINE__],
      [['Sun, 22 Aug 05 00:45:29 -0400',true],[2005,8,22,0,45,29,'-0400',-4*3600,0], __LINE__],
      [['Sun, 22 Aug 49 00:45:29 -0400',true],[2049,8,22,0,45,29,'-0400',-4*3600,0], __LINE__],
-#     [['Sun, 22 Aug 50 00:45:29 -0400',true],[1950,8,22,0,45,29,'-0400',-4*3600,0], __LINE__],
-#     [['Sun, 22 Aug 111 00:45:29 -0400',true],[2011,8,22,0,45,29,'-0400',-4*3600,0], __LINE__],
      [['Sun, 22 Aug 1999 00:45:29 GMT',false],[1999,8,22,0,45,29,'GMT',0,0], __LINE__],
      [["Sun,\00022\r\nAug\r\n1999\r\n00:45:29\r\nGMT",false],[1999,8,22,0,45,29,'GMT',0,0], __LINE__],
      [['Sun, 22 Aug 1999 00:45 GMT',false],[1999,8,22,0,45,nil,'GMT',0,0], __LINE__],
@@ -181,8 +176,6 @@ class TestDateParse < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/date/test_date_parse.rb#L176
      [['1999.5.2',false],[1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
      [['1999.05.02',false],[1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
      [['-1999.05.02',false],[-1999,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
-#     [['05.02',false],[nil,5,2,nil,nil,nil,nil,nil,nil], __LINE__], # not support
-#     [[' 5. 2',false],[nil,5,2,nil,nil,nil,nil,nil,nil], __LINE__], # not support
 
      [['0099.5.2',false],[99,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
      [['0099.5.2',true],[99,5,2,nil,nil,nil,nil,nil,nil], __LINE__],
@@ -310,8 +303,6 @@ class TestDateParse < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/date/test_date_parse.rb#L303
      [['Sat Aug 28 02:29:34 GMT 2000 B.C.E.',false],[-1999,8,28,2,29,34,'GMT',0,6], __LINE__],
 
      # collection
-#     [['le ler juillet 1982',false],[1982,7,1,nil,nil,nil,nil,nil,nil], __LINE__], # bih 1982
-#     [['30 June 1982 , 23h 59m 59s',false],[1982,6,30,23,59,59,nil,nil,nil], __LINE__], # bih 1982
      [['Tuesday, May 18, 1999 Published at 13:36 GMT 14:36 UK',false],[1999,5,18,13,36,nil,'GMT',0,2], __LINE__], # bbc.co.uk
      [['July 20, 2000 Web posted at: 3:37 p.m. EDT (1937 GMT)',false],[2000,7,20,15,37,nil,'EDT',-4*3600,nil], __LINE__], # cnn.com
      [['12:54 p.m. EDT, September 11, 2006',false],[2006,9,11,12,54,nil,'EDT',-4*3600,nil], __LINE__], # cnn.com
@@ -323,11 +314,9 @@ class TestDateParse < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/date/test_date_parse.rb#L314
      [['8:00 pm lt',false],[nil,nil,nil,20,0,nil,'lt',nil,nil], __LINE__],
      [['4:00 AM, Jan. 12, 1990',false],[1990,1,12,4,0,nil,nil,nil,nil], __LINE__],
      [['Jan. 12 4:00 AM 1990',false],[1990,1,12,4,0,nil,nil,nil,nil], __LINE__],
-#     [['Jan. 12 4:00 -1990',false],[-1990,1,12,4,0,nil,nil,nil,nil], __LINE__], # cp
      [['1990-01-12 04:00:00+00',false],[1990,1,12,4,0,0,'+00',0,nil], __LINE__],
      [['1990-01-11 20:00:00-08',false],[1990,1,11,20,0,0,'-08',-8*3600,nil], __LINE__],
      [['1990/01/12 04:00:00',false],[1990,1,12,4,0,0,nil,nil,nil], __LINE__],
-#     [['Thu Jan 11 20:00:00 1990 LT',false], [1990,1,11,20,0,0,'LT',nil,4], __LINE__], # cp
      [['Thu Jan 11 20:00:00 PST 1990',false],[1990,1,11,20,0,0,'PST',-8*3600,4], __LINE__],
      [['Fri Jan 12 04:00:00 GMT 1990',false],[1990,1,12,4,0,0,'GMT',0,5], __LINE__],
      [['Thu, 11 Jan 1990 20:00:00 -0800',false],[1990,1,11,20,0,0,'-0800',-8*3600,4], __LINE__],
@@ -353,8 +342,6 @@ class TestDateParse < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/date/test_date_parse.rb#L342
      [['sat.',false],[nil,nil,nil,nil,nil,nil,nil,nil,6], __LINE__],
      [['SAT.',false],[nil,nil,nil,nil,nil,nil,nil,nil,6], __LINE__],
      [['sAt.',false],[nil,nil,nil,nil,nil,nil,nil,nil,6], __LINE__],
-#     [['su',false],[nil,nil,nil,nil,nil,nil,nil,nil,0], __LINE__],
-#     [['mo',false],[nil,nil,nil,nil,nil,nil,nil,nil,1], __LINE__],
 
      # time
      [['09:55',false],[nil,nil,nil,9,55,nil,nil,nil,nil], __LINE__],
Index: test/date/test_date.rb
===================================================================
--- test/date/test_date.rb	(revision 47024)
+++ test/date/test_date.rb	(revision 47025)
@@ -41,9 +41,7 @@ class TestDate < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/date/test_date.rb#L41
     assert_instance_of(DateSub, DateSub.today)
     assert_instance_of(DateTimeSub, DateTimeSub.now)
 
-#    assert_equal('#<DateSub: -4712-01-01 (-1/2,0,2299161)>', d.inspect)
     assert_equal('-4712-01-01', d.to_s)
-#    assert_equal('#<DateTimeSub: -4712-01-01T00:00:00+00:00 (-1/2,0,2299161)>', dt.inspect)
     assert_equal('-4712-01-01T00:00:00+00:00', dt.to_s)
 
     d2 = d + 1

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]