BAEL-2995 - possible lossy conversion - variable names fixed
This commit is contained in:
parent
8b87952f5b
commit
325c0a4d07
|
@ -19,20 +19,20 @@ public class ConversionTechniquesUnitTest {
|
||||||
assertEquals(15, integerNum);
|
assertEquals(15, integerNum);
|
||||||
|
|
||||||
long largeLongNum = 32768;
|
long largeLongNum = 32768;
|
||||||
short shortNum1 = (short) largeLongNum;
|
short minShortNum = (short) largeLongNum;
|
||||||
assertEquals(-32768, shortNum1);
|
assertEquals(-32768, minShortNum);
|
||||||
|
|
||||||
long smallLongNum = -32769;
|
long smallLongNum = -32769;
|
||||||
short shortNum2 = (short) smallLongNum;
|
short maxShortNum = (short) smallLongNum;
|
||||||
assertEquals(32767, shortNum2);
|
assertEquals(32767, maxShortNum);
|
||||||
|
|
||||||
long maxLong = Long.MAX_VALUE;
|
long maxLong = Long.MAX_VALUE;
|
||||||
int int1 = (int) maxLong;
|
int minInt = (int) maxLong;
|
||||||
assertEquals(-1, int1);
|
assertEquals(-1, minInt);
|
||||||
|
|
||||||
long minLong = Long.MIN_VALUE;
|
long minLong = Long.MIN_VALUE;
|
||||||
int int2 = (int) minLong;
|
int maxInt = (int) minLong;
|
||||||
assertEquals(0, int2);
|
assertEquals(0, maxInt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue