Assertion (software development): Difference between revisions

Content deleted Content added
m Ok
Tags: Visual edit Mobile edit Mobile web edit
m Reverted edits by Faiingay1999 (talk): editing tests (HG) (3.4.9)
Line 1:
{{About|the computer programming concept ok|assertions in the context of the [[Security Assertion Markup Language]] (SAML) open standard|Security Assertion Markup Language#Assertions}}
 
In [[computer programming]], specifically when using the [[imperative programming]] paradigm, an '''assertion''' is a [[Predicate (mathematical logic)|predicate]] (a [[Boolean-valued function]] over the [[state space]], usually expressed as a [[logical proposition]] using the [[variable (programming)|variable]]s of a program) connected to a point in the program, that always should evaluate to true at that point in code execution. Assertions can help a programmer read the code, help a compiler compile it, or help the program detect its own defects.