-
Notifications
You must be signed in to change notification settings - Fork 20
Java
Gábor Szárnyas edited this page Apr 6, 2015
·
12 revisions
From JUnit 4.11, the following works:
@FixMethodOrder(MethodSorters.NAME_ASCENDING)int vs. long
Long l = 1L;
Integer i = 1;
System.out.println(l.equals(i)); // false
System.out.println(1 == 1L); // trueOutputs:
false
true
See also http://cubussapiens.hu/2012/05/java-primitive-type-comparison-a-wat-look/.