< prev index next >
test/jdk/java/time/test/java/time/temporal/TestDateTimeValueRange.java
Print this page
rev 58118 : [mq]: 8239520
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * 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,10 +73,11 @@
import org.testng.annotations.Test;
import test.java.time.AbstractTest;
/**
* Test.
+ * @bug 8239520
*/
@Test
public class TestDateTimeValueRange extends AbstractTest {
//-----------------------------------------------------------------------
@@ -136,10 +137,15 @@
@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,10 +182,11 @@
{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 >