Test the newly-introduced Integer#decode method

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin 2013-10-25 15:24:19 -05:00
parent d04cda30ca
commit 95fcc9ac8e

View File

@ -314,5 +314,11 @@ public class Integers {
{ int b = 0xBE; int x = 0; int y = 0xFF;
expect(((b >>> x) & y) == 0xBE); }
expect(123 == Integer.decode("123").intValue());
expect(-123 == Integer.decode("-123").intValue());
expect(-83 == Integer.decode("-0123").intValue());
expect(-291 == Integer.decode("-0x123").intValue());
expect(291 == Integer.decode("#123").intValue());
}
}