Skip to content
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

assert_abs_diff_eq does not allow specifying epsilon #86

Open
kaphula opened this issue Mar 11, 2024 · 0 comments
Open

assert_abs_diff_eq does not allow specifying epsilon #86

kaphula opened this issue Mar 11, 2024 · 0 comments

Comments

@kaphula
Copy link

kaphula commented Mar 11, 2024

Why can't I specify custom epsilon with assert_abs_diff_eq but I can with abs_diff_eq

// not possible
assert_abs_diff_eq!(1.0, 1.0, epsilon = f64::EPSILON);

// possible
abs_diff_eq!(1.0, 1.0, epsilon = f64::EPSILON);

This makes me unable to write write Rust tests so that I can see the left and right values on test errors when setting epsilon is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant