mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 15:33:39 +02:00
Bug 553447 $(Q#|(B g_assert_no_error()
* glib/gtestutils.h (g_assert_no_error, g_assert_error): Macros to assert that a GError is not set, or else is set to a particular error. * glib/gtestutils.c (g_assertion_message_error): utility for those macros * glib/tests/keyfile.c: * tests/asyncqueue-test.c: * tests/bookmarkfile-test.c: * tests/convert-test.c: * tests/file-test.c: Use g_assert_error/g_assert_no_error svn path=/trunk/; revision=7555
This commit is contained in:
@@ -132,12 +132,12 @@ test_readlink (void)
|
||||
error = NULL;
|
||||
data = g_file_read_link (link3, &error);
|
||||
g_assert (data == NULL && "could read link3");
|
||||
g_assert (error != NULL && "error not set");
|
||||
g_assert_error (error, G_FILE_ERROR, G_FILE_ERROR_NOENT);
|
||||
|
||||
error = NULL;
|
||||
data = g_file_read_link (filename, &error);
|
||||
g_assert (data == NULL && "could read regular file as link");
|
||||
g_assert (error != NULL && "error not set");
|
||||
g_assert_error (error, G_FILE_ERROR, G_FILE_ERROR_INVAL);
|
||||
|
||||
remove (filename);
|
||||
remove (link1);
|
||||
|
Reference in New Issue
Block a user