-/* Copyright (C) 2020 Open Information Security Foundation
+/* Copyright (C) 2020-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
#ifdef UNITTESTS
/**
* \test RfbSecresultTestParse01 is a test for a valid secresult value
- *
- * \retval 1 on succces
- * \retval 0 on failure
*/
static int RfbSecresultTestParse01 (void)
{
- DetectRfbSecresultData *de = NULL;
- de = DetectRfbSecresultParse("fail");
- if (de) {
- DetectRfbSecresultFree(NULL, de);
- return 1;
- }
+ DetectRfbSecresultData *de = DetectRfbSecresultParse("fail");
- return 0;
+ FAIL_IF_NULL(de);
+
+ DetectRfbSecresultFree(NULL, de);
+
+ PASS;
}
/**
* \test RfbSecresultTestParse02 is a test for an invalid secresult value
- *
- * \retval 1 on succces
- * \retval 0 on failure
*/
static int RfbSecresultTestParse02 (void)
{
- DetectRfbSecresultData *de = NULL;
- de = DetectRfbSecresultParse("invalidopt");
- if (de) {
- DetectRfbSecresultFree(NULL, de);
- return 0;
- }
+ DetectRfbSecresultData *de = DetectRfbSecresultParse("invalidopt");
+
+ FAIL_IF_NOT_NULL(de);
- return 1;
+ PASS;
}
/**