We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
compare()
Hello,
I guess this is the intended behaviour but I can't understand the logic:
if I compare numbers that round up to the same value I get this message:
> waldo::compare(c(1, 1.9343), c(1, 1.92)) old != new but don't know how to show the difference
while if they round up to different values I get:
> waldo::compare(c(1, 1.2), c(1, 1.92)) `old`: 1 1 `new`: 1 2
that is, the values get rounded up.
If I use waldo:::diff_element() the output is correct:
waldo:::diff_element()
> waldo:::diff_element(c(1, 1.9343), c(1, 1.92)) `x`: "1" "1.9343" `y`: "1" "1.92"
The problem is that I discovered this behavior in testthat::expect_equal() so I cannot control how the comparison output is managed internally.
testthat::expect_equal()
The text was updated successfully, but these errors were encountered:
This is a bug — probably in my logic that tries to determine the minimum number of decimal places to display.
Sorry, something went wrong.
Another example: waldo::compare(0.21,0.23)
waldo::compare(0.21,0.23)
6df017e
No branches or pull requests
Hello,
I guess this is the intended behaviour but I can't understand the logic:
if I compare numbers that round up to the same value I get this message:
while if they round up to different values I get:
that is, the values get rounded up.
If I use
waldo:::diff_element()
the output is correct:The problem is that I discovered this behavior in
testthat::expect_equal()
so I cannot control how the comparison output is managed internally.The text was updated successfully, but these errors were encountered: