From 95fcc9ac8ef96b8e453eef66f87c21743fb597d4 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 25 Oct 2013 15:24:19 -0500 Subject: [PATCH] Test the newly-introduced Integer#decode method Signed-off-by: Johannes Schindelin --- test/Integers.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/Integers.java b/test/Integers.java index bbaa710351..7c977d6136 100644 --- a/test/Integers.java +++ b/test/Integers.java @@ -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()); } }