-/* Copyright (C) 2007-2015 Open Information Security Foundation
+/* Copyright (C) 2007-2021 Open Information Security Foundation
*
* You can copy, redistribute or modify this Program under the terms of
* the GNU General Public License version 2 as published by the Free
{
ThreadVars tv;
StatsPrivateThreadContext *pca = NULL;
- int result;
memset(&tv, 0, sizeof(ThreadVars));
StatsIncr(&tv, 1);
StatsIncr(&tv, 2);
- result = pca->size;
+ FAIL_IF_NOT(pca->size == 2);
StatsReleaseCounters(tv.perf_public_ctx.head);
StatsReleasePrivateThreadContext(pca);
- PASS_IF(result == 2);
+ PASS;
}
static int StatsTestUpdateCounter08(void)
/**
* \test DecodeVNTagTest01 test if vntag header is too small.
*
- * \retval 1 on success
- * \retval 0 on failure
*/
static int DecodeVNTagtest01(void)
{
FAIL_IF(TM_ECODE_OK == DecodeVNTag(&tv, &dtv, p, raw_vntag, sizeof(raw_vntag)));
- PASS_IF(ENGINE_ISSET_EVENT(p, VNTAG_HEADER_TOO_SMALL));
+ FAIL_IF_NOT(ENGINE_ISSET_EVENT(p, VNTAG_HEADER_TOO_SMALL));
+ PASS;
}
/**
* \test DecodeVNTagt02 test if vntag header has unknown type.
*
- * \retval 1 on success
- * \retval 0 on failure
*/
static int DecodeVNTagtest02(void)
{
memset(&tv, 0, sizeof(ThreadVars));
memset(&dtv, 0, sizeof(DecodeThreadVars));
- PASS_IF(TM_ECODE_OK != DecodeVNTag(&tv, &dtv, p, raw_vntag, sizeof(raw_vntag)));
+ FAIL_IF_NOT(TM_ECODE_OK != DecodeVNTag(&tv, &dtv, p, raw_vntag, sizeof(raw_vntag)));
+ PASS;
}
/**
* \test DecodeVNTagTest03 test a good vntag header.
*
- * \retval 1 on success
- * \retval 0 on failure
*/
static int DecodeVNTagtest03(void)
{
-/* Copyright (C) 2011-2020 Open Information Security Foundation
+/* Copyright (C) 2011-2021 Open Information Security Foundation
*
* You can copy, redistribute or modify this Program under the terms of
* the GNU General Public License version 2 as published by the Free
data = DetectMarkParse("4");
- PASS_IF(data == NULL);
+ FAIL_IF_NOT_NULL(data);
DetectMarkDataFree(NULL, data);
- FAIL;
+ PASS;
}
/**
data = DetectMarkParse("0x1g/0xff");
- PASS_IF(data == NULL);
+ FAIL_IF_NOT_NULL(data);
DetectMarkDataFree(NULL, data);
- FAIL;
+ PASS;
}
/**