aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorodaira <odaira@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-04 22:43:31 +0000
committerodaira <odaira@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-04 22:43:31 +0000
commit5ef34c31ab621fee8e5375413771c5eca4524922 (patch)
tree0eb98458ff68ea576136df0586f6cc699e4ba243
parentd2333c3fab049dd256ccf9c3c3cb2fa777115dd4 (diff)
downloadruby-5ef34c31ab621fee8e5375413771c5eca4524922.tar.gz
* 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/trunk@54003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--test/-ext-/float/test_nextafter.rb13
2 files changed, 17 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 6729e9a397..9924ae7c6f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sat Mar 5 07:36:27 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.
+
Sat Mar 5 07:14:10 2016 Rei Odaira <Rei.Odaira@gmail.com>
* test/zlib/test_zlib.rb (test_adler32_combine, test_crc32_combine):
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
}