public class TestSupport
extends java.lang.Object
| Constructor and Description | 
|---|
| TestSupport() | 
| Modifier and Type | Method and Description | 
|---|---|
| static void | checkExceptions(java.lang.Exception eActual,
               java.lang.Exception eExpected)Checks to see if an actual exception equals an expected exception. | 
| static void | doassert(boolean expr,
        java.lang.String msg)Checks an assertion and throws a TestException if it fails. | 
| static boolean | epsilonEquals(double[] a1,
             double[] a2,
             double tol)Returns true if the double arrys a1 and a2 are equal within a presecribed
 tolerance, or if they are both null. | 
| static boolean | equals(boolean[] a1,
      boolean[] a2)Returns true if the boolean arrys a1 and a2 are equal, or if they are both
 null. | 
| static boolean | equals(java.util.Collection c1,
      java.util.Collection c2)Returns true if the contents of two collections are the same, or if they
 are both null. | 
| static boolean | equals(double[] a1,
      double[] a2)Returns true if the double arrys a1 and a2 are equal, or if they are both
 null. | 
| static boolean | equals(java.lang.Exception e1,
      java.lang.Exception e2)Returns true if two exceptions have the same class type and error message,
 or if they are both null. | 
| static boolean | equals(int[] a1,
      int[] a2)Returns true if the integer arrys a1 and a2 are equal, or if they are both
 null. | 
| static boolean | equals(java.lang.String s1,
      java.lang.String s2)Returns true if the Strings s1 and s2 are equal, or if they are both null. | 
| static java.lang.String | exceptionName(java.lang.Exception e)Returns a string giving the class name and message for a particular
 exception. | 
| static java.lang.String | toString(boolean[] a)Converts an array of booleans into a String | 
| static java.lang.String | toString(double[] a)Converts an array of doubles into a String | 
| static java.lang.String | toString(int[] a)Converts an array of integers into a String | 
public static void doassert(boolean expr,
                            java.lang.String msg)
public static boolean equals(boolean[] a1,
                             boolean[] a2)
a1 - first arraya2 - second arraypublic static boolean equals(int[] a1,
                             int[] a2)
a1 - first arraya2 - second arraypublic static boolean equals(double[] a1,
                             double[] a2)
a1 - first arraya2 - second arraypublic static boolean equals(java.lang.String s1,
                             java.lang.String s2)
s1 - first strings2 - second stringpublic static boolean epsilonEquals(double[] a1,
                                    double[] a2,
                                    double tol)
a1 - first arraya2 - second arraytol - tolerancepublic static boolean equals(java.lang.Exception e1,
                             java.lang.Exception e2)
e1 - first exceptione2 - second exceptionpublic static boolean equals(java.util.Collection c1,
                             java.util.Collection c2)
c1 - first collectionc2 - second collectionpublic static java.lang.String exceptionName(java.lang.Exception e)
public static void checkExceptions(java.lang.Exception eActual,
                                   java.lang.Exception eExpected)
                            throws TestException
eActual - exception that actually occurred.eExpected - exception that we are expecting.TestExceptionpublic static java.lang.String toString(boolean[] a)
a - boolean arraypublic static java.lang.String toString(int[] a)
a - integer arraypublic static java.lang.String toString(double[] a)
a - double array