]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SourceLayout: Avoid including cppunit outside unit tests (#649)
authorFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 3 Jun 2020 08:29:24 +0000 (08:29 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 3 Jun 2020 08:29:27 +0000 (08:29 +0000)
compat/cppunit.h is needed on some soon-to-be-deprecated
OSes (centos-6). But it's not necessary to include it
everywhere.
Change so that it is only included in unit tests

37 files changed:
compat/compat.h
src/tests/testACLMaxUserIP.h
src/tests/testAuth.h
src/tests/testBoilerplate.h
src/tests/testCacheManager.h
src/tests/testCharacterSet.h
src/tests/testConfigParser.h
src/tests/testDiskIO.h
src/tests/testEnumIterator.h
src/tests/testEvent.h
src/tests/testEventLoop.h
src/tests/testHttp1Parser.h
src/tests/testHttpReply.h
src/tests/testHttpRequest.h
src/tests/testHttpRequestMethod.h
src/tests/testIcmp.h
src/tests/testIpAddress.h
src/tests/testLookupTable.h
src/tests/testMem.h
src/tests/testNetDb.h
src/tests/testPackableStream.h
src/tests/testRFC1035.h
src/tests/testRefCount.h
src/tests/testRock.h
src/tests/testSBuf.h
src/tests/testSBufList.h
src/tests/testStatHist.h
src/tests/testStore.h
src/tests/testStoreController.h
src/tests/testStoreHashIndex.h
src/tests/testString.h
src/tests/testTokenizer.h
src/tests/testURL.h
src/tests/testUfs.h
src/tests/testUriScheme.h
src/tests/testYesNoNone.h
test-suite/splay.cc

index 5d765a6fcfba87196f3b34b7d1f2cf3db1e2940a..c301411e27efee36797c719c88a4f55eb4d4a3f7 100644 (file)
  */
 #include "compat/GnuRegex.h"
 
-/* cppunit is not quite C++0x compatible yet */
-#include "compat/cppunit.h"
-
 #endif /* _SQUID_COMPAT_H */
 
index 297d079e14154dc819d3bff6a086658d9ebb72bb..cc40fc18841f217f8f03083b16de283421de7ffd 100644 (file)
@@ -11,7 +11,7 @@
 
 #if USE_AUTH
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * demonstration test file, as new idioms are made they will
index e4d9172aba01836a2dc09b59ec9b6b7398dc5d91..8bcdf9d2f2237b85f5f1af83c01cc96609ffe237 100644 (file)
@@ -11,7 +11,7 @@
 
 #if USE_AUTH
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * test the auth Config framework
index 460d5b9b44ff03e2b49d74df20f9701c37889a58..d4bc44ac489a47982155cd76aa8af0311e75c87c 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TEST_BOILDERPLATE_H
 #define SQUID_SRC_TEST_BOILDERPLATE_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * demonstration test file, as new idioms are made they will
index 07d933db222080bb4b69e7503d914c38b9304fda..8be302fb2bdf6bf0fd86c78c995df91906602a35 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TEST_CACHEMANAGER_H
 #define SQUID_SRC_TEST_CACHEMANAGER_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * test the CacheManager implementation
index 1734ebe129a659cca0fd05a3b6a5c4f282f39d7e..8f6c4d6acd5f21d6f1de8cf54185de70d3c3455b 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_BASE_TESTCHARACTERSET_H
 #define SQUID_BASE_TESTCHARACTERSET_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 class testCharacterSet : public CPPUNIT_NS::TestFixture
 {
index a44e3654932ab6d68d6061229e5a119c4ca52186..8e51fd219da672a1692d7da68cae7a6e89415fc0 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TEST_CONFIG_PARSER_H
 #define SQUID_SRC_TEST_CONFIG_PARSER_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * test the ConfigParser framework
index 4d1fba31fedfc355689ab179e11a5b22c737f56d..4ed7ff3a4feebf8c711cb8ab1c2fddf948d07d2f 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TEST_DISKIO_H
 #define SQUID_SRC_TEST_DISKIO_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * test the DiskIO framework
index a790afd39625e6e6ff2cd0cf355c416423b71bc5..6439a480bd3594c92ed3e8cf721c215ba8f1cfd0 100644 (file)
@@ -11,7 +11,7 @@
 
 #include "base/EnumIterator.h"
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 class testEnumIterator : public CPPUNIT_NS::TestFixture
 {
index a96076b0b304507380d1ffd2fb55eaac7479d132..eb570e720734d05be7bdfb6a8b81d38057cdc891 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TEST_EVENT_H
 #define SQUID_SRC_TEST_EVENT_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * test the event module.
index 964c5322cc3bdec521a92797db66baf741a78e22..e2c25fc2ad8f32b7ea43deae72aebacc9a0e3ff5 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TEST_EVENTLOOP_H
 #define SQUID_SRC_TEST_EVENTLOOP_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * test the EventLoop implementation
index acf7d5e7fd844044c033dd1abfd1543f34e70ef0..808b0b2fbd95c434ba4560556d4adecf5d893d67 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TESTS_TESTHTTP1PARSER_H
 #define SQUID_SRC_TESTS_TESTHTTP1PARSER_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 class testHttp1Parser : public CPPUNIT_NS::TestFixture
 {
index d90b6534a07e5fcb7cff3e6021168514525a6629..d3c9c255384d1d6c811b8b952bff7c13a090b07a 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TEST_HTTP_REPLY_H
 #define SQUID_SRC_TEST_HTTP_REPLY_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * test HttpReply
index 72cd654b86cb5f5e91f926be91361483e85008e6..b9c1d196cecd86c909a77c0ce070c740f73646e9 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TEST_HTTP_REQUEST_H
 #define SQUID_SRC_TEST_HTTP_REQUEST_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * test HttpRequest
index 928f318a157a2bdd73b5dd625fc2b973369890f3..c95fd970f0f9cfed28eceb2e117bf8cf2aa286d9 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TEST_HTTP_REQUEST_METHOD_H
 #define SQUID_SRC_TEST_HTTP_REQUEST_METHOD_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * test HttpRequestMethod
index 4d7e010489f9683f04105d30c5cf3aeb4d441f69..ae402dc394ad027417632fd193a8741d80b0a12a 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TESTS_TESTICMP_H
 #define SQUID_SRC_TESTS_TESTICMP_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 #if USE_ICMP
 
index 3de76e6bf59498786980f7d83492f0379eab0a4e..c855db22a8cba9507c27604f48a0da56f84f81ac 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TEST_IPADDRESS_H
 #define SQUID_SRC_TEST_IPADDRESS_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * test the IP storage type
index a9d311e7242ffef300256d64a531114d4c1144bc..d42994269ad89df5d58d026bde4e9dd606111465 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_TESTLOOKUPTABLE_H_
 #define SQUID_TESTLOOKUPTABLE_H_
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 class testLookupTable : public CPPUNIT_NS::TestFixture
 {
index 263344a49163712547de2559e7ee23c3babe084a..8568580e5fc84c44a0f87d6d03756b48c48f9f01 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TESTS_TESTMEM_H
 #define SQUID_SRC_TESTS_TESTMEM_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 class testMem : public CPPUNIT_NS::TestFixture
 {
index 9045d43582c6a9c438ff33a1addfb2a958c3c2d7..ce734aaca79097874a3e9e92e800caca228301e2 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TESTS_TESTNETDB_H
 #define SQUID_SRC_TESTS_TESTNETDB_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 class testNetDb : public CPPUNIT_NS::TestFixture
 {
index 6f342001fc3af01cd8494be6b47004ebdc128010..05c32ea390a7048735e4e02828299149bc135ad3 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TESTS_TESTPACKABLESTREAM_H
 #define SQUID_SRC_TESTS_TESTPACKABLESTREAM_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * test PackableStream
index 1e130b03512ea65ade423c166c01741e06db0a87..7f2be1fc1244fc81b2bb81ee0ab90c4ac17ccf77 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TEST_RFC1035_H
 #define SQUID_SRC_TEST_RFC1035_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * test the DNS resolver RFC 1035 Engine
index d5762fa8c8cfa86bb6aca7e913a69fc65ba63897..d6b27582fc4af5a7525aa61d2d3b3d62071ae923 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TEST_REFCOUNT_H
 #define SQUID_SRC_TEST_REFCOUNT_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 class testRefCount : public CPPUNIT_NS::TestFixture
 {
index 211f468e7394f9eabdd82179d139fdf764b1bc9f..3342e091aab470e4de2e11530c54df50dc4e0b11 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TEST_TESTROCK_H
 #define SQUID_SRC_TEST_TESTROCK_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * test the store framework
index 72cbb7bebd027130de42d538fdf32c96f4e3799b..d07feaba5fc38afb997d4d5ed0fe1f2619f79b55 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TEST_TESTSBUF_H
 #define SQUID_SRC_TEST_TESTSBUF_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 #include "base/TextException.h"
 
index 423df608c682650508f2a0f85fee136ee01d08f7..29477d3bf4459e9c474fb66ab1fc578e057c0b48 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TEST_TESTSBUF_H
 #define SQUID_SRC_TEST_TESTSBUF_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 class testSBufList : public CPPUNIT_NS::TestFixture
 {
index c0f2a90bf5e7f99b2f640282f84afaca20762d85..1173c331e49ad121ac6f0096b12038d8e2c50998 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef TESTSTATHIST_H_
 #define TESTSTATHIST_H_
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 class testStatHist : public CPPUNIT_NS::TestFixture
 {
index 91dda25118dab9a27fb8d53ca37569d316e70ae1..dee168ff8952439ffaf506c467fd1079bf410ea0 100644 (file)
@@ -12,7 +12,7 @@
 #include "Store.h"
 #include "store/Controlled.h"
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * test the store framework
index e6282813ba28319e4948928d37844f62973c2d34..544590abe00e695b1b6441fb1c8abb57f0f1af6d 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TEST_STORECONTROLLER_H
 #define SQUID_SRC_TEST_STORECONTROLLER_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * test the store framework
index a8ccd6b6e3e2fa18544f7926c1c27d4de7116fdf..f237822218eeb9bfb19bdd3a6bda2d4db9603fef 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TEST_STOREHASHINDEX_H
 #define SQUID_SRC_TEST_STOREHASHINDEX_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * test the store framework
index 48899ba7985271eb5a5539ec51956d2a7e3608b0..94235f47a1b274bede4054b0aa8e380c326a68b1 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TEST_STRING_H
 #define SQUID_SRC_TEST_STRING_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * test the store framework
index c1bdadba691ea7b97224397881f6e21d426a43ab..353b9170805d6f026f4d0edece4dddc33e91dbe4 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_TESTTOKENIZER_H_
 #define SQUID_TESTTOKENIZER_H_
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 class testTokenizer : public CPPUNIT_NS::TestFixture
 {
index 063cbed0ba8e5713c0e5043bb96559c0ab4e0645..f0dbd073acb0e2cc375328002a73e1994f109ba3 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TEST_URL_H
 #define SQUID_SRC_TEST_URL_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * test the URL class.
index 0030d6f69e688a8d056c8600558d0c91b874d144..66e4f64e3f6a67134038483ad832c753d929acfd 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TEST_STORECONTROLLER_H
 #define SQUID_SRC_TEST_STORECONTROLLER_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * test the store framework
index a324cdc8530180032fa19280b2c17aa488500c9d..8f9d5096259a509a55cf02c07fb6c20a6a85ac81 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TESTS_TESTURISCHEME_H
 #define SQUID_SRC_TESTS_TESTURISCHEME_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * test UriScheme
index d978bf4b7ba38303f34ad4234762037c68398b42..230a73e08b51a2299fb102b7ba7120bd71411754 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SRC_TESTS_TESTYESNONONE_H
 #define SQUID_SRC_TESTS_TESTYESNONONE_H
 
-#include <cppunit/extensions/HelperMacros.h>
+#include "compat/cppunit.h"
 
 /*
  * demonstration test file, as new idioms are made they will
index c17792c9942c7ef2d152263e2d0461f127c543fb..f788019d79b0962eae76b52c044f22636db5ffef 100644 (file)
@@ -16,6 +16,7 @@
 #include "util.h"
 
 #include <cstdlib>
+#include <functional>
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif