summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKenta Murata <mrkn@mrkn.jp>2021-01-22 13:50:26 +0900
committerKenta Murata <mrkn@mrkn.jp>2021-12-24 02:28:56 +0900
commit75f552e973ba565ef8615a0c5fd375d3a052b82e (patch)
tree6aadd84ddc6f903c1fc9566241d9eccaab387a58 /test
parent7b2cfce543b876744544c8b43abdee3c72cab910 (diff)
[ruby/bigdecimal] Fix the precision of the adjusted quotient
https://github.com/ruby/bigdecimal/commit/8dc8cd339d
Diffstat (limited to 'test')
-rw-r--r--test/bigdecimal/test_bigdecimal.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/bigdecimal/test_bigdecimal.rb b/test/bigdecimal/test_bigdecimal.rb
index 26d346b364..784560d1d4 100644
--- a/test/bigdecimal/test_bigdecimal.rb
+++ b/test/bigdecimal/test_bigdecimal.rb
@@ -1048,6 +1048,10 @@ class TestBigDecimal < Test::Unit::TestCase
b = BigDecimal('1.23456789e10')
q, r = a.divmod(b)
assert_equal((a/b), q)
+
+ b = BigDecimal('-1.23456789e10')
+ q, r = a.divmod(b)
+ assert_equal((a/b), q)
end
def test_divmod_error