mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
2007-12-10 15:08:59 Tim Janik <timj@imendio.com> * let g_warn_if_fail replace g_assert as discussed here: http://mail.gnome.org/archives/gtk-devel-list/2007-October/msg00089.html * fix bug #502498: Test framework assertion failures should follow gcc error format. * gmessages.h, gmessages.c: deprecated g_assert_warning() which is unused now. removed g_assert*() definitions whcih are provided by gtestutils.h now. added g_warn_if_reached() and g_warn_if_fail() which are recommended as g_assert/g_assert_not_reached replacements for non-test programs. added g_warn_message() to implement g_warn_*() macros. use emacs-next-error friendly formatting for file:line: for warnings. * gtestutils.h, gtestutils.c: use emacs-next-error friendly formatting. implement g_assert_not_reached() with g_assertion_message() and g_assert() in terms of g_assertion_message_expr() so we'll be able to provide assertion messages in test logs. * gkeyfile.c, gbookmarkfile.c: changed g_assert*() to g_warn_if_fail() or g_return_if_fail() where suitable. * gio/: changed g_assert to g_warn_if_fail. svn path=/trunk/; revision=6086
This commit is contained in:
committed by
Tim Janik
parent
0dbfa89ba1
commit
cc3de68e21
@@ -354,7 +354,7 @@ g_unix_input_stream_read_finish (GInputStream *stream,
|
||||
gssize nread;
|
||||
|
||||
simple = G_SIMPLE_ASYNC_RESULT (result);
|
||||
g_assert (g_simple_async_result_get_source_tag (simple) == g_unix_input_stream_read_async);
|
||||
g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == g_unix_input_stream_read_async);
|
||||
|
||||
nread = g_simple_async_result_get_op_res_gssize (simple);
|
||||
return nread;
|
||||
@@ -368,7 +368,7 @@ g_unix_input_stream_skip_async (GInputStream *stream,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer data)
|
||||
{
|
||||
g_assert_not_reached ();
|
||||
g_warn_if_reached ();
|
||||
/* TODO: Not implemented */
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ g_unix_input_stream_skip_finish (GInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
{
|
||||
g_assert_not_reached ();
|
||||
g_warn_if_reached ();
|
||||
/* TODO: Not implemented */
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user