Misc #10809
closed
[PATCH 2/2] Add tests for math.c related to [Feature 10785], [Feature 10800]
Added by gogotanaka (Kazuki Tanaka) almost 10 years ago.
Updated over 9 years ago.
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
+ 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?
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.
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.
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
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.
Commit bit approved. Proceed to usual previledge grant process.
Matz.
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
- Status changed from Open to Closed
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0Like0Like0Like0Like0