posted 21 years ago
assert is a keyword. It evaluates a boolean expression. if the expression is true, nothing happens. If it is false, an AssertionError is thrown at the point where the assert statement fails.
example:
assert (myVar == 1) ; //if the variable "myVar" does not contain the int value '1', then an AssertionError is thrown.