9#ifndef SQUID_SRC_TESTS_SBUFFINDTEST_H
10#define SQUID_SRC_TESTS_SBUFFINDTEST_H
SBufFindTest::Placement Placement
int caseLimit
approximate caseCount limit
void handleFailure(const char *method)
std::string theStringHay
theHay converted to std::string
Placement
Supported algorithms for placing needle in the hay.
SBuf::size_type thePos
search position limit
std::string theReportFunc
int caseCount
cases executed so far
void checkResults(const char *method)
Placement thePlacement
where in the hay the needle is placed
std::string placementKey() const
std::string::size_type theBareNeedlePos
needle pos w/o thePos restrictions; used for case categorization
SBuf theSBufNeedle
the string to be found
void placeNeedle(const SBuf &cleanHay)
bool hushSimilar
whether to report only one failed test case per "category"
int errorCount
total number of failed test cases so far
std::string theReportNeedle
void nextLen(SBuf::size_type &len, const SBuf::size_type max)
SBuf::size_type theFindSBuf
std::string theStringNeedle
theNeedle converted to std::string
bool resultsMatch() const
std::string posKey() const
std::string::size_type theFindString
int reportCount
total number of test cases reported so far
void run()
generates and executes cases using configuration params
SBuf theSBufHay
the string to be searched
std::set< std::string > failedCats
reported failed categories
SBuf::size_type maxHayLength
approximate maximum generated hay string length
static SBuf RandomSBuf(const int length)
MemBlob::size_type size_type
A const & max(A const &lhs, A const &rhs)