18#include "../app-layer-htp-file.h"
19#include "../util-unittest.h"
26static int AppLayerHtpFileParseContentRangeTest01 (
void)
28 HTTPContentRange range;
29 bstr * rawvalue = bstr_dup_c(
"bytes 12-25/100");
43static int AppLayerHtpFileParseContentRangeTest02 (
void)
45 HTTPContentRange range;
46 bstr * rawvalue = bstr_dup_c(
"bytes 15335424-27514354/");
57static int AppLayerHtpFileParseContentRangeTest03 (
void)
59 HTTPContentRange range;
60 bstr * rawvalue = bstr_dup_c(
"bytes 15335424-");
72static int AppLayerHtpFileParseContentRangeTest04 (
void)
74 HTTPContentRange range;
75 bstr * rawvalue = bstr_dup_c(
"bytes 24-42/*");
88 UtRegisterTest(
"AppLayerHtpFileParseContentRangeTest01", AppLayerHtpFileParseContentRangeTest01);
89 UtRegisterTest(
"AppLayerHtpFileParseContentRangeTest02", AppLayerHtpFileParseContentRangeTest02);
90 UtRegisterTest(
"AppLayerHtpFileParseContentRangeTest03", AppLayerHtpFileParseContentRangeTest03);
91 UtRegisterTest(
"AppLayerHtpFileParseContentRangeTest04", AppLayerHtpFileParseContentRangeTest04);
void AppLayerHtpFileRegisterTests(void)
this function registers unit tests for AppLayerHtpFile
int HTPParseContentRange(const bstr *rawvalue, HTTPContentRange *range)
void UtRegisterTest(const char *name, int(*TestFn)(void))
Register unit test.
#define FAIL_IF_NOT(expr)
Fail a test if expression evaluates to false.
#define PASS
Pass the test.
#define FAIL_IF(expr)
Fail a test if expression evaluates to true.