void
gi_marshalling_tests_int8_in_max (gint8 int8)
{
- g_assert(int8 == G_MAXINT8);
+ g_assert_cmpint(int8, ==, G_MAXINT8);
}
void
gi_marshalling_tests_int8_in_min (gint8 int8)
{
- g_assert(int8 == G_MININT8);
+ g_assert_cmpint(int8, ==, G_MININT8);
}
/**
void
gi_marshalling_tests_int8_inout_max_min (gint8 *int8)
{
- g_assert(*int8 == G_MAXINT8);
+ g_assert_cmpint(*int8, ==, G_MAXINT8);
*int8 = G_MININT8;
}
void
gi_marshalling_tests_int8_inout_min_max (gint8 *int8)
{
- g_assert(*int8 == G_MININT8);
+ g_assert_cmpint(*int8, ==, G_MININT8);
*int8 = G_MAXINT8;
}
void
gi_marshalling_tests_uint8_in (guint8 uint8)
{
- g_assert(uint8 == G_MAXUINT8);
+ g_assert_cmpuint(uint8, ==, G_MAXUINT8);
}
/**
void
gi_marshalling_tests_uint8_inout (guint8 *uint8)
{
- g_assert(*uint8 == G_MAXUINT8);
+ g_assert_cmpuint(*uint8, ==, G_MAXUINT8);
*uint8 = 0;
}
void
gi_marshalling_tests_int16_in_max (gint16 int16)
{
- g_assert(int16 == G_MAXINT16);
+ g_assert_cmpint(int16, ==, G_MAXINT16);
}
void
gi_marshalling_tests_int16_in_min (gint16 int16)
{
- g_assert(int16 == G_MININT16);
+ g_assert_cmpint(int16, ==, G_MININT16);
}
/**
void
gi_marshalling_tests_int16_inout_max_min (gint16 *int16)
{
- g_assert(*int16 == G_MAXINT16);
+ g_assert_cmpint(*int16, ==, G_MAXINT16);
*int16 = G_MININT16;
}
void
gi_marshalling_tests_int16_inout_min_max (gint16 *int16)
{
- g_assert(*int16 == G_MININT16);
+ g_assert_cmpint(*int16, ==, G_MININT16);
*int16 = G_MAXINT16;
}
void
gi_marshalling_tests_uint16_in (guint16 uint16)
{
- g_assert(uint16 == G_MAXUINT16);
+ g_assert_cmpuint(uint16, ==, G_MAXUINT16);
}
/**
void
gi_marshalling_tests_uint16_inout (guint16 *uint16)
{
- g_assert(*uint16 == G_MAXUINT16);
+ g_assert_cmpuint(*uint16, ==, G_MAXUINT16);
*uint16 = 0;
}
void
gi_marshalling_tests_int32_in_max (gint32 int32)
{
- g_assert(int32 == G_MAXINT32);
+ g_assert_cmpint(int32, ==, G_MAXINT32);
}
void
gi_marshalling_tests_int32_in_min (gint32 int32)
{
- g_assert(int32 == G_MININT32);
+ g_assert_cmpint(int32, ==, G_MININT32);
}
/**
void
gi_marshalling_tests_int32_inout_max_min (gint32 *int32)
{
- g_assert(*int32 == G_MAXINT32);
+ g_assert_cmpint(*int32, ==, G_MAXINT32);
*int32 = G_MININT32;
}
void
gi_marshalling_tests_int32_inout_min_max (gint32 *int32)
{
- g_assert(*int32 == G_MININT32);
+ g_assert_cmpint(*int32, ==, G_MININT32);
*int32 = G_MAXINT32;
}
void
gi_marshalling_tests_uint32_in (guint32 uint32)
{
- g_assert(uint32 == G_MAXUINT32);
+ g_assert_cmpuint(uint32, ==, G_MAXUINT32);
}
/**
void
gi_marshalling_tests_uint32_inout (guint32 *uint32)
{
- g_assert(*uint32 == G_MAXUINT32);
+ g_assert_cmpuint(*uint32, ==, G_MAXUINT32);
*uint32 = 0;
}
void
gi_marshalling_tests_int64_in_max (gint64 int64)
{
- g_assert(int64 == G_MAXINT64);
+ g_assert_cmpint(int64, ==, G_MAXINT64);
}
void
gi_marshalling_tests_int64_in_min (gint64 int64)
{
- g_assert(int64 == G_MININT64);
+ g_assert_cmpint(int64, ==, G_MININT64);
}
/**
void
gi_marshalling_tests_int64_inout_max_min (gint64 *int64)
{
- g_assert(*int64 == G_MAXINT64);
+ g_assert_cmpint(*int64, ==, G_MAXINT64);
*int64 = G_MININT64;
}
void
gi_marshalling_tests_int64_inout_min_max (gint64 *int64)
{
- g_assert(*int64 == G_MININT64);
+ g_assert_cmpint(*int64, ==, G_MININT64);
*int64 = G_MAXINT64;
}
void
gi_marshalling_tests_uint64_in (guint64 uint64)
{
- g_assert(uint64 == G_MAXUINT64);
+ g_assert_cmpuint(uint64, ==, G_MAXUINT64);
}
/**
void
gi_marshalling_tests_uint64_inout (guint64 *uint64)
{
- g_assert(*uint64 == G_MAXUINT64);
+ g_assert_cmpuint(*uint64, ==, G_MAXUINT64);
*uint64 = 0;
}
void
gi_marshalling_tests_short_in_max (gshort short_)
{
- g_assert(short_ == G_MAXSHORT);
+ g_assert_cmpint(short_, ==, G_MAXSHORT);
}
void
gi_marshalling_tests_short_in_min (gshort short_)
{
- g_assert(short_ == G_MINSHORT);
+ g_assert_cmpint(short_, ==, G_MINSHORT);
}
/**
void
gi_marshalling_tests_short_inout_max_min (gshort *short_)
{
- g_assert(*short_ == G_MAXSHORT);
+ g_assert_cmpint(*short_, ==, G_MAXSHORT);
*short_ = G_MINSHORT;
}
void
gi_marshalling_tests_short_inout_min_max (gshort *short_)
{
- g_assert(*short_ == G_MINSHORT);
+ g_assert_cmpint(*short_, ==, G_MINSHORT);
*short_ = G_MAXSHORT;
}
void
gi_marshalling_tests_ushort_in (gushort ushort_)
{
- g_assert(ushort_ == G_MAXUSHORT);
+ g_assert_cmpuint(ushort_, ==, G_MAXUSHORT);
}
/**
void
gi_marshalling_tests_ushort_inout (gushort *ushort_)
{
- g_assert(*ushort_ == G_MAXUSHORT);
+ g_assert_cmpuint(*ushort_, ==, G_MAXUSHORT);
*ushort_ = 0;
}
void
gi_marshalling_tests_int_in_max (gint int_)
{
- g_assert(int_ == G_MAXINT);
+ g_assert_cmpint(int_, ==, G_MAXINT);
}
void
gi_marshalling_tests_int_in_min (gint int_)
{
- g_assert(int_ == G_MININT);
+ g_assert_cmpint(int_, ==, G_MININT);
}
/**
void
gi_marshalling_tests_int_inout_max_min (gint *int_)
{
- g_assert(*int_ == G_MAXINT);
+ g_assert_cmpint(*int_, ==, G_MAXINT);
*int_ = G_MININT;
}
void
gi_marshalling_tests_int_inout_min_max (gint *int_)
{
- g_assert(*int_ == G_MININT);
+ g_assert_cmpint(*int_, ==, G_MININT);
*int_ = G_MAXINT;
}
void
gi_marshalling_tests_uint_in (guint uint_)
{
- g_assert(uint_ == G_MAXUINT);
+ g_assert_cmpuint(uint_, ==, G_MAXUINT);
}
/**
void
gi_marshalling_tests_uint_inout (guint *uint_)
{
- g_assert(*uint_ == G_MAXUINT);
+ g_assert_cmpuint(*uint_, ==, G_MAXUINT);
*uint_ = 0;
}
void
gi_marshalling_tests_long_in_max (glong long_)
{
- g_assert(long_ == G_MAXLONG);
+ g_assert_cmpint(long_, ==, G_MAXLONG);
}
void
gi_marshalling_tests_long_in_min (glong long_)
{
- g_assert(long_ == G_MINLONG);
+ g_assert_cmpint(long_, ==, G_MINLONG);
}
/**
void
gi_marshalling_tests_long_inout_max_min (glong *long_)
{
- g_assert(*long_ == G_MAXLONG);
+ g_assert_cmpint(*long_, ==, G_MAXLONG);
*long_ = G_MINLONG;
}
void
gi_marshalling_tests_long_inout_min_max (glong *long_)
{
- g_assert(*long_ == G_MINLONG);
+ g_assert_cmpint(*long_, ==, G_MINLONG);
*long_ = G_MAXLONG;
}
void
gi_marshalling_tests_ulong_in (gulong ulong_)
{
- g_assert(ulong_ == G_MAXULONG);
+ g_assert_cmpuint(ulong_, ==, G_MAXULONG);
}
/**
void
gi_marshalling_tests_ulong_inout (gulong *ulong_)
{
- g_assert(*ulong_ == G_MAXULONG);
+ g_assert_cmpuint(*ulong_, ==, G_MAXULONG);
*ulong_ = 0;
}
void
gi_marshalling_tests_ssize_in_max (gssize ssize)
{
- g_assert(ssize == G_MAXSSIZE);
+ g_assert_cmpint(ssize, ==, G_MAXSSIZE);
}
void
gi_marshalling_tests_ssize_in_min (gssize ssize)
{
- g_assert(ssize == G_MINSSIZE);
+ g_assert_cmpint(ssize, ==, G_MINSSIZE);
}
/**
void
gi_marshalling_tests_ssize_inout_max_min (gssize *ssize)
{
- g_assert(*ssize == G_MAXSSIZE);
+ g_assert_cmpint(*ssize, ==, G_MAXSSIZE);
*ssize = G_MINSSIZE;
}
void
gi_marshalling_tests_ssize_inout_min_max (gssize *ssize)
{
- g_assert(*ssize == G_MINSSIZE);
+ g_assert_cmpint(*ssize, ==, G_MINSSIZE);
*ssize = G_MAXSSIZE;
}
void
gi_marshalling_tests_size_in (gsize size)
{
- g_assert(size == G_MAXSIZE);
+ g_assert_cmpuint(size, ==, G_MAXSIZE);
}
/**
void
gi_marshalling_tests_size_inout (gsize *size)
{
- g_assert(*size == G_MAXSIZE);
+ g_assert_cmpuint(*size, ==, G_MAXSIZE);
*size = 0;
}
void
gi_marshalling_tests_float_in (gfloat float_)
{
- g_assert(float_ == G_MAXFLOAT);
+ g_assert_cmpfloat(float_, ==, G_MAXFLOAT);
}
/**
void
gi_marshalling_tests_float_inout (gfloat *float_)
{
- g_assert(*float_ == G_MAXFLOAT);
+ g_assert_cmpfloat(*float_, ==, G_MAXFLOAT);
*float_ = G_MINFLOAT;
}
void
gi_marshalling_tests_double_in (gdouble double_)
{
- g_assert(double_ == G_MAXDOUBLE);
+ g_assert_cmpfloat(double_, ==, G_MAXDOUBLE);
}
/**
void
gi_marshalling_tests_double_inout (gdouble *double_)
{
- g_assert(*double_ == G_MAXDOUBLE);
+ g_assert_cmpfloat(*double_, ==, G_MAXDOUBLE);
*double_ = G_MINDOUBLE;
}
void
gi_marshalling_tests_time_t_in (time_t time_t_)
{
- g_assert(time_t_ == 1234567890);
+ g_assert_cmpuint(time_t_, ==, 1234567890);
}
/**
void
gi_marshalling_tests_time_t_inout (time_t *time_t_)
{
- g_assert(*time_t_ == 1234567890);
+ g_assert_cmpuint(*time_t_, ==, 1234567890);
*time_t_ = 0;
}
void
gi_marshalling_tests_utf8_none_in (const gchar *utf8)
{
- g_assert(strcmp(GI_MARSHALLING_TESTS_CONSTANT_UTF8, utf8) == 0);
+ g_assert_cmpstr(GI_MARSHALLING_TESTS_CONSTANT_UTF8, ==, utf8);
}
/**
void
gi_marshalling_tests_utf8_none_inout (gchar **utf8)
{
- g_assert(strcmp(GI_MARSHALLING_TESTS_CONSTANT_UTF8, *utf8) == 0);
+ g_assert_cmpstr(GI_MARSHALLING_TESTS_CONSTANT_UTF8, ==, *utf8);
*utf8 = "";
}
void
gi_marshalling_tests_utf8_full_inout (gchar **utf8)
{
- g_assert(strcmp(GI_MARSHALLING_TESTS_CONSTANT_UTF8, *utf8) == 0);
+ g_assert_cmpstr(GI_MARSHALLING_TESTS_CONSTANT_UTF8, ==, *utf8);
g_free(*utf8);
*utf8 = g_strdup("");
}
void
gi_marshalling_tests_array_fixed_int_in (const gint *ints)
{
- g_assert(ints[0] == -1);
- g_assert(ints[1] == 0);
- g_assert(ints[2] == 1);
- g_assert(ints[3] == 2);
+ g_assert_cmpint(ints[0], ==, -1);
+ g_assert_cmpint(ints[1], ==, 0);
+ g_assert_cmpint(ints[2], ==, 1);
+ g_assert_cmpint(ints[3], ==, 2);
}
/**
void
gi_marshalling_tests_array_fixed_short_in (const gshort *shorts)
{
- g_assert(shorts[0] == -1);
- g_assert(shorts[1] == 0);
- g_assert(shorts[2] == 1);
- g_assert(shorts[3] == 2);
+ g_assert_cmpint(shorts[0], ==, -1);
+ g_assert_cmpint(shorts[1], ==, 0);
+ g_assert_cmpint(shorts[2], ==, 1);
+ g_assert_cmpint(shorts[3], ==, 2);
}
/**
{
static gint values[] = {2, 1, 0, -1};
- g_assert((*ints)[0] == -1);
- g_assert((*ints)[1] == 0);
- g_assert((*ints)[2] == 1);
- g_assert((*ints)[3] == 2);
+ g_assert_cmpint((*ints)[0], ==, -1);
+ g_assert_cmpint((*ints)[1], ==, 0);
+ g_assert_cmpint((*ints)[2], ==, 1);
+ g_assert_cmpint((*ints)[3], ==, 2);
*ints = values;
}
void
gi_marshalling_tests_array_in (const gint *ints, gint length)
{
- g_assert(length == 4);
- g_assert(ints[0] == -1);
- g_assert(ints[1] == 0);
- g_assert(ints[2] == 1);
- g_assert(ints[3] == 2);
+ g_assert_cmpint(length, ==, 4);
+ g_assert_cmpint(ints[0], ==, -1);
+ g_assert_cmpint(ints[1], ==, 0);
+ g_assert_cmpint(ints[2], ==, 1);
+ g_assert_cmpint(ints[3], ==, 2);
}
/**
void
gi_marshalling_tests_array_in_len_zero_terminated (const gint *ints, gint length)
{
- g_assert (length == 4);
+ g_assert_cmpint(length, ==, 4);
- g_assert (ints[0] == -1);
- g_assert (ints[1] == 0);
- g_assert (ints[2] == 1);
- g_assert (ints[3] == 2);
+ g_assert_cmpint(ints[0], ==, -1);
+ g_assert_cmpint(ints[1], ==, 0);
+ g_assert_cmpint(ints[2], ==, 1);
+ g_assert_cmpint(ints[3], ==, 2);
/* One past the end, null terminator */
- g_assert (ints[4] == 0);
+ g_assert_cmpint(ints[4], ==, 0);
}
/**
void
gi_marshalling_tests_array_string_in (const gchar **strings, gint length)
{
- g_assert(length == 2);
- g_assert(g_strcmp0(strings[0], "foo") == 0);
- g_assert(g_strcmp0(strings[1], "bar") == 0);
+ g_assert_cmpint(length, ==, 2);
+ g_assert_cmpstr(strings[0], ==, "foo");
+ g_assert_cmpstr(strings[1], ==, "bar");
}
/**
void
gi_marshalling_tests_array_uint8_in (const guint8 *chars, gint length)
{
- g_assert(length == 4);
+ g_assert_cmpint(length, ==, 4);
g_assert(chars[0] == 'a');
g_assert(chars[1] == 'b');
g_assert(chars[2] == 'c');
void
gi_marshalling_tests_array_struct_in (GIMarshallingTestsBoxedStruct **structs, gint length)
{
- g_assert(length == 3);
- g_assert(structs[0]->long_ == 1);
- g_assert(structs[1]->long_ == 2);
- g_assert(structs[2]->long_ == 3);
+ g_assert_cmpint(length, ==, 3);
+ g_assert_cmpint(structs[0]->long_, ==, 1);
+ g_assert_cmpint(structs[1]->long_, ==, 2);
+ g_assert_cmpint(structs[2]->long_, ==, 3);
}
/**
void
gi_marshalling_tests_array_simple_struct_in (GIMarshallingTestsSimpleStruct *structs, gint length)
{
- g_assert(length == 3);
- g_assert(structs[0].long_ == 1);
- g_assert(structs[1].long_ == 2);
- g_assert(structs[2].long_ == 3);
+ g_assert_cmpint(length, ==, 3);
+ g_assert_cmpint(structs[0].long_, ==, 1);
+ g_assert_cmpint(structs[1].long_, ==, 2);
+ g_assert_cmpint(structs[2].long_, ==, 3);
}
/**
void
gi_marshalling_tests_multi_array_key_value_in (gint length, const gchar **keys, const GValue *values)
{
- g_assert(length == 3);
- g_assert(g_strcmp0("one", keys[0]) == 0);
- g_assert(g_value_get_int(&values[0]) == 1);
- g_assert(g_strcmp0("two", keys[1]) == 0);
- g_assert(g_value_get_int(&values[1]) == 2);
- g_assert(g_strcmp0("three", keys[2]) == 0);
- g_assert(g_value_get_int(&values[2]) == 3);
+ g_assert_cmpint(length, ==, 3);
+ g_assert_cmpstr("one", ==, keys[0]);
+ g_assert_cmpint(g_value_get_int(&values[0]), ==, 1);
+ g_assert_cmpstr("two", ==, keys[1]);
+ g_assert_cmpint(g_value_get_int(&values[1]), ==, 2);
+ g_assert_cmpstr("three", ==, keys[2]);
+ g_assert_cmpint(g_value_get_int(&values[2]), ==, 3);
}
void
gi_marshalling_tests_array_enum_in (GIMarshallingTestsEnum *_enum, gint length)
{
- g_assert (length == 3);
- g_assert (_enum[0] == GI_MARSHALLING_TESTS_ENUM_VALUE1);
- g_assert (_enum[1] == GI_MARSHALLING_TESTS_ENUM_VALUE2);
- g_assert (_enum[2] == GI_MARSHALLING_TESTS_ENUM_VALUE3);
+ g_assert_cmpint(length, ==, 3);
+ g_assert_cmpint(_enum[0], ==, GI_MARSHALLING_TESTS_ENUM_VALUE1);
+ g_assert_cmpint(_enum[1], ==, GI_MARSHALLING_TESTS_ENUM_VALUE2);
+ g_assert_cmpint(_enum[2], ==, GI_MARSHALLING_TESTS_ENUM_VALUE3);
}
/**
void
gi_marshalling_tests_array_in_guint64_len (const gint *ints, guint64 length)
{
- g_assert (length == 4);
+ g_assert_cmpint(length, ==, 4);
gi_marshalling_tests_array_in (ints, length);
}
void
gi_marshalling_tests_array_in_guint8_len (const gint *ints, guint8 length)
{
- g_assert (length == 4);
+ g_assert_cmpint(length, ==, 4);
gi_marshalling_tests_array_in (ints, length);
}
{
static gint values[] = {-2, -1, 0, 1, 2};
- g_assert(*length == 4);
- g_assert((*ints)[0] == -1);
- g_assert((*ints)[1] == 0);
- g_assert((*ints)[2] == 1);
- g_assert((*ints)[3] == 2);
+ g_assert_cmpint(*length, ==, 4);
+ g_assert_cmpint((*ints)[0], ==, -1);
+ g_assert_cmpint((*ints)[1], ==, 0);
+ g_assert_cmpint((*ints)[2], ==, 1);
+ g_assert_cmpint((*ints)[3], ==, 2);
*length = 5;
*ints = values;
{
static gint values[] = {-2, -1, 0, 1, 2};
- g_assert(*length == 4);
- g_assert((*ints)[0] == -1);
- g_assert((*ints)[1] == 0);
- g_assert((*ints)[2] == 1);
- g_assert((*ints)[3] == 2);
+ g_assert_cmpint(*length, ==, 4);
+ g_assert_cmpint((*ints)[0], ==, -1);
+ g_assert_cmpint((*ints)[1], ==, 0);
+ g_assert_cmpint((*ints)[2], ==, 1);
+ g_assert_cmpint((*ints)[3], ==, 2);
values[0] = first;
values[4] = last;
gi_marshalling_tests_array_zero_terminated_in (gchar **utf8s)
{
g_assert(g_strv_length(utf8s));
- g_assert(strcmp(utf8s[0], "0") == 0);
- g_assert(strcmp(utf8s[1], "1") == 0);
- g_assert(strcmp(utf8s[2], "2") == 0);
+ g_assert_cmpstr(utf8s[0], ==, "0");
+ g_assert_cmpstr(utf8s[1], ==, "1");
+ g_assert_cmpstr(utf8s[2], ==, "2");
}
/**
static gchar *values[] = {"-1", "0", "1", "2", NULL};
g_assert(g_strv_length(*utf8s));
- g_assert(strcmp((*utf8s)[0], "0") == 0);
- g_assert(strcmp((*utf8s)[1], "1") == 0);
- g_assert(strcmp((*utf8s)[2], "2") == 0);
+ g_assert_cmpstr((*utf8s)[0], ==, "0");
+ g_assert_cmpstr((*utf8s)[1], ==, "1");
+ g_assert_cmpstr((*utf8s)[2], ==, "2");
*utf8s = values;
}
void
gi_marshalling_tests_garray_int_none_in (GArray *array_)
{
- g_assert (array_->len == 4);
- g_assert (g_array_index (array_, gint, 0) == -1);
- g_assert (g_array_index (array_, gint, 1) == 0);
- g_assert (g_array_index (array_, gint, 2) == 1);
- g_assert (g_array_index (array_, gint, 3) == 2);
+ g_assert_cmpint(array_->len, ==, 4);
+ g_assert_cmpint(g_array_index (array_, gint, 0), ==, -1);
+ g_assert_cmpint(g_array_index (array_, gint, 1), ==, 0);
+ g_assert_cmpint(g_array_index (array_, gint, 2), ==, 1);
+ g_assert_cmpint(g_array_index (array_, gint, 3), ==, 2);
}
/**
void
gi_marshalling_tests_garray_utf8_none_in (GArray *array_)
{
- g_assert (array_->len == 3);
- g_assert (strcmp (g_array_index (array_, gchar*, 0), "0") == 0);
- g_assert (strcmp (g_array_index (array_, gchar*, 1), "1") == 0);
- g_assert (strcmp (g_array_index (array_, gchar*, 2), "2") == 0);
+ g_assert_cmpint(array_->len, ==, 3);
+ g_assert_cmpstr(g_array_index (array_, gchar*, 0), ==, "0");
+ g_assert_cmpstr(g_array_index (array_, gchar*, 1), ==, "1");
+ g_assert_cmpstr(g_array_index (array_, gchar*, 2), ==, "2");
}
/**
static gchar *values[] = {"-2", "-1", "0", "1", NULL};
gint i;
- g_assert ((*array_)->len == 3);
- g_assert (strcmp (g_array_index (*array_, gchar*, 0), "0") == 0);
- g_assert (strcmp (g_array_index (*array_, gchar*, 1), "1") == 0);
- g_assert (strcmp (g_array_index (*array_, gchar*, 2), "2") == 0);
+ g_assert_cmpint((*array_)->len, ==, 3);
+ g_assert_cmpstr(g_array_index (*array_, gchar*, 0), ==, "0");
+ g_assert_cmpstr(g_array_index (*array_, gchar*, 1), ==, "1");
+ g_assert_cmpstr(g_array_index (*array_, gchar*, 2), ==, "2");
if (internal == NULL) {
internal = g_array_new (TRUE, TRUE, sizeof (gchar *));
static gchar *val4 = "1";
GArray *result;
- g_assert ((*array_)->len == 3);
- g_assert (strcmp (g_array_index (*array_, gchar*, 0), "0") == 0);
- g_assert (strcmp (g_array_index (*array_, gchar*, 1), "1") == 0);
- g_assert (strcmp (g_array_index (*array_, gchar*, 2), "2") == 0);
+ g_assert_cmpint((*array_)->len, ==, 3);
+ g_assert_cmpstr(g_array_index (*array_, gchar*, 0), ==, "0");
+ g_assert_cmpstr(g_array_index (*array_, gchar*, 1), ==, "1");
+ g_assert_cmpstr(g_array_index (*array_, gchar*, 2), ==, "2");
result = g_array_new (TRUE, TRUE, sizeof (gchar *));
g_array_append_val (result, val1);
gchar *val;
GArray *result;
- g_assert ((*array_)->len == 3);
- g_assert (strcmp (g_array_index (*array_, gchar*, 0), "0") == 0);
- g_assert (strcmp (g_array_index (*array_, gchar*, 1), "1") == 0);
- g_assert (strcmp (g_array_index (*array_, gchar*, 2), "2") == 0);
+ g_assert_cmpint((*array_)->len, ==, 3);
+ g_assert_cmpstr(g_array_index (*array_, gchar*, 0), ==, "0");
+ g_assert_cmpstr(g_array_index (*array_, gchar*, 1), ==, "1");
+ g_assert_cmpstr(g_array_index (*array_, gchar*, 2), ==, "2");
result = g_array_new (TRUE, TRUE, sizeof (gchar *));
val = g_strdup (val2);
void
gi_marshalling_tests_gptrarray_utf8_none_in (GPtrArray *parray_)
{
- g_assert (parray_->len == 3);
- g_assert (strcmp (g_ptr_array_index (parray_, 0), "0") == 0);
- g_assert (strcmp (g_ptr_array_index (parray_, 1), "1") == 0);
- g_assert (strcmp (g_ptr_array_index (parray_, 2), "2") == 0);
+ g_assert_cmpint(parray_->len, ==, 3);
+ g_assert_cmpstr(g_ptr_array_index (parray_, 0), ==, "0");
+ g_assert_cmpstr(g_ptr_array_index (parray_, 1), ==, "1");
+ g_assert_cmpstr(g_ptr_array_index (parray_, 2), ==, "2");
}
/**
static gchar *values[] = {"-2", "-1", "0", "1", NULL};
gint i;
- g_assert ((*parray_)->len == 3);
- g_assert (strcmp (g_ptr_array_index (*parray_, 0), "0") == 0);
- g_assert (strcmp (g_ptr_array_index (*parray_, 1), "1") == 0);
- g_assert (strcmp (g_ptr_array_index (*parray_, 2), "2") == 0);
+ g_assert_cmpint((*parray_)->len, ==, 3);
+ g_assert_cmpstr(g_ptr_array_index (*parray_, 0), ==, "0");
+ g_assert_cmpstr(g_ptr_array_index (*parray_, 1), ==, "1");
+ g_assert_cmpstr(g_ptr_array_index (*parray_, 2), ==, "2");
if (internal == NULL) {
internal = g_ptr_array_new ();
static gchar *val4 = "1";
GPtrArray *result;
- g_assert ((*parray_)->len == 3);
- g_assert (strcmp (g_ptr_array_index (*parray_, 0), "0") == 0);
- g_assert (strcmp (g_ptr_array_index (*parray_, 1), "1") == 0);
- g_assert (strcmp (g_ptr_array_index (*parray_, 2), "2") == 0);
+ g_assert_cmpint((*parray_)->len, ==, 3);
+ g_assert_cmpstr(g_ptr_array_index (*parray_, 0), ==, "0");
+ g_assert_cmpstr(g_ptr_array_index (*parray_, 1), ==, "1");
+ g_assert_cmpstr(g_ptr_array_index (*parray_, 2), ==, "2");
result = g_ptr_array_new ();
g_ptr_array_add (result, (gpointer) val1);
gchar *val;
GPtrArray *result;
- g_assert ((*parray_)->len == 3);
- g_assert (strcmp (g_ptr_array_index (*parray_, 0), "0") == 0);
- g_assert (strcmp (g_ptr_array_index (*parray_, 1), "1") == 0);
- g_assert (strcmp (g_ptr_array_index (*parray_, 2), "2") == 0);
+ g_assert_cmpint((*parray_)->len, ==, 3);
+ g_assert_cmpstr(g_ptr_array_index (*parray_, 0), ==, "0");
+ g_assert_cmpstr(g_ptr_array_index (*parray_, 1), ==, "1");
+ g_assert_cmpstr(g_ptr_array_index (*parray_, 2), ==, "2");
result = g_ptr_array_new ();
val = g_strdup (val2);
void
gi_marshalling_tests_gstrv_in (GStrv g_strv)
{
- g_assert(g_strv_length(g_strv) == 3);
- g_assert(strcmp(g_strv[0], "0") == 0);
- g_assert(strcmp(g_strv[1], "1") == 0);
- g_assert(strcmp(g_strv[2], "2") == 0);
+ g_assert_cmpint(g_strv_length(g_strv), ==, 3);
+ g_assert_cmpstr(g_strv[0], ==, "0");
+ g_assert_cmpstr(g_strv[1], ==, "1");
+ g_assert_cmpstr(g_strv[2], ==, "2");
}
/**
void
gi_marshalling_tests_glist_int_none_in (GList *list)
{
- g_assert(g_list_length(list) == 4);
- g_assert(GPOINTER_TO_INT(g_list_nth_data(list, 0)) == -1);
- g_assert(GPOINTER_TO_INT(g_list_nth_data(list, 1)) == 0);
- g_assert(GPOINTER_TO_INT(g_list_nth_data(list, 2)) == 1);
- g_assert(GPOINTER_TO_INT(g_list_nth_data(list, 3)) == 2);
+ g_assert_cmpint(g_list_length(list), ==, 4);
+ g_assert_cmpint(GPOINTER_TO_INT(g_list_nth_data(list, 0)), ==, -1);
+ g_assert_cmpint(GPOINTER_TO_INT(g_list_nth_data(list, 1)), ==, 0);
+ g_assert_cmpint(GPOINTER_TO_INT(g_list_nth_data(list, 2)), ==, 1);
+ g_assert_cmpint(GPOINTER_TO_INT(g_list_nth_data(list, 3)), ==, 2);
}
/**
void
gi_marshalling_tests_glist_utf8_none_in (GList *list)
{
- g_assert(g_list_length(list) == 3);
- g_assert(strcmp(g_list_nth_data(list, 0), "0") == 0);
- g_assert(strcmp(g_list_nth_data(list, 1), "1") == 0);
- g_assert(strcmp(g_list_nth_data(list, 2), "2") == 0);
+ g_assert_cmpint(g_list_length(list), ==, 3);
+ g_assert_cmpint(strcmp(g_list_nth_data(list, 0), "0"), ==, 0);
+ g_assert_cmpint(strcmp(g_list_nth_data(list, 1), "1"), ==, 0);
+ g_assert_cmpint(strcmp(g_list_nth_data(list, 2), "2"), ==, 0);
}
/**
{
static GList *values = NULL;
- g_assert(g_list_length(*list) == 3);
- g_assert(strcmp(g_list_nth_data(*list, 0), "0") == 0);
- g_assert(strcmp(g_list_nth_data(*list, 1), "1") == 0);
- g_assert(strcmp(g_list_nth_data(*list, 2), "2") == 0);
+ g_assert_cmpint(g_list_length(*list), ==, 3);
+ g_assert_cmpstr(g_list_nth_data(*list, 0), ==, "0");
+ g_assert_cmpstr(g_list_nth_data(*list, 1), ==, "1");
+ g_assert_cmpstr(g_list_nth_data(*list, 2), ==, "2");
if (values == NULL) {
values = g_list_append(values, "-2");
{
GList *result = NULL;
- g_assert(g_list_length(*list) == 3);
- g_assert(strcmp(g_list_nth_data(*list, 0), "0") == 0);
- g_assert(strcmp(g_list_nth_data(*list, 1), "1") == 0);
- g_assert(strcmp(g_list_nth_data(*list, 2), "2") == 0);
+ g_assert_cmpint(g_list_length(*list), ==, 3);
+ g_assert_cmpstr(g_list_nth_data(*list, 0), ==, "0");
+ g_assert_cmpstr(g_list_nth_data(*list, 1), ==, "1");
+ g_assert_cmpstr(g_list_nth_data(*list, 2), ==, "2");
result = g_list_prepend(result, "1");
result = g_list_prepend(result, "0");
{
GList *result = NULL;
- g_assert(g_list_length(*list) == 3);
- g_assert(strcmp(g_list_nth_data(*list, 0), "0") == 0);
- g_assert(strcmp(g_list_nth_data(*list, 1), "1") == 0);
- g_assert(strcmp(g_list_nth_data(*list, 2), "2") == 0);
+ g_assert_cmpint(g_list_length(*list), ==, 3);
+ g_assert_cmpstr(g_list_nth_data(*list, 0), ==, "0");
+ g_assert_cmpstr(g_list_nth_data(*list, 1), ==, "1");
+ g_assert_cmpstr(g_list_nth_data(*list, 2), ==, "2");
result = g_list_prepend(result, g_strdup("1"));
result = g_list_prepend(result, g_strdup("0"));
void
gi_marshalling_tests_gslist_int_none_in (GSList *list)
{
- g_assert(g_slist_length(list) == 4);
- g_assert(GPOINTER_TO_INT(g_slist_nth_data(list, 0)) == -1);
- g_assert(GPOINTER_TO_INT(g_slist_nth_data(list, 1)) == 0);
- g_assert(GPOINTER_TO_INT(g_slist_nth_data(list, 2)) == 1);
- g_assert(GPOINTER_TO_INT(g_slist_nth_data(list, 3)) == 2);
+ g_assert_cmpint(g_slist_length(list), ==, 4);
+ g_assert_cmpint(GPOINTER_TO_INT(g_slist_nth_data(list, 0)), ==, -1);
+ g_assert_cmpint(GPOINTER_TO_INT(g_slist_nth_data(list, 1)), ==, 0);
+ g_assert_cmpint(GPOINTER_TO_INT(g_slist_nth_data(list, 2)), ==, 1);
+ g_assert_cmpint(GPOINTER_TO_INT(g_slist_nth_data(list, 3)), ==, 2);
}
/**
void
gi_marshalling_tests_gslist_utf8_none_in (GSList *list)
{
- g_assert(g_slist_length(list) == 3);
- g_assert(strcmp(g_slist_nth_data(list, 0), "0") == 0);
- g_assert(strcmp(g_slist_nth_data(list, 1), "1") == 0);
- g_assert(strcmp(g_slist_nth_data(list, 2), "2") == 0);
+ g_assert_cmpint(g_slist_length(list), ==, 3);
+ g_assert_cmpstr(g_slist_nth_data(list, 0), ==, "0");
+ g_assert_cmpstr(g_slist_nth_data(list, 1), ==, "1");
+ g_assert_cmpstr(g_slist_nth_data(list, 2), ==, "2");
}
/**
{
static GSList *values = NULL;
- g_assert(g_slist_length(*list) == 3);
- g_assert(strcmp(g_slist_nth_data(*list, 0), "0") == 0);
- g_assert(strcmp(g_slist_nth_data(*list, 1), "1") == 0);
- g_assert(strcmp(g_slist_nth_data(*list, 2), "2") == 0);
+ g_assert_cmpint(g_slist_length(*list), ==, 3);
+ g_assert_cmpstr(g_slist_nth_data(*list, 0), ==, "0");
+ g_assert_cmpstr(g_slist_nth_data(*list, 1), ==, "1");
+ g_assert_cmpstr(g_slist_nth_data(*list, 2), ==, "2");
if (values == NULL) {
values = g_slist_prepend(values, "-2");
{
GSList *result = NULL;
- g_assert(g_slist_length(*list) == 3);
- g_assert(strcmp(g_slist_nth_data(*list, 0), "0") == 0);
- g_assert(strcmp(g_slist_nth_data(*list, 1), "1") == 0);
- g_assert(strcmp(g_slist_nth_data(*list, 2), "2") == 0);
+ g_assert_cmpint(g_slist_length(*list), ==, 3);
+ g_assert_cmpstr(g_slist_nth_data(*list, 0), ==, "0");
+ g_assert_cmpstr(g_slist_nth_data(*list, 1), ==, "1");
+ g_assert_cmpstr(g_slist_nth_data(*list, 2), ==, "2");
result = g_slist_prepend(result, "1");
result = g_slist_prepend(result, "0");
{
GSList *result = NULL;
- g_assert(g_slist_length(*list) == 3);
- g_assert(strcmp(g_slist_nth_data(*list, 0), "0") == 0);
- g_assert(strcmp(g_slist_nth_data(*list, 1), "1") == 0);
- g_assert(strcmp(g_slist_nth_data(*list, 2), "2") == 0);
+ g_assert_cmpint(g_slist_length(*list), ==, 3);
+ g_assert_cmpstr(g_slist_nth_data(*list, 0), ==, "0");
+ g_assert_cmpstr(g_slist_nth_data(*list, 1), ==, "1");
+ g_assert_cmpstr(g_slist_nth_data(*list, 2), ==, "2");
result = g_slist_prepend(result, g_strdup("1"));
result = g_slist_prepend(result, g_strdup("0"));
void
gi_marshalling_tests_ghashtable_int_none_in (GHashTable *hash_table)
{
- g_assert(GPOINTER_TO_INT(g_hash_table_lookup(hash_table, GINT_TO_POINTER(-1))) == 1);
- g_assert(GPOINTER_TO_INT(g_hash_table_lookup(hash_table, GINT_TO_POINTER(0))) == 0);
- g_assert(GPOINTER_TO_INT(g_hash_table_lookup(hash_table, GINT_TO_POINTER(1))) == -1);
- g_assert(GPOINTER_TO_INT(g_hash_table_lookup(hash_table, GINT_TO_POINTER(2))) == -2);
+ g_assert_cmpint(GPOINTER_TO_INT(g_hash_table_lookup(hash_table, GINT_TO_POINTER(-1))), ==, 1);
+ g_assert_cmpint(GPOINTER_TO_INT(g_hash_table_lookup(hash_table, GINT_TO_POINTER(0))), ==, 0);
+ g_assert_cmpint(GPOINTER_TO_INT(g_hash_table_lookup(hash_table, GINT_TO_POINTER(1))), ==, -1);
+ g_assert_cmpint(GPOINTER_TO_INT(g_hash_table_lookup(hash_table, GINT_TO_POINTER(2))), ==, -2);
}
/**
void
gi_marshalling_tests_ghashtable_utf8_none_in (GHashTable *hash_table)
{
- g_assert(strcmp(g_hash_table_lookup(hash_table, "-1"), "1") == 0);
- g_assert(strcmp(g_hash_table_lookup(hash_table, "0"), "0") == 0);
- g_assert(strcmp(g_hash_table_lookup(hash_table, "1"), "-1") == 0);
- g_assert(strcmp(g_hash_table_lookup(hash_table, "2"), "-2") == 0);
+ g_assert_cmpstr(g_hash_table_lookup(hash_table, "-1"), ==, "1");
+ g_assert_cmpstr(g_hash_table_lookup(hash_table, "0"), ==, "0");
+ g_assert_cmpstr(g_hash_table_lookup(hash_table, "1"), ==, "-1");
+ g_assert_cmpstr(g_hash_table_lookup(hash_table, "2"), ==, "-2");
}
/**
{
static GHashTable *new_hash_table = NULL;
- g_assert(strcmp(g_hash_table_lookup(*hash_table, "-1"), "1") == 0);
- g_assert(strcmp(g_hash_table_lookup(*hash_table, "0"), "0") == 0);
- g_assert(strcmp(g_hash_table_lookup(*hash_table, "1"), "-1") == 0);
- g_assert(strcmp(g_hash_table_lookup(*hash_table, "2"), "-2") == 0);
+ g_assert_cmpstr(g_hash_table_lookup(*hash_table, "-1"), ==, "1");
+ g_assert_cmpstr(g_hash_table_lookup(*hash_table, "0"), ==, "0");
+ g_assert_cmpstr(g_hash_table_lookup(*hash_table, "1"), ==, "-1");
+ g_assert_cmpstr(g_hash_table_lookup(*hash_table, "2"), ==, "-2");
if (new_hash_table == NULL) {
new_hash_table = g_hash_table_new(g_str_hash, g_str_equal);
{
GHashTable *result = g_hash_table_new(g_str_hash, g_str_equal);
- g_assert(strcmp(g_hash_table_lookup(*hash_table, "-1"), "1") == 0);
- g_assert(strcmp(g_hash_table_lookup(*hash_table, "0"), "0") == 0);
- g_assert(strcmp(g_hash_table_lookup(*hash_table, "1"), "-1") == 0);
- g_assert(strcmp(g_hash_table_lookup(*hash_table, "2"), "-2") == 0);
+ g_assert_cmpstr(g_hash_table_lookup(*hash_table, "-1"), ==, "1");
+ g_assert_cmpstr(g_hash_table_lookup(*hash_table, "0"), ==, "0");
+ g_assert_cmpstr(g_hash_table_lookup(*hash_table, "1"), ==, "-1");
+ g_assert_cmpstr(g_hash_table_lookup(*hash_table, "2"), ==, "-2");
g_hash_table_insert(result, "-1", "1");
g_hash_table_insert(result, "0", "0");
GHashTable *result = g_hash_table_new_full(g_str_hash, g_str_equal,
g_free, g_free);
- g_assert(strcmp(g_hash_table_lookup(*hash_table, "-1"), "1") == 0);
- g_assert(strcmp(g_hash_table_lookup(*hash_table, "0"), "0") == 0);
- g_assert(strcmp(g_hash_table_lookup(*hash_table, "1"), "-1") == 0);
- g_assert(strcmp(g_hash_table_lookup(*hash_table, "2"), "-2") == 0);
+ g_assert_cmpstr(g_hash_table_lookup(*hash_table, "-1"), ==, "1");
+ g_assert_cmpstr(g_hash_table_lookup(*hash_table, "0"), ==, "0");
+ g_assert_cmpstr(g_hash_table_lookup(*hash_table, "1"), ==, "-1");
+ g_assert_cmpstr(g_hash_table_lookup(*hash_table, "2"), ==, "-2");
g_hash_table_insert(result, g_strdup("-1"), g_strdup("1"));
g_hash_table_insert(result, g_strdup("0"), g_strdup("0"));
void
gi_marshalling_tests_gvalue_in (GValue *value)
{
- g_assert(g_value_get_int(value) == 42);
+ g_assert_cmpint(g_value_get_int(value), ==, 42);
}
/**
void
gi_marshalling_tests_gvalue_inout (GValue **value)
{
- g_assert(g_value_get_int(*value) == 42);
+ g_assert_cmpint(g_value_get_int(*value), ==, 42);
g_value_unset(*value);
g_value_init(*value, G_TYPE_STRING);
g_value_set_string(*value, "42");
0, NULL,
NULL);
- g_assert(g_value_get_int (&return_value) == 42);
+ g_assert_cmpint(g_value_get_int (&return_value), ==, 42);
g_value_unset(&return_value);
}
void
gi_marshalling_tests_genum_in (GIMarshallingTestsGEnum enum_)
{
- g_assert(enum_ == GI_MARSHALLING_TESTS_GENUM_VALUE3);
+ g_assert_cmpint(enum_, ==, GI_MARSHALLING_TESTS_GENUM_VALUE3);
}
/**
void
gi_marshalling_tests_genum_inout (GIMarshallingTestsGEnum *enum_)
{
- g_assert(*enum_ == GI_MARSHALLING_TESTS_GENUM_VALUE3);
+ g_assert_cmpint(*enum_, ==, GI_MARSHALLING_TESTS_GENUM_VALUE3);
*enum_ = GI_MARSHALLING_TESTS_GENUM_VALUE1;
}
void
gi_marshalling_tests_enum_in (GIMarshallingTestsEnum enum_)
{
- g_assert(enum_ == GI_MARSHALLING_TESTS_ENUM_VALUE3);
+ g_assert_cmpint(enum_, ==, GI_MARSHALLING_TESTS_ENUM_VALUE3);
}
/**
void
gi_marshalling_tests_enum_inout (GIMarshallingTestsEnum *enum_)
{
- g_assert(*enum_ == GI_MARSHALLING_TESTS_ENUM_VALUE3);
+ g_assert_cmpint(*enum_, ==, GI_MARSHALLING_TESTS_ENUM_VALUE3);
*enum_ = GI_MARSHALLING_TESTS_ENUM_VALUE1;
}
void
gi_marshalling_tests_simple_struct_inv (GIMarshallingTestsSimpleStruct *struct_)
{
- g_assert(struct_->long_ == 6);
- g_assert(struct_->int8 == 7);
+ g_assert_cmpint(struct_->long_, ==, 6);
+ g_assert_cmpint(struct_->int8, ==, 7);
}
void
gi_marshalling_tests_simple_struct_method (GIMarshallingTestsSimpleStruct *struct_)
{
- g_assert(struct_->long_ == 6);
- g_assert(struct_->int8 == 7);
+ g_assert_cmpint(struct_->long_, ==, 6);
+ g_assert_cmpint(struct_->int8, ==, 7);
}
void
gi_marshalling_tests_pointer_struct_inv (GIMarshallingTestsPointerStruct *struct_)
{
- g_assert(struct_->long_ == 42);
+ g_assert_cmpint(struct_->long_, ==, 42);
}
static GIMarshallingTestsBoxedStruct *
void
gi_marshalling_tests_boxed_struct_inv (GIMarshallingTestsBoxedStruct *struct_)
{
- g_assert(struct_->long_ == 42);
+ g_assert_cmpint(struct_->long_, ==, 42);
}
/**
void
gi_marshalling_tests_boxed_struct_inout (GIMarshallingTestsBoxedStruct **struct_)
{
- g_assert((*struct_)->long_ == 42);
+ g_assert_cmpint((*struct_)->long_, ==, 42);
(*struct_) = g_slice_new (GIMarshallingTestsBoxedStruct);
(*struct_)->long_ = 0;
void
gi_marshalling_tests_union_inv (GIMarshallingTestsUnion *union_)
{
- g_assert(union_->long_ == 42);
+ g_assert_cmpint(union_->long_, ==, 42);
}
void
gi_marshalling_tests_union_method (GIMarshallingTestsUnion *union_)
{
- g_assert(union_->long_ == 42);
+ g_assert_cmpint(union_->long_, ==, 42);
}
gi_marshalling_tests_object_method (GIMarshallingTestsObject *object)
{
g_return_if_fail (GI_MARSHALLING_TESTS_IS_OBJECT (object));
- g_assert (object->int_ == 42);
+ g_assert_cmpint (object->int_, ==, 42);
}
void
gi_marshalling_tests_object_overridden_method (GIMarshallingTestsObject *object)
{
g_return_if_fail (GI_MARSHALLING_TESTS_IS_OBJECT (object));
- g_assert (object->int_ == 0);
+ g_assert_cmpint (object->int_, ==, 0);
}
GIMarshallingTestsObject *
void
gi_marshalling_tests_object_method_array_in (GIMarshallingTestsObject *object, const gint *ints, gint length)
{
- g_assert(length == 4);
- g_assert(ints[0] == -1);
- g_assert(ints[1] == 0);
- g_assert(ints[2] == 1);
- g_assert(ints[3] == 2);
+ g_assert_cmpint(length, ==, 4);
+ g_assert_cmpint(ints[0], ==, -1);
+ g_assert_cmpint(ints[1], ==, 0);
+ g_assert_cmpint(ints[2], ==, 1);
+ g_assert_cmpint(ints[3], ==, 2);
}
/**
{
static gint values[] = {-2, -1, 0, 1, 2};
- g_assert(*length == 4);
- g_assert((*ints)[0] == -1);
- g_assert((*ints)[1] == 0);
- g_assert((*ints)[2] == 1);
- g_assert((*ints)[3] == 2);
+ g_assert_cmpint(*length, ==, 4);
+ g_assert_cmpint((*ints)[0], ==, -1);
+ g_assert_cmpint((*ints)[1], ==, 0);
+ g_assert_cmpint((*ints)[2], ==, 1);
+ g_assert_cmpint((*ints)[3], ==, 2);
*length = 5;
*ints = values;
void
gi_marshalling_tests_object_none_in (GIMarshallingTestsObject *object)
{
- g_assert(object->int_ == 42);
+ g_assert_cmpint(object->int_, ==, 42);
}
/**
{
static GIMarshallingTestsObject *new_object = NULL;
- g_assert((*object)->int_ == 42);
+ g_assert_cmpint((*object)->int_, ==, 42);
if (new_object == NULL) {
new_object = g_object_new(GI_MARSHALLING_TESTS_TYPE_OBJECT, NULL);
void
gi_marshalling_tests_object_full_inout (GIMarshallingTestsObject **object)
{
- g_assert((*object)->int_ == 42);
+ g_assert_cmpint((*object)->int_, ==, 42);
*object = g_object_new(GI_MARSHALLING_TESTS_TYPE_OBJECT, NULL);
}
void
gi_marshalling_tests_sub_object_sub_method (GIMarshallingTestsSubObject *object)
{
- g_assert(GI_MARSHALLING_TESTS_OBJECT(object)->int_ == 0);
+ g_assert_cmpint(GI_MARSHALLING_TESTS_OBJECT(object)->int_, ==, 0);
}
void
gi_marshalling_tests_sub_object_overwritten_method (GIMarshallingTestsSubObject *object)
{
- g_assert(GI_MARSHALLING_TESTS_OBJECT(object)->int_ == 0);
+ g_assert_cmpint(GI_MARSHALLING_TESTS_OBJECT(object)->int_, ==, 0);
}
G_DEFINE_TYPE (GIMarshallingTestsSubSubObject, gi_marshalling_tests_sub_sub_object, GI_MARSHALLING_TESTS_TYPE_SUB_OBJECT);