diff options
| author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-29 08:03:45 +0000 |
|---|---|---|
| committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-29 08:03:45 +0000 |
| commit | c03f28c98c95673d426b535dba6b5819fb5df239 (patch) | |
| tree | 0532389f243e2fc2114366d168bf2353b419b728 | |
| parent | 9d502cf9a44d3934742d076f184574ef5b89702a (diff) | |
merge revision(s) 54003: [Backport #12153]
* test/-ext-/float/test_nextafter.rb: In AIX,
nextafter(+0.0,-0.0)=+0.0, and nextafter(-0.0,+0.0)=-0.0,
but they should return -0.0 and +0.0, respectively. This is
a known bug in nextafter(3) on AIX, so skip related tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | test/-ext-/float/test_nextafter.rb | 13 | ||||
| -rw-r--r-- | version.h | 2 |
3 files changed, 18 insertions, 4 deletions
@@ -1,3 +1,10 @@ +Tue Mar 29 17:03:28 2016 Rei Odaira <Rei.Odaira@gmail.com> + + * test/-ext-/float/test_nextafter.rb: In AIX, + nextafter(+0.0,-0.0)=+0.0, and nextafter(-0.0,+0.0)=-0.0, + but they should return -0.0 and +0.0, respectively. This is + a known bug in nextafter(3) on AIX, so skip related tests. + Tue Mar 29 16:54:14 2016 Nobuyoshi Nakada <nobu@ruby-lang.org> * string.c (enc_succ_alnum_char): try to skip an invalid character diff --git a/test/-ext-/float/test_nextafter.rb b/test/-ext-/float/test_nextafter.rb index c131d1e413..636f803fac 100644 --- a/test/-ext-/float/test_nextafter.rb +++ b/test/-ext-/float/test_nextafter.rb @@ -46,9 +46,16 @@ class TestFloatExt < Test::Unit::TestCase if v1 == 0 s1 = 1.0/v1 < 0 ? "negative-zero" : "positive-zero" s2 = 1.0/v2 < 0 ? "negative-zero" : "positive-zero" - assert_equal(s1, s2, - "Bug::Float.missing_nextafter(#{'%a' % n1}, #{'%a' % n2}) = #{'%a' % v1} != " + - "#{'%a' % v2} = Bug::Float.system_nextafter(#{'%a' % n1}, #{'%a' % n2})") + begin + assert_equal(s1, s2, + "Bug::Float.missing_nextafter(#{'%a' % n1}, #{'%a' % n2}) = #{'%a' % v1} != " + + "#{'%a' % v2} = Bug::Float.system_nextafter(#{'%a' % n1}, #{'%a' % n2})") + rescue Minitest::Assertion + if /aix/ =~ RUBY_PLATFORM + skip "Known bug in nextafter(3) on AIX" + end + raise $! + end end end } @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.3.0" #define RUBY_RELEASE_DATE "2016-03-29" -#define RUBY_PATCHLEVEL 41 +#define RUBY_PATCHLEVEL 42 #define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_MONTH 3 |
