Package org.protelis.test
Class InfrastructureTester
java.lang.Object
org.protelis.test.InfrastructureTester
Test protelis simulations.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classMatching results. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSkip this value while comparing results.static final doubleTolerance while comparing double values.static final intDefault runs.static final intCheck function stability for this number of steps. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidRun a test.static voidmultiRunTest(String file) Test the given file.static voidTest the given file.static voidTest the given file.static voidTest a given property.static voidTest a given property.
-
Field Details
-
DC
Skip this value while comparing results.- See Also:
-
DELTA
public static final double DELTATolerance while comparing double values.- See Also:
-
SIMULATION_STEPS
public static final int SIMULATION_STEPSDefault runs.- See Also:
-
STABILITY_STEPS
public static final int STABILITY_STEPSCheck function stability for this number of steps.- See Also:
-
-
Method Details
-
main
Run a test.- Parameters:
args- parameters- Throws:
IOException- file not found
-
multiRunTest
Test the given file.- Parameters:
file- file to be tested
-
runTest
Test the given file.- Parameters:
file- file to be tested
-
runTest
Test the given file.- Parameters:
file- file to be testedexampleRuns- number of runsstabilitySteps- check function stability for this number of steps
-
runTest
public static void runTest(String file, int simulationSteps, int stabilitySteps, Object expectedValue) Test a given property.- Parameters:
file- file to be testedsimulationSteps- number of runsstabilitySteps- check function stability for this number of stepsexpectedValue- value to be checked
-
runTest
Test a given property.- Parameters:
file- file to be testedexpectedValue- value to be checked
-