gtestutils: Clarify that g_assert() should not have side effects

g_assert() gets completely compiled out if G_DISABLE_ASSERT is defined,
so applications should not depend on side effects of the expression in
an assertion.
This commit is contained in:
Philip Withnall 2016-11-09 16:52:21 +00:00
parent 4607bd377f
commit 3f12ca57c4

View File

@ -380,7 +380,8 @@
* an error message is logged and the application is terminated.
*
* The macro can be turned off in final releases of code by defining
* `G_DISABLE_ASSERT` when compiling the application.
* `G_DISABLE_ASSERT` when compiling the application, so code must
* not depend on any side effects from @expr.
*/
/**