rcx.josx.util
Class Assertion
java.lang.Object
   rcx.josx.util.Assertion
rcx.josx.util.Assertion
- public class Assertion 
- extends java.lang.Object
Class used in debugging to test assertions. Implementation
 is platform dependent. For example the unix_impl version
 will print the string and throw an error if an assertion fails.
 The rcx_impl version will only throw an error.
- Author:
- Paul Andrews
 
| Method Summary | 
| static void | test(java.lang.String s,
     boolean flag)
 | 
| static void | testEQ(java.lang.String s,
       int expected,
       int was)If the actual value is not equal to the expected value, throw an Error.
 | 
 
| Methods inherited from class java.lang.Object | 
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
Assertion
public Assertion()
test
public static void test(java.lang.String s,
                        boolean flag)
- 
- Parameters:
- s- A string that may be printed along with any other
          error text.
- flag- if true then an Error will be thrown, otherwise
             nothing will happend.
- Throws:
- java.lang.Error- if 'flag' is false.
 
testEQ
public static void testEQ(java.lang.String s,
                          int expected,
                          int was)
- If the actual value is not equal to the expected value, throw an Error.
 
- 
- Parameters:
- s- A string that may be printed along with any other
          error text.
- expected- the expected value.
- was- the actual value.
- Throws:
- java.lang.Error- if 'flag' is false.