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

expect_equals sometimes reports incorrect values when values are not equal #1955

Open
JimMcL opened this issue May 7, 2024 · 0 comments
Open

Comments

@JimMcL
Copy link

JimMcL commented May 7, 2024

The values reported by expect_equal for actual and expected in the case of a test failure are occasionally rounded in incorrect/inconsistent ways. It appears to be an edge case activated by 0.5 values.
Example:

> expect_equal(c(8.5, 9.5), c(1.5, 2.5))
Error: c(8.5, 9.5) (`actual`) not equal to c(1.5, 2.5) (`expected`).

  `actual`: 8 10
`expected`: 2  2

Note the reported values for actual and expected.

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