aboutsummaryrefslogtreecommitdiff
path: root/src/cz/crcs/ectester/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/cz/crcs/ectester/common')
-rw-r--r--src/cz/crcs/ectester/common/ec/EC_Category.java1
-rw-r--r--src/cz/crcs/ectester/common/output/BaseTextTestWriter.java22
-rw-r--r--src/cz/crcs/ectester/common/output/OutputLogger.java5
-rw-r--r--src/cz/crcs/ectester/common/output/TestWriter.java3
-rw-r--r--src/cz/crcs/ectester/common/test/TestCallback.java3
-rw-r--r--src/cz/crcs/ectester/common/util/ByteUtil.java7
6 files changed, 24 insertions, 17 deletions
diff --git a/src/cz/crcs/ectester/common/ec/EC_Category.java b/src/cz/crcs/ectester/common/ec/EC_Category.java
index 8c58159..8af308c 100644
--- a/src/cz/crcs/ectester/common/ec/EC_Category.java
+++ b/src/cz/crcs/ectester/common/ec/EC_Category.java
@@ -10,6 +10,7 @@ import java.util.TreeMap;
/**
* A category of EC_Data objects, has a name, description and represents a directory in
* the cz.crcs.ectester.data package.
+ *
* @author Jan Jancar johny@neuromancer.sk
*/
public class EC_Category {
diff --git a/src/cz/crcs/ectester/common/output/BaseTextTestWriter.java b/src/cz/crcs/ectester/common/output/BaseTextTestWriter.java
index ee55069..f60f8bb 100644
--- a/src/cz/crcs/ectester/common/output/BaseTextTestWriter.java
+++ b/src/cz/crcs/ectester/common/output/BaseTextTestWriter.java
@@ -54,17 +54,17 @@ public abstract class BaseTextTestWriter implements TestWriter {
Result result = t.getResult();
- String line = "";
- if (prefix.equals("")) {
- char charLine[] = new char[BASE_WIDTH + 24];
- new String(new char[BASE_WIDTH + 24]).replace("\0", "━").getChars(0, charLine.length - 1, charLine, 0);
- charLine[0] = '■';
- charLine[4] = '┳';
- charLine[BASE_WIDTH + 1] = '┳';
- charLine[BASE_WIDTH + 13] = '┳';
- charLine[BASE_WIDTH + 23] = '┓';
- line = new String(charLine) + System.lineSeparator();
- }
+ String line = "";
+ if (prefix.equals("")) {
+ char charLine[] = new char[BASE_WIDTH + 24];
+ new String(new char[BASE_WIDTH + 24]).replace("\0", "━").getChars(0, charLine.length - 1, charLine, 0);
+ charLine[0] = '■';
+ charLine[4] = '┳';
+ charLine[BASE_WIDTH + 1] = '┳';
+ charLine[BASE_WIDTH + 13] = '┳';
+ charLine[BASE_WIDTH + 23] = '┓';
+ line = new String(charLine) + System.lineSeparator();
+ }
StringBuilder out = new StringBuilder();
out.append(t.ok() ? Colors.ok(" OK ") : Colors.error("NOK "));
diff --git a/src/cz/crcs/ectester/common/output/OutputLogger.java b/src/cz/crcs/ectester/common/output/OutputLogger.java
index 09b8f73..effd1fd 100644
--- a/src/cz/crcs/ectester/common/output/OutputLogger.java
+++ b/src/cz/crcs/ectester/common/output/OutputLogger.java
@@ -1,6 +1,9 @@
package cz.crcs.ectester.common.output;
-import java.io.*;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintStream;
import java.util.LinkedList;
import java.util.List;
diff --git a/src/cz/crcs/ectester/common/output/TestWriter.java b/src/cz/crcs/ectester/common/output/TestWriter.java
index eb95804..67aeccb 100644
--- a/src/cz/crcs/ectester/common/output/TestWriter.java
+++ b/src/cz/crcs/ectester/common/output/TestWriter.java
@@ -19,14 +19,13 @@ public interface TestWriter {
void begin(TestSuite suite);
/**
- *
* @param t
* @param index
*/
void outputTest(Test t, int index);
/**
- * @param t
+ * @param t
* @param cause
* @param index
*/
diff --git a/src/cz/crcs/ectester/common/test/TestCallback.java b/src/cz/crcs/ectester/common/test/TestCallback.java
index ce6000b..c5a49f3 100644
--- a/src/cz/crcs/ectester/common/test/TestCallback.java
+++ b/src/cz/crcs/ectester/common/test/TestCallback.java
@@ -3,9 +3,8 @@ package cz.crcs.ectester.common.test;
import java.util.function.Function;
/**
- *
- * @author Jan Jancar johny@neuromancer.sk
* @param <T>
+ * @author Jan Jancar johny@neuromancer.sk
*/
public abstract class TestCallback<T extends Testable> implements Function<T, Result> {
diff --git a/src/cz/crcs/ectester/common/util/ByteUtil.java b/src/cz/crcs/ectester/common/util/ByteUtil.java
index daacabb..4b4a2d6 100644
--- a/src/cz/crcs/ectester/common/util/ByteUtil.java
+++ b/src/cz/crcs/ectester/common/util/ByteUtil.java
@@ -10,6 +10,7 @@ public class ByteUtil {
/**
* Gen a short from a byte array at <code>offset</code>, big-endian.
+ *
* @return the short value
*/
public static short getShort(byte[] array, int offset) {
@@ -26,6 +27,7 @@ public class ByteUtil {
/**
* Compare two byte arrays upto <code>length</code> and get first difference.
+ *
* @return the position of the first difference in the two byte arrays, or <code>length</code> if they are equal.
*/
public static int diffBytes(byte[] one, int oneOffset, byte[] other, int otherOffset, int length) {
@@ -41,6 +43,7 @@ public class ByteUtil {
/**
* Compare two byte arrays, upto <code>length</code>.
+ *
* @return whether the arrays are equal upto <code>length</code>
*/
public static boolean compareBytes(byte[] one, int oneOffset, byte[] other, int otherOffset, int length) {
@@ -77,6 +80,7 @@ public class ByteUtil {
/**
* Parse a hex string into a byte array, big-endian.
+ *
* @param hex The String to parse.
* @return the byte array from the hex string.
*/
@@ -86,7 +90,8 @@ public class ByteUtil {
/**
* Parse a hex string into a byte-array, specify endianity.
- * @param hex The String to parse.
+ *
+ * @param hex The String to parse.
* @param bigEndian Whether to parse as big-endian.
* @return the byte array from the hex string.
*/