![]() |
![]() |
![]() |
Cutter Reference Manual | ![]() |
---|---|---|---|---|
Test Utilities with GLib supportTest Utilities with GLib support — Utilities to write tests more easily with GLib support. |
#define gcut_take_object (object) #define gcut_take_error (error) #define gcut_take_list (list, destroy_function) GList* gcut_list_string_new (const gchar *value, ...); void gcut_list_string_free (GList *list);
To write tests, you need to write codes that set up/tear down test environment, prepare expected and actual values and so on. Cutter provides test utilities to you write your tests more easily.
The utilities work with GLib.
#define gcut_take_object(object)
Passes ownership of object
to Cutter and returns object
.
|
the GObject * to be owned by Cutter. |
Since 1.0.3
#define gcut_take_error(error)
Passes ownership of error
to Cutter and returns
a GError * that has same contents of error
.
|
the GError * to be owned by Cutter. |
Since 1.0.3
#define gcut_take_list(list, destroy_function)
Passes ownership of list
to Cutter and returns
a GList * that has same elements of list
.
|
the GList * to be owned by Cutter. |
|
the destroy function (CutDestroyFunction) that
destroys the elements of list , or NULL.
|
Since 1.0.3
GList* gcut_list_string_new (const gchar *value, ...);
Creates a list from passed strings.
|
the first string. |
|
remaining strings in list, terminated by NULL. |
Returns : |
a newly-allocated GList * that contains passed
strings and must be freed with gcut_list_string_free() .
|
Since 1.0.3
void gcut_list_string_free (GList *list);
Frees list
and contained strings.
|
the list that contains strings to be freed. |
Since 1.0.3