Assertions with GLib support

Assertions with GLib support — Checks that your program works as you expect with GLib support.

Synopsis

#define             gcut_assert_equal_type              (expected, actual, ...)
#define             cut_assert_equal_g_type             (expected, actual, ...)
#define             gcut_assert_equal_value             (expected, actual, ...)
#define             cut_assert_equal_g_value            (expected, actual, ...)
#define             gcut_assert_equal_list_int          (expected, actual, ...)
#define             cut_assert_equal_g_list_int         (expected, actual, ...)
#define             gcut_assert_equal_list_uint         (expected, actual, ...)
#define             gcut_assert_equal_list_string       (expected, actual, ...)
#define             cut_assert_equal_g_list_string      (expected, actual, ...)
#define             gcut_assert_error                   (error, ...)
#define             cut_assert_g_error                  (error, ...)
#define             gcut_assert_remove_path             (path, ...)
#define             cut_assert_remove_path              (path, ...)

Description

Details

gcut_assert_equal_type()

#define             gcut_assert_equal_type(expected, actual, ...)

Passes if expected == actual.

expected :

an expected GType.

actual :

an actual GType.

... :

optional format string, followed by parameters to insert into the format string (as with printf())

Since 1.0.3


cut_assert_equal_g_type()

#define             cut_assert_equal_g_type(expected, actual, ...)

Warning

cut_assert_equal_g_type has been deprecated since version 1.0.3 and should not be used in newly-written code. Use gcut_assert_equal_type() instead.

Passes if expected == actual.

expected :

an expected GType.

actual :

an actual GType.

... :

optional format string, followed by parameters to insert into the format string (as with printf())

gcut_assert_equal_value()

#define             gcut_assert_equal_value(expected, actual, ...)

Passes if expected == actual.

expected :

an expected GValue *.

actual :

an actual GValue *.

... :

optional format string, followed by parameters to insert into the format string (as with printf())

Since 1.0.3


cut_assert_equal_g_value()

#define             cut_assert_equal_g_value(expected, actual, ...)

Warning

cut_assert_equal_g_value has been deprecated since version 1.0.3 and should not be used in newly-written code. Use gcut_assert_equal_value() instead.

Passes if expected == actual.

expected :

an expected GValue *.

actual :

an actual GValue *.

... :

optional format string, followed by parameters to insert into the format string (as with printf())

gcut_assert_equal_list_int()

#define             gcut_assert_equal_list_int(expected, actual, ...)

Passes if expected == actual.

expected :

an expected GList * of integer.

actual :

an actual GList * of integer.

... :

optional format string, followed by parameters to insert into the format string (as with printf())

Since 1.0.3


cut_assert_equal_g_list_int()

#define             cut_assert_equal_g_list_int(expected, actual, ...)

Warning

cut_assert_equal_g_list_int has been deprecated since version 1.0.3 and should not be used in newly-written code. Use gcut_assert_equal_list_int() instead.

Passes if expected == actual.

expected :

an expected GList * of integer.

actual :

an actual GList * of integer.

... :

optional format string, followed by parameters to insert into the format string (as with printf())

Since 0.8


gcut_assert_equal_list_uint()

#define             gcut_assert_equal_list_uint(expected, actual, ...)

Passes if expected == actual.

expected :

an expected GList * of unsigned integer.

actual :

an actual GList * of unsigned integer.

... :

optional format string, followed by parameters to insert into the format string (as with printf())

Since 1.0.3


gcut_assert_equal_list_string()

#define             gcut_assert_equal_list_string(expected, actual, ...)

Passes if expected == actual.

expected :

an expected GList * of string.

actual :

an actual GList * of string.

... :

optional format string, followed by parameters to insert into the format string (as with printf())

Since 1.0.3


cut_assert_equal_g_list_string()

#define             cut_assert_equal_g_list_string(expected, actual, ...)

Warning

cut_assert_equal_g_list_string has been deprecated since version 1.0.3 and should not be used in newly-written code. Use gcut_assert_equal_list_string() instead.

Passes if expected == actual.

expected :

an expected GList * of string.

actual :

an actual GList * of string.

... :

optional format string, followed by parameters to insert into the format string (as with printf())

Since 0.8


gcut_assert_error()

#define             gcut_assert_error(error, ...)

Passes if error == NULL.

error :

a target GError *.

... :

optional format string, followed by parameters to insert into the format string (as with printf())

Since 1.0.3


cut_assert_g_error()

#define             cut_assert_g_error(error, ...)

Warning

cut_assert_g_error has been deprecated since version 1.0.3 and should not be used in newly-written code. Use gcut_assert_error() instead.

Passes if error == NULL.

error :

a target GError *.

... :

optional format string, followed by parameters to insert into the format string (as with printf())

Since 1.0


gcut_assert_remove_path()

#define             gcut_assert_remove_path(path, ...)

Passes if cut_utils_build_path(path, ...) is removed successfully.

path :

a first element of the path to the removed path.

... :

remaining elements in path.

Since 1.0.3


cut_assert_remove_path()

#define             cut_assert_remove_path(path, ...)

Warning

cut_assert_remove_path has been deprecated since version 1.0.3 and should not be used in newly-written code. Use gcut_assert_remove_path() instead.

Passes if cut_utils_build_path(path, ...) is removed successfully.

path :

a first element of the path to the removed path.

... :

remaining elements in path.

Since 1.0.2