-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test file for the 'modf' routine in rakudo #742
base: master
Are you sure you want to change the base?
Conversation
See rakudo PR #4434.
Note there will be more tests added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if there're any chance for errors on user side. I'd be glad to see testing for incorrect user input. How modf
must react on *
? Inf
, NaN
?
Also, I didn't follow the original discussion about modf
, but why $val
is in stringified form only? This way you test the Cool
candidate only. This is right, in the light of the proposed PR you kinda test every multi-candidate then. But testing must not rely on particular implementation.
And then, tests for positives must be explicitl, i.e. included into the table. When you use abs
you turn $val
into a Numeric
, thus testing different multi-candidates compared to the tests for negative. It effectively means that you kind of testing two things at once: multi-dispatch and the type of argument.
Note I haved closed the associated Rakudo PR #4434 which I will be rewriting and resubmitting as a new PR. This roast PR will continue to be used by the new Rakudo PR (which I will not push until I am happy with it). |
@vrurg, I've been doing some experiments and would appreciate your thoughts on this:
Then I think we would have all the number type possibilities to test, as applicable. |
See rakudo PR rakudo/rakudo#4434.