jsync
Class Assert
java.lang.Object
jsync.Assert
- public class Assert
- extends java.lang.Object
Class for checking program invariants. Analog of C assert()
macro. As far as Java compiler doesn't provide information about compiled
file and line number, place of assertion failure can be located only
by analyzing stack trace of thrown AssertionFailed exception.
- See Also:
AssertionFailed
Method Summary |
static void |
that(boolean cond)
Check specified condition and raise AssertionFailed
exception if it is not true. |
static void |
that(java.lang.String description,
boolean cond)
Check specified condition and raise AssertionFailed
exception if it is not true. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Assert
public Assert()
that
public static final void that(boolean cond)
- Check specified condition and raise
AssertionFailed
exception if it is not true.
- Parameters:
cond
- result of checked condition
that
public static final void that(java.lang.String description,
boolean cond)
- Check specified condition and raise
AssertionFailed
exception if it is not true.
- Parameters:
description
- string describing checked conditioncond
- result of checked condition