Class InfrastructureTester


  • public final class InfrastructureTester
    extends java.lang.Object
    Test protelis simulations.
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 bested
        exampleRuns - number of runs
        stabilitySteps - 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 bested
        simulationSteps - number of runs
        stabilitySteps - check function stability for this number of steps
        expectedValue - 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 bested
        expectedValue - value to be checked