-
Notifications
You must be signed in to change notification settings - Fork 3.3k
add hamcrest-library as a test dependency #1301
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
add hamcrest-library as a test dependency #1301
Conversation
Do we have immediate plans to use this dependency? |
I may use it here to ensure that the signature of failureCountIs allows to take greaterThan. |
I realize this is personal preference and I am looking at only two data points , but I think that 69e8a8a made the tests easier to read. It is extremely rare for me to write an assertion that a given integer is greater that some value (or less than some value, or not equal to some value). That being said, I find Hamcrest assertions hard to read (compared with Fest or Truth) so it might be just me, so I won't object to the new dependency. |
Sounds like you are not happy with hamcrest. Fair enough, but here I'm not proposing to introduce hamcrest, I'm only trying to help us contributors writing cleaner unit tests by providing more Matchers to use. It's only about giving more options, really. Besides
All of these assertions could be refactored to use |
I'll defer to Marc on this one. |
Thanks! |
Thank you @marcphilipp! |
As discussed in #1292
(see #1292 (comment))