diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-05-24 17:43:36 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-05-24 17:43:36 +0200 |
commit | b0fad063b58f3728f1368adc98c32f1ce1063e10 (patch) | |
tree | 04f4da86bcb5b326601b7eb3b3f78b54264e301b | |
parent | 7e6d579301b2db838e809f536ea9506ea48dfd61 (diff) | |
parent | f9a4dcd074cf1a2077754ba5aed4f8c4e5a07e89 (diff) |
Merge branch 'master' into 0.11
-rw-r--r-- | libs/gst/check/gstcheck.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libs/gst/check/gstcheck.h b/libs/gst/check/gstcheck.h index 5c604adbb..6d4a9356f 100644 --- a/libs/gst/check/gstcheck.h +++ b/libs/gst/check/gstcheck.h @@ -148,6 +148,34 @@ G_STMT_START { \ #define assert_equals_int(a, b) fail_unless_equals_int(a, b) /** + * fail_unless_equals_int64: + * @a: a #gint64 value or expression + * @b: a #gint64 value or expression + * + * This macro checks that @a and @b are equal and aborts if this is not the + * case, printing both expressions and the values they evaluated to. This + * macro is for use in unit tests. + */ +#define fail_unless_equals_int64(a, b) \ +G_STMT_START { \ + gint64 first = a; \ + gint64 second = b; \ + fail_unless(first == second, \ + "'" #a "' (%" G_GINT64_FORMAT") is not equal to '" #b"' (%" \ + G_GINT64_FORMAT")", first, second); \ +} G_STMT_END; +/** + * assert_equals_int64: + * @a: a #gint64 value or expression + * @b: a #gint64 value or expression + * + * This macro checks that @a and @b are equal and aborts if this is not the + * case, printing both expressions and the values they evaluated to. This + * macro is for use in unit tests. + */ +#define assert_equals_int64(a, b) fail_unless_equals_int64(a, b) + +/** * fail_unless_equals_uint64: * @a: a #guint64 value or expression * @b: a #guint64 value or expression |