mirror of
https://github.com/ruby/ruby.git
synced 2026-08-16 02:15:57 +08:00
* test/date/test_date_base.rb (test_jd): tests for
[ruby-dev:45008]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a9b0e34b97
commit
f26ee7454f
@ -1,3 +1,8 @@
|
||||
Tue Dec 20 11:49:13 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* test/date/test_date_base.rb (test_jd): tests for
|
||||
[ruby-dev:45008].
|
||||
|
||||
Tue Dec 20 10:20:48 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* ext/date/date_core.c (wholenum): fix the type of the return value.
|
||||
|
||||
@ -181,6 +181,13 @@ class TestDateBase < Test::Unit::TestCase
|
||||
|
||||
def test_jd
|
||||
assert_equal(1 << 33, Date.jd(1 << 33).jd)
|
||||
|
||||
bug = '[ruby-dev:45008]'
|
||||
d = Date.new(2011,12,20)
|
||||
jd = d.jd
|
||||
assert_equal(d, Date.jd(jd))
|
||||
assert_equal(d, Date.jd(jd.to_f), bug)
|
||||
assert_equal(d, Date.jd(Rational(jd)), bug)
|
||||
end
|
||||
|
||||
def test_mjd
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user