Assertions in design by contract: Difference between revisions
m
→{{header|Wren}}: Minor tidy
(→{{header|jq}}: library) |
m (→{{header|Wren}}: Minor tidy) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 345:
=={{header|jq}}==
{{libheader|Jq/assert.jq}}
{{works with|jq}}
Line 357:
In the following, it is assumed the "debug" mode of assertion checking has been used, e.g.
via the invocation: jq --arg assert debug
This mode allows execution to continue after an assertion violation has been detected.
<syntaxhighlight lang="jq">
include "rc-assert" {search: "."}; # or use the -L command-line option
Line 825 ⟶ 827:
{{libheader|Wren-assert}}
Wren doesn't support assertions natively though they (and design by contract) can be simulated using a library.
<syntaxhighlight lang="
import "./math" for Nums
// Assert.disabled = true
|