[cvs] / jsr166 / src / test / tck / TimeUnitTest.java Repository:
ViewVC logotype

Annotation of /jsr166/src/test/tck/TimeUnitTest.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.22 - (view) (download)

1 : dl 1.1 /*
2 : dl 1.6 * Written by Doug Lea with assistance from members of JCP JSR-166
3 :     * Expert Group and released to the public domain, as explained at
4 : jsr166 1.19 * http://creativecommons.org/publicdomain/zero/1.0/
5 : jsr166 1.10 * Other contributors include Andrew Wright, Jeffrey Hayes,
6 :     * Pat Fisher, Mike Judd.
7 : dl 1.1 */
8 :    
9 :     import junit.framework.*;
10 : jsr166 1.22 import java.util.concurrent.CountDownLatch;
11 :     import java.util.concurrent.TimeUnit;
12 : dl 1.1
13 : dl 1.3 public class TimeUnitTest extends JSR166TestCase {
14 : dl 1.1 public static void main(String[] args) {
15 : jsr166 1.14 junit.textui.TestRunner.run(suite());
16 : dl 1.1 }
17 : jsr166 1.10
18 : dl 1.1 public static Test suite() {
19 : jsr166 1.14 return new TestSuite(TimeUnitTest.class);
20 : dl 1.1 }
21 :    
22 : dl 1.9 // (loops to 88888 check increments at all time divisions.)
23 :    
24 : dl 1.4 /**
25 : dl 1.9 * convert correctly converts sample values across the units
26 : dl 1.4 */
27 : dl 1.1 public void testConvert() {
28 : dl 1.9 for (long t = 0; t < 88888; ++t) {
29 : jsr166 1.10 assertEquals(t*60*60*24,
30 :     TimeUnit.SECONDS.convert(t,
31 : dl 1.9 TimeUnit.DAYS));
32 : jsr166 1.10 assertEquals(t*60*60,
33 :     TimeUnit.SECONDS.convert(t,
34 : dl 1.9 TimeUnit.HOURS));
35 : jsr166 1.10 assertEquals(t*60,
36 :     TimeUnit.SECONDS.convert(t,
37 : dl 1.9 TimeUnit.MINUTES));
38 : jsr166 1.10 assertEquals(t,
39 :     TimeUnit.SECONDS.convert(t,
40 : dl 1.1 TimeUnit.SECONDS));
41 : jsr166 1.10 assertEquals(t,
42 :     TimeUnit.SECONDS.convert(1000L*t,
43 : dl 1.1 TimeUnit.MILLISECONDS));
44 : jsr166 1.10 assertEquals(t,
45 :     TimeUnit.SECONDS.convert(1000000L*t,
46 : dl 1.1 TimeUnit.MICROSECONDS));
47 : jsr166 1.10 assertEquals(t,
48 :     TimeUnit.SECONDS.convert(1000000000L*t,
49 : dl 1.1 TimeUnit.NANOSECONDS));
50 : dl 1.9
51 : jsr166 1.10 assertEquals(1000L*t*60*60*24,
52 :     TimeUnit.MILLISECONDS.convert(t,
53 : dl 1.9 TimeUnit.DAYS));
54 : jsr166 1.10 assertEquals(1000L*t*60*60,
55 :     TimeUnit.MILLISECONDS.convert(t,
56 : dl 1.9 TimeUnit.HOURS));
57 : jsr166 1.10 assertEquals(1000L*t*60,
58 :     TimeUnit.MILLISECONDS.convert(t,
59 : dl 1.9 TimeUnit.MINUTES));
60 : jsr166 1.10 assertEquals(1000L*t,
61 :     TimeUnit.MILLISECONDS.convert(t,
62 : dl 1.1 TimeUnit.SECONDS));
63 : jsr166 1.10 assertEquals(t,
64 :     TimeUnit.MILLISECONDS.convert(t,
65 : dl 1.1 TimeUnit.MILLISECONDS));
66 : jsr166 1.10 assertEquals(t,
67 :     TimeUnit.MILLISECONDS.convert(1000L*t,
68 : dl 1.1 TimeUnit.MICROSECONDS));
69 : jsr166 1.10 assertEquals(t,
70 :     TimeUnit.MILLISECONDS.convert(1000000L*t,
71 : dl 1.1 TimeUnit.NANOSECONDS));
72 : dl 1.9
73 : jsr166 1.10 assertEquals(1000000L*t*60*60*24,
74 :     TimeUnit.MICROSECONDS.convert(t,
75 : dl 1.9 TimeUnit.DAYS));
76 : jsr166 1.10 assertEquals(1000000L*t*60*60,
77 :     TimeUnit.MICROSECONDS.convert(t,
78 : dl 1.9 TimeUnit.HOURS));
79 : jsr166 1.10 assertEquals(1000000L*t*60,
80 :     TimeUnit.MICROSECONDS.convert(t,
81 : dl 1.9 TimeUnit.MINUTES));
82 : jsr166 1.10 assertEquals(1000000L*t,
83 :     TimeUnit.MICROSECONDS.convert(t,
84 : dl 1.1 TimeUnit.SECONDS));
85 : jsr166 1.10 assertEquals(1000L*t,
86 :     TimeUnit.MICROSECONDS.convert(t,
87 : dl 1.1 TimeUnit.MILLISECONDS));
88 : jsr166 1.10 assertEquals(t,
89 :     TimeUnit.MICROSECONDS.convert(t,
90 : dl 1.1 TimeUnit.MICROSECONDS));
91 : jsr166 1.10 assertEquals(t,
92 :     TimeUnit.MICROSECONDS.convert(1000L*t,
93 : dl 1.1 TimeUnit.NANOSECONDS));
94 : dl 1.9
95 : jsr166 1.10 assertEquals(1000000000L*t*60*60*24,
96 :     TimeUnit.NANOSECONDS.convert(t,
97 : dl 1.9 TimeUnit.DAYS));
98 : jsr166 1.10 assertEquals(1000000000L*t*60*60,
99 :     TimeUnit.NANOSECONDS.convert(t,
100 : dl 1.9 TimeUnit.HOURS));
101 : jsr166 1.10 assertEquals(1000000000L*t*60,
102 :     TimeUnit.NANOSECONDS.convert(t,
103 : dl 1.9 TimeUnit.MINUTES));
104 : jsr166 1.10 assertEquals(1000000000L*t,
105 :     TimeUnit.NANOSECONDS.convert(t,
106 : dl 1.1 TimeUnit.SECONDS));
107 : jsr166 1.10 assertEquals(1000000L*t,
108 :     TimeUnit.NANOSECONDS.convert(t,
109 : dl 1.1 TimeUnit.MILLISECONDS));
110 : jsr166 1.10 assertEquals(1000L*t,
111 :     TimeUnit.NANOSECONDS.convert(t,
112 : dl 1.1 TimeUnit.MICROSECONDS));
113 : jsr166 1.10 assertEquals(t,
114 :     TimeUnit.NANOSECONDS.convert(t,
115 : dl 1.1 TimeUnit.NANOSECONDS));
116 :     }
117 :     }
118 :    
119 : dl 1.4 /**
120 : dl 1.5 * toNanos correctly converts sample values in different units to
121 :     * nanoseconds
122 : dl 1.4 */
123 : dl 1.1 public void testToNanos() {
124 : dl 1.9 for (long t = 0; t < 88888; ++t) {
125 : jsr166 1.10 assertEquals(t*1000000000L*60*60*24,
126 : dl 1.9 TimeUnit.DAYS.toNanos(t));
127 : jsr166 1.10 assertEquals(t*1000000000L*60*60,
128 : dl 1.9 TimeUnit.HOURS.toNanos(t));
129 : jsr166 1.10 assertEquals(t*1000000000L*60,
130 : dl 1.9 TimeUnit.MINUTES.toNanos(t));
131 : jsr166 1.10 assertEquals(1000000000L*t,
132 : dl 1.1 TimeUnit.SECONDS.toNanos(t));
133 : jsr166 1.10 assertEquals(1000000L*t,
134 : dl 1.1 TimeUnit.MILLISECONDS.toNanos(t));
135 : jsr166 1.10 assertEquals(1000L*t,
136 : dl 1.1 TimeUnit.MICROSECONDS.toNanos(t));
137 : jsr166 1.10 assertEquals(t,
138 : dl 1.3 TimeUnit.NANOSECONDS.toNanos(t));
139 :     }
140 :     }
141 :    
142 : dl 1.4 /**
143 : dl 1.5 * toMicros correctly converts sample values in different units to
144 :     * microseconds
145 : dl 1.4 */
146 : dl 1.3 public void testToMicros() {
147 : dl 1.9 for (long t = 0; t < 88888; ++t) {
148 : jsr166 1.10 assertEquals(t*1000000L*60*60*24,
149 : dl 1.9 TimeUnit.DAYS.toMicros(t));
150 : jsr166 1.10 assertEquals(t*1000000L*60*60,
151 : dl 1.9 TimeUnit.HOURS.toMicros(t));
152 : jsr166 1.10 assertEquals(t*1000000L*60,
153 : dl 1.9 TimeUnit.MINUTES.toMicros(t));
154 : jsr166 1.10 assertEquals(1000000L*t,
155 : dl 1.3 TimeUnit.SECONDS.toMicros(t));
156 : jsr166 1.10 assertEquals(1000L*t,
157 : dl 1.3 TimeUnit.MILLISECONDS.toMicros(t));
158 : jsr166 1.10 assertEquals(t,
159 : dl 1.3 TimeUnit.MICROSECONDS.toMicros(t));
160 : jsr166 1.10 assertEquals(t,
161 : dl 1.9 TimeUnit.NANOSECONDS.toMicros(t*1000L));
162 : dl 1.3 }
163 :     }
164 :    
165 : dl 1.4 /**
166 : dl 1.5 * toMillis correctly converts sample values in different units to
167 :     * milliseconds
168 : dl 1.4 */
169 : dl 1.3 public void testToMillis() {
170 : dl 1.9 for (long t = 0; t < 88888; ++t) {
171 : jsr166 1.10 assertEquals(t*1000L*60*60*24,
172 : dl 1.9 TimeUnit.DAYS.toMillis(t));
173 : jsr166 1.10 assertEquals(t*1000L*60*60,
174 : dl 1.9 TimeUnit.HOURS.toMillis(t));
175 : jsr166 1.10 assertEquals(t*1000L*60,
176 : dl 1.9 TimeUnit.MINUTES.toMillis(t));
177 : jsr166 1.10 assertEquals(1000L*t,
178 : dl 1.3 TimeUnit.SECONDS.toMillis(t));
179 : jsr166 1.10 assertEquals(t,
180 : dl 1.3 TimeUnit.MILLISECONDS.toMillis(t));
181 : jsr166 1.10 assertEquals(t,
182 : dl 1.9 TimeUnit.MICROSECONDS.toMillis(t*1000L));
183 : jsr166 1.10 assertEquals(t,
184 : dl 1.9 TimeUnit.NANOSECONDS.toMillis(t*1000000L));
185 : dl 1.3 }
186 :     }
187 :    
188 : dl 1.4 /**
189 : dl 1.5 * toSeconds correctly converts sample values in different units to
190 :     * seconds
191 : dl 1.4 */
192 : dl 1.3 public void testToSeconds() {
193 : dl 1.9 for (long t = 0; t < 88888; ++t) {
194 : jsr166 1.10 assertEquals(t*60*60*24,
195 : dl 1.9 TimeUnit.DAYS.toSeconds(t));
196 : jsr166 1.10 assertEquals(t*60*60,
197 : dl 1.9 TimeUnit.HOURS.toSeconds(t));
198 : jsr166 1.10 assertEquals(t*60,
199 : dl 1.9 TimeUnit.MINUTES.toSeconds(t));
200 : jsr166 1.10 assertEquals(t,
201 : dl 1.3 TimeUnit.SECONDS.toSeconds(t));
202 : jsr166 1.10 assertEquals(t,
203 : dl 1.9 TimeUnit.MILLISECONDS.toSeconds(t*1000L));
204 : jsr166 1.10 assertEquals(t,
205 : dl 1.9 TimeUnit.MICROSECONDS.toSeconds(t*1000000L));
206 : jsr166 1.10 assertEquals(t,
207 : dl 1.9 TimeUnit.NANOSECONDS.toSeconds(t*1000000000L));
208 :     }
209 :     }
210 : dl 1.3
211 : dl 1.9 /**
212 :     * toMinutes correctly converts sample values in different units to
213 :     * minutes
214 :     */
215 :     public void testToMinutes() {
216 :     for (long t = 0; t < 88888; ++t) {
217 : jsr166 1.10 assertEquals(t*60*24,
218 : dl 1.9 TimeUnit.DAYS.toMinutes(t));
219 : jsr166 1.10 assertEquals(t*60,
220 : dl 1.9 TimeUnit.HOURS.toMinutes(t));
221 : jsr166 1.10 assertEquals(t,
222 : dl 1.9 TimeUnit.MINUTES.toMinutes(t));
223 : jsr166 1.10 assertEquals(t,
224 : dl 1.9 TimeUnit.SECONDS.toMinutes(t*60));
225 : jsr166 1.10 assertEquals(t,
226 : dl 1.9 TimeUnit.MILLISECONDS.toMinutes(t*1000L*60));
227 : jsr166 1.10 assertEquals(t,
228 : dl 1.9 TimeUnit.MICROSECONDS.toMinutes(t*1000000L*60));
229 : jsr166 1.10 assertEquals(t,
230 : dl 1.9 TimeUnit.NANOSECONDS.toMinutes(t*1000000000L*60));
231 :     }
232 :     }
233 :    
234 :     /**
235 :     * toHours correctly converts sample values in different units to
236 :     * hours
237 :     */
238 :     public void testToHours() {
239 :     for (long t = 0; t < 88888; ++t) {
240 : jsr166 1.10 assertEquals(t*24,
241 : dl 1.9 TimeUnit.DAYS.toHours(t));
242 : jsr166 1.10 assertEquals(t,
243 : dl 1.9 TimeUnit.HOURS.toHours(t));
244 : jsr166 1.10 assertEquals(t,
245 : dl 1.9 TimeUnit.MINUTES.toHours(t*60));
246 : jsr166 1.10 assertEquals(t,
247 : dl 1.9 TimeUnit.SECONDS.toHours(t*60*60));
248 : jsr166 1.10 assertEquals(t,
249 : dl 1.9 TimeUnit.MILLISECONDS.toHours(t*1000L*60*60));
250 : jsr166 1.10 assertEquals(t,
251 : dl 1.9 TimeUnit.MICROSECONDS.toHours(t*1000000L*60*60));
252 : jsr166 1.10 assertEquals(t,
253 : dl 1.9 TimeUnit.NANOSECONDS.toHours(t*1000000000L*60*60));
254 :     }
255 :     }
256 :    
257 :     /**
258 :     * toDays correctly converts sample values in different units to
259 :     * days
260 :     */
261 :     public void testToDays() {
262 :     for (long t = 0; t < 88888; ++t) {
263 : jsr166 1.10 assertEquals(t,
264 : dl 1.9 TimeUnit.DAYS.toDays(t));
265 : jsr166 1.10 assertEquals(t,
266 : dl 1.9 TimeUnit.HOURS.toDays(t*24));
267 : jsr166 1.10 assertEquals(t,
268 : dl 1.9 TimeUnit.MINUTES.toDays(t*60*24));
269 : jsr166 1.10 assertEquals(t,
270 : dl 1.9 TimeUnit.SECONDS.toDays(t*60*60*24));
271 : jsr166 1.10 assertEquals(t,
272 : dl 1.9 TimeUnit.MILLISECONDS.toDays(t*1000L*60*60*24));
273 : jsr166 1.10 assertEquals(t,
274 : dl 1.9 TimeUnit.MICROSECONDS.toDays(t*1000000L*60*60*24));
275 : jsr166 1.10 assertEquals(t,
276 : dl 1.9 TimeUnit.NANOSECONDS.toDays(t*1000000000L*60*60*24));
277 : dl 1.1 }
278 :     }
279 :    
280 : dl 1.4 /**
281 : jsr166 1.10 * convert saturates positive too-large values to Long.MAX_VALUE
282 : dl 1.5 * and negative to LONG.MIN_VALUE
283 : dl 1.4 */
284 : dl 1.1 public void testConvertSaturate() {
285 :     assertEquals(Long.MAX_VALUE,
286 :     TimeUnit.NANOSECONDS.convert(Long.MAX_VALUE / 2,
287 :     TimeUnit.SECONDS));
288 :     assertEquals(Long.MIN_VALUE,
289 :     TimeUnit.NANOSECONDS.convert(-Long.MAX_VALUE / 4,
290 :     TimeUnit.SECONDS));
291 : dl 1.9 assertEquals(Long.MAX_VALUE,
292 :     TimeUnit.NANOSECONDS.convert(Long.MAX_VALUE / 2,
293 :     TimeUnit.MINUTES));
294 :     assertEquals(Long.MIN_VALUE,
295 :     TimeUnit.NANOSECONDS.convert(-Long.MAX_VALUE / 4,
296 :     TimeUnit.MINUTES));
297 :     assertEquals(Long.MAX_VALUE,
298 :     TimeUnit.NANOSECONDS.convert(Long.MAX_VALUE / 2,
299 :     TimeUnit.HOURS));
300 :     assertEquals(Long.MIN_VALUE,
301 :     TimeUnit.NANOSECONDS.convert(-Long.MAX_VALUE / 4,
302 :     TimeUnit.HOURS));
303 :     assertEquals(Long.MAX_VALUE,
304 :     TimeUnit.NANOSECONDS.convert(Long.MAX_VALUE / 2,
305 :     TimeUnit.DAYS));
306 :     assertEquals(Long.MIN_VALUE,
307 :     TimeUnit.NANOSECONDS.convert(-Long.MAX_VALUE / 4,
308 :     TimeUnit.DAYS));
309 : dl 1.1 }
310 :    
311 : dl 1.4 /**
312 : jsr166 1.10 * toNanos saturates positive too-large values to Long.MAX_VALUE
313 : dl 1.5 * and negative to LONG.MIN_VALUE
314 : dl 1.4 */
315 : dl 1.1 public void testToNanosSaturate() {
316 : jsr166 1.13 assertEquals(Long.MAX_VALUE,
317 :     TimeUnit.MILLISECONDS.toNanos(Long.MAX_VALUE / 2));
318 :     assertEquals(Long.MIN_VALUE,
319 :     TimeUnit.MILLISECONDS.toNanos(-Long.MAX_VALUE / 3));
320 : dl 1.1 }
321 :    
322 : dl 1.4 /**
323 : jsr166 1.20 * toString returns name of unit
324 : dl 1.4 */
325 : dl 1.1 public void testToString() {
326 : jsr166 1.20 assertEquals("SECONDS", TimeUnit.SECONDS.toString());
327 : dl 1.1 }
328 :    
329 : jsr166 1.20 /**
330 :     * name returns name of unit
331 :     */
332 :     public void testName() {
333 :     assertEquals("SECONDS", TimeUnit.SECONDS.name());
334 :     }
335 : jsr166 1.10
336 : dl 1.1 /**
337 : jsr166 1.17 * Timed wait without holding lock throws
338 :     * IllegalMonitorStateException
339 : dl 1.1 */
340 : jsr166 1.21 public void testTimedWait_IllegalMonitorException() {
341 :     Thread t = newStartedThread(new CheckedRunnable() {
342 : jsr166 1.13 public void realRun() throws InterruptedException {
343 :     Object o = new Object();
344 :     TimeUnit tu = TimeUnit.MILLISECONDS;
345 : jsr166 1.21
346 : jsr166 1.13 try {
347 : jsr166 1.21 tu.timedWait(o, LONG_DELAY_MS);
348 : jsr166 1.13 threadShouldThrow();
349 : jsr166 1.21 } catch (IllegalMonitorStateException success) {}
350 :     }});
351 : dl 1.1
352 : jsr166 1.21 awaitTermination(t);
353 : dl 1.1 }
354 : jsr166 1.10
355 : dl 1.1 /**
356 : dl 1.5 * timedWait throws InterruptedException when interrupted
357 : dl 1.4 */
358 : jsr166 1.21 public void testTimedWait_Interruptible() {
359 :     final CountDownLatch pleaseInterrupt = new CountDownLatch(1);
360 :     Thread t = newStartedThread(new CheckedRunnable() {
361 : jsr166 1.14 public void realRun() throws InterruptedException {
362 : jsr166 1.13 Object o = new Object();
363 : jsr166 1.21 TimeUnit tu = TimeUnit.MILLISECONDS;
364 : jsr166 1.13
365 : jsr166 1.21 Thread.currentThread().interrupt();
366 :     try {
367 :     synchronized (o) {
368 :     tu.timedWait(o, LONG_DELAY_MS);
369 :     }
370 :     shouldThrow();
371 :     } catch (InterruptedException success) {}
372 :     assertFalse(Thread.interrupted());
373 :    
374 :     pleaseInterrupt.countDown();
375 :     try {
376 :     synchronized (o) {
377 :     tu.timedWait(o, LONG_DELAY_MS);
378 :     }
379 :     shouldThrow();
380 :     } catch (InterruptedException success) {}
381 :     assertFalse(Thread.interrupted());
382 : jsr166 1.13 }});
383 : jsr166 1.21
384 :     await(pleaseInterrupt);
385 :     assertThreadStaysAlive(t);
386 : jsr166 1.13 t.interrupt();
387 : jsr166 1.21 awaitTermination(t);
388 : dl 1.1 }
389 : jsr166 1.10
390 : dl 1.1 /**
391 : dl 1.5 * timedJoin throws InterruptedException when interrupted
392 : dl 1.4 */
393 : jsr166 1.21 public void testTimedJoin_Interruptible() {
394 :     final CountDownLatch pleaseInterrupt = new CountDownLatch(1);
395 :     final Thread s = newStartedThread(new CheckedInterruptedRunnable() {
396 : jsr166 1.13 public void realRun() throws InterruptedException {
397 : jsr166 1.21 Thread.sleep(LONG_DELAY_MS);
398 : jsr166 1.13 }});
399 : jsr166 1.21 final Thread t = newStartedThread(new CheckedRunnable() {
400 : jsr166 1.14 public void realRun() throws InterruptedException {
401 : jsr166 1.13 TimeUnit tu = TimeUnit.MILLISECONDS;
402 : jsr166 1.21 Thread.currentThread().interrupt();
403 :     try {
404 :     tu.timedJoin(s, LONG_DELAY_MS);
405 :     shouldThrow();
406 :     } catch (InterruptedException success) {}
407 :     assertFalse(Thread.interrupted());
408 :    
409 :     pleaseInterrupt.countDown();
410 :     try {
411 :     tu.timedJoin(s, LONG_DELAY_MS);
412 :     shouldThrow();
413 :     } catch (InterruptedException success) {}
414 :     assertFalse(Thread.interrupted());
415 : jsr166 1.18 }});
416 : jsr166 1.21
417 :     await(pleaseInterrupt);
418 :     assertThreadStaysAlive(t);
419 : jsr166 1.13 t.interrupt();
420 : jsr166 1.21 awaitTermination(t);
421 : jsr166 1.13 s.interrupt();
422 : jsr166 1.21 awaitTermination(s);
423 : dl 1.1 }
424 : jsr166 1.10
425 : dl 1.1 /**
426 : jsr166 1.17 * timedSleep throws InterruptedException when interrupted
427 : dl 1.4 */
428 : jsr166 1.21 public void testTimedSleep_Interruptible() {
429 :     final CountDownLatch pleaseInterrupt = new CountDownLatch(1);
430 :     Thread t = newStartedThread(new CheckedRunnable() {
431 : jsr166 1.14 public void realRun() throws InterruptedException {
432 : jsr166 1.13 TimeUnit tu = TimeUnit.MILLISECONDS;
433 : jsr166 1.21 Thread.currentThread().interrupt();
434 :     try {
435 :     tu.sleep(LONG_DELAY_MS);
436 :     shouldThrow();
437 :     } catch (InterruptedException success) {}
438 :     assertFalse(Thread.interrupted());
439 :    
440 :     pleaseInterrupt.countDown();
441 :     try {
442 :     tu.sleep(LONG_DELAY_MS);
443 :     shouldThrow();
444 :     } catch (InterruptedException success) {}
445 :     assertFalse(Thread.interrupted());
446 : jsr166 1.13 }});
447 : dl 1.1
448 : jsr166 1.21 await(pleaseInterrupt);
449 :     assertThreadStaysAlive(t);
450 : jsr166 1.13 t.interrupt();
451 : jsr166 1.21 awaitTermination(t);
452 : dl 1.1 }
453 : dl 1.2
454 : dl 1.4 /**
455 : jsr166 1.13 * a deserialized serialized unit is the same instance
456 : dl 1.4 */
457 : jsr166 1.13 public void testSerialization() throws Exception {
458 : jsr166 1.22 TimeUnit x = TimeUnit.MILLISECONDS;
459 :     assertSame(x, serialClone(x));
460 : dl 1.2 }
461 :    
462 : dl 1.1 }

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8