-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Issues/1710 groovy assertions fixes #1741
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1741 +/- ##
============================================
+ Coverage 88.47% 92.27% +3.79%
- Complexity 3902 4678 +776
============================================
Files 350 351 +1
Lines 9574 11018 +1444
Branches 777 905 +128
============================================
+ Hits 8471 10167 +1696
+ Misses 901 656 -245
+ Partials 202 195 -7
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #1741 +/- ##
============================================
+ Coverage 88.47% 89.59% +1.11%
- Complexity 3902 4443 +541
============================================
Files 350 350
Lines 9574 10833 +1259
Branches 777 889 +112
============================================
+ Hits 8471 9706 +1235
- Misses 901 925 +24
Partials 202 202
Continue to review full report at Codecov.
|
marcphilipp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍
I think we should add smoke tests for Java and Koltin, e.g. assertEquals() with all combinations of int and Integer.
@sbrannen Didn't we add @API and @since when adding the additional overloads in 5.3?
We added them for the overloads in 5.4, for example: /**
* <em>Assert</em> that {@code expected} and {@code actual} are not equal.
*
* <p>If necessary, the failure message will be retrieved lazily from the
* supplied {@code messageSupplier}.
*
* @since 5.4
*/
@API(status = STABLE, since = "5.4")
public static void assertNotEquals(byte unexpected, Byte actual, Supplier<String> messageSupplier) {
AssertNotEquals.assertNotEquals((Byte) unexpected, actual, messageSupplier);
} |
So, yes, we need those there, too. |
That's definitely not a bad idea, just more busy work (unless we auto-generate those as you've suggested elsewhere). |
sbrannen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At a cursory glance, it LGTM as well.
As @marcphilipp mentioned please add @API and @since to the new overloaded methods.
Overview
This PR adds overloaded
assertEquals()andassertNotEqualsMethods()to reestablishcompatibility with Groovy's dynamic method dispatch.
Fixes #1710.
I hereby agree to the terms of the JUnit Contributor License Agreement.
Definition of Done
@APIannotations