]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/tests/SBufFindTest.h
Source Format Enforcement (#532)
[thirdparty/squid.git] / src / tests / SBufFindTest.h
index c4202e8e91214caf0ce81f8a91ac703f9620480a..2dec992b8114af477948843e32b46bded313f3f5 100644 (file)
@@ -1,12 +1,18 @@
+/*
+ * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
 #ifndef SQUID_SRC_TEST_SBUFFINDTEST_H
 #define SQUID_SRC_TEST_SBUFFINDTEST_H
 
-#include "SBuf.h"
+#include "sbuf/SBuf.h"
 
-#if HAVE_STRING
-#include <string>
-#endif
 #include <set>
+#include <string>
 
 /// Generates and executes a [configurable] large number of SBuf::*find()
 /// test cases using random strings. Reports detected failures.
@@ -20,7 +26,6 @@ public:
     /* test configuration parameters; can be optionally set before run() */
     int caseLimit; ///< approximate caseCount limit
     int errorLimit; ///< errorCount limit
-    unsigned int randomSeed; ///< pseudo-random sequence choice
     /// whether to report only one failed test case per "category"
     bool hushSimilar;
     /// approximate maximum generated hay string length
@@ -33,7 +38,7 @@ public:
 protected:
 
     static SBuf RandomSBuf(const int length);
-    void nextLen(int &len, const int max);
+    void nextLen(SBuf::size_type &len, const SBuf::size_type max);
     void placeNeedle(const SBuf &cleanHay);
 
     void testAllMethods();
@@ -85,3 +90,4 @@ private:
 typedef SBufFindTest::Placement Placement;
 
 #endif
+