public class TestSet
extends java.lang.Object
TestSetWrapper
provides a number of methods for this conversion.| Modifier and Type | Field and Description |
|---|---|
static int |
DONT_CARE
uninitialized value or values that do not affect the test
|
static java.lang.String |
DONT_CARE_STRING
string that indicates don't care values
|
static int |
INVALID_VALUES_STARTINDEX |
java.util.Map<java.lang.Integer,java.lang.Integer> |
mapOfnumberOfCoveredCombos |
int |
numberOfCoveredCombos |
| Constructor and Description |
|---|
TestSet()
Creates a new
TestSet instance. |
TestSet(java.util.ArrayList<Parameter> params)
Creates a test set with a list of (input) parameters.
|
TestSet(java.util.ArrayList<Parameter> params,
java.util.ArrayList<Parameter> outputParams)
Creates a test set with a list of input parameters and a list
of output parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMatrix(java.util.ArrayList<int[]> matrix)
Adds an existing matrix into this test set.
|
void |
addNewTest(int[] tuple) |
void |
addNewTest(edu.uta.cse.fireeye.service.engine.Tuple tuple)
Add a new test to cover a given tuple.
|
void |
addTest(int[] test)
Adds a new test into this test set.
|
int[] |
clone(int row)
Makes a deep copy of a test (or row).
|
boolean |
containsOutputParam(Parameter outputParam)
Checks if a given output parameter is contained in this test set.
|
boolean |
containsParam(Parameter param)
Checks if a given (input) parameter is contained in this test set.
|
void |
cover(int row,
int[] tuple) |
void |
cover(int row,
edu.uta.cse.fireeye.service.engine.Tuple tuple)
Change an existing test to cover a tuple.
|
int |
getColumnID(int paramID)
Return the column ID of a given (input) parameter.
|
int |
getExistingCols() |
int |
getExistingRows() |
float |
getGenerationTime()
Gets the time taken to generate this test set.
|
java.util.ArrayList<int[]> |
getMatrix()
Gets the test matrix of this test set.
|
java.lang.Boolean |
getNeedConstraintCheck(int row)
get constraint check tag.
|
int |
getNumOfParams()
Gets the number of parameters in this test set.
|
int |
getNumOfTests()
Get the number of tests in this test set.
|
int |
getOutputParamColumnID(int outputParamID)
Returns the column ID of a given output parameter.
|
java.util.ArrayList<Parameter> |
getOutputParams()
Gets the list of output parameters.
|
Parameter |
getParam(int index)
Gets a parameter with a given index.
|
java.util.ArrayList<Parameter> |
getParams()
Get the parameters in this test set.
|
java.util.ArrayList<java.lang.Integer> |
getStrikethroughRowIndices() |
int[] |
getTest(int row)
Gets a test with a given row index in this test set.
|
int |
getValue(int row,
int column)
Gets a value in this test set.
|
boolean |
isCompatible(int[] row1,
int[] row2)
Checks whether two rows (tests) are compatible.
|
boolean |
isCompatible(int row,
edu.uta.cse.fireeye.service.engine.Tuple tuple)
Checks whether a tuple can be covered by an existing test.
|
int[] |
makeCompatibleTest(int row,
int[] test,
java.util.ArrayList<java.lang.Integer> changedCols) |
void |
setExistingCols(int existingCols) |
void |
setExistingRows(int existingRows) |
void |
setGenerationTime(float generationTime)
Sets the time taken to generate this test set.
|
void |
setMatrix(java.util.ArrayList<int[]> matrix)
Sets the test matrix of this test set.
|
void |
setNeedConstraintCheck(int row,
java.lang.Boolean need) |
void |
setOutputParams(java.util.ArrayList<Parameter> outputParams)
Sets the list of output parameters.
|
void |
setParams(java.util.ArrayList<Parameter> params)
Set the parameters for this test set.
|
void |
setStrikethroughRowIndices(java.util.ArrayList<java.lang.Integer> strikethroughRowIndices) |
void |
setValue(int row,
int column,
int value)
Sets a value in this test set.
|
java.lang.String |
toString()
Returns a string representation of this test set.
|
public static final int DONT_CARE
public static final java.lang.String DONT_CARE_STRING
public static final int INVALID_VALUES_STARTINDEX
public int numberOfCoveredCombos
public java.util.Map<java.lang.Integer,java.lang.Integer> mapOfnumberOfCoveredCombos
public TestSet()
TestSet instance.public TestSet(java.util.ArrayList<Parameter> params)
params - a list of parameterspublic int getExistingRows()
public void setExistingRows(int existingRows)
public int getExistingCols()
public void setExistingCols(int existingCols)
public void setParams(java.util.ArrayList<Parameter> params)
params - a list of parameterspublic java.util.ArrayList<Parameter> getParams()
public int getNumOfParams()
public Parameter getParam(int index)
index - the parameter indexpublic boolean containsParam(Parameter param)
param - the given parameterpublic boolean containsOutputParam(Parameter outputParam)
outputParam - the given parameterpublic int getColumnID(int paramID)
paramID - the ID of the given parameterpublic int getOutputParamColumnID(int outputParamID)
outputParamID - the ID of the given parameterpublic void addMatrix(java.util.ArrayList<int[]> matrix)
matrix - an existing test matrixpublic java.util.ArrayList<int[]> getMatrix()
public void setMatrix(java.util.ArrayList<int[]> matrix)
matrix - the test matrix to be setpublic int[] getTest(int row)
row - the row indexpublic int getNumOfTests()
public int getValue(int row,
int column)
row - the row indexcolumn - the column indexpublic void setValue(int row,
int column,
int value)
row - the row indexcolumn - the column indexvalue - the value to be setpublic boolean isCompatible(int row,
edu.uta.cse.fireeye.service.engine.Tuple tuple)
row - the row indextuple - the tupletrue if the tuple can be coveredpublic int[] makeCompatibleTest(int row,
int[] test,
java.util.ArrayList<java.lang.Integer> changedCols)
public boolean isCompatible(int[] row1,
int[] row2)
row1 - a row in this test setrow2 - a row in this test setpublic void cover(int row,
edu.uta.cse.fireeye.service.engine.Tuple tuple)
row - the row index of the existing testtuple - the tuple to be coveredpublic void cover(int row,
int[] tuple)
public void addNewTest(edu.uta.cse.fireeye.service.engine.Tuple tuple)
tuple - the tuple to be covered.public void addNewTest(int[] tuple)
public void addTest(int[] test)
test - public float getGenerationTime()
public void setGenerationTime(float generationTime)
generationTime - the time taken to generat this test set.public int[] clone(int row)
row - the row index of the test to be copied.public java.util.ArrayList<Parameter> getOutputParams()
public void setOutputParams(java.util.ArrayList<Parameter> outputParams)
outputParams - a list of output parameterspublic java.lang.Boolean getNeedConstraintCheck(int row)
row - numberpublic void setNeedConstraintCheck(int row,
java.lang.Boolean need)
public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.ArrayList<java.lang.Integer> getStrikethroughRowIndices()
public void setStrikethroughRowIndices(java.util.ArrayList<java.lang.Integer> strikethroughRowIndices)