Enabling Assertions in jGrasp:

To enable assertions in jGrasp:

To verify that assertion testing is turned on, try running the AssertTest program. It should abort due to an AssertionError. If it does not, it means that assertion testing has not been turned on.


Note: In the less likely event that you are running a Java program from the command line (using the java command), to enable assertions you need to include the -ea (or the more verbose -enableassertions) option. For example, if you were running a program named Multiply you would enter

java -ea Multiply

End of note.