diff options
author | Philip Withnall <withnall@endlessm.com> | 2018-07-11 17:30:24 +0200 |
---|---|---|
committer | Philip Withnall <withnall@endlessm.com> | 2018-07-11 17:41:46 +0200 |
commit | ca23acdb24b568ed98257f1c462eb83ca527a205 (patch) | |
tree | d5fc4bf19c4a1de2b124dfad1a2324c38345e52a /glib/gmain.h | |
parent | 51ce8d204c62bdc67f7d6f5816b3192f43ac6175 (diff) | |
download | glib-ca23acdb24b568ed98257f1c462eb83ca527a205.tar.gz |
gtestutils: Bail out of g_test_init() if G_DISABLE_ASSERT is defined
If G_DISABLE_ASSERT is defined, g_assert() is a no-op. Despite it now
being standard practice to *not* use g_assert() in unit tests (use
g_assert_*() instead), a lot of existing unit tests still use it.
Compiling those tests with G_DISABLE_ASSERT would make them silently
no-ops. Avoid that by warning the user loudly.
Note that it’s pretty rare for people to compile with G_DISABLE_ASSERT,
so it’s not expected that this will be hit often.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/glib/issues/976
Diffstat (limited to 'glib/gmain.h')
0 files changed, 0 insertions, 0 deletions