From d45835438dce1457ccf0cbecc42bf4c14f39d52a Mon Sep 17 00:00:00 2001 From: hama Date: Fri, 29 Jul 2016 00:32:46 +0200 Subject: [PATCH] javadoc corrections * fix: endless loop in lvalue() and isBasicType() --- .gitignore | 1 + pom.xml | 23 +++++++++++++++++-- .../java/de/republib/expr/Expression.java | 19 ++++++++------- src/main/java/de/republib/expr/Scanner.java | 2 ++ src/main/java/de/republib/expr/Token.java | 20 ++++++++-------- src/main/java/de/republib/expr/Variable.java | 1 + src/main/java/de/republib/expr/Variant.java | 11 +++++---- src/main/java/de/republib/gui/CurveSheet.java | 2 +- .../de/republib/gui/MultiChannelSheet.java | 4 ++-- src/main/java/de/republib/net/TcpClient.java | 4 ++-- src/main/java/de/republib/pinet/Client.java | 7 +++++- .../java/de/republib/pinet/GpioClient.java | 8 +++---- .../java/de/republib/pinet/PinNumber.java | 4 +++- .../de/republib/pinet/gui/GPIOSettings.java | 18 ++++++++++++--- .../java/de/republib/util/BytePairData.java | 6 +++++ src/main/java/de/republib/util/DynBytes.java | 19 ++++++++++----- src/main/java/de/republib/util/I18N.java | 4 ++-- src/main/java/de/republib/util/PairData.java | 4 +++- .../java/de/republib/expr/ExpressionTest.java | 5 ++++ .../java/de/republib/expr/ScannerTest.java | 6 +++++ .../java/de/republib/expr/VariableTest.java | 5 ++++ .../java/de/republib/expr/VariantTest.java | 13 +++++++++++ .../java/de/republib/gui/GuiUtilsTest.java | 6 +++++ .../de/republib/util/BytePairDataTest.java | 6 +++++ .../java/de/republib/util/DynBytesTest.java | 6 +++++ .../republib/util/FunctionPairDataTest.java | 5 ++++ .../java/de/republib/util/PairDataTest.java | 5 ++++ .../de/republib/util/StringUtilsTest.java | 5 ++++ 28 files changed, 171 insertions(+), 48 deletions(-) diff --git a/.gitignore b/.gitignore index ff41283..0d31329 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ target +src/main/doc test-output *.iml .project diff --git a/pom.xml b/pom.xml index ca1e11d..d11fb48 100644 --- a/pom.xml +++ b/pom.xml @@ -17,9 +17,15 @@ UTF-8 1.1.7 1.7.21 - + UTF-8 + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + org.slf4j @@ -122,5 +128,18 @@ - + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.3 + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 2.8 + + + diff --git a/src/main/java/de/republib/expr/Expression.java b/src/main/java/de/republib/expr/Expression.java index 8b256d3..894cc08 100644 --- a/src/main/java/de/republib/expr/Expression.java +++ b/src/main/java/de/republib/expr/Expression.java @@ -15,10 +15,10 @@ import de.republib.util.I18N; * *
  * Syntax:
- *  ::=  {  ::= '('  ')' |  | 
- *  ::= 
- *  ::= '+' | '-' | '*' | '/' | '%' | '**' | '='
+ * <expr> ::= <term> {<operator> <operand}*
+ * <term> ::= '(' <expr> ')' | <constant> | <variable>
+ * <constant> ::= <number>
+ * <operator> ::= '+' | '-' | '*' | '/' | '%' | '**' | '='
  * 
* * @author hm @@ -40,6 +40,7 @@ public class Expression { * formula text * @return the result of the formula as long * @throws ExpressionException + * illegal type */ public static long asLong(final String text) throws ExpressionException { final Variant result = Expression.getInstance().expr(text); @@ -110,11 +111,12 @@ public class Expression { * Calculates the value of the expression. * *
-	 *  ::=  {   }*
+	 * <expr> ::= <term> { <operator> <term> }*
 	 * 
* * @return the value of the expression stored in a token * @throws ParserException + * parser error found */ public Variant expr() throws ParserException { final int entryStackLevel = this.operators.size(); @@ -174,6 +176,7 @@ public class Expression { * formula text * @return the value of the expression * @throws ParserException + * parser error detected */ public Variant expr(String text) throws ParserException { final Variant rc = reset(text).expr(); @@ -248,13 +251,13 @@ public class Expression { * Calculates the value of the expression. * *
-	 *  ::= '('  ')' |  |  |  
-	 *  ::= '+' | '-'
+	 * <term> ::= '(' <expr> ')' | <constant> | <variable> | <sign> <term>
+	 * <sign> ::= '+' | '-'
 	 * 
* * @return the value of the term * @throws ParserException - * @throws VariantException + * parser error found */ public Variant term() throws ParserException { Variant rc = null; diff --git a/src/main/java/de/republib/expr/Scanner.java b/src/main/java/de/republib/expr/Scanner.java index 756d0ea..fdb027f 100644 --- a/src/main/java/de/republib/expr/Scanner.java +++ b/src/main/java/de/republib/expr/Scanner.java @@ -208,6 +208,7 @@ public class Scanner { * * @return the next token * @throws ParserException + * parser error found */ public Token nextNotSpaceToken() throws ParserException { Token token; @@ -222,6 +223,7 @@ public class Scanner { * * @return the next token * @throws ParserException + * parser error found */ public Token nextToken() throws ParserException { final Token token = this.lastToken = this.tokens[this.indexToken++]; diff --git a/src/main/java/de/republib/expr/Token.java b/src/main/java/de/republib/expr/Token.java index 2d5cba0..fd42867 100644 --- a/src/main/java/de/republib/expr/Token.java +++ b/src/main/java/de/republib/expr/Token.java @@ -127,11 +127,8 @@ public class Token implements Cloneable { } /** - * Sets the token as identifier. + * Sets the token as end of string. * - * @param id - * name of the identifier - * @param delimiter * @return the instance (for chaining) */ public Token setEndOfString() { @@ -144,7 +141,6 @@ public class Token implements Cloneable { * * @param id * name of the identifier - * @param delimiter * @return the instance (for chaining) */ public Token setId(String id) { @@ -214,8 +210,12 @@ public class Token implements Cloneable { /** * Sets the token as string. * - * @param spaces - * the space sequence + * @param string + * the string with replaced meta characters (like '\n') + * @param rawString + * the string as in source code inclusive delimiters + * @param delimiter + * the delimiter in the source code / input text * @return the instance (for chaining) */ public Token setString(String string, String rawString, char delimiter) { @@ -227,10 +227,10 @@ public class Token implements Cloneable { } /** - * Sets the token as space sequence. + * Sets the token as unknown type. * - * @param spaces - * the space sequence + * @param info + * the unknown input text not belonging to other token types * @return the instance (for chaining) */ public Token setUnknown(String info) { diff --git a/src/main/java/de/republib/expr/Variable.java b/src/main/java/de/republib/expr/Variable.java index ccd6fe1..af7da08 100644 --- a/src/main/java/de/republib/expr/Variable.java +++ b/src/main/java/de/republib/expr/Variable.java @@ -30,6 +30,7 @@ public class Variable { * Assigns a new value to the instance. * * @param value + * the value to assign */ public void assign(Variant value) { this.value.redefine(value); diff --git a/src/main/java/de/republib/expr/Variant.java b/src/main/java/de/republib/expr/Variant.java index 5a02690..8ad8933 100644 --- a/src/main/java/de/republib/expr/Variant.java +++ b/src/main/java/de/republib/expr/Variant.java @@ -38,7 +38,7 @@ public class Variant implements Cloneable { /** * Constructor. * - * @param longValue + * @param value * the instance becomes the type INTEGER with this value */ public Variant(double value) { @@ -346,7 +346,7 @@ public class Variant implements Cloneable { public boolean isBasicType(DataType type) { Variant value = this; while (value.isType(DataType.VARIABLE)) { - value = this.variableValue.getValue(); + value = value.variableValue.getValue(); } final boolean rc = value.isType(type); return rc; @@ -383,7 +383,7 @@ public class Variant implements Cloneable { public Variant lValue() { Variant rc = this; while (rc.isType(DataType.VARIABLE)) { - rc = this.variableValue.getValue(); + rc = rc.variableValue.getValue(); if (!rc.isType(DataType.VARIABLE)) { rc = rc.copy(); break; @@ -403,7 +403,7 @@ public class Variant implements Cloneable { protected Variant lValueImmutable() { Variant rc = this; while (rc.isType(DataType.VARIABLE)) { - rc = this.variableValue.getValue(); + rc = rc.variableValue.getValue(); } return rc; } @@ -487,9 +487,10 @@ public class Variant implements Cloneable { } /** - * Takes the datat ype from another instance. + * Takes the data type from another instance. * * @param source + * the source to copy * @return the instance (for chaining) */ public Variant redefine(Variant source) { diff --git a/src/main/java/de/republib/gui/CurveSheet.java b/src/main/java/de/republib/gui/CurveSheet.java index 8b07c95..5326cc8 100644 --- a/src/main/java/de/republib/gui/CurveSheet.java +++ b/src/main/java/de/republib/gui/CurveSheet.java @@ -22,7 +22,7 @@ import de.republib.util.PairData; * *
  * ----------------------------
- * |<-- vertic. scale
+ * |<-- vertic. scale
  * |
  * |
  * |
diff --git a/src/main/java/de/republib/gui/MultiChannelSheet.java b/src/main/java/de/republib/gui/MultiChannelSheet.java
index aabd91c..0a3275d 100644
--- a/src/main/java/de/republib/gui/MultiChannelSheet.java
+++ b/src/main/java/de/republib/gui/MultiChannelSheet.java
@@ -61,8 +61,8 @@ public class MultiChannelSheet extends JPanel {
 	/**
 	 * Adds a channel to the sheet.
 	 *
-	 * @param channel
-	 *            the channel to add
+	 * @param data
+	 *            the data for the channel (for displaying)
 	 * @return the instance (for chaining)
 	 */
 	public MultiChannelSheet addChannel(IPairData data) {
diff --git a/src/main/java/de/republib/net/TcpClient.java b/src/main/java/de/republib/net/TcpClient.java
index d47f647..760f5ff 100644
--- a/src/main/java/de/republib/net/TcpClient.java
+++ b/src/main/java/de/republib/net/TcpClient.java
@@ -107,7 +107,7 @@ public class TcpClient {
 	 *            hostname of the address to compare
 	 * @param port
 	 *            port of the address to compare
-	 * @return
+	 * @return true: the instance have the same host/port as given
 	 */
 	public boolean sameAddress(String host, int port) {
 		return host.equals(this.host) && port == this.port;
@@ -115,7 +115,7 @@ public class TcpClient {
 
 	/**
 	 *
-	 * @param buffer
+	 * @param message
 	 *            bytes to send
 	 */
 	public void send(DynBytes message) {
diff --git a/src/main/java/de/republib/pinet/Client.java b/src/main/java/de/republib/pinet/Client.java
index 2586eb4..670b856 100644
--- a/src/main/java/de/republib/pinet/Client.java
+++ b/src/main/java/de/republib/pinet/Client.java
@@ -18,6 +18,11 @@ public class Client {
 
 	/**
 	 * Starts the graphical user interface client.
+	 *
+	 * @param host
+	 *            the server name
+	 * @param port
+	 *            the ip port: 1..65535
 	 */
 	public static void gui(String host, int port) {
 		final ControlCenter center = new ControlCenter();
@@ -31,7 +36,7 @@ public class Client {
 	 * @param args
 	 *            program arguments
 	 */
-	public static void main(String... args) throws Exception {
+	public static void main(String... args) {
 		Client.logger.info("start");
 		int port = 15000;
 		final String host = "127.0.0.1";
diff --git a/src/main/java/de/republib/pinet/GpioClient.java b/src/main/java/de/republib/pinet/GpioClient.java
index 43ef611..89b643d 100644
--- a/src/main/java/de/republib/pinet/GpioClient.java
+++ b/src/main/java/de/republib/pinet/GpioClient.java
@@ -24,7 +24,9 @@ public class GpioClient extends TcpClient {
 	 * Constructor.
 	 *
 	 * @param host
+	 *            the server name
 	 * @param port
+	 *            the ip port: 1..65535
 	 */
 	public GpioClient(String host, int port) {
 		super(host, port);
@@ -76,10 +78,8 @@ public class GpioClient extends TcpClient {
 	 *
 	 * @param pin
 	 *            pin for output
-	 * @param clock
-	 *            minimal time slice of the pwm period in microseconds
-	 * @param steps
-	 *            number of time slices
+	 * @param period
+	 *            the period of the pwm signal in microseconds
 	 * @param startValue
 	 *            value of the first PWM period (in steps)
 	 * @param function
diff --git a/src/main/java/de/republib/pinet/PinNumber.java b/src/main/java/de/republib/pinet/PinNumber.java
index bbd7ddc..35ed31e 100644
--- a/src/main/java/de/republib/pinet/PinNumber.java
+++ b/src/main/java/de/republib/pinet/PinNumber.java
@@ -49,7 +49,9 @@ public enum PinNumber {
 	 * Finds the item by name
 	 *
 	 * @param name
-	 * @return
+	 *            the name of the pin to search
+	 * @return null: not found
+ * otherwise: the pin number */ public static PinNumber find(String name) { PinNumber rc = null; diff --git a/src/main/java/de/republib/pinet/gui/GPIOSettings.java b/src/main/java/de/republib/pinet/gui/GPIOSettings.java index 5f3598c..5540bfb 100644 --- a/src/main/java/de/republib/pinet/gui/GPIOSettings.java +++ b/src/main/java/de/republib/pinet/gui/GPIOSettings.java @@ -52,12 +52,14 @@ public class GPIOSettings extends JPanel { private OutputPwmPanel panelOutputPwmData; private InputPanel panelInputData; private InputPwmPanel panelInputPwmData; + private JPanel panelUndef; private final ControlCenter center; /** + * Constructor. * * @param center - * @return + * the parent (control center) */ public GPIOSettings(ControlCenter center) { super(new FlowLayout(FlowLayout.LEADING)); @@ -92,6 +94,13 @@ public class GPIOSettings extends JPanel { return this.panelOutputPwmData; } + /** + * @return the panelUndef + */ + public JPanel getPanelUndef() { + return this.panelUndef; + } + /** * Populates the panel with the widgets. */ @@ -110,6 +119,10 @@ public class GPIOSettings extends JPanel { this.panelInputData.setVisible(false); add(this.panelInputPwmData = new InputPwmPanel(this.center, panelPinData)); this.panelInputPwmData.setVisible(false); + add(this.panelUndef = new JPanel(new MigLayout("fillx", "[left]rel[grow,fill]", "[]7[]"))); + this.panelUndef.setVisible(true); + this.panelUndef.add(new JLabel(I18N.tr("The pin is not initialized for input/output")), "wrap"); + this.panelUndef.add(new JLabel(I18N.tr("Select an input/output mode"))); } } @@ -705,8 +718,6 @@ class PinPanel extends JPanel implements ActionListener, FocusListener { final int index = this.comboMode.getSelectedIndex(); if (this.currentPin.getMode() != index) { final boolean isOutputPWM = index == PinButton.MODE_OUTPUT_PWM; - this.logger.debug( - "actionPerformed(); changing mode: " + index + " isOutPwm: " + String.valueOf(isOutputPWM)); this.currentPin.setMode(index); boolean visible = index == PinButton.MODE_OUTPUT_BLINK; this.parent.getGpioSettings().getPanelOutputBlinkData().setVisible(visible); @@ -715,6 +726,7 @@ class PinPanel extends JPanel implements ActionListener, FocusListener { this.parent.getGpioSettings().getPanelInputData().setVisible(visible); visible = index == PinButton.MODE_INPUT_PWM; this.parent.getGpioSettings().getPanelInputPwmData().setVisible(visible); + this.parent.getGpioSettings().getPanelUndef().setVisible(index == PinButton.MODE_UNDEF); } } } diff --git a/src/main/java/de/republib/util/BytePairData.java b/src/main/java/de/republib/util/BytePairData.java index 9bedf06..700ebfe 100644 --- a/src/main/java/de/republib/util/BytePairData.java +++ b/src/main/java/de/republib/util/BytePairData.java @@ -24,10 +24,15 @@ public class BytePairData extends DynBytes implements IPairData { * Constructor. * * @param capacity + * the capacity at the start * @param blocksize + * the minimum size while enlarging the buffer * @param minX + * the minimum of the x coordinate * @param maxX + * the maximum ot the x coordinate * @param dataWidth + * the number of bytes of one item: 1..8 */ public BytePairData(int capacity, int blocksize, double minX, double maxX, int dataWidth) { super(capacity, blocksize); @@ -134,6 +139,7 @@ public class BytePairData extends DynBytes implements IPairData { * @param name * the name to set */ + @Override public void setName(String name) { this.name = name; } diff --git a/src/main/java/de/republib/util/DynBytes.java b/src/main/java/de/republib/util/DynBytes.java index 2c03111..7b394ea 100644 --- a/src/main/java/de/republib/util/DynBytes.java +++ b/src/main/java/de/republib/util/DynBytes.java @@ -23,6 +23,8 @@ public class DynBytes { /** * Convert a (binary) buffer content into a readable form. * + * @param buffer + * the buffer with the content to dump * @param offset * first index to dump: 0..length-1 * @param length @@ -80,10 +82,11 @@ public class DynBytes { * Constructor. * * @param capacity - * the initial capacity of the buffer. If <= 0 it will be set to - * 16 + * the initial capacity of the buffer. If <= 0 it will be set + * to 16 * @param blocksize - * the initial blocksize. If <= 0 it will be set to 1 + * the initial blocksize. If lower or equal to 0 it will be set + * to 1 */ public DynBytes(int capacity, int blocksize) { if (capacity <= 0) { @@ -114,7 +117,7 @@ public class DynBytes { * the byte array to add * @param offset * the first index of buffer to add
- * 0 <= offset < buffer.length
+ * 0 <= offset < buffer.length
* If offset is out of range nothing will be done * @param length * the number of bytes to add
@@ -343,6 +346,8 @@ public class DynBytes { * the first index of the integer * @param width * the number of bytes of the integer + * @param defaultValue + * the return value if an error occurres, e.g. index error * @return the value of the integer stored as little endian */ public int intAsLittleEndian(int index, int width, int defaultValue) { @@ -367,6 +372,8 @@ public class DynBytes { * the first index of the integer * @param width * the number of bytes of the integer + * @param defaultValue + * the return value if an error occurres, e.g. index error * @return the value of the integer stored as little endian */ public long longAsLittleEndian(int index, int width, long defaultValue) { @@ -388,7 +395,7 @@ public class DynBytes { * Sets the blocksize. * * @param blocksize - * the new blocksize. Values < 1 will be set to 1 + * the new blocksize. Values < 1 will be set to 1 */ public void setBlocksize(int blocksize) { this.blocksize = blocksize; @@ -398,7 +405,7 @@ public class DynBytes { * Sets the current length. * * @param length - * < 0: the length is set to 0
+ * < 0: the length is set to 0
* otherwise: the new length * @return the instance (for chaining) */ diff --git a/src/main/java/de/republib/util/I18N.java b/src/main/java/de/republib/util/I18N.java index b8932ae..dd0bc8a 100644 --- a/src/main/java/de/republib/util/I18N.java +++ b/src/main/java/de/republib/util/I18N.java @@ -17,7 +17,7 @@ public class I18N { * text to translate * @return the translated text */ - public static String tr(final String key) { - return key; + public static String tr(final String text) { + return text; } } diff --git a/src/main/java/de/republib/util/PairData.java b/src/main/java/de/republib/util/PairData.java index e100aaf..c8bfa46 100644 --- a/src/main/java/de/republib/util/PairData.java +++ b/src/main/java/de/republib/util/PairData.java @@ -31,7 +31,9 @@ public class PairData { * * @param data * data to inspect - * @return the minimal of the y values + * @param minMax + * the buffer for the result + * @return minMax with the minimum and the maximum values */ public static DoublePair minMaxY(IPairData data, DoublePair minMax) { double min = data.getY(0); diff --git a/src/test/java/de/republib/expr/ExpressionTest.java b/src/test/java/de/republib/expr/ExpressionTest.java index 3ea94a1..38df10e 100644 --- a/src/test/java/de/republib/expr/ExpressionTest.java +++ b/src/test/java/de/republib/expr/ExpressionTest.java @@ -1,9 +1,14 @@ package de.republib.expr; import org.testng.Assert; +import org.testng.annotations.BeforeSuite; import org.testng.annotations.Test; public class ExpressionTest { + @BeforeSuite + public static void beforeSuite() { + System.out.println("Expression started"); + } @Test public void shouldConstruct() throws ParserException { diff --git a/src/test/java/de/republib/expr/ScannerTest.java b/src/test/java/de/republib/expr/ScannerTest.java index b2ab884..b040d84 100644 --- a/src/test/java/de/republib/expr/ScannerTest.java +++ b/src/test/java/de/republib/expr/ScannerTest.java @@ -1,9 +1,15 @@ package de.republib.expr; import org.testng.Assert; +import org.testng.annotations.BeforeSuite; import org.testng.annotations.Test; public class ScannerTest { + @BeforeSuite + public static void beforeSuite() { + System.out.println("Scanner started"); + } + @Test public void shouldConstruct() { final Scanner scanner = new Scanner(""); diff --git a/src/test/java/de/republib/expr/VariableTest.java b/src/test/java/de/republib/expr/VariableTest.java index 4702f8e..c528094 100644 --- a/src/test/java/de/republib/expr/VariableTest.java +++ b/src/test/java/de/republib/expr/VariableTest.java @@ -1,9 +1,14 @@ package de.republib.expr; import org.testng.Assert; +import org.testng.annotations.BeforeSuite; import org.testng.annotations.Test; public class VariableTest { + @BeforeSuite + public static void beforeSuite() { + System.out.println("Variable started"); + } @Test public void shouldAssign() { diff --git a/src/test/java/de/republib/expr/VariantTest.java b/src/test/java/de/republib/expr/VariantTest.java index 886bf91..15773d6 100644 --- a/src/test/java/de/republib/expr/VariantTest.java +++ b/src/test/java/de/republib/expr/VariantTest.java @@ -1,9 +1,15 @@ package de.republib.expr; import org.testng.Assert; +import org.testng.annotations.BeforeSuite; import org.testng.annotations.Test; public class VariantTest extends Variant { + @BeforeSuite + public static void beforeSuite() { + System.out.println("Variant started"); + } + VariantTest() { super("Test"); } @@ -238,6 +244,13 @@ public class VariantTest extends Variant { Assert.assertTrue(val1.isType(DataType.VARIABLE)); Assert.assertTrue(val1.getVariableValue().getValue().isType(DataType.VARIABLE)); Assert.assertTrue(val1.isBasicType(DataType.LONG)); + Assert.assertTrue(val1.lValue().isType(DataType.LONG)); + Assert.assertEquals(val1.lValue().getLongValue(), 44L); + // changing lvalue() does not change the variable value: + val1.lValue().redefineLong(77L); + // Test now the unchanged variable value: + Assert.assertTrue(val1.lValueImmutable().isBasicType(DataType.LONG)); + Assert.assertEquals(val1.lValueImmutable().getLongValue(), 44L); } @Test diff --git a/src/test/java/de/republib/gui/GuiUtilsTest.java b/src/test/java/de/republib/gui/GuiUtilsTest.java index 3fd8e21..23fa4be 100644 --- a/src/test/java/de/republib/gui/GuiUtilsTest.java +++ b/src/test/java/de/republib/gui/GuiUtilsTest.java @@ -3,10 +3,16 @@ package de.republib.gui; import javax.swing.JTextField; import org.testng.Assert; +import org.testng.annotations.BeforeSuite; import org.testng.annotations.Test; public class GuiUtilsTest { + @BeforeSuite + public static void beforeSuite() { + System.out.println("GuiUtils started"); + } + @Test public void numberOf() { final JTextField field = new JTextField(); diff --git a/src/test/java/de/republib/util/BytePairDataTest.java b/src/test/java/de/republib/util/BytePairDataTest.java index b547273..80d1075 100644 --- a/src/test/java/de/republib/util/BytePairDataTest.java +++ b/src/test/java/de/republib/util/BytePairDataTest.java @@ -3,6 +3,7 @@ package de.republib.util; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; +import org.testng.annotations.BeforeSuite; import org.testng.annotations.Test; /** @@ -14,6 +15,11 @@ import org.testng.annotations.Test; public class BytePairDataTest { static Logger logger = LoggerFactory.getLogger(BytePairDataTest.class); + @BeforeSuite + public static void beforeSuite() { + System.out.println("BytePairData started"); + } + @Test public void BytePairData() { for (int width = 1; width <= 8; width++) { diff --git a/src/test/java/de/republib/util/DynBytesTest.java b/src/test/java/de/republib/util/DynBytesTest.java index 01bb1d9..c183c2e 100644 --- a/src/test/java/de/republib/util/DynBytesTest.java +++ b/src/test/java/de/republib/util/DynBytesTest.java @@ -1,11 +1,17 @@ package de.republib.util; import org.testng.Assert; +import org.testng.annotations.BeforeSuite; /** * Tests the class DynBytes. */ public class DynBytesTest { + @BeforeSuite + public static void beforeSuite() { + System.out.println("DynBytes started"); + } + @org.testng.annotations.BeforeMethod public void setUp() throws Exception { diff --git a/src/test/java/de/republib/util/FunctionPairDataTest.java b/src/test/java/de/republib/util/FunctionPairDataTest.java index 3fc2b2c..9364914 100644 --- a/src/test/java/de/republib/util/FunctionPairDataTest.java +++ b/src/test/java/de/republib/util/FunctionPairDataTest.java @@ -1,9 +1,14 @@ package de.republib.util; import org.testng.Assert; +import org.testng.annotations.BeforeSuite; import org.testng.annotations.Test; public class FunctionPairDataTest { + @BeforeSuite + public static void beforeSuite() { + System.out.println("FunctionPairData started"); + } void checkFunctionCos() { final FunctionPairData data = new FunctionPairData(MathFunction.COS, 0.0, 4 * Math.PI / 4, 4); diff --git a/src/test/java/de/republib/util/PairDataTest.java b/src/test/java/de/republib/util/PairDataTest.java index 8a62a20..1df92ad 100644 --- a/src/test/java/de/republib/util/PairDataTest.java +++ b/src/test/java/de/republib/util/PairDataTest.java @@ -1,9 +1,14 @@ package de.republib.util; import org.testng.Assert; +import org.testng.annotations.BeforeSuite; import org.testng.annotations.Test; public class PairDataTest { + @BeforeSuite + public static void beforeSuite() { + System.out.println("PairData started"); + } @Test public void maxY() { diff --git a/src/test/java/de/republib/util/StringUtilsTest.java b/src/test/java/de/republib/util/StringUtilsTest.java index 88b0360..d67885e 100644 --- a/src/test/java/de/republib/util/StringUtilsTest.java +++ b/src/test/java/de/republib/util/StringUtilsTest.java @@ -1,9 +1,14 @@ package de.republib.util; import org.testng.Assert; +import org.testng.annotations.BeforeSuite; import org.testng.annotations.Test; public class StringUtilsTest { + @BeforeSuite + public static void beforeSuite() { + System.out.println("StringUtils started"); + } private void checkPrec1() { final double value = 1234567.77; -- 2.39.5