< prev index next >

test/jdk/java/time/test/java/time/temporal/TestDateTimeValueRange.java

Print this page
rev 58118 : [mq]: 8239520

*** 1,7 **** /* ! * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 73,82 **** --- 73,83 ---- import org.testng.annotations.Test; import test.java.time.AbstractTest; /** * Test. + * @bug 8239520 */ @Test public class TestDateTimeValueRange extends AbstractTest { //-----------------------------------------------------------------------
*** 136,145 **** --- 137,151 ---- @Test(expectedExceptions = IllegalArgumentException.class) public void test_of_longlonglong_smallestmaxminGtMax() { ValueRange.of(1, 31, 28); } + @Test(expectedExceptions = IllegalArgumentException.class) + public void test_of_longlonglong_minGtSmallestMax() { + ValueRange.of(5, 2, 10); + } + //----------------------------------------------------------------------- // of(long,long,long,long) //----------------------------------------------------------------------- @DataProvider(name="valid") Object[][] data_valid() {
*** 176,185 **** --- 182,192 ---- {31, 2, 3, 28}, {2, 1, 28, 31}, {2, 1, 31, 28}, {12, 13, 1, 2}, + {5, 5, 2, 10}, }; } @Test(dataProvider="invalid", expectedExceptions=IllegalArgumentException.class) public void test_of_longlonglonglong_invalid(long sMin, long lMin, long sMax, long lMax) {
< prev index next >