![]() |
![]() |
![]() |
Cutter Reference Manual | ![]() |
---|---|---|---|---|
Assertion Utilities for GListAssertion Utilities for GList — Utilities to write assertions related to GList more easily. |
gboolean gcut_list_equal (const GList *list1, const GList *list2, GEqualFunc equal_func); gchar* gcut_list_inspect (const GList *list, GCutInspectFunc inspect_func, gpointer user_data); gboolean gcut_list_int_equal (const GList *list1, const GList *list2); gchar* gcut_list_int_inspect (const GList *list); gboolean gcut_list_uint_equal (const GList *list1, const GList *list2); gchar* gcut_list_uint_inspect (const GList *list); gboolean gcut_list_string_equal (const GList *list1, const GList *list2); gchar* gcut_list_string_inspect (const GList *list); gchar* gcut_list_object_inspect (const GList *list); gchar* gcut_list_enum_inspect (const GList *list, GType type); gchar* gcut_list_flags_inspect (const GList *list, GType type);
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 GList.
gboolean gcut_list_equal (const GList *list1, const GList *list2, GEqualFunc equal_func);
Compares two GList, list1
and list2
. equal_func
is
called for each corresponding values of list1
and list2
.
e.g.:
TODO
|
a GList to be compared. |
|
a GList to be compared. |
|
a function that compares two values. |
Returns : |
TRUE if all corresponding values of list1 and
list2 are reported TRUE by equal_func , FALSE otherwise.
|
Since 1.0.5
gchar* gcut_list_inspect (const GList *list, GCutInspectFunc inspect_func, gpointer user_data);
Inspects list
. Each value of list
is inspected by
inspect_func
. The returned string should be freed when
no longer needed.
e.g.:
TODO
|
a GList to be inspected. |
|
a function that inspects each value. |
|
user data to pass to the function. |
Returns : |
inspected list as a string.
|
Since 1.0.5
gboolean gcut_list_int_equal (const GList *list1, const GList *list2);
Compares two GList, list1
and list2
. list1
and list2
should be GList of gint.
|
a GList of gint to be compared. |
|
a GList of gint to be compared. |
Returns : |
TRUE if all corresponding integers of list1 and
list2 are same value, FALSE otherwise.
|
Since 1.0.5
gchar* gcut_list_int_inspect (const GList *list);
Inspects list
. list
should be GList of gint. The
returned string should be freed when no longer needed.
|
a GList of gint to be inspected. |
Returns : |
inspected list as a string.
|
Since 1.0.5
gboolean gcut_list_uint_equal (const GList *list1, const GList *list2);
Compares two GList, list1
and list2
. list1
and list2
should be GList of guint.
|
a GList of guint to be compared. |
|
a GList of guint to be compared. |
Returns : |
TRUE if all corresponding unsigned integers of
list1 and list2 are same value, FALSE otherwise.
|
Since 1.0.5
gchar* gcut_list_uint_inspect (const GList *list);
Inspects list
. list
should be GList of guint. The
returned string should be freed when no longer needed.
|
a GList of guint to be inspected. |
Returns : |
inspected list as a string.
|
Since 1.0.5
gboolean gcut_list_string_equal (const GList *list1, const GList *list2);
Compares two GList, list1
and list2
. list1
and list2
should be GList of string.
|
a GList of string to be compared. |
|
a GList of string to be compared. |
Returns : |
TRUE if all corresponding string of list1 and
list2 are same content string, FALSE otherwise.
|
Since 1.0.5
gchar* gcut_list_string_inspect (const GList *list);
Inspects list
. list
should be GList of string. The
returned string should be freed when no longer needed.
|
a GList of string to be inspected. |
Returns : |
inspected list as a string.
|
Since 1.0.5
gchar* gcut_list_object_inspect (const GList *list);
Inspects list
. list
should be GList of GObject. The
returned string should be freed when no longer needed.
|
a GList of GObject to be inspected. |
Returns : |
inspected list as a string.
|
Since 1.0.5
gchar* gcut_list_enum_inspect (const GList *list, GType type);
Inspects list
. list
should be GList of enum value of
GEnum. The returned string should be freed when no
longer needed.
|
a GList of enum value to be inspected. |
|
a GEnum type. |
Returns : |
inspected list as a string.
|
Since 1.0.5
gchar* gcut_list_flags_inspect (const GList *list, GType type);
Inspects list
. list
should be GList of flags value of
GFlags. The returned string should be freed when no
longer needed.
|
a GList of flags value to be inspected. |
|
a GFlags type. |
Returns : |
inspected list as a string.
|
Since 1.0.5