public class TimeUnitTest extends JSR166TestCase
JSR166TestCase.AdjustablePolicy, JSR166TestCase.CallableOne, JSR166TestCase.CheckedBarrier, JSR166TestCase.CheckedCallable<T>, JSR166TestCase.CheckedInterruptedCallable<T>, JSR166TestCase.CheckedInterruptedRunnable, JSR166TestCase.CheckedRecursiveAction, JSR166TestCase.CheckedRecursiveTask<T>, JSR166TestCase.CheckedRunnable, JSR166TestCase.LongPossiblyInterruptedRunnable, JSR166TestCase.MediumInterruptedRunnable, JSR166TestCase.MediumPossiblyInterruptedRunnable, JSR166TestCase.MediumRunnable, JSR166TestCase.NoOpCallable, JSR166TestCase.NoOpREHandler, JSR166TestCase.NoOpRunnable, JSR166TestCase.NPETask, JSR166TestCase.RunnableShouldThrow, JSR166TestCase.ShortInterruptedRunnable, JSR166TestCase.ShortRunnable, JSR166TestCase.SimpleThreadFactory, JSR166TestCase.SmallCallable, JSR166TestCase.SmallPossiblyInterruptedRunnable, JSR166TestCase.SmallRunnable, JSR166TestCase.StringTask, JSR166TestCase.ThreadShouldThrow, JSR166TestCase.TrackedCallable, JSR166TestCase.TrackedLongRunnable, JSR166TestCase.TrackedMediumRunnable, JSR166TestCase.TrackedNoOpRunnable, JSR166TestCase.TrackedRunnable, JSR166TestCase.TrackedShortRunnable, JSR166TestCase.TrackedSmallRunnable
eight, expensiveTests, five, four, JAVA_CLASS_VERSION, JAVA_SPECIFICATION_VERSION, LONG_DELAY_MS, m1, m10, m2, m3, m4, m5, m6, MEDIUM_DELAY_MS, nine, one, seven, SHORT_DELAY_MS, six, SIZE, SMALL_DELAY_MS, TEST_STRING, testImplementationDetails, three, two, zero
Constructor and Description |
---|
TimeUnitTest() |
Modifier and Type | Method and Description |
---|---|
void |
testConvert()
convert correctly converts sample values across the units
|
void |
testConvertSaturate()
convert saturates positive too-large values to Long.MAX_VALUE
and negative to LONG.MIN_VALUE
|
void |
testName()
name returns name of unit
|
void |
testSerialization()
a deserialized serialized unit is the same instance
|
void |
testTimedJoin_Interruptible()
timedJoin throws InterruptedException when interrupted
|
void |
testTimedSleep_Interruptible()
timedSleep throws InterruptedException when interrupted
|
void |
testTimedWait_IllegalMonitorException()
Timed wait without holding lock throws
IllegalMonitorStateException
|
void |
testTimedWait_Interruptible()
timedWait throws InterruptedException when interrupted
|
void |
testToDays()
toDays correctly converts sample values in different units to
days
|
void |
testToHours()
toHours correctly converts sample values in different units to
hours
|
void |
testToMicros()
toMicros correctly converts sample values in different units to
microseconds
|
void |
testToMillis()
toMillis correctly converts sample values in different units to
milliseconds
|
void |
testToMinutes()
toMinutes correctly converts sample values in different units to
minutes
|
void |
testToNanos()
toNanos correctly converts sample values in different units to
nanoseconds
|
void |
testToNanosSaturate()
toNanos saturates positive too-large values to Long.MAX_VALUE
and negative to LONG.MIN_VALUE
|
void |
testToSeconds()
toSeconds correctly converts sample values in different units to
seconds
|
void |
testToString()
toString returns name of unit
|
addNamedTestClasses, assertIteratorExhausted, assertThrows, atLeastJava10, atLeastJava6, atLeastJava7, atLeastJava8, atLeastJava9, await, await, await, awaiter, countDowner, getShortDelay, jdk8ParameterizedTestSuite, latchAwaitingStringTask, newTestSuite, parameterizedTestSuite, permissivePolicy, possiblyInterruptedRunnable, runBare, runTest, runTestProfiled, runWithoutPermissions, runWithPermissions, runWithSecurityManagerWithPermissions, setDelays, setUp, shouldThrow, shouldThrow, tearDown, testMethodNames, threadAssertEquals, threadAssertEquals, threadAssertFalse, threadAssertNull, threadAssertSame, threadAssertTrue, threadFail, threadRecordFailure, threadShouldThrow, threadShouldThrow, threadUnexpectedException, trackedRunnable
public void testConvert()
public void testToNanos()
public void testToMicros()
public void testToMillis()
public void testToSeconds()
public void testToMinutes()
public void testToHours()
public void testToDays()
public void testConvertSaturate()
public void testToNanosSaturate()
public void testToString()
public void testName()
public void testTimedWait_IllegalMonitorException()
public void testTimedWait_Interruptible()
public void testTimedJoin_Interruptible()
public void testTimedSleep_Interruptible()