use of java.time.Duration in project jdk8u_jdk by JetBrains.
the class TestDuration method plusNanos_zeroReturnsThis.
@Test
public void plusNanos_zeroReturnsThis() {
Duration t = Duration.ofSeconds(-1, 2000000);
assertSame(t.plusNanos(0), t);
}
use of java.time.Duration in project jdk8u_jdk by JetBrains.
the class TestDuration method minusNanos_zeroReturnsThis.
@Test
public void minusNanos_zeroReturnsThis() {
Duration t = Duration.ofSeconds(1, 2000000);
assertSame(t.minusNanos(0), t);
}
use of java.time.Duration in project jdk8u_jdk by JetBrains.
the class TestDuration method minus_zeroSingleton.
@Test
public void minus_zeroSingleton() {
Duration t = Duration.ofSeconds(1);
assertSame(t.minus(Duration.ofSeconds(1)), Duration.ZERO);
}
use of java.time.Duration in project jdk8u_jdk by JetBrains.
the class TestDuration method minus_zeroReturnsThis.
@Test
public void minus_zeroReturnsThis() {
Duration t = Duration.ofSeconds(1);
assertSame(t.minus(Duration.ZERO), t);
}
use of java.time.Duration in project jdk8u_jdk by JetBrains.
the class TestDuration method plusMillis_zeroReturnsThis.
@Test
public void plusMillis_zeroReturnsThis() {
Duration t = Duration.ofSeconds(-1, 2000000);
assertSame(t.plusMillis(0), t);
}
Aggregations