Skip to content

Commit 552654f

Browse files
committed
docs: fix inline code example
1 parent 5e60aed commit 552654f

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,13 @@ Key Features
1717
a unit-test and returning `1` or `0` depending on whether any assert has been triggered
1818
- **Extra** assertion variants to support checking condition directly in `if` statement :
1919
```c
20-
TTA_ASSERT_IF_MSG(0 != x /* assert triggers if (0 == x) */, "Expected 0 != x") { /* do something if 0 != x */ }
21-
TTA_ASSERT_IF(0 != x /* assert triggers if (0 == x) */) { /* do something if 0 != x */ }
20+
TTA_ASSERT_IF_MSG(0 != x /* assert triggers if (0 == x) */, "Expected 0 != x")
21+
{
22+
/* do something if 0 != x */
23+
}
24+
TTA_ASSERT_IF(0 != x /* assert triggers if (0 == x) */)
25+
{
26+
/* do something if 0 != x */
2227
}
2328
```
2429
- **Extra** assertion variants for use as a replacement for `if (!condition) { Report(...); return retval; }`

0 commit comments

Comments
 (0)