diff options
author | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-10 13:23:58 +0000 |
---|---|---|
committer | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-10 13:23:58 +0000 |
commit | 70f772c3efb1caeb3333ba95b778967c6810695e (patch) | |
tree | 9b8cb2d2b0ab7e594f7ae8b4e70642f02a147cca /test/bigdecimal | |
parent | 5d906263abf242b8c9209a9253cdfa4be3eb25dd (diff) |
bigdecimal: version 1.3.1
Import bigdecimal version 1.3.1. The full commit log is here:
https://github.com/ruby/bigdecimal/compare/v1.3.0...v1.3.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/bigdecimal')
-rw-r--r-- | test/bigdecimal/test_bigdecimal_util.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/bigdecimal/test_bigdecimal_util.rb b/test/bigdecimal/test_bigdecimal_util.rb index c3a45b2eee..3a3772c449 100644 --- a/test/bigdecimal/test_bigdecimal_util.rb +++ b/test/bigdecimal/test_bigdecimal_util.rb @@ -48,4 +48,13 @@ class TestBigDecimalUtil < Test::Unit::TestCase def test_Rational_to_d_with_negative_precision assert_raise(ArgumentError) { 355.quo(113).to_d(-42) } end + + def test_String_to_d + assert_equal("2.5".to_d, BigDecimal.new('2.5')) + end + + def test_invalid_String_to_d + assert_equal("invalid".to_d, BigDecimal.new('0.0')) + end + end |