New test case detects previous template bug
This commit is contained in:
@@ -33,6 +33,23 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define IF_OPT_COMPARE(ac,bc,e) \
|
||||
if (((ac)->e == NULL && (bc)->e != NULL) || (((ac)->e != NULL && (bc)->e == NULL))) return 1; if ((ac)->e)
|
||||
#define COMPARE_OPT_STRING(ac,bc,e) \
|
||||
do { if (strcmp(*(ac)->e, *(bc)->e) != 0) return 1; } while(0)
|
||||
#define COMPARE_OPT_OCTET_STRING(ac,bc,e) \
|
||||
do { if ((ac)->e->length != (bc)->e->length || memcmp((ac)->e->data, (bc)->e->data, (ac)->e->length) != 0) return 1; } while(0)
|
||||
#define COMPARE_STRING(ac,bc,e) \
|
||||
do { if (strcmp((ac)->e, (bc)->e) != 0) return 1; } while(0)
|
||||
#define COMPARE_INTEGER(ac,bc,e) \
|
||||
do { if ((ac)->e != (bc)->e) return 1; } while(0)
|
||||
#define COMPARE_OPT_INTEGER(ac,bc,e) \
|
||||
do { if (*(ac)->e != *(bc)->e) return 1; } while(0)
|
||||
#define COMPARE_MEM(ac,bc,e,len) \
|
||||
do { if (memcmp((ac)->e, (bc)->e,len) != 0) return 1; } while(0)
|
||||
#define COMPARE_OCTET_STRING(ac,bc,e) \
|
||||
do { if ((ac)->e.length != (bc)->e.length || memcmp((ac)->e.data, (bc)->e.data, (ac)->e.length) != 0) return 1; } while(0)
|
||||
|
||||
struct test_case {
|
||||
void *val;
|
||||
ssize_t byte_len;
|
||||
|
Reference in New Issue
Block a user