-
Notifications
You must be signed in to change notification settings - Fork 37
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
Testing for NaN #73
Comments
Without code snippet it's hard for me to help you with your exact problem, but I'm assuming you have something like this: #[test_case(input => 1.0)]
#[test_case(input2 => NaN)]
fn test(input: X) -> f64 {
stuff...
}
#[test_case(input => 1.0)]
fn test(input: X) -> f64 {
stuff...
} #[test_case(input2 => true)]
fn test(input: X) -> bool {
(stuff that returns NaN...).is_nan()
} |
Thanks, I knew I forgot to do something when posting the issue. (whoops)
Yep, I should have made my understanding of this clearer. (whoops) I was more so wondering if a feature was in the works for these sorts of tests, or for a possible future idea? If not then it's all good, just couldn't find an issue referring to that was all. |
Understood. |
Ah, coolio. Thanks for the help and information anyway. I look forward to using this crate in more projects. |
Thanks for the awesome crate!
I was wondering if there was any way to go about testing
NaN
value equality? I've tried a few ideas to no success (unless I went about them wrong), such as using thehamcrest2
support.If this isn't possible at the moment then I already have a workaround using regular tests, but maybe it could be supported somehow in the future.
The text was updated successfully, but these errors were encountered: