Skip to content

Commit 4b099b3

Browse files
committed
refactor: remove duplicate tests
1 parent f846450 commit 4b099b3

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/test/java/com/thealgorithms/maths/prime/EulerPseudoprimeTest.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ void testSingleTrialConsistency() {
5353
@Test
5454
void testJacobiSymbolBasicCases() throws Exception {
5555
var method = EulerPseudoprime.class.getDeclaredMethod("jacobiSymbol", BigInteger.class, BigInteger.class);
56-
method.setAccessible(true);
5756

5857
// (a/n) = (2/3) = -1
5958
assertEquals(-1, (int) method.invoke(null, BigInteger.valueOf(2), BigInteger.valueOf(3)));
@@ -68,18 +67,6 @@ void testJacobiSymbolBasicCases() throws Exception {
6867
assertEquals(0, (int) method.invoke(null, BigInteger.valueOf(3), BigInteger.valueOf(9)));
6968
}
7069

71-
@Test
72-
void testUniformRandomRange() throws Exception {
73-
var method = EulerPseudoprime.class.getDeclaredMethod("uniformRandom", BigInteger.class, BigInteger.class);
74-
method.setAccessible(true);
75-
76-
BigInteger min = BigInteger.TWO;
77-
BigInteger max = BigInteger.valueOf(20);
78-
BigInteger value = (BigInteger) method.invoke(null, min, max);
79-
80-
assertTrue(value.compareTo(min) >= 0 && value.compareTo(max) <= 0, "Random value should be within [min, max]");
81-
}
82-
8370
@Test
8471
void testIsProbablePrimeWhenJacobiSymbolIsZero() {
8572
try (MockedStatic<EulerPseudoprime> mockedPrimality = Mockito.mockStatic(EulerPseudoprime.class, Mockito.CALLS_REAL_METHODS)) {
@@ -96,7 +83,6 @@ void testIsProbablePrimeWhenJacobiSymbolIsZero() {
9683
@Test
9784
void testJacobiSymbolThrowsForEvenOrNonPositiveN() throws Exception {
9885
var method = EulerPseudoprime.class.getDeclaredMethod("jacobiSymbol", BigInteger.class, BigInteger.class);
99-
method.setAccessible(true);
10086

10187
// Helper lambda to unwrap InvocationTargetException
10288
Runnable invokeJacobi = () -> {

0 commit comments

Comments
 (0)