Move non-production apps from main to test

+ Move test apps from org.qora.test to org.qora.test.apps

("app" being a class with a main() method)
This commit is contained in:
catbref 2019-11-12 15:03:20 +00:00
parent 47dcff0beb
commit 47d0274a5e
14 changed files with 16 additions and 16 deletions

View File

@ -2,7 +2,7 @@ package org.qora.crypto;
import com.google.common.primitives.Bytes;
public class CiyamMemoryPoW {
public class MemoryPoW {
private static final int WORK_BUFFER_LENGTH = 4 * 1024 * 1024;
private static final int WORK_BUFFER_LENGTH_MASK = WORK_BUFFER_LENGTH - 1;

View File

@ -1,13 +1,13 @@
package org.qora.test;
import org.junit.Test;
import org.qora.crypto.CiyamMemoryPoW;
import org.qora.crypto.MemoryPoW;
import static org.junit.Assert.*;
import java.util.Random;
public class CiyamMemoryPoWTests {
public class MemoryPoWTests {
@Test
public void testCompute() {
@ -21,7 +21,7 @@ public class CiyamMemoryPoWTests {
int difficulty = 1;
long startTime = System.currentTimeMillis();
Integer nonce = CiyamMemoryPoW.compute(data, start, range, difficulty);
Integer nonce = MemoryPoW.compute(data, start, range, difficulty);
long finishTime = System.currentTimeMillis();
System.out.println(String.format("Memory-hard PoW took %dms", finishTime - startTime));

View File

@ -1,4 +1,4 @@
package org.qora.test;
package org.qora.test.apps;
import java.io.File;
import java.net.UnknownHostException;

View File

@ -1,4 +1,4 @@
package org.qora;
package org.qora.test.apps;
import java.security.Security;

View File

@ -1,4 +1,4 @@
package org.qora.test;
package org.qora.test.apps;
import java.io.IOException;
import java.net.InetAddress;

View File

@ -1,4 +1,4 @@
package org.qora.test;
package org.qora.test.apps;
import java.io.IOException;
import java.io.InputStream;

View File

@ -1,4 +1,4 @@
package org.qora;
package org.qora.test.apps;
import java.security.Security;

View File

@ -1,4 +1,4 @@
package org.qora.test;
package org.qora.test.apps;
import java.io.FileReader;
import java.io.IOException;

View File

@ -1,4 +1,4 @@
package org.qora.test;
package org.qora.test.apps;
import java.io.IOException;
import java.io.InputStream;

View File

@ -1,4 +1,4 @@
package org.qora;
package org.qora.test.apps;
import java.security.SecureRandom;
import java.security.Security;

View File

@ -1,4 +1,4 @@
package org.qora.test;
package org.qora.test.apps;
import java.io.IOException;
import java.io.InputStream;

View File

@ -1,4 +1,4 @@
package org.qora;
package org.qora.test.apps;
import java.io.IOException;
import java.io.InputStream;

View File

@ -1,4 +1,4 @@
package org.qora;
package org.qora.test.apps;
import org.qora.crypto.BrokenMD160;
import com.google.common.hash.HashCode;

View File

@ -1,4 +1,4 @@
package org.qora;
package org.qora.test.apps;
import java.security.Security;
import org.bouncycastle.jce.provider.BouncyCastleProvider;