From 9279d29588e52d8f0260c2ce5e730c773c247569 Mon Sep 17 00:00:00 2001 From: mwcw Date: Mon, 5 Feb 2024 09:29:19 +1100 Subject: [PATCH] Removed version assertion test. --- .../bouncycastle/crypto/test/AllTests.java | 2 -- .../crypto/test/JVMAssertionTest.java | 19 ------------------- 2 files changed, 21 deletions(-) delete mode 100644 core/src/test/java/org/bouncycastle/crypto/test/JVMAssertionTest.java diff --git a/core/src/test/java/org/bouncycastle/crypto/test/AllTests.java b/core/src/test/java/org/bouncycastle/crypto/test/AllTests.java index 69d12d8c0d..1ab4247f85 100644 --- a/core/src/test/java/org/bouncycastle/crypto/test/AllTests.java +++ b/core/src/test/java/org/bouncycastle/crypto/test/AllTests.java @@ -21,8 +21,6 @@ public static Test suite() suite.addTestSuite(SimpleTestTest.class); suite.addTestSuite(GCMReorderTest.class); suite.addTestSuite(HPKETestVectors.class); - suite.addTestSuite(JVMAssertionTest.class); - return new BCTestSetup(suite); } diff --git a/core/src/test/java/org/bouncycastle/crypto/test/JVMAssertionTest.java b/core/src/test/java/org/bouncycastle/crypto/test/JVMAssertionTest.java deleted file mode 100644 index 9a90f78dfb..0000000000 --- a/core/src/test/java/org/bouncycastle/crypto/test/JVMAssertionTest.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.bouncycastle.crypto.test; - -import junit.framework.TestCase; - -/** - * "java.version" must start with the value of "test.java.version.prefix" it acts as - * an interlock to prevent accidental test execution on a different java version to what - * is expected. - */ -public class JVMAssertionTest extends TestCase -{ - public void testVersion() { - if (!System.getProperty("java.version").startsWith(System.getProperty("test.java.version.prefix"))) { - System.out.println(System.getProperty("java.version")); - System.out.println(System.getProperty("test.java.version.prefix")); - } - assertTrue(System.getProperty("java.version").startsWith(System.getProperty("test.java.version.prefix"))); - } -}