An assertion is a way of checking what you think should be true at a program point is true at that point. The syntax for an assertion comes in two forms (with and without a message):
assert boolean_condtion; assert boolean_condition : string_message_to_print;
Assertions can, for example, be used to check pre-conditions during development of code, e.g: