OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
644c686
)
coccinelle: add g_assert_cmp* to macro file
author
Paolo Bonzini
<pbonzini@redhat.com>
Wed, 18 May 2016 09:11:55 +0000
(11:11 +0200)
committer
Paolo Bonzini
<pbonzini@redhat.com>
Mon, 23 May 2016 14:53:46 +0000
(16:53 +0200)
This helps applying semantic patches to unit tests.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scripts/cocci-macro-file.h
patch
|
blob
|
history
diff --git
a/scripts/cocci-macro-file.h
b/scripts/cocci-macro-file.h
index
eceb4be
..
9f2e72e
100644
(file)
--- a/
scripts/cocci-macro-file.h
+++ b/
scripts/cocci-macro-file.h
@@
-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)