Package org.protelis.test
Class InfrastructureTester
- java.lang.Object
-
- org.protelis.test.InfrastructureTester
-
public final class InfrastructureTester extends java.lang.Object
Test protelis simulations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InfrastructureTester.TestMatcher
Matching results.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DC
Skip this value while comparing results.static double
DELTA
Tolerance while comparing double values.static int
SIMULATION_STEPS
Default runs.static int
STABILITY_STEPS
Check function stability for this number of steps.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
Run a test.static void
multiRunTest(java.lang.String file)
Test the given file.static void
runTest(java.lang.String file)
Test the given file.static void
runTest(java.lang.String file, int exampleRuns, int stabilitySteps)
Test the given file.static void
runTest(java.lang.String file, int simulationSteps, int stabilitySteps, java.lang.Object expectedValue)
Test a given property.static void
runTest(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.IOException
Run 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
-
-