Allow successful build on Java 9+.

Currently "JdkMath" implements all "Math" methods only on Java 8 (or lower).
This commit is contained in:
Gilles Sadowski 2022-01-11 01:05:58 +01:00
parent bc3711d0c6
commit 9b0fc1fe7f
1 changed files with 10 additions and 0 deletions

View File

@ -32,8 +32,18 @@ public class JdkMathTest {
/** Separator. */
private static final String LINE_SEP = System.lineSeparator();
/**
* Drop-in replacement of {@link Math} with {@link JdkMath} is only valid
* for Java 8.
* Test should be updated when {@code AccurateMath} implements functions
* added in Java 9+.
*/
@Test
public void checkMissingMethods() {
final String runtimeVersion = System.getProperty("java.runtime.version");
final boolean doTest = runtimeVersion.matches("^1\\.8\\..*");
org.junit.Assume.assumeTrue(doTest);
final List<String> notFound = compareClassMethods(StrictMath.class,
JdkMath.class);
if (!notFound.isEmpty()) {