GNOME Bugzilla – Bug 749035
use g_assert() instead of g_assert_cmpint() in src/ and libide/
Last modified: 2015-05-07 09:00:08 UTC
g_assert_cmpint() does not get compiled out when G_DISABLE_ASSERT is defined, as it is part of the unit testing framework. We need to use g_assert() in src/ and libide/ directories as we want all assertions to compile out in optimized builds. `git grep g_assert_cmpint` should help you find all the locations. Possibly check for g_assert_cmpstr() too, there may be a few floating around.
What about tests and egg folder?Those should be done to?
Created attachment 303012 [details] [review] Replace g_assert_cmpint and g_assert_cmpstr with g_assert I replaced the two functions with g_assert also in egg and test folder.
Review of attachment 303012 [details] [review]: First part looks good. We do want to continue using g_assert_cmpint() inside of tests/ though. (It has g_print() helpers to see what the failed value which is useful when running unit tests).
Created attachment 303015 [details] [review] Replace g_assert_cmpint and g_assert_cmpstr with g_assert Added a new patch that removed the tests/ changes
LGTM, Thanks! Attachment 303015 [details] pushed as 43fc972 - Replace g_assert_cmpint and g_assert_cmpstr with g_assert