previous
|
start
|
next
Assertions
Mechanism for warning programmers
Can be turned off after testing
Useful for warning programmers about precondition failure
Syntax:
assert
condition
;
assert
condition
:
explanation
;
Throws
AssertionError
if condition false and checking enabled
previous
|
start
|
next