|
Squid Web Cache master
|
#include <SBufFindTest.h>
Public Types | |
| enum | Placement { placeBeginning , placeMiddle , placeEnd , placeNowhere , placeEof } |
| Supported algorithms for placing needle in the hay. More... | |
Public Member Functions | |
| SBufFindTest () | |
| void | run () |
| generates and executes cases using configuration params | |
Public Attributes | |
| int | caseLimit |
| approximate caseCount limit | |
| int | errorLimit |
| bool | hushSimilar |
| whether to report only one failed test case per "category" | |
| SBuf::size_type | maxHayLength |
| approximate maximum generated hay string length | |
Protected Member Functions | |
| void | nextLen (SBuf::size_type &len, const SBuf::size_type max) |
| void | placeNeedle (const SBuf &cleanHay) |
| void | testAllMethods () |
| void | testFindDefs () |
| void | testFind () |
| void | testRFindDefs () |
| void | testRFind () |
| void | testFindCharDefs () |
| void | testFindChar () |
| void | testRFindCharDefs () |
| void | testRFindChar () |
| void | testFindFirstOf () |
| std::string | posKey () const |
| std::string | placementKey () const |
| bool | resultsMatch () const |
| void | checkResults (const char *method) |
| void | handleFailure (const char *method) |
Static Protected Member Functions | |
| static SBuf | RandomSBuf (const int length) |
Private Attributes | |
| SBuf | theSBufHay |
| the string to be searched | |
| SBuf | theSBufNeedle |
| the string to be found | |
| SBuf::size_type | thePos |
| search position limit | |
| Placement | thePlacement |
| where in the hay the needle is placed | |
| std::string | theStringHay |
| theHay converted to std::string | |
| std::string | theStringNeedle |
| theNeedle converted to std::string | |
| std::string::size_type | theBareNeedlePos |
| needle pos w/o thePos restrictions; used for case categorization | |
| std::string::size_type | theFindString |
| SBuf::size_type | theFindSBuf |
| std::string | theReportFunc |
| std::string | theReportNeedle |
| std::string | theReportPos |
| char | theReportQuote |
| int | caseCount |
| cases executed so far | |
| int | errorCount |
| total number of failed test cases so far | |
| int | reportCount |
| total number of test cases reported so far | |
| std::set< std::string > | failedCats |
| reported failed categories | |
Generates and executes a [configurable] large number of SBuf::*find() test cases using random strings. Reports detected failures.
Definition at line 19 of file SBufFindTest.h.
| Enumerator | |
|---|---|
| placeBeginning | |
| placeMiddle | |
| placeEnd | |
| placeNowhere | |
| placeEof | |
Definition at line 35 of file SBufFindTest.h.
| SBufFindTest::SBufFindTest | ( | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| void SBufFindTest::run | ( | ) |
Referenced by TestSBuf::testAutoFind().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
Definition at line 83 of file SBufFindTest.h.
| int SBufFindTest::caseLimit |
Definition at line 27 of file SBufFindTest.h.
|
private |
Definition at line 84 of file SBufFindTest.h.
| int SBufFindTest::errorLimit |
errorCount limit
Definition at line 28 of file SBufFindTest.h.
|
private |
Definition at line 86 of file SBufFindTest.h.
| bool SBufFindTest::hushSimilar |
Definition at line 30 of file SBufFindTest.h.
| SBuf::size_type SBufFindTest::maxHayLength |
Definition at line 32 of file SBufFindTest.h.
|
private |
Definition at line 85 of file SBufFindTest.h.
|
private |
Definition at line 72 of file SBufFindTest.h.
|
private |
Definition at line 76 of file SBufFindTest.h.
|
private |
Definition at line 75 of file SBufFindTest.h.
|
private |
Definition at line 67 of file SBufFindTest.h.
|
private |
Definition at line 66 of file SBufFindTest.h.
|
private |
Definition at line 77 of file SBufFindTest.h.
|
private |
Definition at line 78 of file SBufFindTest.h.
|
private |
Definition at line 79 of file SBufFindTest.h.
|
private |
Definition at line 80 of file SBufFindTest.h.
|
private |
Definition at line 64 of file SBufFindTest.h.
|
private |
Definition at line 65 of file SBufFindTest.h.
|
private |
Definition at line 68 of file SBufFindTest.h.
|
private |
Definition at line 69 of file SBufFindTest.h.