curlcheck.h: add verify_memory
This check verifies that a pointer contains the correct data.
This commit is contained in:
parent
1602ed6ba1
commit
7af54ef9a5
@ -23,6 +23,13 @@
|
|||||||
unitfail++; \
|
unitfail++; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define verify_memory(dynamic, check, len) \
|
||||||
|
if(memcmp(dynamic, check, len)) { \
|
||||||
|
fprintf(stderr, "%s:%d The dynamic string didn't match '%s'\n", \
|
||||||
|
__FILE__, __LINE__, check); \
|
||||||
|
unitfail++; \
|
||||||
|
}
|
||||||
|
|
||||||
extern int unitfail;
|
extern int unitfail;
|
||||||
|
|
||||||
#define UNITTEST_START \
|
#define UNITTEST_START \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user