[OISF/outreachy] Issue 4048 - Unittests FAIL/PASS API

Juliana Fajardini Reichow jufajardini at gmail.com
Sat Oct 31 14:44:28 UTC 2020


Hi all,

I'm working on converting detect-iprep unittets to the new FAIL/PASS API,
and I'm not sure about how to proceed with methods
- DetectIPrepTest05
- DetectIPrepTest06
- DetectIPrepTest07
- DetectIPrepTest08

So far, all tests I've seen followed a "return 1" logic for passing, as to
say: "int result" would control the checks, and by the end, if no checks
had failed, it would be 1, and that would be returned, so same as using
PASS at the end of the method.

But for those four mentioned above, it seems that the method returns true
if int result is 0:
return result == 0

Does that mean that for these tests the logic is that they pass if the
checks fail?

I have considered using
PASS_IF(result == 0)

at the end of the methods instead, but I am not sure this is enough to keep
things as they should be.

If anyone can offer some guidance in this, I'll be rather grateful.

Thanks in advance and kind regards,
-- 
Juliana Fajardini Reichow
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openinfosecfoundation.org/pipermail/outreachy/attachments/20201031/ddc88091/attachment.html>


More information about the Outreachy mailing list