use of java.time.LocalDate in project jdk8u_jdk by JetBrains.
the class TestLocalDate method test_with_DateTimeField_long_noChange_same.
@Test
public void test_with_DateTimeField_long_noChange_same() {
LocalDate t = TEST_2007_07_15.with(YEAR, 2007);
assertSame(t, TEST_2007_07_15);
}
use of java.time.LocalDate in project jdk8u_jdk by JetBrains.
the class TestLocalDate method test_plusYears_long_noChange_same.
@Test
public void test_plusYears_long_noChange_same() {
LocalDate t = TEST_2007_07_15.plusYears(0);
assertSame(t, TEST_2007_07_15);
}
use of java.time.LocalDate in project jdk8u_jdk by JetBrains.
the class TestLocalDate method test_minusDays_symmetry.
@Test(dataProvider = "sampleMinusDaysSymmetry")
public void test_minusDays_symmetry(LocalDate reference) {
for (int days = 0; days < 365 * 8; days++) {
LocalDate t = reference.minusDays(days).minusDays(-days);
assertEquals(t, reference);
t = reference.minusDays(-days).minusDays(days);
assertEquals(t, reference);
}
}
use of java.time.LocalDate in project jdk8u_jdk by JetBrains.
the class TestLocalDate method test_plusWeeks_noChange_same.
@Test
public void test_plusWeeks_noChange_same() {
LocalDate t = TEST_2007_07_15.plusWeeks(0);
assertSame(t, TEST_2007_07_15);
}
use of java.time.LocalDate in project jdk8u_jdk by JetBrains.
the class TestLocalDate method test_plusMonths_long_noChange_same.
@Test
public void test_plusMonths_long_noChange_same() {
LocalDate t = TEST_2007_07_15.plusMonths(0);
assertSame(t, TEST_2007_07_15);
}
Aggregations