diff options
| author | ksss <[email protected]> | 2017-03-28 22:50:10 +0900 |
|---|---|---|
| committer | ksss <[email protected]> | 2017-03-29 11:59:19 +0900 |
| commit | db3573e0bf45bc3653d49a7dee90458df09005c8 (patch) | |
| tree | f28332dc68c91263ce1371ce912b3f4b6a449f5b /test/t | |
| parent | 1f6bf0e14f57afca0c5254cc1a0893d11b3303e2 (diff) | |
| download | mruby-db3573e0bf45bc3653d49a7dee90458df09005c8.tar.gz mruby-db3573e0bf45bc3653d49a7dee90458df09005c8.zip | |
Should raise FloatDomainError
Diffstat (limited to 'test/t')
| -rw-r--r-- | test/t/float.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/t/float.rb b/test/t/float.rb index 1805c6e7d..7e8c98988 100644 --- a/test/t/float.rb +++ b/test/t/float.rb @@ -148,6 +148,9 @@ end assert('Float#to_i', '15.2.9.3.14') do assert_equal(3, 3.123456789.to_i) + assert_raise(FloatDomainError) { Float::INFINITY.to_i } + assert_raise(FloatDomainError) { (-Float::INFINITY).to_i } + assert_raise(FloatDomainError) { Float::NAN.to_i } end assert('Float#truncate', '15.2.9.3.15') do |
