[subset] try to get more info from bot where g_assert_cmpmem fails
This commit is contained in:
parent
0bb2d7ac12
commit
c7a633f957
@ -112,13 +112,11 @@ hb_subset_test_check (hb_face_t *expected,
|
|||||||
hb_face_t *actual,
|
hb_face_t *actual,
|
||||||
hb_tag_t table)
|
hb_tag_t table)
|
||||||
{
|
{
|
||||||
hb_blob_t *glyf_expected_blob = hb_face_reference_table (expected, table);
|
hb_blob_t *expected_blob = hb_face_reference_table (expected, table);
|
||||||
hb_blob_t *glyf_actual_blob = hb_face_reference_table (actual, table);
|
hb_blob_t *actual_blob = hb_face_reference_table (actual, table);
|
||||||
unsigned int expected_length, actual_length;
|
hb_test_assert_blob_eq(expected_blob, actual_blob);
|
||||||
g_assert_cmpmem(hb_blob_get_data (glyf_expected_blob, &expected_length), expected_length,
|
hb_blob_destroy (expected_blob);
|
||||||
hb_blob_get_data (glyf_actual_blob, &actual_length), actual_length);
|
hb_blob_destroy (actual_blob);
|
||||||
hb_blob_destroy (glyf_actual_blob);
|
|
||||||
hb_blob_destroy (glyf_expected_blob);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -161,9 +161,14 @@ typedef void (*hb_test_fixture_func_t) (void);
|
|||||||
#define g_test_fail() g_error("Test failed")
|
#define g_test_fail() g_error("Test failed")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef g_assert_cmpmem
|
static inline void hb_test_assert_blob_eq(hb_blob_t *expected_blob, hb_blob_t *actual_blob)
|
||||||
#define g_assert_cmpmem(m1, l1, m2, l2) g_assert_true (l1 == l2 && memcmp (m1, m2, l1) == 0)
|
{
|
||||||
#endif
|
unsigned int expected_length, actual_length;
|
||||||
|
const char *raw_expected = hb_blob_get_data (expected_blob, &expected_length);
|
||||||
|
const char *raw_actual = hb_blob_get_data (actual_blob, &actual_length);
|
||||||
|
g_assert_cmpint(expected_length, ==, actual_length);
|
||||||
|
g_assert_cmpint(0, ==, memcmp(raw_expected, raw_actual, expected_length));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
Loading…
Reference in New Issue
Block a user