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
Currently the limit is set to 40 bytes in #195, there are few issues with that:
Unpredictability. I discovered this trying to figure out why in some cases I don't get useful information during test failures, while in other cases I do. This is inconsistent
40 bytes is only useful when comparing numbers, for real use cases that will very often be not enough. Something like 400 bytes would suffice I guess
The initial argument
This avoids dumping enormous objects into the error message implicitly.
Does not make that much sense:
assert_eq doesn't have that limitation
ensure is used primarily in tests, having a bit of a spill there wouldn't hurt, while not getting useful information actually might hurt
So I wonder if this limit can be completely removed.
On the contrary, the difference with assert_eq is that with ensure the memory needs to be allocated, while with assert_eq it probably prints right away, so some limit probably makes sense for this reason
The text was updated successfully, but these errors were encountered:
Currently the limit is set to 40 bytes in #195, there are few issues with that:
Unpredictability. I discovered this trying to figure out why in some cases I don't get useful information during test failures, while in other cases I do. This is inconsistent
40 bytes is only useful when comparing numbers, for real use cases that will very often be not enough. Something like 400 bytes would suffice I guess
The initial argument
Does not make that much sense:
assert_eq
doesn't have that limitationensure
is used primarily in tests, having a bit of a spill there wouldn't hurt, while not getting useful information actually might hurtSo I wonder if this limit can be completely removed.
On the contrary, the difference with
assert_eq
is that withensure
the memory needs to be allocated, while withassert_eq
it probably prints right away, so some limit probably makes sense for this reasonThe text was updated successfully, but these errors were encountered: