Open JimMcL opened 1 month ago
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.
Unless there is a desire to keep the formatting as it is, I would be happy to try and address this by refactoring the sprintf formatting?
sprintf
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:
Note the reported values for actual and expected.