Jump to content

Assertion (software development)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by TakuyaMurata (talk | contribs) at 02:19, 26 May 2003 (stub). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

In computer programming, assert is a function that tells if something wrong at that moment.

It is used to check things like if arguments are correct or if states in objects are consistent. In practice, the execution of a computer programs continues if there is such problem. It is usually hard to figure out problems whose cause is rooted from the point at which the execution ended. Assert can be used to terminate the program as soon as such problems arise.