Allow successful build on Java 9+.
Currently "JdkMath" implements all "Math" methods only on Java 8 (or lower).
This commit is contained in:
parent
bc3711d0c6
commit
9b0fc1fe7f
|
@ -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()) {
|
||||
|
|
Loading…
Reference in New Issue