You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does your observation mean this should be a candidate to be fixed such that order should not matter (i.e. a true boolean or evaluation regardless of order of assertions)?
Ok, so it is a valid finding and hopefully will be a candidate for fixing in the next release. Thanks for looking into this. For context, I am a more recent user of both Criterion and Mimick, so expecting to gain more experience with them over time.
An "any" clause with int comparisons where at least one condition is true works:
cr_expect(any(eq(int, 1, 2), eq(int, 3, 3)));
Tried the same with double, and assertion fails for some reason:
double elapsed_time;
elapsed_time = 0.10;
cr_expect(ieee_ulp_eq(dbl, elapsed_time, 0.10, 4)); /* this passes /
cr_expect(ieee_ulp_eq(dbl, elapsed_time, 0.11, 4)); / line 20 - this fails (as expected) /
/ here, first condition should pass (like above), so why does this fail (line 22)? */
cr_expect(any(ieee_ulp_eq(dbl, elapsed_time, 0.10, 4), ieee_ulp_eq(dbl, elapsed_time, 0.11, 4)));
Failure reported:
[----] ... test_any.c:20: Assertion Failed
[----] ieee_ulp_eq(dbl, elapsed_time, 0.11, 4):
[----] diff: [-0.10000000000000001-]{+0.11+}
[----] ulp: 4
[----] ... test_any.c:22: Assertion Failed
[FAIL] test_any::any_with_double: (0.00s)
Also note that the line 22 failure does not report any value diffs, which perhaps is fine.
The text was updated successfully, but these errors were encountered: