Assertion Utilities for GError

Assertion Utilities for GError — Utilities to write assertions related to GError more easily.

Synopsis

gboolean            gcut_error_equal                    (const GError *error1,
                                                         const GError *error2);
gchar *             gcut_error_inspect                  (const GError *error);

Description

To write assertions, you need to check equality and show expected and actual values.

The utilities help you to write assertions that are related to GError.

Details

gcut_error_equal ()

gboolean            gcut_error_equal                    (const GError *error1,
                                                         const GError *error2);

Compares two GError, error1 and error2.

error1 :

a GError to be compared.

error2 :

a GError to be compared.

Returns :

TRUE if both of error1 and error2 have the same domain, code and message, FALSE otherwise.

Since 1.0.5


gcut_error_inspect ()

gchar *             gcut_error_inspect                  (const GError *error);

Inspects error. The returned string should be freed when no longer needed.

error :

a GError value.

Returns :

inspected error as a string.

Since 1.0.5