265 |
|
public static boolean atLeastJava6() { return JAVA_CLASS_VERSION >= 50.0; } |
266 |
|
public static boolean atLeastJava7() { return JAVA_CLASS_VERSION >= 51.0; } |
267 |
|
public static boolean atLeastJava8() { return JAVA_CLASS_VERSION >= 52.0; } |
268 |
< |
public static boolean atLeastJava9() { |
269 |
< |
// As of 2014-05, java9 still uses 52.0 class file version |
270 |
< |
return JAVA_SPECIFICATION_VERSION.startsWith("1.9"); |
271 |
< |
} |
268 |
> |
public static boolean atLeastJava9() { return JAVA_CLASS_VERSION >= 53.0; } |
269 |
|
|
270 |
|
/** |
271 |
|
* Collects all JSR166 unit tests as one suite. |
561 |
|
public void threadAssertEquals(Object x, Object y) { |
562 |
|
try { |
563 |
|
assertEquals(x, y); |
564 |
< |
} catch (AssertionFailedError t) { |
565 |
< |
threadRecordFailure(t); |
566 |
< |
throw t; |
567 |
< |
} catch (Throwable t) { |
568 |
< |
threadUnexpectedException(t); |
564 |
> |
} catch (AssertionFailedError fail) { |
565 |
> |
threadRecordFailure(fail); |
566 |
> |
throw fail; |
567 |
> |
} catch (Throwable fail) { |
568 |
> |
threadUnexpectedException(fail); |
569 |
|
} |
570 |
|
} |
571 |
|
|
577 |
|
public void threadAssertSame(Object x, Object y) { |
578 |
|
try { |
579 |
|
assertSame(x, y); |
580 |
< |
} catch (AssertionFailedError t) { |
581 |
< |
threadRecordFailure(t); |
582 |
< |
throw t; |
580 |
> |
} catch (AssertionFailedError fail) { |
581 |
> |
threadRecordFailure(fail); |
582 |
> |
throw fail; |
583 |
|
} |
584 |
|
} |
585 |
|
|