gtestutils: fix g_test_set_nonfatal_assertions()
authorDan Winship <danw@gnome.org>
Sun, 10 Nov 2013 20:44:06 +0000 (15:44 -0500)
committerDan Winship <danw@gnome.org>
Sun, 24 Nov 2013 19:59:51 +0000 (14:59 -0500)
commitf4c30feb9598e09d1d32805bad96e216c1a21786
tree0b8dcee7f10ac87659dd4fef4609a894715b6e4f
parent910191597a6c2e5d5d460e9ce9efb4f47d9cc63c
gtestutils: fix g_test_set_nonfatal_assertions()

g_test_set_nonfatal_assertions() was a no-op, because
g_assertion_message() wasn't actually checking the
test_nonfatal_assertions flag. Fix that and add a test.

Also, g_test_set_nonfatal_assertions() has to set test_mode_fatal to
FALSE as well, or else a failed assertion will cause the test program
to abort at the end of the failed test.

Also, belatedly add this and the new g_assert_* methods to the docs.

https://bugzilla.gnome.org/show_bug.cgi?id=711800
docs/reference/glib/glib-sections.txt
glib/gtestutils.c
glib/tests/testing.c