提交 6ad978e9 编写于 作者: P Paolo Bonzini

coccinelle: add g_assert_cmp* to macro file

This helps applying semantic patches to unit tests.
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 644c6869
......@@ -117,3 +117,9 @@ struct { \
type *tqe_next; /* next element */ \
type **tqe_prev; /* address of previous next element */ \
}
/* From glib */
#define g_assert_cmpint(a, op, b) g_assert(a op b)
#define g_assert_cmpuint(a, op, b) g_assert(a op b)
#define g_assert_cmphex(a, op, b) g_assert(a op b)
#define g_assert_cmpstr(a, op, b) g_assert(strcmp(a, b) op 0)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册