Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
dfc0c796
Commit
dfc0c796
authored
Sep 30, 2011
by
Pieter Noordhuis
Browse files
String equality helper
parent
77a045ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/test-helper.h
View file @
dfc0c796
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#define _TEST_HELPER_H 1
#define _TEST_HELPER_H 1
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <assert.h>
#define assert_equal(a, b, type, fmt) do { \
#define assert_equal(a, b, type, fmt) do { \
...
@@ -32,4 +33,13 @@
...
@@ -32,4 +33,13 @@
assert_equal(a, b, double, "%f"); \
assert_equal(a, b, double, "%f"); \
} while(0)
} while(0)
#define assert_equal_string(a,b) do { \
if (strcmp(a, b)) { \
fprintf(stderr, \
"%s:%d: %s != %s\n", \
__FILE__, __LINE__, a, b); \
assert(0); \
} \
} while(0)
#endif
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment