Misc #10809
closed[PATCH 2/2] Add tests for math.c related to [Feature 10785], [Feature 10800]
Description
Hi! Here are two patches.
reorder_test_cbrt_and_add_a_assertion.patch:¶
Move Test#test_cbrt to more proper place and add a assertion for Math.cbrt(1.0/0)
add_test_for_math_c_about_overriding_Integer_to_f.patch:¶
Add tests for Feature 10785 and Feature 10800
These two features are merged by Nobuyoshi Nakada san, so I assigned him but please feel free to reassigne.
thanks.
Files
        
           Updated by nobu (Nobuyoshi Nakada) over 10 years ago
          Updated by nobu (Nobuyoshi Nakada) over 10 years ago
          
          
        
        
      
      + assert_equal(1.0/0, Math.cbrt(1.0/0))
Isn't it better to use assert_infinity?
+ def to_f + _to_f + end
Why not revert to the original methods?
        
           Updated by gogotanaka (Kazuki Tanaka) over 10 years ago
          Updated by gogotanaka (Kazuki Tanaka) over 10 years ago
          
          
        
        
      
      Isn't it better to use assert_infinity?
It's much better! I attached patch to follow what you said(not only Math.cbrt also other cases)
Why not revert to the original methods?
I intended to revert to the original methods through this way.
thanks.
        
           Updated by gogotanaka (Kazuki Tanaka) over 10 years ago
          Updated by gogotanaka (Kazuki Tanaka) over 10 years ago
          
          
        
        
      
      Oh.. I found editting message with uploading new file posts new message with duplicate contents.
We seem not to be able to upload more than 2 patches at one message.
        
           Updated by nobu (Nobuyoshi Nakada) over 10 years ago
          Updated by nobu (Nobuyoshi Nakada) over 10 years ago
          
          
        
        
      
      class_eval with a block form would be preferable to a string form in may cases.
Are you going to commit these patches by yourself?
If so, then ask matz, and follow the instruction CommitterHowto
        
           Updated by gogotanaka (Kazuki Tanaka) over 10 years ago
          Updated by gogotanaka (Kazuki Tanaka) over 10 years ago
          
          
        
        
      
      It's my super great pleasure to be able to do that, I'm glad to and go to follow what you said.
But now I'm afraid of committing myself and I realize there'er much things I should know.
So it seems to take a while. Anyway I want to do so.
thanks.
        
           Updated by matz (Yukihiro Matsumoto) over 10 years ago
          Updated by matz (Yukihiro Matsumoto) over 10 years ago
          
          
        
        
      
      Commit bit approved. Proceed to usual previledge grant process.
Matz.
        
           Updated by gogotanaka (Kazuki Tanaka) over 10 years ago
          Updated by gogotanaka (Kazuki Tanaka) over 10 years ago
          
          
        
        
      
      - File add_test_about_overriding_Integer_to_f_20150222.patch add_test_about_overriding_Integer_to_f_20150222.patch added
I'll commit these 3 patches.
reorder_test_cbrt_and_add_a_assertion.patch:¶
Move Test#test_cbrt to more proper place and add a assertion for Math.cbrt(1.0/0)
use_assert_infinity.patch:¶
Use assert_infinity  instead of assert_equal(1.0/0, ...)
add_test_about_overriding_Integer_to_f_20150222.patch:¶
Add tests for Feature 10785 and Feature 10800
        
           Updated by gogotanaka (Kazuki Tanaka) over 10 years ago
          Updated by gogotanaka (Kazuki Tanaka) over 10 years ago
          
          
        
        
      
      - Status changed from Open to Closed