public class TestUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) static boolean |
debug |
Constructor and Description |
---|
TestUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
setAllLogs(AbstractGenerator generator)
Use system properties to set command-line arguments for logging.
|
static void |
setOperationLog(AbstractGenerator generator)
If the system property
randoop.operation.history.log is set, sets the operation history
logger for the generator using the destination given by the property. |
static void |
setOperationLog(java.io.PrintWriter pw,
AbstractGenerator generator)
If the PrintWriter is non-null, sets the operation history logger for the generator using it.
|
static void |
setOperationLog(@Nullable java.lang.String filename,
AbstractGenerator generator)
If the filename is non-null, sets the operation history logger for the generator using it.
|
static void |
setRandoopLog()
Uses the system property
randoop.log to set GenInputsAbstract.log . |
static void |
setRandoopLog(@Nullable java.lang.String filename)
Uses the argument to set
GenInputsAbstract.log . |
static void |
setSelectionLog()
Uses the system property
randoop.selection.log to set GenInputsAbstract.selection_log . |
static void |
setSelectionLog(org.plumelib.util.FileWriterWithName fw)
Uses the argument to set
GenInputsAbstract.selection_log . |
static void |
setSelectionLog(@Nullable java.lang.String filename)
Uses the argument to set
GenInputsAbstract.selection_log . |
public static void setAllLogs(AbstractGenerator generator)
This has no effect unless tests are run with gradle command-line options such as
-Drandoop.log=randoop-log.txt -Drandoop.selection.log=selection-log.txt -Drandoop.operation.history.log=operation-log.txt
generator
- the AbstractGenerator in which to set the operation logpublic static void setRandoopLog()
randoop.log
to set GenInputsAbstract.log
.public static void setRandoopLog(@Nullable java.lang.String filename)
GenInputsAbstract.log
.filename
- the file to write the log to; does nothing if filename is nullpublic static void setSelectionLog()
randoop.selection.log
to set GenInputsAbstract.selection_log
.public static void setSelectionLog(@Nullable java.lang.String filename)
GenInputsAbstract.selection_log
.filename
- the file to write the log to; does nothing if filename is nullpublic static void setSelectionLog(org.plumelib.util.FileWriterWithName fw)
GenInputsAbstract.selection_log
.fw
- the FileWriter to write the log to; does nothing if fw is nullpublic static void setOperationLog(AbstractGenerator generator)
randoop.operation.history.log
is set, sets the operation history
logger for the generator using the destination given by the property.generator
- the generator for which logger is to be setpublic static void setOperationLog(@Nullable java.lang.String filename, AbstractGenerator generator)
filename
- the file to write the log to; does nothing if filename is nullgenerator
- the generator for which logger is to be setpublic static void setOperationLog(java.io.PrintWriter pw, AbstractGenerator generator)
pw
- the PrintWriter to write the log to; does nothing if pw is nullgenerator
- the generator for which logger is to be set