detect-icmp-seq: convert unittests to FAIL/PASS APIs

Task: #4043
pull/8097/head
Alice Akaki 2 years ago committed by Victor Julien
parent 8d5c5f24a1
commit 6621b0ec93

@ -337,11 +337,10 @@ static int DetectIcmpSeqParseTest01 (void)
{
DetectIcmpSeqData *iseq = NULL;
iseq = DetectIcmpSeqParse(NULL, "300");
if (iseq != NULL && htons(iseq->seq) == 300) {
DetectIcmpSeqFree(NULL, iseq);
return 1;
}
return 0;
FAIL_IF_NULL(iseq);
FAIL_IF_NOT(htons(iseq->seq) == 300);
DetectIcmpSeqFree(NULL, iseq);
PASS;
}
/**
@ -352,11 +351,10 @@ static int DetectIcmpSeqParseTest02 (void)
{
DetectIcmpSeqData *iseq = NULL;
iseq = DetectIcmpSeqParse(NULL, " 300 ");
if (iseq != NULL && htons(iseq->seq) == 300) {
DetectIcmpSeqFree(NULL, iseq);
return 1;
}
return 0;
FAIL_IF_NULL(iseq);
FAIL_IF_NOT(htons(iseq->seq) == 300);
DetectIcmpSeqFree(NULL, iseq);
PASS;
}
/**
@ -364,13 +362,9 @@ static int DetectIcmpSeqParseTest02 (void)
*/
static int DetectIcmpSeqParseTest03 (void)
{
DetectIcmpSeqData *iseq = NULL;
iseq = DetectIcmpSeqParse(NULL, "badc");
if (iseq != NULL) {
DetectIcmpSeqFree(NULL, iseq);
return 0;
}
return 1;
DetectIcmpSeqData *iseq = DetectIcmpSeqParse(NULL, "badc");
FAIL_IF_NOT_NULL(iseq);
PASS;
}
/**

Loading…
Cancel
Save