Class Test


  • public final class Test
    extends Object

    Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
    BSD-style license. See OpenTrafficSim License.

    $LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Nov 9, 2015
    Author:
    Alexander Verbraeck, Peter Knoppers
    • Method Detail

      • checkAll

        public static String checkAll​(OTSLine3D reference,
                                      double offset)
        Apply all offset methods and check the results.
        Parameters:
        reference - OTSLine3D; reference line
        offset - double; the offset
        Returns:
        int; the number of failures
      • timeLimitedCheckOffsetLine

        public static String timeLimitedCheckOffsetLine​(OTSLine3D reference,
                                                        double offset,
                                                        OTSLine3D.OffsetMethod offsetMethod,
                                                        int timeLimitMillis)
        Parameters:
        reference - OTSLine3D; the reference line
        offset - double; the offset
        offsetMethod - OTSLine3D.OffsetMethod; the offset method
        timeLimitMillis - int; maximum running time in milliseconds
        Returns:
        String; empty string on success, description of the result on failure
      • checkOffsetLine

        public static boolean checkOffsetLine​(OTSLine3D referenceLine,
                                              double offset,
                                              OTSLine3D.OffsetMethod offsetMethod)
        Check the offsetLine method.
        Parameters:
        referenceLine - OTSLine3D; the reference line
        offset - double; the offset
        offsetMethod - OTSLine3D.OffsetMethod; the offset method
        Returns:
        boolean; false if the result is obviously wrong; true if the result (appears to be) fine