return i;
}
+/** \brief parser a sig and see if the expected result is correct */
+int UTHParseSignature(const char *str, bool expect)
+{
+ DetectEngineCtx *de_ctx = DetectEngineCtxInit();
+ FAIL_IF_NULL(de_ctx);
+ de_ctx->flags |= DE_QUIET;
+
+ Signature *s = DetectEngineAppendSig(de_ctx, str);
+ if (expect)
+ FAIL_IF_NULL(s);
+ else
+ FAIL_IF_NOT_NULL(s);
+
+ DetectEngineCtxFree(de_ctx);
+ PASS;
+}
+
+
/*
* unittests for the unittest helpers
*/
uint32_t UTHBuildPacketOfFlows(uint32_t, uint32_t, uint8_t);
Packet *UTHBuildPacketIPV6Real(uint8_t *, uint16_t , uint8_t ipproto, const char *, const char *,
uint16_t , uint16_t );
+
+int UTHParseSignature(const char *str, bool expect);
#endif
void UTHRegisterTests(void);