-
-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
| public boolean equals(Complex other){ |
See Effective Java by Josua Bloch, item 11.
This will fail in Junit5, and probably in Junit 4 and TestNG too:
assertEquals(new Complex(1, 0), new Complex(1, 0));
because the expected (left) and actual (right) values have different hash codes.
IntelliJ can make a working hashCode method for you in seconds.
Metadata
Metadata
Assignees
Labels
No labels