Last active
August 13, 2020 18:35
-
-
Save nothub/a84ab18b1ed46d843ba4449d398f998d to your computer and use it in GitHub Desktop.
found somewhere on stackoverflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package not.hub.test; | |
import org.junit.jupiter.api.Assertions; | |
import org.junit.jupiter.api.Test; | |
class UnboxingEquals { | |
@Test | |
void sanity_check() { | |
// noinspection NumberEquality,SimplifiableAssertion,SimplifiableAssertion | |
Assertions.assertTrue((Integer.valueOf(42) == Integer.valueOf(42)) == (Integer.valueOf(420) == Integer.valueOf(420))); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment