Package org.protelis.test
Class InfrastructureTester
- java.lang.Object
-
- org.protelis.test.InfrastructureTester
-
public final class InfrastructureTester extends java.lang.ObjectTest protelis simulations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInfrastructureTester.TestMatcherMatching results.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDCSkip this value while comparing results.static doubleDELTATolerance while comparing double values.static intSIMULATION_STEPSDefault runs.static intSTABILITY_STEPSCheck function stability for this number of steps.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmain(java.lang.String[] args)Run a test.static voidmultiRunTest(java.lang.String file)Test the given file.static voidrunTest(java.lang.String file)Test the given file.static voidrunTest(java.lang.String file, int exampleRuns, int stabilitySteps)Test the given file.static voidrunTest(java.lang.String file, int simulationSteps, int stabilitySteps, java.lang.Object expectedValue)Test a given property.static voidrunTest(java.lang.String file, java.lang.Object expectedValue)Test a given property.
-
-
-
Field Detail
-
DC
public static final java.lang.String DC
Skip this value while comparing results.- See Also:
- Constant Field Values
-
DELTA
public static final double DELTA
Tolerance while comparing double values.- See Also:
- Constant Field Values
-
SIMULATION_STEPS
public static final int SIMULATION_STEPS
Default runs.- See Also:
- Constant Field Values
-
STABILITY_STEPS
public static final int STABILITY_STEPS
Check function stability for this number of steps.- See Also:
- Constant Field Values
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.io.IOExceptionRun a test.- Parameters:
args- parameters- Throws:
java.io.IOException- file not found
-
multiRunTest
public static void multiRunTest(java.lang.String file)
Test the given file.- Parameters:
file- file to bested
-
runTest
public static void runTest(java.lang.String file)
Test the given file.- Parameters:
file- file to bested
-
runTest
public static void runTest(java.lang.String file, int exampleRuns, int stabilitySteps)Test the given file.- Parameters:
file- file to bestedexampleRuns- number of runsstabilitySteps- check function stability for this number of steps
-
runTest
public static void runTest(java.lang.String file, int simulationSteps, int stabilitySteps, java.lang.Object expectedValue)Test a given property.- Parameters:
file- file to bestedsimulationSteps- number of runsstabilitySteps- check function stability for this number of stepsexpectedValue- value to be checked
-
runTest
public static void runTest(java.lang.String file, java.lang.Object expectedValue)Test a given property.- Parameters:
file- file to bestedexpectedValue- value to be checked
-
-