| Cutter Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
Assertion Utilities for GObjectAssertion Utilities for GObject — Utilities to write assertions related to GObject more easily. |
gboolean gcut_object_equal (const GObject *object1, const GObject *object2, GEqualFunc equal_func); gchar * gcut_object_inspect (const GObject *object); gchar * gcut_object_inspect_custom (const GObject *object, GCutInspectFunction inspect_func, gpointer user_data);
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 GObject.
gboolean gcut_object_equal (const GObject *object1, const GObject *object2, GEqualFunc equal_func);
Compares two GObject, object1 and object2 by
equal_func. If equal_func is NULL, object1 and
object2 is just only compared by memory location.
|
a GObject to be compared. |
|
a GObject to be compared. |
|
a function that compares two GObject. NULL is OK. |
Returns : |
TRUE if object1 == object2 or
equal_func(object1, object2), FALSE otherwise.
|
Since 1.0.5
gchar * gcut_object_inspect (const GObject *object);
Inspects object's property. The returned string should
be freed when no longer needed.
|
a GObject. |
Returns : |
inspected object as a string.
|
Since 1.0.5
gchar * gcut_object_inspect_custom (const GObject *object, GCutInspectFunction inspect_func, gpointer user_data);
Inspects object by inspect_func. The returned string
should be freed when no longer needed.
|
a GObject. |
|
a function that inspects object.
|
|
user data to pass to the function. |
Returns : |
inspected object as a string.
|
Since 1.0.5