This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-validator.git
The following commit(s) were added to refs/heads/master by this push: new dabe335 Test Integer.min/max dabe335 is described below commit dabe3357f495f51181125e1c5e2f4ab6466cdf85 Author: Sebb <s...@apache.org> AuthorDate: Fri Jun 19 00:02:13 2020 +0100 Test Integer.min/max --- .../org/apache/commons/validator/routines/IntegerValidatorTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/java/org/apache/commons/validator/routines/IntegerValidatorTest.java b/src/test/java/org/apache/commons/validator/routines/IntegerValidatorTest.java index b1fb9bd..80c0964 100644 --- a/src/test/java/org/apache/commons/validator/routines/IntegerValidatorTest.java +++ b/src/test/java/org/apache/commons/validator/routines/IntegerValidatorTest.java @@ -134,4 +134,10 @@ public class IntegerValidatorTest extends AbstractNumberValidatorTest { assertTrue("maxValue() = max", validator.maxValue(number20, 20)); assertFalse("maxValue() > max", validator.maxValue(number21, 20)); } + public void testMinMaxValues() { + assertTrue("2147483647 is max integer", validator.isValid("2147483647")); + assertFalse("2147483648 > max integer", validator.isValid("2147483648")); + assertTrue("-2147483648 is min integer", validator.isValid("-2147483648")); + assertFalse("-2147483649 < min integer", validator.isValid("-2147483649")); + } }