From 23d6933899fdcefc230a693582101326d205e09f Mon Sep 17 00:00:00 2001 From: Olivia Appleton Date: Tue, 13 Aug 2024 01:15:23 -0500 Subject: [PATCH] Continue pruning --- .github/workflows/java.yml | 3 +-- README.rst | 12 ++++++------ java/src/test/java/EulerTest.java | 7 ++++++- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index 11a25942..a888883a 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -65,8 +65,7 @@ jobs: distribution: corretto os: macos-latest - version: 15 - distribution: dargonwell - os: ubuntu-latest + distribution: dragonwell - version: 15 distribution: semeru - version: 16 diff --git a/README.rst b/README.rst index 443dd8c4..f2780375 100644 --- a/README.rst +++ b/README.rst @@ -80,13 +80,13 @@ Olivia's Project Euler Solutions +------------+--------------------------+--------+-------------------+ | JavaScript | Node 12+ |br| | 25 | |JavaScript| |br| | | | Bun 1.0+ |br| | | |Js-Cov| |br| | -| | Firefox [2]_ |br| | | |CodeQL| |br| | -| | Chrome [2]_ | | |ESLint| | +| | Browser [2]_ | | |CodeQL| |br| | +| | | | |ESLint| | +------------+--------------------------+--------+-------------------+ | Python | CPython 3.6+ |br| | 79 | |Python| |br| | | | Pypy 3.6+ |br| | | |Py-Cov| |br| | | | GraalPy 23.1+ |br| | | |CodeQL| |br| | -| | Pyodide 0.26.2+ [3]_ | | |PythonLint| | +| | Browser [3]_ | | |PythonLint| | +------------+--------------------------+--------+-------------------+ | Rust | 1.69+ | 28 | |Rust| |br| | | | | | |Rs-Cov| |br| | @@ -102,9 +102,9 @@ Olivia's Project Euler Solutions click here! .. [1] This is the earliest standard the MSVC explicitly supports. -.. [2] While these solutions do run on Chrome and Firefox, they need to be bundled with WebPack + Babel first, and - these tests not yet automated as in Nodejs and Bun. To run these tests yourself, |test-js-link| -.. [3] While these solutions do run on Chrome and Firefox, they need to be bundled with Pyodide first, and these +.. [2] While these solutions do run in most browsers, they need to be bundled with WebPack 5.93+ & Babel 7.25+ first, + and these tests not yet automated as in Nodejs and Bun. To run these tests yourself, |test-js-link| +.. [3] While these solutions do run in most browsers, they need to be bundled with Pyodide 0.26.2+ first, and these tests are not yet automated as in CPython and pypy. To run these tests yourself, |test-py-link| Coverage diff --git a/java/src/test/java/EulerTest.java b/java/src/test/java/EulerTest.java index 50414735..8ffc564d 100644 --- a/java/src/test/java/EulerTest.java +++ b/java/src/test/java/EulerTest.java @@ -45,8 +45,13 @@ void eulerTestProblem(Class problemClass, boolean isSlow, Object expected) th Object result = answerMethod.invoke(instance); long elapsedTime = System.nanoTime() - startTime; Assertions.assertEquals(expected, result); - if (!isSlow && System.getenv("IS_TARGET") != "false") { + if (!isSlow && !isSemeru()) { Assertions.assertTrue(elapsedTime <= ONE_MINUTE_NS, "Test took too long"); } } + + public static boolean isSemeru() { + return System.getProperty("java.runtime.name", "").contains("Semeru") + || System.getProperty("java.vm.vendor", "").contains("IBM"); + } }