diff --git a/src/main/java/de/tilman_neumann/jml/quadraticResidues/QuadraticResidues.java b/src/main/java/de/tilman_neumann/jml/quadraticResidues/QuadraticResidues.java index f31e9248..6325c026 100644 --- a/src/main/java/de/tilman_neumann/jml/quadraticResidues/QuadraticResidues.java +++ b/src/main/java/de/tilman_neumann/jml/quadraticResidues/QuadraticResidues.java @@ -15,9 +15,6 @@ import java.util.TreeSet; -import org.apache.logging.log4j.Logger; -import org.apache.logging.log4j.LogManager; - /** * Methods to generate quadratic residues or test for quadratic residuosity for general moduli m. * @@ -25,12 +22,6 @@ */ public class QuadraticResidues { - @SuppressWarnings("unused") - private static final Logger LOG = LogManager.getLogger(QuadraticResidues.class); - - @SuppressWarnings("unused") - private static final boolean DEBUG = false; - /** * Return all quadratic residues modulo m, computed by brute force. * diff --git a/src/test/java/de/tilman_neumann/jml/quadraticResidues/QuadraticResiduesMod2PowNTest.java b/src/test/java/de/tilman_neumann/jml/quadraticResidues/QuadraticResiduesTest.java similarity index 90% rename from src/test/java/de/tilman_neumann/jml/quadraticResidues/QuadraticResiduesMod2PowNTest.java rename to src/test/java/de/tilman_neumann/jml/quadraticResidues/QuadraticResiduesTest.java index 4e765306..4afd6836 100644 --- a/src/test/java/de/tilman_neumann/jml/quadraticResidues/QuadraticResiduesMod2PowNTest.java +++ b/src/test/java/de/tilman_neumann/jml/quadraticResidues/QuadraticResiduesTest.java @@ -26,13 +26,13 @@ import de.tilman_neumann.util.ConfigUtil; /** - * Test quadratic residue computations modulo 2^n. + * Tests for class QuadraticResidues. * * @author Tilman Neumann */ -public class QuadraticResiduesMod2PowNTest { +public class QuadraticResiduesTest { - private static final Logger LOG = LogManager.getLogger(QuadraticResiduesMod2PowNTest.class); + private static final Logger LOG = LogManager.getLogger(QuadraticResiduesTest.class); private static final boolean DEBUG = false; @@ -42,7 +42,6 @@ public static void setup() { } @Test - // TODO this test must be moved to another class because m=100 is not of the form 2^n public void testSetOfQuadraticResidues() { TreeSet quadraticResiduesMod100 = QuadraticResidues.getQuadraticResidues(100); LOG.info("m = 100 has " + quadraticResiduesMod100.size() + " quadratic residues: " + quadraticResiduesMod100); @@ -56,7 +55,7 @@ public void testSetOfQuadraticResidues() { * a(n) = {1, 1} + A023105(n-2) = 1, 1, 1, 2, 2, 3, 4, 7, 12, 23, 44, 87, 172, 343, 684, 1367, 2732, 5463, 10924, 21847, ... for "even" quadratic residues modulo 2^n. */ @Test - public void testQuadraticResidueCounts() { + public void testQuadraticResiduesMod2PowNCounts() { ArrayList counts = new ArrayList(); ArrayList evenCounts = new ArrayList();