# assert {#assert}

**Parent topic:**[Programming Statements](../../Programming/ProgrammingStatements/programming_statements.md)

## Syntax {#syntax}

assert &lt;expr&gt;

or

assert &lt;subCase&gt;, &lt;expr&gt;

## Arguments {#arguments}

**subCase** is a string. It can be specified without quotes.

**expr** is a Boolean value or expression.

## Details {#details}

Mainly used for unit testing. It prints testing result only if the testing case fails.

## Examples {#examples}

```
@testing: case = "inner product"
// output: assert [1,2,3]**[4,5,6]==32;

assert [1,2,3]**[4,5,6]==33;
// output: Testing case inner product failed

assert 1==2;
// output: Testing case adhocTesting failed

@testing: case = "equal"
/* output
assert "one", 1==2
assert "two", 3==4
*/
```

