]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Maintenance: Change unit test class names to CamelCase (#1288)
authorgkinkie@gmail.com <kinkie@squid-cache.org>
Sat, 25 Feb 2023 11:53:17 +0000 (11:53 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sat, 25 Feb 2023 13:03:11 +0000 (13:03 +0000)
Besides applying Project CamelCase class naming rules to all CppUnit
test class names, these script-driven changes also adjust affected class
name-dependent code, improve consistency across unit test declarations a
little, and rename a few test classes (e.g. testURL is not TestUri). The
corresponding source code filenames are left unchanged (for now).

77 files changed:
compat/testPreCompiler.cc
compat/testPreCompiler.h
lib/tests/testRFC1738.cc
lib/tests/testRFC1738.h
src/tests/SBufFindTest.cc
src/tests/stub_MemObject.cc
src/tests/stub_tools.cc
src/tests/testACLMaxUserIP.cc
src/tests/testACLMaxUserIP.h
src/tests/testAuth.cc
src/tests/testAuth.h
src/tests/testBoilerplate.cc
src/tests/testBoilerplate.h
src/tests/testCacheManager.cc
src/tests/testCacheManager.h
src/tests/testCharacterSet.cc
src/tests/testCharacterSet.h
src/tests/testConfigParser.cc
src/tests/testConfigParser.h
src/tests/testDiskIO.cc
src/tests/testDiskIO.h
src/tests/testEnumIterator.cc
src/tests/testEnumIterator.h
src/tests/testEvent.cc
src/tests/testEvent.h
src/tests/testEventLoop.cc
src/tests/testEventLoop.h
src/tests/testHttp1Parser.cc
src/tests/testHttp1Parser.h
src/tests/testHttpReply.cc
src/tests/testHttpReply.h
src/tests/testHttpRequest.cc
src/tests/testHttpRequest.h
src/tests/testHttpRequestMethod.cc
src/tests/testHttpRequestMethod.h
src/tests/testIcmp.cc
src/tests/testIcmp.h
src/tests/testIpAddress.cc
src/tests/testIpAddress.h
src/tests/testLookupTable.cc
src/tests/testLookupTable.h
src/tests/testMem.cc
src/tests/testMem.h
src/tests/testNetDb.cc
src/tests/testNetDb.h
src/tests/testPackableStream.cc
src/tests/testPackableStream.h
src/tests/testRFC1035.cc
src/tests/testRFC1035.h
src/tests/testRefCount.cc
src/tests/testRefCount.h
src/tests/testRock.cc
src/tests/testRock.h
src/tests/testSBuf.cc
src/tests/testSBuf.h
src/tests/testSBufList.cc
src/tests/testSBufList.h
src/tests/testStatHist.cc
src/tests/testStatHist.h
src/tests/testStore.cc
src/tests/testStore.h
src/tests/testStoreController.cc
src/tests/testStoreController.h
src/tests/testStoreHashIndex.cc
src/tests/testStoreHashIndex.h
src/tests/testString.cc
src/tests/testString.h
src/tests/testTokenizer.cc
src/tests/testTokenizer.h
src/tests/testURL.cc
src/tests/testURL.h
src/tests/testUfs.cc
src/tests/testUfs.h
src/tests/testUriScheme.cc
src/tests/testUriScheme.h
src/tests/testYesNoNone.cc
src/tests/testYesNoNone.h

index a5b807bd50c3dbe861ee936da5b407b2580b6ab9..8b6b0734750b218410a5dee9c2386386bcc87e4b 100644 (file)
@@ -12,7 +12,7 @@
 
 #include <cassert>
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testPreCompiler );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestPreCompiler );
 
 /**
  * Test several ways of defining pre-compiler directives.
@@ -20,7 +20,7 @@ CPPUNIT_TEST_SUITE_REGISTRATION( testPreCompiler );
  * These tests ensure that the inputs will work as expected.
  */
 void
-testPreCompiler::testIfDef()
+TestPreCompiler::testIfDef()
 {
     /* Defined to explicit value 1 should be true */
 #define ONE_FOO 1
@@ -77,7 +77,7 @@ testPreCompiler::testIfDef()
  * when undefined macros are used in && conditions
  */
 void
-testPreCompiler::testIfDefAnd()
+TestPreCompiler::testIfDefAnd()
 {
     /* Not Defined to exist at all == false - when used in a compound if */
 #undef UNDEFINED_FOO
@@ -130,7 +130,7 @@ testPreCompiler::testIfDefAnd()
  * when undefined macros are used in || conditions
  */
 void
-testPreCompiler::testIfDefOr()
+TestPreCompiler::testIfDefOr()
 {
     /* Not Defined to exist at all == false - when used in a compound if */
 #undef UNDEFINED_FOO
index 400808cc48e188249603cf1cfb465699db70bc97..7906dfb478a0df9e74fc6d92112239fa57af9fce 100644 (file)
@@ -15,9 +15,9 @@
  * Test the pre-compiler directives used within Squid code actually work.
  */
 
-class testPreCompiler : public CPPUNIT_NS::TestFixture
+class TestPreCompiler: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testPreCompiler );
+    CPPUNIT_TEST_SUITE( TestPreCompiler );
     CPPUNIT_TEST( testIfDef );
     CPPUNIT_TEST( testIfDefAnd );
     CPPUNIT_TEST( testIfDefOr );
index 3bf16c0b1925e60ca6eeee069d003c6e86570dd4..5fc5d8606039a00fc95c34cff3aa3d90c01472aa 100644 (file)
 /* Being a C library code it is best bodily included and tested with C++ type-safe techniques. */
 #include "lib/rfc1738.c"
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testRFC1738 );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestRfc1738 );
 
 /* Regular Format de-coding tests */
-void testRFC1738::testUrlDecode()
+void TestRfc1738::testUrlDecode()
 {
     char *unescaped_str;
 
@@ -87,7 +87,7 @@ void testRFC1738::testUrlDecode()
  * rfc1738_escape_unescaped == -1
  * rfc1738_escape_part == 1
  */
-void testRFC1738::testUrlEncode()
+void TestRfc1738::testUrlEncode()
 {
     char *result;
 
@@ -124,7 +124,7 @@ void testRFC1738::testUrlEncode()
 }
 
 /** SECURITY BUG TESTS: avoid null truncation attacks by skipping %00 bytes */
-void testRFC1738::PercentZeroNullDecoding()
+void TestRfc1738::PercentZeroNullDecoding()
 {
     char *unescaped_str;
 
index b0ed74851c02c7ef298983c57d20c90b37043196..eedae79593dde271213e2517c9d202d5de47d151 100644 (file)
@@ -14,9 +14,9 @@
 /**
  * Test the URL coder RFC 1738 Engine
  */
-class testRFC1738 : public CPPUNIT_NS::TestFixture
+class TestRfc1738: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testRFC1738 );
+    CPPUNIT_TEST_SUITE( TestRfc1738 );
     CPPUNIT_TEST( testUrlDecode );
     CPPUNIT_TEST( testUrlEncode );
 
index f26efa587b04bdcf493313b380da149ad74e28cb..cefc3b7e1dde3937f9361d932b30bf5a099dc8ea 100644 (file)
@@ -62,7 +62,7 @@ SBufFindTest::run()
 
                 // the special npos value is not tested as the behavior is
                 //  different from std::string (where the behavior is undefined)
-                //  It is ad-hoc tested in testSBuf instead
+                //  It is ad-hoc tested in TestSBuf instead
                 //thePos = SBuf::npos;
                 //testAllMethods();
             }
index 60430a92d8f29857730067a5f6d1b4b878dde04f..2be51b6ee56a1045f34f29e7594cc6553849c727 100644 (file)
@@ -22,7 +22,7 @@ RemovalPolicy * mem_policy = nullptr;
 int64_t
 MemObject::endOffset() const
 {
-    // XXX: required by testStore
+    // XXX: required by TestStore
     return data_hdr.endOffset();
 }
 
index b273d62e125d98662b9b942806113aaea68c3fd2..338de5053cee635b240351d902ee02553b05e72a 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include "squid.h"
-// XXX: need src/ to avoid clashes with ip/tools.h in testIpAddress
+// XXX: need src/ to avoid clashes with ip/tools.h in TestIpAddress
 #include "src/tools.h"
 
 #define STUB_API "tools.cc"
index 4164c02ffcfc6cb1abc0dfd64a2250a203009e58..8d3b2dd98bb15abd4a168e9244c5ab3f9bd02080 100644 (file)
 
 #include <stdexcept>
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testACLMaxUserIP );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestACLMaxUserIP );
 
 /* globals required to resolve link issues */
 AnyP::PortCfgPointer HttpPortList;
 
 void
-testACLMaxUserIP::testDefaults()
+TestACLMaxUserIP::testDefaults()
 {
     ACLMaxUserIP anACL("max_user_ip");
     /* 0 is not a valid maximum, so we start at 0 */
@@ -37,14 +37,14 @@ testACLMaxUserIP::testDefaults()
 }
 
 void
-testACLMaxUserIP::setUp()
+TestACLMaxUserIP::setUp()
 {
     CPPUNIT_NS::TestFixture::setUp();
     Acl::RegisterMaker("max_user_ip", [](Acl::TypeName name)->ACL* { return new ACLMaxUserIP(name); });
 }
 
 void
-testACLMaxUserIP::testParseLine()
+TestACLMaxUserIP::testParseLine()
 {
     /* a config line to pass with a lead-in token to seed the parser. */
     char * line = xstrdup("test max_user_ip -s 1");
index 103abe7ea141153e132a45f30593078ab0c62763..20bf242c02db444d33ff359c864d5999139761d7 100644 (file)
 
 /*
  * demonstration test file, as new idioms are made they will
- * be shown in the testBoilerplate source.
+ * be shown in the TestBoilerplate source.
  */
 
-class testACLMaxUserIP : public CPPUNIT_NS::TestFixture
+class TestACLMaxUserIP: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testACLMaxUserIP );
+    CPPUNIT_TEST_SUITE( TestACLMaxUserIP );
     /* note the statement here and then the actual prototype below */
     CPPUNIT_TEST( testDefaults );
     CPPUNIT_TEST( testParseLine );
index b0e4e740126de6b11ef962fa849ed65e462b488b..e9da1ded83d6c0f0520a2cbaa56687ea09d093cc 100644 (file)
 #include "testAuth.h"
 #include "unitTestMain.h"
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testAuth );
-CPPUNIT_TEST_SUITE_REGISTRATION( testAuthConfig );
-CPPUNIT_TEST_SUITE_REGISTRATION( testAuthUserRequest );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestAuth );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestAuthConfig );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestAuthUserRequest );
 #if HAVE_AUTH_MODULE_BASIC
-CPPUNIT_TEST_SUITE_REGISTRATION( testAuthBasicUserRequest );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestAuthBasicUserRequest );
 #endif
 #if HAVE_AUTH_MODULE_DIGEST
-CPPUNIT_TEST_SUITE_REGISTRATION( testAuthDigestUserRequest );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestAuthDigestUserRequest );
 #endif
 #if HAVE_AUTH_MODULE_NTLM
-CPPUNIT_TEST_SUITE_REGISTRATION( testAuthNTLMUserRequest );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestAuthNtlmUserRequest );
 #endif
 #if HAVE_AUTH_MODULE_NEGOTIATE
-CPPUNIT_TEST_SUITE_REGISTRATION( testAuthNegotiateUserRequest );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestAuthNegotiateUserRequest );
 #endif
 
 /* Instantiate all auth framework types */
 void
-testAuth::instantiate()
+TestAuth::instantiate()
 {}
 
 char const * stub_config="auth_param digest program /home/robertc/install/squid/libexec/digest_pw_auth /home/robertc/install/squid/etc/digest.pwd\n"
@@ -160,7 +160,7 @@ fake_auth_setup()
  * authentication types
  */
 void
-testAuthConfig::create()
+TestAuthConfig::create()
 {
     Debug::Levels[29]=9;
     fake_auth_setup();
@@ -177,7 +177,7 @@ testAuthConfig::create()
  * authentication types
  */
 void
-testAuthUserRequest::scheme()
+TestAuthUserRequest::scheme()
 {
     Debug::Levels[29]=9;
     fake_auth_setup();
@@ -196,7 +196,7 @@ testAuthUserRequest::scheme()
 /* AuthBasicUserRequest::AuthBasicUserRequest works
  */
 void
-testAuthBasicUserRequest::construction()
+TestAuthBasicUserRequest::construction()
 {
     AuthBasicUserRequest();
     AuthBasicUserRequest *temp=new AuthBasicUserRequest();
@@ -204,7 +204,7 @@ testAuthBasicUserRequest::construction()
 }
 
 void
-testAuthBasicUserRequest::username()
+TestAuthBasicUserRequest::username()
 {
     AuthUserRequest::Pointer temp = new AuthBasicUserRequest();
     Auth::Basic::User *basic_auth=new Auth::Basic::User(Auth::Config::Find("basic"));
@@ -220,7 +220,7 @@ testAuthBasicUserRequest::username()
 /* AuthDigestUserRequest::AuthDigestUserRequest works
  */
 void
-testAuthDigestUserRequest::construction()
+TestAuthDigestUserRequest::construction()
 {
     AuthDigestUserRequest();
     AuthDigestUserRequest *temp=new AuthDigestUserRequest();
@@ -228,7 +228,7 @@ testAuthDigestUserRequest::construction()
 }
 
 void
-testAuthDigestUserRequest::username()
+TestAuthDigestUserRequest::username()
 {
     AuthUserRequest::Pointer temp = new AuthDigestUserRequest();
     Auth::Digest::User *duser=new Auth::Digest::User(Auth::Config::Find("digest"));
@@ -244,7 +244,7 @@ testAuthDigestUserRequest::username()
 /* AuthNTLMUserRequest::AuthNTLMUserRequest works
  */
 void
-testAuthNTLMUserRequest::construction()
+TestAuthNtlmUserRequest::construction()
 {
     AuthNTLMUserRequest();
     AuthNTLMUserRequest *temp=new AuthNTLMUserRequest();
@@ -252,7 +252,7 @@ testAuthNTLMUserRequest::construction()
 }
 
 void
-testAuthNTLMUserRequest::username()
+TestAuthNtlmUserRequest::username()
 {
     AuthUserRequest::Pointer temp = new AuthNTLMUserRequest();
     Auth::Ntlm::User *nuser=new Auth::Ntlm::User(Auth::Config::Find("ntlm"));
@@ -268,7 +268,7 @@ testAuthNTLMUserRequest::username()
 /* AuthNegotiateUserRequest::AuthNegotiateUserRequest works
  */
 void
-testAuthNegotiateUserRequest::construction()
+TestAuthNegotiateUserRequest::construction()
 {
     AuthNegotiateUserRequest();
     AuthNegotiateUserRequest *temp=new AuthNegotiateUserRequest();
@@ -276,7 +276,7 @@ testAuthNegotiateUserRequest::construction()
 }
 
 void
-testAuthNegotiateUserRequest::username()
+TestAuthNegotiateUserRequest::username()
 {
     AuthUserRequest::Pointer temp = new AuthNegotiateUserRequest();
     Auth::Negotiate::User *nuser=new Auth::Negotiate::User(Auth::Config::Find("negotiate"));
index cab3ba889f8d229a96aa6493e3df880cbf8e5666..cfa14f2d4cd99c7c62b19f53b7ed9df5b4583e2c 100644 (file)
@@ -17,9 +17,9 @@
  * test the auth Config framework
  */
 
-class testAuth : public CPPUNIT_NS::TestFixture
+class TestAuth: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testAuth );
+    CPPUNIT_TEST_SUITE( TestAuth );
     CPPUNIT_TEST( instantiate );
     CPPUNIT_TEST_SUITE_END();
 
@@ -29,9 +29,9 @@ protected:
     void instantiate();
 };
 
-class testAuthConfig : public CPPUNIT_NS::TestFixture
+class TestAuthConfig: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testAuthConfig );
+    CPPUNIT_TEST_SUITE( TestAuthConfig );
     CPPUNIT_TEST( create );
     CPPUNIT_TEST_SUITE_END();
 
@@ -41,9 +41,9 @@ protected:
     void create();
 };
 
-class testAuthUserRequest : public CPPUNIT_NS::TestFixture
+class TestAuthUserRequest: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testAuthUserRequest );
+    CPPUNIT_TEST_SUITE( TestAuthUserRequest );
     CPPUNIT_TEST( scheme );
     CPPUNIT_TEST_SUITE_END();
 
@@ -56,9 +56,9 @@ protected:
 
 #if HAVE_AUTH_MODULE_BASIC
 #include "auth/basic/UserRequest.h"
-class testAuthBasicUserRequest : public CPPUNIT_NS::TestFixture
+class TestAuthBasicUserRequest: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testAuthBasicUserRequest );
+    CPPUNIT_TEST_SUITE( TestAuthBasicUserRequest );
     CPPUNIT_TEST( construction );
     CPPUNIT_TEST( username );
     CPPUNIT_TEST_SUITE_END();
@@ -73,9 +73,9 @@ protected:
 
 #if HAVE_AUTH_MODULE_DIGEST
 #include "auth/digest/UserRequest.h"
-class testAuthDigestUserRequest : public CPPUNIT_NS::TestFixture
+class TestAuthDigestUserRequest: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testAuthDigestUserRequest );
+    CPPUNIT_TEST_SUITE( TestAuthDigestUserRequest );
     CPPUNIT_TEST( construction );
     CPPUNIT_TEST( username );
     CPPUNIT_TEST_SUITE_END();
@@ -90,9 +90,9 @@ protected:
 
 #if HAVE_AUTH_MODULE_NTLM
 #include "auth/ntlm/UserRequest.h"
-class testAuthNTLMUserRequest : public CPPUNIT_NS::TestFixture
+class TestAuthNtlmUserRequest: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testAuthNTLMUserRequest );
+    CPPUNIT_TEST_SUITE( TestAuthNtlmUserRequest );
     CPPUNIT_TEST( construction );
     CPPUNIT_TEST( username );
     CPPUNIT_TEST_SUITE_END();
@@ -107,9 +107,9 @@ protected:
 
 #if HAVE_AUTH_MODULE_NEGOTIATE
 #include "auth/negotiate/UserRequest.h"
-class testAuthNegotiateUserRequest : public CPPUNIT_NS::TestFixture
+class TestAuthNegotiateUserRequest: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testAuthNegotiateUserRequest );
+    CPPUNIT_TEST_SUITE( TestAuthNegotiateUserRequest );
     CPPUNIT_TEST( construction );
     CPPUNIT_TEST( username );
     CPPUNIT_TEST_SUITE_END();
index cf4ed87c45005499a9714bf97ad9d7a0c3c322fd..07e23f798f8e0a57129b68e0661bf59db45f7352 100644 (file)
 
 #include <stdexcept>
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testBoilerplate );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestBoilerplate );
 
 void
-testBoilerplate::testDemonstration()
+TestBoilerplate::testDemonstration()
 {
     CPPUNIT_ASSERT_EQUAL(0, 0);
 }
index a7aa8d52f1453332b595189c013c34a2080c16d5..56887e161077d0ef096b1c3e4cfebd5476f9bb7c 100644 (file)
 
 /*
  * demonstration test file, as new idioms are made they will
- * be shown in the testBoilerplate source.
+ * be shown in the TestBoilerplate source.
  */
 
-class testBoilerplate : public CPPUNIT_NS::TestFixture
+class TestBoilerplate: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testBoilerplate );
+    CPPUNIT_TEST_SUITE( TestBoilerplate );
     /* note the statement here and then the actual prototype below */
     CPPUNIT_TEST( testDemonstration );
     CPPUNIT_TEST_SUITE_END();
index 6503f4aff9866b1caba5bd8af355ad009b612bba..d8d9bfaac6bb48b13dbd89c9e211b58c8373f0dc 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <cppunit/TestAssert.h>
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testCacheManager );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestCacheManager );
 
 /// Provides test code access to CacheManager internal symbols
 class CacheManagerInternals : public CacheManager
@@ -27,7 +27,7 @@ public:
 
 /* init memory pools */
 
-void testCacheManager::setUp()
+void TestCacheManager::setUp()
 {
     Mem::Init();
     AnyP::UriScheme::Init();
@@ -37,7 +37,7 @@ void testCacheManager::setUp()
  * Test creating a CacheManager
  */
 void
-testCacheManager::testCreate()
+TestCacheManager::testCreate()
 {
     CacheManager::GetInstance(); //it's a singleton..
 }
@@ -53,7 +53,7 @@ dummy_action(StoreEntry * sentry)
  * registering an action makes it findable.
  */
 void
-testCacheManager::testRegister()
+TestCacheManager::testRegister()
 {
     CacheManager *manager=CacheManager::GetInstance();
     CPPUNIT_ASSERT(manager != nullptr);
@@ -76,7 +76,7 @@ testCacheManager::testRegister()
 }
 
 void
-testCacheManager::testParseUrl()
+TestCacheManager::testParseUrl()
 {
     auto *mgr = static_cast<CacheManagerInternals *>(CacheManager::GetInstance());
     CPPUNIT_ASSERT(mgr != nullptr);
index 490f46ed05d39a63ef3eae513c87f232f6a08715..08a98aff785914ef9602d672de0f2791b6755947 100644 (file)
@@ -15,9 +15,9 @@
  * test the CacheManager implementation
  */
 
-class testCacheManager : public CPPUNIT_NS::TestFixture
+class TestCacheManager: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testCacheManager );
+    CPPUNIT_TEST_SUITE( TestCacheManager );
     CPPUNIT_TEST( testCreate );
     CPPUNIT_TEST( testRegister );
     CPPUNIT_TEST( testParseUrl );
index b82b1d4fee5ca8e6f764614f7f1644aeed01378d..61e125b700ab06f1d1fc04626b7a7ecb8b9de53e 100644 (file)
 
 #include <string>
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testCharacterSet );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestCharacterSet );
 
 void
-testCharacterSet::CharacterSetConstruction()
+TestCharacterSet::CharacterSetConstruction()
 {
     {
         CharacterSet t(nullptr,"");
@@ -45,7 +45,7 @@ testCharacterSet::CharacterSetConstruction()
 }
 
 void
-testCharacterSet::CharacterSetAdd()
+TestCharacterSet::CharacterSetAdd()
 {
     CharacterSet t("test","0");
     t.add(0);
@@ -54,7 +54,7 @@ testCharacterSet::CharacterSetAdd()
 }
 
 void
-testCharacterSet::CharacterSetAddRange()
+TestCharacterSet::CharacterSetAddRange()
 {
     CharacterSet t("test","");
     t.addRange('0','9');
@@ -65,7 +65,7 @@ testCharacterSet::CharacterSetAddRange()
 }
 
 void
-testCharacterSet::CharacterSetConstants()
+TestCharacterSet::CharacterSetConstants()
 {
     CPPUNIT_ASSERT_EQUAL(true,CharacterSet::ALPHA['a']);
     CPPUNIT_ASSERT_EQUAL(true,CharacterSet::ALPHA['z']);
@@ -75,7 +75,7 @@ testCharacterSet::CharacterSetConstants()
 }
 
 void
-testCharacterSet::CharacterSetUnion()
+TestCharacterSet::CharacterSetUnion()
 {
     {
         CharacterSet hex("hex","");
@@ -94,7 +94,7 @@ testCharacterSet::CharacterSetUnion()
 }
 
 void
-testCharacterSet::CharacterSetEqualityOp()
+TestCharacterSet::CharacterSetEqualityOp()
 {
     CPPUNIT_ASSERT_EQUAL(CharacterSet::ALPHA, CharacterSet::ALPHA);
     CPPUNIT_ASSERT_EQUAL(CharacterSet::BIT, CharacterSet(nullptr,"01"));
@@ -106,7 +106,7 @@ testCharacterSet::CharacterSetEqualityOp()
 }
 
 void
-testCharacterSet::CharacterSetSubtract()
+TestCharacterSet::CharacterSetSubtract()
 {
     CharacterSet sample(nullptr, "0123456789aAbBcCdDeEfFz");
 
index 4033e43544dac9f5070a68d2b22adf5ef554dc69..b2286ead5effaf7d4ed9b5bbb949030056b22937 100644 (file)
@@ -11,9 +11,9 @@
 
 #include "compat/cppunit.h"
 
-class testCharacterSet : public CPPUNIT_NS::TestFixture
+class TestCharacterSet: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testCharacterSet );
+    CPPUNIT_TEST_SUITE( TestCharacterSet );
     CPPUNIT_TEST( CharacterSetConstruction );
     CPPUNIT_TEST( CharacterSetAdd );
     CPPUNIT_TEST( CharacterSetAddRange );
index 60953a632c30916289fddd13ce5a64b0b32181c7..f896b4324ce1df2fbc4908a9602d6a54cd995658 100644 (file)
 #include "tests/testConfigParser.h"
 #include "unitTestMain.h"
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testConfigParser);
+CPPUNIT_TEST_SUITE_REGISTRATION( TestConfigParser );
 
 int shutting_down = 0;
 
-void testConfigParser::setUp()
+void TestConfigParser::setUp()
 {
 }
 
-bool testConfigParser::doParseQuotedTest(const char *s, const char *expectInterp)
+bool TestConfigParser::doParseQuotedTest(const char *s, const char *expectInterp)
 {
     char cfgline[2048];
     char cfgparam[2048];
@@ -54,7 +54,7 @@ bool testConfigParser::doParseQuotedTest(const char *s, const char *expectInterp
     return quotedOk && interpOk ;
 }
 
-void testConfigParser::testParseQuoted()
+void TestConfigParser::testParseQuoted()
 {
     // SingleToken
     CPPUNIT_ASSERT_EQUAL(true, doParseQuotedTest("SingleToken", "SingleToken"));
index c3a18a4c7922302410093a6e0cba23304ef84db8..f47de6ab15a561ad6890e823ae976db0fa72e2b9 100644 (file)
@@ -15,9 +15,9 @@
  * test the ConfigParser framework
  */
 
-class testConfigParser : public CPPUNIT_NS::TestFixture
+class TestConfigParser: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testConfigParser );
+    CPPUNIT_TEST_SUITE( TestConfigParser );
     CPPUNIT_TEST( testParseQuoted );
     CPPUNIT_TEST_SUITE_END();
 
index be8b75c28508442748aa842e5be66a9b0481ac67..b6a1279b032ecc74d1bd59121d1d381690b7e51f 100644 (file)
 
 #include <stdexcept>
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testDiskIO );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestDiskIO );
 
 void
-testDiskIO::setUp()
+TestDiskIO::setUp()
 {
     Mem::Init();
     DiskIOModule::SetupAllModules();
 }
 
 void
-testDiskIO::testFindDefault()
+TestDiskIO::testFindDefault()
 {
     DiskIOModule * module = DiskIOModule::FindDefault();
 #if USE_DISKIO
index 34cd6b545bbcafaeb53dfec1b66774859874c399..6015f05bdcd815a51932148b12cdfd32934dab4b 100644 (file)
@@ -15,9 +15,9 @@
  * test the DiskIO framework
  */
 
-class testDiskIO : public CPPUNIT_NS::TestFixture
+class TestDiskIO: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testDiskIO );
+    CPPUNIT_TEST_SUITE( TestDiskIO );
     CPPUNIT_TEST( testFindDefault );
     CPPUNIT_TEST_SUITE_END();
 
index 229c6ee2c4059f8b3bbbafb94df53bb5bf2bb4fd..4d623ec12cc8f2b19c99fc1d4dc3469d641a80b7 100644 (file)
@@ -12,7 +12,7 @@
 
 #include <cppunit/TestAssert.h>
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testEnumIterator );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestEnumIterator );
 
 enum class TestEnum {
     enumBegin_ = 0,
@@ -35,7 +35,7 @@ enum class UnsignedTestEnum : unsigned char {
 };
 
 void
-testEnumIterator::testForwardIter()
+TestEnumIterator::testForwardIter()
 {
     WholeEnum<TestEnum>::iterator i = WholeEnum<TestEnum>().begin();
     CPPUNIT_ASSERT(*i == TestEnum::zero);
@@ -52,7 +52,7 @@ testEnumIterator::testForwardIter()
 }
 
 void
-testEnumIterator::testReverseIter()
+TestEnumIterator::testReverseIter()
 {
     WholeEnum<TestEnum>::reverse_iterator i = WholeEnum<TestEnum>().rbegin();
     CPPUNIT_ASSERT(*i == TestEnum::four);
@@ -69,7 +69,7 @@ testEnumIterator::testReverseIter()
 }
 
 void
-testEnumIterator::testBidirectionalIter()
+TestEnumIterator::testBidirectionalIter()
 {
     WholeEnum<TestEnum>::iterator i = WholeEnum<TestEnum>().begin();
     CPPUNIT_ASSERT(*i == TestEnum::zero);
@@ -102,7 +102,7 @@ testEnumIterator::testBidirectionalIter()
 }
 
 void
-testEnumIterator::testRangeFor()
+TestEnumIterator::testRangeFor()
 {
     int j = 0;
     for (auto e : WholeEnum<TestEnum>()) {
@@ -115,7 +115,7 @@ testEnumIterator::testRangeFor()
 }
 
 void
-testEnumIterator::testRangeForRange()
+TestEnumIterator::testRangeForRange()
 {
     int j = 0;
     // free function-based range
@@ -129,7 +129,7 @@ testEnumIterator::testRangeForRange()
 }
 
 void
-testEnumIterator::testUnsignedEnum()
+TestEnumIterator::testUnsignedEnum()
 {
     int j = 0;
     for (auto e = WholeEnum<TestEnum>().rbegin(); e != WholeEnum<TestEnum>().rend(); ++e ) {
index e77d5190a7e3d2ddbc1b8d0acfdc95a1a883cac6..a3c32fe8c4f1dc6def25cb12c3b8a158ca69739a 100644 (file)
@@ -13,9 +13,9 @@
 
 #include "compat/cppunit.h"
 
-class testEnumIterator : public CPPUNIT_NS::TestFixture
+class TestEnumIterator: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testEnumIterator );
+    CPPUNIT_TEST_SUITE( TestEnumIterator );
     CPPUNIT_TEST( testForwardIter );
     CPPUNIT_TEST( testReverseIter );
     CPPUNIT_TEST( testBidirectionalIter );
index 35e0f960631372bb22b005658345169031efe652..ae4b750198f7ed6afa249b24a40bcc2756b9249d 100644 (file)
 #include "tests/testEvent.h"
 #include "unitTestMain.h"
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testEvent );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestEvent );
 
 /* init legacy static-initialized modules */
 
 void
-testEvent::setUp()
+TestEvent::setUp()
 {
     Mem::Init();
 }
@@ -27,7 +27,7 @@ testEvent::setUp()
  * Test creating a Scheduler
  */
 void
-testEvent::testCreate()
+TestEvent::testCreate()
 {
     EventScheduler scheduler = EventScheduler();
 }
@@ -46,7 +46,7 @@ public:
 /* submit two callbacks, and cancel one, then dispatch and only the other should run.
  */
 void
-testEvent::testCancel()
+TestEvent::testCancel()
 {
     EventScheduler scheduler;
     CalledEvent event;
@@ -62,7 +62,7 @@ testEvent::testCancel()
 
 // submit two callbacks, and then dump the queue.
 void
-testEvent::testDump()
+TestEvent::testDump()
 {
     EventScheduler scheduler;
     CalledEvent event;
@@ -114,7 +114,7 @@ testEvent::testDump()
 /* submit two callbacks, and find the right one.
  */
 void
-testEvent::testFind()
+TestEvent::testFind()
 {
     EventScheduler scheduler;
     CalledEvent event;
@@ -126,7 +126,7 @@ testEvent::testFind()
 
 /* do a trivial test of invoking callbacks */
 void
-testEvent::testCheckEvents()
+TestEvent::testCheckEvents()
 {
     EventScheduler scheduler;
     CalledEvent event;
@@ -147,7 +147,7 @@ testEvent::testCheckEvents()
 
 /* for convenience we have a singleton scheduler */
 void
-testEvent::testSingleton()
+TestEvent::testSingleton()
 {
     EventScheduler *scheduler = dynamic_cast<EventScheduler *>(EventScheduler::GetInstance());
     CPPUNIT_ASSERT(nullptr != scheduler);
index c3147238ccd64cd4f2818b1b5bb43b04a5179bd6..d91431cb4c64dc94bc80cb257b19caef3c8a22e9 100644 (file)
@@ -15,9 +15,9 @@
  * test the event module.
  */
 
-class testEvent : public CPPUNIT_NS::TestFixture
+class TestEvent: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testEvent );
+    CPPUNIT_TEST_SUITE( TestEvent );
     CPPUNIT_TEST( testCreate );
     CPPUNIT_TEST( testDump );
     CPPUNIT_TEST( testFind );
index 03da6f37f8d0174699dfa75bcd558b88d6e692b1..782b9612b85f94cce90da697def0045e2d217deb 100644 (file)
 
 #include <cppunit/TestAssert.h>
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testEventLoop );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestEventLoop );
 
 void
-testEventLoop::testCreate()
+TestEventLoop::testCreate()
 {
     EventLoop();
 }
@@ -43,7 +43,7 @@ public:
  * we do this with an instrumented async engine.
  */
 void
-testEventLoop::testRunOnce()
+TestEventLoop::testRunOnce()
 {
     {
         /* trivial case - no engine, should quit immediately */
@@ -89,7 +89,7 @@ testEventLoop::testRunOnce()
  * tracked, and the lowest non-negative value given to the last engine.
  */
 void
-testEventLoop::testEngineTimeout()
+TestEventLoop::testEngineTimeout()
 {
     EventLoop theLoop;
     RecordingEngine engineOne(5);
@@ -108,7 +108,7 @@ testEventLoop::testEngineTimeout()
  * hard-coded into EventLoop::runOnce()
  */
 void
-testEventLoop::testEngineErrors()
+TestEventLoop::testEngineErrors()
 {
     EventLoop theLoop;
     RecordingEngine failing_engine(AsyncEngine::EVENT_ERROR);
@@ -137,7 +137,7 @@ public:
 };
 
 void
-testEventLoop::testSetTimeService()
+TestEventLoop::testSetTimeService()
 {
     EventLoop theLoop;
     StubTime myTime;
@@ -157,7 +157,7 @@ testEventLoop::testSetTimeService()
  * this defaults to the last added one, but can be explicitly nominated
  */
 void
-testEventLoop::testSetPrimaryEngine()
+TestEventLoop::testSetPrimaryEngine()
 {
     EventLoop theLoop;
     RecordingEngine first_engine(10);
index 939a7b9d6c2627fe850712290263454572cf7cc3..28e99c9a41e12d1293ad755244d56b3a548d1837 100644 (file)
@@ -15,9 +15,9 @@
  * test the EventLoop implementation
  */
 
-class testEventLoop : public CPPUNIT_NS::TestFixture
+class TestEventLoop: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testEventLoop );
+    CPPUNIT_TEST_SUITE( TestEventLoop );
     CPPUNIT_TEST( testCreate );
     CPPUNIT_TEST( testRunOnce );
     CPPUNIT_TEST( testEngineTimeout );
index 087d394767c4e912473d7167af9bb3f26a81282d..7a23b396b28113860dcc0ee166cbc155c9b64617 100644 (file)
 #include "testHttp1Parser.h"
 #include "unitTestMain.h"
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testHttp1Parser );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestHttp1Parser );
 
 void
-testHttp1Parser::globalSetup()
+TestHttp1Parser::globalSetup()
 {
     static bool setup_done = false;
     if (setup_done)
@@ -121,7 +121,7 @@ testResults(int line, const SBuf &input, Http1::RequestParser &output, struct re
 }
 
 void
-testHttp1Parser::testParserConstruct()
+TestHttp1Parser::testParserConstruct()
 {
     // whether the constructor works
     {
@@ -150,7 +150,7 @@ testHttp1Parser::testParserConstruct()
 }
 
 void
-testHttp1Parser::testParseRequestLineProtocols()
+TestHttp1Parser::testParseRequestLineProtocols()
 {
     // ensure MemPools etc exist
     globalSetup();
@@ -432,7 +432,7 @@ testHttp1Parser::testParseRequestLineProtocols()
 }
 
 void
-testHttp1Parser::testParseRequestLineStrange()
+TestHttp1Parser::testParseRequestLineStrange()
 {
     // ensure MemPools etc exist
     globalSetup();
@@ -528,7 +528,7 @@ testHttp1Parser::testParseRequestLineStrange()
 }
 
 void
-testHttp1Parser::testParseRequestLineTerminators()
+TestHttp1Parser::testParseRequestLineTerminators()
 {
     // ensure MemPools etc exist
     globalSetup();
@@ -626,7 +626,7 @@ testHttp1Parser::testParseRequestLineTerminators()
 }
 
 void
-testHttp1Parser::testParseRequestLineMethods()
+TestHttp1Parser::testParseRequestLineMethods()
 {
     // ensure MemPools etc exist
     globalSetup();
@@ -880,7 +880,7 @@ testHttp1Parser::testParseRequestLineMethods()
 }
 
 void
-testHttp1Parser::testParseRequestLineInvalid()
+TestHttp1Parser::testParseRequestLineInvalid()
 {
     // ensure MemPools etc exist
     globalSetup();
@@ -1070,7 +1070,7 @@ testHttp1Parser::testParseRequestLineInvalid()
 }
 
 void
-testHttp1Parser::testDripFeed()
+TestHttp1Parser::testDripFeed()
 {
     // Simulate a client drip-feeding Squid a few bytes at a time.
     // extend the size of the buffer from 0 bytes to full request length
index c7b67b4ea00b8546f05feefe746cc736a96cd52b..ba53e640b8752a675711a8eeb98b4292b4fd36b1 100644 (file)
@@ -11,9 +11,9 @@
 
 #include "compat/cppunit.h"
 
-class testHttp1Parser : public CPPUNIT_NS::TestFixture
+class TestHttp1Parser: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testHttp1Parser );
+    CPPUNIT_TEST_SUITE( TestHttp1Parser );
     // object basics are working, just in case.
     CPPUNIT_TEST( testParserConstruct );
     CPPUNIT_TEST( testDripFeed );
index 05b7d7ae86bb04075f16cc2fa9e6a3ab727b946b..ec28c57a6738a6ed412d1a60550522123c8ae3c1 100644 (file)
@@ -16,7 +16,7 @@
 #include "testHttpReply.h"
 #include "unitTestMain.h"
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testHttpReply );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestHttpReply );
 
 class SquidConfig Config;
 
@@ -32,14 +32,14 @@ MemObject::endOffset() const
 /* end */
 
 void
-testHttpReply::setUp()
+TestHttpReply::setUp()
 {
     Mem::Init();
     httpHeaderInitModule();
 }
 
 void
-testHttpReply::testSanityCheckFirstLine()
+TestHttpReply::testSanityCheckFirstLine()
 {
     MemBuf input;
     HttpReply engine;
index 3d01f38ab4fe28a1de42c9b2254464fe618421b1..152b294a4ab6171b4caa691c76214b4bd461f2be 100644 (file)
@@ -15,9 +15,9 @@
  * test HttpReply
  */
 
-class testHttpReply : public CPPUNIT_NS::TestFixture
+class TestHttpReply: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testHttpReply );
+    CPPUNIT_TEST_SUITE( TestHttpReply );
     CPPUNIT_TEST( testSanityCheckFirstLine );
     CPPUNIT_TEST_SUITE_END();
 
index 1fda137a3f25be6a03eb885eade8cda01dbb31be..fb4b689cf30ebcd9b6a1484e45ed16de3204819c 100644 (file)
@@ -17,7 +17,7 @@
 #include "testHttpRequest.h"
 #include "unitTestMain.h"
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testHttpRequest );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestHttpRequest );
 
 /** wrapper for testing HttpRequest object private and protected functions */
 class PrivateHttpRequest : public HttpRequest
@@ -30,7 +30,7 @@ public:
 /* init memory pools */
 
 void
-testHttpRequest::setUp()
+TestHttpRequest::setUp()
 {
     Mem::Init();
     AnyP::UriScheme::Init();
@@ -41,7 +41,7 @@ testHttpRequest::setUp()
  * Test creating an HttpRequest object from a Url and method
  */
 void
-testHttpRequest::testCreateFromUrl()
+TestHttpRequest::testCreateFromUrl()
 {
     /* vanilla url, implicit method */
     unsigned short expected_port;
@@ -102,7 +102,7 @@ testHttpRequest::testCreateFromUrl()
  * Test BUG: URL '2000:800:45' opens host 2000 port 800 !!
  */
 void
-testHttpRequest::testIPv6HostColonBug()
+TestHttpRequest::testIPv6HostColonBug()
 {
     unsigned short expected_port;
     HttpRequest *aRequest = nullptr;
@@ -140,7 +140,7 @@ testHttpRequest::testIPv6HostColonBug()
 }
 
 void
-testHttpRequest::testSanityCheckStartLine()
+TestHttpRequest::testSanityCheckStartLine()
 {
     MemBuf input;
     const auto mx = MasterXaction::MakePortless<XactionInitiator::initHtcp>();
index 3605edebb497cef8a38d2a774242d40c44292f56..9c03e2733f2ccc6faa10ab77669a1696e07062f3 100644 (file)
@@ -15,9 +15,9 @@
  * test HttpRequest
  */
 
-class testHttpRequest : public CPPUNIT_NS::TestFixture
+class TestHttpRequest: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testHttpRequest );
+    CPPUNIT_TEST_SUITE( TestHttpRequest );
     CPPUNIT_TEST( testCreateFromUrl );
     CPPUNIT_TEST( testIPv6HostColonBug );
     CPPUNIT_TEST( testSanityCheckStartLine );
index 75e9557f09b1a4494efcddffcd47f3ff83d4c03f..8f781b01702afc16cdb0f30e7ac932381d0d4e66 100644 (file)
 
 #include <sstream>
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testHttpRequestMethod );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestHttpRequestMethod );
 
 /*
  * We should be able to make an HttpRequestMethod straight from a string.
  */
 void
-testHttpRequestMethod::testConstructCharStart()
+TestHttpRequestMethod::testConstructCharStart()
 {
     // string in SBuf
 
@@ -59,7 +59,7 @@ testHttpRequestMethod::testConstructCharStart()
  * We can also parse precise ranges of characters with SBuf
  */
 void
-testHttpRequestMethod::testConstructCharStartEnd()
+TestHttpRequestMethod::testConstructCharStartEnd()
 {
     char const * buffer;
     /* parse an empty string -> Http::METHOD_NONE */
@@ -75,7 +75,7 @@ testHttpRequestMethod::testConstructCharStartEnd()
  * we should be able to assign a Http::MethodType to a HttpRequestMethod
  */
 void
-testHttpRequestMethod::testAssignFrommethod_t()
+TestHttpRequestMethod::testAssignFrommethod_t()
 {
     HttpRequestMethod method;
     method = Http::METHOD_NONE;
@@ -88,7 +88,7 @@ testHttpRequestMethod::testAssignFrommethod_t()
  * a default constructed HttpRequestMethod is == Http::METHOD_NONE
  */
 void
-testHttpRequestMethod::testDefaultConstructor()
+TestHttpRequestMethod::testDefaultConstructor()
 {
     HttpRequestMethod lhs;
     HttpRequestMethod rhs(Http::METHOD_NONE);
@@ -99,7 +99,7 @@ testHttpRequestMethod::testDefaultConstructor()
  * we should be able to construct a HttpRequestMethod from a Http::MethodType
  */
 void
-testHttpRequestMethod::testConstructmethod_t()
+TestHttpRequestMethod::testConstructmethod_t()
 {
     CPPUNIT_ASSERT_EQUAL(HttpRequestMethod(Http::METHOD_NONE), HttpRequestMethod(Http::METHOD_NONE));
     CPPUNIT_ASSERT_EQUAL(HttpRequestMethod(Http::METHOD_POST), HttpRequestMethod(Http::METHOD_POST));
@@ -110,7 +110,7 @@ testHttpRequestMethod::testConstructmethod_t()
  * we should be able to get a char const * version of the method.
  */
 void
-testHttpRequestMethod::testImage()
+TestHttpRequestMethod::testImage()
 {
     // relaxed RFC-compliance parse HTTP methods are upgraded to correct case
     Config.onoff.relaxed_header_parser = 1;
@@ -130,7 +130,7 @@ testHttpRequestMethod::testImage()
  * matches
  */
 void
-testHttpRequestMethod::testEqualmethod_t()
+TestHttpRequestMethod::testEqualmethod_t()
 {
     CPPUNIT_ASSERT(HttpRequestMethod(Http::METHOD_NONE) == Http::METHOD_NONE);
     CPPUNIT_ASSERT(not (HttpRequestMethod(Http::METHOD_POST) == Http::METHOD_GET));
@@ -142,7 +142,7 @@ testHttpRequestMethod::testEqualmethod_t()
  * an HttpRequestMethod should testable for inequality without fail maatches
  */
 void
-testHttpRequestMethod::testNotEqualmethod_t()
+TestHttpRequestMethod::testNotEqualmethod_t()
 {
     CPPUNIT_ASSERT(HttpRequestMethod(Http::METHOD_NONE) != Http::METHOD_GET);
     CPPUNIT_ASSERT(not (HttpRequestMethod(Http::METHOD_POST) != Http::METHOD_POST));
@@ -154,7 +154,7 @@ testHttpRequestMethod::testNotEqualmethod_t()
  * we should be able to send it to a stream and get the normalised version
  */
 void
-testHttpRequestMethod::testStream()
+TestHttpRequestMethod::testStream()
 {
     // relaxed RFC-compliance parse HTTP methods are upgraded to correct case
     Config.onoff.relaxed_header_parser = 1;
index 691657c36ffed761dfa3f098b40abaed7ec9c06b..7f47fb0d40634e99269a79a4a169d1bebacd3402 100644 (file)
@@ -15,9 +15,9 @@
  * test HttpRequestMethod
  */
 
-class testHttpRequestMethod : public CPPUNIT_NS::TestFixture
+class TestHttpRequestMethod: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testHttpRequestMethod );
+    CPPUNIT_TEST_SUITE( TestHttpRequestMethod );
     CPPUNIT_TEST( testAssignFrommethod_t );
     CPPUNIT_TEST( testConstructmethod_t );
     CPPUNIT_TEST( testConstructCharStart );
index a1e1e122859492fc3d0a276840619f33285170c5..5b93c739cc12effc58d83f4d90b94403b61fad51 100644 (file)
 
 #include <cppunit/TestAssert.h>
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testIcmp );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestIcmp );
 
 void
-testIcmp::testChecksum()
+TestIcmp::testChecksum()
 {
 #if USE_ICMP
-    stubIcmp icmp;
+    IcmpStub icmp;
     uint16_t buf[10], tmpval;
     for (tmpval=0; tmpval < 10; ++tmpval)
         buf[tmpval]=htons(1+tmpval);
@@ -72,10 +72,10 @@ testIcmp::testChecksum()
 }
 
 void
-testIcmp::testHops()
+TestIcmp::testHops()
 {
 #if USE_ICMP
-    stubIcmp icmp;
+    IcmpStub icmp;
 
     /* test invalid -(under values) */
     // negative     : n > 33
index 646eaa50bad49c471f517e3a07b4b6abb130c1c7..5cdda1c1858e82aa60725077b06536efc80b12b8 100644 (file)
 
 #include "icmp/Icmp.h"
 
-class stubIcmp : public Icmp
+class IcmpStub: public Icmp
 {
 public:
-    stubIcmp() {};
-    ~stubIcmp() override {};
+    IcmpStub() {};
+    ~IcmpStub() override {};
     int Open() override { return 0; };
     void Close() override {};
 
@@ -38,9 +38,9 @@ public:
 /**
  * test the ICMP base class.
  */
-class testIcmp : public CPPUNIT_NS::TestFixture
+class TestIcmp: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testIcmp );
+    CPPUNIT_TEST_SUITE( TestIcmp );
     CPPUNIT_TEST( testChecksum );
     CPPUNIT_TEST( testHops );
     CPPUNIT_TEST_SUITE_END();
index 851c0aca1943a60b185b1b64d71496ae2bae468f..bb2cef4d764ec3a3cf9ffa2c6b35cfb6d03f0086 100644 (file)
 #include <netdb.h>
 #endif
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testIpAddress );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestIpAddress );
 
 void
-testIpAddress::testDefaults()
+TestIpAddress::testDefaults()
 {
     Ip::Address anIPA;
 
@@ -42,7 +42,7 @@ testIpAddress::testDefaults()
 }
 
 void
-testIpAddress::testInAddrConstructor()
+TestIpAddress::testInAddrConstructor()
 {
     struct in_addr inval;
     struct in_addr outval;
@@ -64,7 +64,7 @@ testIpAddress::testInAddrConstructor()
 }
 
 void
-testIpAddress::testInAddr6Constructor()
+TestIpAddress::testInAddr6Constructor()
 {
     struct in6_addr inval;
     struct in6_addr outval = IN6ADDR_ANY_INIT;
@@ -88,7 +88,7 @@ testIpAddress::testInAddr6Constructor()
 }
 
 void
-testIpAddress::testSockAddrConstructor()
+TestIpAddress::testSockAddrConstructor()
 {
     struct sockaddr_in insock;
     struct sockaddr_in outsock;
@@ -117,7 +117,7 @@ testIpAddress::testSockAddrConstructor()
 }
 
 void
-testIpAddress::testSockAddr6Constructor()
+TestIpAddress::testSockAddr6Constructor()
 {
     struct sockaddr_in6 insock;
     struct sockaddr_in6 outsock;
@@ -149,7 +149,7 @@ testIpAddress::testSockAddr6Constructor()
 }
 
 void
-testIpAddress::testCopyConstructor()
+TestIpAddress::testCopyConstructor()
 {
     struct sockaddr_in insock;
     struct sockaddr_in outsock;
@@ -179,7 +179,7 @@ testIpAddress::testCopyConstructor()
 }
 
 void
-testIpAddress::testHostentConstructor()
+TestIpAddress::testHostentConstructor()
 {
     struct hostent *hp = nullptr;
     struct in_addr outval;
@@ -204,7 +204,7 @@ testIpAddress::testHostentConstructor()
 }
 
 void
-testIpAddress::testStringConstructor()
+TestIpAddress::testStringConstructor()
 {
     struct in_addr outval;
     struct in_addr expectval;
@@ -267,7 +267,7 @@ testIpAddress::testStringConstructor()
 }
 
 void
-testIpAddress::testsetEmpty()
+TestIpAddress::testsetEmpty()
 {
     Ip::Address anIPA;
     struct in_addr inval;
@@ -296,7 +296,7 @@ testIpAddress::testsetEmpty()
 }
 
 void
-testIpAddress::testBooleans()
+TestIpAddress::testBooleans()
 {
     Ip::Address lhsIPA;
     Ip::Address rhsIPA;
@@ -408,7 +408,7 @@ testIpAddress::testBooleans()
 }
 
 void
-testIpAddress::testtoStr()
+TestIpAddress::testtoStr()
 {
     struct in_addr inval;
     char buf[MAX_IPSTRLEN];
@@ -432,7 +432,7 @@ testIpAddress::testtoStr()
 }
 
 void
-testIpAddress::testtoUrl_fromInAddr()
+TestIpAddress::testtoUrl_fromInAddr()
 {
     char buf[MAX_IPSTRLEN];
     buf[0] = '\0';
@@ -461,7 +461,7 @@ testIpAddress::testtoUrl_fromInAddr()
 }
 
 void
-testIpAddress::testtoUrl_fromSockAddr()
+TestIpAddress::testtoUrl_fromSockAddr()
 {
     struct sockaddr_in sock;
     sock.sin_addr.s_addr = htonl(0xC0A8640C);
@@ -498,7 +498,7 @@ testIpAddress::testtoUrl_fromSockAddr()
 }
 
 void
-testIpAddress::testgetReverseString()
+TestIpAddress::testgetReverseString()
 {
     char buf[MAX_IPSTRLEN];
 
@@ -532,7 +532,7 @@ testIpAddress::testgetReverseString()
 }
 
 void
-testIpAddress::testMasking()
+TestIpAddress::testMasking()
 {
     char buf[MAX_IPSTRLEN];
     Ip::Address anIPA;
@@ -613,7 +613,7 @@ testIpAddress::testMasking()
 }
 
 void
-testIpAddress::testAddrInfo()
+TestIpAddress::testAddrInfo()
 {
     struct addrinfo *expect;
     struct addrinfo *ipval = nullptr;
@@ -677,7 +677,7 @@ testIpAddress::testAddrInfo()
 }
 
 void
-testIpAddress::testBugNullingDisplay()
+TestIpAddress::testBugNullingDisplay()
 {
     // Weird Bug: address set to empty during string conversion somewhere.
     // initial string gets created and returned OK.
index f2320710d10226cfa73f8f3fa16177ec86481661..97d1cac8b4ef37a0eae2b2f151b881b01b2361f0 100644 (file)
@@ -15,9 +15,9 @@
  * test the IP storage type
  */
 
-class testIpAddress : public CPPUNIT_NS::TestFixture
+class TestIpAddress: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testIpAddress );
+    CPPUNIT_TEST_SUITE( TestIpAddress );
     CPPUNIT_TEST( testDefaults );
     CPPUNIT_TEST( testInAddrConstructor );
     CPPUNIT_TEST( testInAddr6Constructor );
index dcff5e57ca64ff1f06a72dea5586ce6ddb7221d5..306889d247e50ecb0d180698be4baf9ae4fe39d3 100644 (file)
@@ -11,7 +11,7 @@
 #include "testLookupTable.h"
 #include "unitTestMain.h"
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testLookupTable );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestLookupTable );
 
 enum EnumData {
     ENUM_1,
@@ -36,7 +36,7 @@ static const LookupTable<EnumData>::Record tableData[] = {
 };
 
 void
-testLookupTable::testLookupTableLookup()
+TestLookupTable::testLookupTableLookup()
 {
     LookupTable<EnumData> lt(ENUM_INVALID, tableData);
     // element found
index f944a50c0d9b38d1549d76f44baf14a1c72a4246..c1da774f4342b0cbb5d55ac53a601fe687317e7b 100644 (file)
@@ -11,9 +11,9 @@
 
 #include "compat/cppunit.h"
 
-class testLookupTable : public CPPUNIT_NS::TestFixture
+class TestLookupTable: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testLookupTable );
+    CPPUNIT_TEST_SUITE( TestLookupTable );
     CPPUNIT_TEST( testLookupTableLookup );
     CPPUNIT_TEST_SUITE_END();
 public:
index 6fce58c3a37008301d17b0dc3fc89c110bdd8203..9fd69ee2df9888bb6f859b2cbef7eb97c6fedb92 100644 (file)
@@ -15,7 +15,7 @@
 #include <iostream>
 #include <stdexcept>
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testMem );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestMem );
 
 class SomethingToAlloc
 {
@@ -32,7 +32,7 @@ public:
 };
 
 void
-testMem::testMemPool()
+TestMem::testMemPool()
 {
     const auto Pool = memPoolCreate("Test Pool", sizeof(SomethingToAlloc));
     CPPUNIT_ASSERT(Pool);
@@ -53,7 +53,7 @@ testMem::testMemPool()
 }
 
 void
-testMem::testMemProxy()
+TestMem::testMemProxy()
 {
     auto *something = new MoreToAlloc;
     CPPUNIT_ASSERT(something);
index 0b99748dd4932e154343c9e059e51fa0a795a917..83f1ee6aaf0715f9e8610e9b46fc2706ce078ba4 100644 (file)
@@ -11,9 +11,9 @@
 
 #include "compat/cppunit.h"
 
-class testMem : public CPPUNIT_NS::TestFixture
+class TestMem: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testMem );
+    CPPUNIT_TEST_SUITE( TestMem );
     /* note the statement here and then the actual prototype below */
     CPPUNIT_TEST( testMemPool );
     CPPUNIT_TEST( testMemProxy );
index 5a078ce5284b1ac98b9365d34713efa03d7b84f8..03a9419af7382ffba5f8e556fbf3b166d0269999 100644 (file)
 
 #include <stdexcept>
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testNetDb );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestNetDb );
 
 void
-testNetDb::testConstruct()
+TestNetDb::testConstruct()
 {
     // default construct and destruct
     {
index c2a8dec691294b4c37ff26fc4d8ff1e8b9a48100..ca6839c03395b7135d02ab20420355b49c6cad88 100644 (file)
@@ -11,9 +11,9 @@
 
 #include "compat/cppunit.h"
 
-class testNetDb : public CPPUNIT_NS::TestFixture
+class TestNetDb: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testNetDb );
+    CPPUNIT_TEST_SUITE( TestNetDb );
     /* note the statement here and then the actual prototype below */
     CPPUNIT_TEST( testConstruct );
     CPPUNIT_TEST_SUITE_END();
index 2e3c923ffffb01709bfdb154c98c44577ba9a7e5..769b76ff45353b72552074170efe01dfa6c6686d 100644 (file)
 #include <iomanip>
 #include <cppunit/TestAssert.h>
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testPackableStream );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestPackableStream );
 
 /* init memory pools */
 
-void testPackableStream::setUp()
+void TestPackableStream::setUp()
 {
     Mem::Init();
 }
@@ -28,7 +28,7 @@ void testPackableStream::setUp()
 // TODO: test streaming to a MemBuf as well.
 
 void
-testPackableStream::testGetStream()
+TestPackableStream::testGetStream()
 {
     /* Setup a store root so we can create a StoreEntry */
     Store::Init();
index 47da3b725a39d2efac2af0eb2503339dcb5bf39d..5549874f03ca5a3fe5bfe38a4313b99ade30a7ce 100644 (file)
@@ -15,9 +15,9 @@
  * test PackableStream
  */
 
-class testPackableStream : public CPPUNIT_NS::TestFixture
+class TestPackableStream: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testPackableStream );
+    CPPUNIT_TEST_SUITE( TestPackableStream );
     CPPUNIT_TEST( testGetStream );
     CPPUNIT_TEST_SUITE_END();
 
index 3bcf0c8ccc7635574bd5cf40f3ffb6a8b69e4e3a..0caefaeb0441fa2e36c775bed422f6aaebcac1e5 100644 (file)
 
 #include <cassert>
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testRFC1035 );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestRfc1035 );
 
 // TODO Test each function in the Library independently
 //  Just because we can for global functions.
 //  It's good for the code too.
 
-void testRFC1035::testHeaderUnpack()
+void TestRfc1035::testHeaderUnpack()
 {
     /* Setup a buffer with the known-content packet */
     const char *buf = "\x76\xb1\x81\x80\x00\x01\x00\x01\x00\x02\x00\x02\x03\x77\x77\x77\x07\x67\x61\x6d\x65\x64\x65\x76\x03\x6e\x65\x74\x00\x00\x01\x00\x01\xc0\x0c\x00\x01\x00\x01\x00\x00\x00\xef\x00\x04\xd8\xb9\x60\xea\xc0\x10\x00\x02\x00\x01\x00\x00\x00\xef\x00\x0f\x03\x6e\x73\x32\x05\x7a\x77\x61\x76\x65\x03\x63\x6f\x6d\x00\xc0\x10\x00\x02\x00\x01\x00\x00\x00\xef\x00\x06\x03\x6e\x73\x31\xc0\x41\xc0\x3d\x00\x01\x00\x01\x00\x00\x29\x6b\x00\x04\xd8\xea\xee\x4a\xc0\x58\x00\x01\x00\x01\x00\x00\x29\x6b\x00\x04\xd8\xea\xee\x4b";
@@ -52,7 +52,7 @@ void testRFC1035::testHeaderUnpack()
     msg = nullptr;
 }
 
-void testRFC1035::testParseAPacket()
+void TestRfc1035::testParseAPacket()
 {
     /* Setup a buffer with the known-content packet */
     const char *buf = "\x76\xb1\x81\x80\x00\x01\x00\x01\x00\x02\x00\x02\x03\x77\x77\x77\x07\x67\x61\x6d\x65\x64\x65\x76\x03\x6e\x65\x74\x00\x00\x01\x00\x01\xc0\x0c\x00\x01\x00\x01\x00\x00\x00\xef\x00\x04\xd8\xb9\x60\xea\xc0\x10\x00\x02\x00\x01\x00\x00\x00\xef\x00\x0f\x03\x6e\x73\x32\x05\x7a\x77\x61\x76\x65\x03\x63\x6f\x6d\x00\xc0\x10\x00\x02\x00\x01\x00\x00\x00\xef\x00\x06\x03\x6e\x73\x31\xc0\x41\xc0\x3d\x00\x01\x00\x01\x00\x00\x29\x6b\x00\x04\xd8\xea\xee\x4a\xc0\x58\x00\x01\x00\x01\x00\x00\x29\x6b\x00\x04\xd8\xea\xee\x4b";
@@ -70,7 +70,7 @@ void testRFC1035::testParseAPacket()
     CPPUNIT_ASSERT(msg == nullptr);
 }
 
-void testRFC1035::testBugPacketEndingOnCompressionPtr()
+void TestRfc1035::testBugPacketEndingOnCompressionPtr()
 {
     /* Setup a buffer with the known-to-fail packet */
     const char *buf = "\xec\x7b\x81\x80\x00\x01\x00\x01\x00\x00\x00\x00\x05\x62\x75\x72\x73\x74\x02\x74\x65\x06\x74\x61\x63\x6f\x64\x61\x03\x6e\x65\x74\x00\x00\x1c\x00\x01\xc0\x0c\x00\x05\x00\x01\x00\x00\x19\xe5\x00\x0a\x02\x74\x65\x04\x67\x73\x6c\x62\xc0\x15";
@@ -113,7 +113,7 @@ void testRFC1035::testBugPacketEndingOnCompressionPtr()
     rfc1035MessageDestroy(&msg);
 }
 
-void testRFC1035::testBugPacketHeadersOnly()
+void TestRfc1035::testBugPacketHeadersOnly()
 {
     /* Setup a buffer with the known-to-fail headers-only packet */
     const char *buf = "\xab\xcd\x81\x80\x00\x01\x00\x05\x00\x04\x00\x04";
index 5fa1fd7a712ed47551ab6d904cb7920cfe10f0a3..f4621bdec02a60f3dce0e44bc996c95d0ecac1c4 100644 (file)
@@ -15,9 +15,9 @@
  * test the DNS resolver RFC 1035 Engine
  */
 
-class testRFC1035 : public CPPUNIT_NS::TestFixture
+class TestRfc1035: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testRFC1035 );
+    CPPUNIT_TEST_SUITE( TestRfc1035 );
     CPPUNIT_TEST( testHeaderUnpack );
     CPPUNIT_TEST( testParseAPacket );
 
index 8c9dffa05117157d4e0eabb92e1ca1a98b68029c..08dd2b520602e281f45225a4681173699ec6fbff 100644 (file)
@@ -13,7 +13,7 @@
 #include "testRefCount.h"
 #include "unitTestMain.h"
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testRefCount );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestRefCount );
 
 class _ToRefCount : public RefCountable
 {
@@ -48,7 +48,7 @@ public:
 };
 
 void
-testRefCount::testCountability()
+TestRefCount::testCountability()
 {
     {
         CPPUNIT_ASSERT_EQUAL(0, _ToRefCount::Instances);
@@ -80,7 +80,7 @@ testRefCount::testCountability()
 }
 
 void
-testRefCount::testObjectToRefCounted()
+TestRefCount::testObjectToRefCounted()
 {
     /* Test creating an object, using it , and then making available as a
      * refcounted one:
@@ -93,7 +93,7 @@ testRefCount::testObjectToRefCounted()
 }
 
 void
-testRefCount::testStandalonePointer()
+TestRefCount::testStandalonePointer()
 {
     /* standalone pointers should be usable */
     ToRefCount anObject;
@@ -101,7 +101,7 @@ testRefCount::testStandalonePointer()
 }
 
 void
-testRefCount::testCheckPointers()
+TestRefCount::testCheckPointers()
 {
     /* Can we check pointers for equality */
     ToRefCount anObject;
@@ -118,7 +118,7 @@ testRefCount::testCheckPointers()
 }
 
 void
-testRefCount::testPointerConst()
+TestRefCount::testPointerConst()
 {
     /* Can we get the pointer for a const object */
     CPPUNIT_ASSERT_EQUAL(0, _ToRefCount::Instances);
@@ -130,7 +130,7 @@ testRefCount::testPointerConst()
     CPPUNIT_ASSERT_EQUAL(1, _ToRefCount::Instances);
 }
 
-void testRefCount::testRefCountFromConst()
+void TestRefCount::testRefCountFromConst()
 {
     /* Can we get a refcounted pointer from a const object */
     CPPUNIT_ASSERT_EQUAL(0, _ToRefCount::Instances);
@@ -142,7 +142,7 @@ void testRefCount::testRefCountFromConst()
 }
 
 void
-testRefCount::testPointerFromRefCounter()
+TestRefCount::testPointerFromRefCounter()
 {
     /* Can we get a pointer to nonconst from a nonconst refcounter */
     CPPUNIT_ASSERT_EQUAL(0, _ToRefCount::Instances);
@@ -154,7 +154,7 @@ testRefCount::testPointerFromRefCounter()
 }
 
 void
-testRefCount::testDoubleInheritToSingleInherit()
+TestRefCount::testDoubleInheritToSingleInherit()
 {
 
     CPPUNIT_ASSERT_EQUAL(0, _ToRefCount::Instances);
index c62fd37da36f3c51c17ec7a16e36abb6f0486929..a42a185dd4b686ff70deff5abc1fa6c2635f3e22 100644 (file)
@@ -11,9 +11,9 @@
 
 #include "compat/cppunit.h"
 
-class testRefCount : public CPPUNIT_NS::TestFixture
+class TestRefCount: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testRefCount );
+    CPPUNIT_TEST_SUITE( TestRefCount );
     CPPUNIT_TEST( testCountability );
     CPPUNIT_TEST( testObjectToRefCounted );
     CPPUNIT_TEST( testStandalonePointer );
index 32f2b5f45c6a8c78acb3aea388ae7fec2d37a941..859594f3076e6f4bc054f288d36ccf7d72f95378 100644 (file)
 
 #define TESTDIR "tr"
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testRock );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestRock );
 
 extern REMOVALPOLICYCREATE createRemovalPolicy_lru;
 
 static char cwd[MAXPATHLEN];
 
 static void
-addSwapDir(testRock::SwapDirPointer aStore)
+addSwapDir(TestRock::SwapDirPointer aStore)
 {
     allocate_new_swapdir(Config.cacheSwap);
     Config.cacheSwap.swapDirs[Config.cacheSwap.n_configured] = aStore.getRaw();
@@ -51,7 +51,7 @@ addSwapDir(testRock::SwapDirPointer aStore)
 }
 
 void
-testRock::setUp()
+TestRock::setUp()
 {
     CPPUNIT_NS::TestFixture::setUp();
 
@@ -95,7 +95,7 @@ testRock::setUp()
 }
 
 void
-testRock::tearDown()
+TestRock::tearDown()
 {
     CPPUNIT_NS::TestFixture::tearDown();
 
@@ -117,7 +117,7 @@ testRock::tearDown()
 }
 
 void
-testRock::commonInit()
+TestRock::commonInit()
 {
     static bool inited = false;
 
@@ -153,7 +153,7 @@ testRock::commonInit()
 }
 
 void
-testRock::storeInit()
+TestRock::storeInit()
 {
     /* ok, ready to use */
     Store::Root().init();
@@ -184,7 +184,7 @@ storeId(const int i)
 }
 
 StoreEntry *
-testRock::createEntry(const int i)
+TestRock::createEntry(const int i)
 {
     RequestFlags flags;
     flags.cachable.support();
@@ -199,7 +199,7 @@ testRock::createEntry(const int i)
 }
 
 StoreEntry *
-testRock::addEntry(const int i)
+TestRock::addEntry(const int i)
 {
     StoreEntry *const pe = createEntry(i);
 
@@ -214,13 +214,13 @@ testRock::addEntry(const int i)
 }
 
 StoreEntry *
-testRock::getEntry(const int i)
+TestRock::getEntry(const int i)
 {
     return storeGetPublic(storeId(i), Http::METHOD_GET);
 }
 
 void
-testRock::testRockCreate()
+TestRock::testRockCreate()
 {
     struct stat sb;
 
@@ -232,7 +232,7 @@ testRock::testRockCreate()
 }
 
 void
-testRock::testRockSwapOut()
+TestRock::testRockSwapOut()
 {
     storeInit();
 
@@ -253,7 +253,7 @@ testRock::testRockSwapOut()
 
         CPPUNIT_ASSERT_EQUAL(SWAPOUT_DONE, pe->swap_status);
 
-        pe->unlock("testRock::testRockSwapOut priming");
+        pe->unlock("TestRock::testRockSwapOut priming");
     }
 
     CPPUNIT_ASSERT_EQUAL((uint64_t)5, store->currentCount());
@@ -266,7 +266,7 @@ testRock::testRockSwapOut()
         CPPUNIT_ASSERT_EQUAL(SWAPOUT_NONE, pe->swap_status);
         CPPUNIT_ASSERT_EQUAL(-1, pe->swap_dirn);
         CPPUNIT_ASSERT_EQUAL(-1, pe->swap_filen);
-        pe->unlock("testRock::testRockSwapOut e#3");
+        pe->unlock("TestRock::testRockSwapOut e#3");
 
         // after marking the old entry as deleted
         StoreEntry *const pe2 = getEntry(4);
@@ -283,7 +283,7 @@ testRock::testRockSwapOut()
 
         CPPUNIT_ASSERT_EQUAL(SWAPOUT_DONE, pe3->swap_status);
 
-        pe->unlock("testRock::testRockSwapOut e#4");
+        pe->unlock("TestRock::testRockSwapOut e#4");
     }
 
     // try to swap out entry to a used locked slot
@@ -304,8 +304,8 @@ testRock::testRockSwapOut()
         StockEventLoop loop;
         loop.run();
 
-        pe->unlock("testRock::testRockSwapOut e#5.1");
-        pe2->unlock("testRock::testRockSwapOut e#5.2");
+        pe->unlock("TestRock::testRockSwapOut e#5.1");
+        pe2->unlock("TestRock::testRockSwapOut e#5.2");
 
         // pe2 has the same public key as pe so it marks old pe for release
         // here, we add another entry #5 into the now-available slot
@@ -315,7 +315,7 @@ testRock::testRockSwapOut()
         CPPUNIT_ASSERT(pe3->swap_filen >= 0);
         loop.run();
         CPPUNIT_ASSERT_EQUAL(SWAPOUT_DONE, pe3->swap_status);
-        pe3->unlock("testRock::testRockSwapOut e#5.3");
+        pe3->unlock("TestRock::testRockSwapOut e#5.3");
     }
 
     CPPUNIT_ASSERT_EQUAL((uint64_t)6, store->currentCount());
index 93adf6349af27062309243c491022fccad8a84f4..cf3d32217830d1a89fb1b4eadc63a37b070f57e2 100644 (file)
  * test the store framework
  */
 
-class testRock : public CPPUNIT_NS::TestFixture
+class TestRock: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testRock );
+    CPPUNIT_TEST_SUITE( TestRock );
     CPPUNIT_TEST( testRockCreate );
     CPPUNIT_TEST( testRockSwapOut );
     CPPUNIT_TEST_SUITE_END();
 
 public:
-    testRock() : rr(nullptr) {}
+    TestRock() : rr(nullptr) {}
     void setUp() override;
     void tearDown() override;
 
index 259a05aa18429f3ae4af663414a3b3243bb421da..acfb9bd0807ab92c668c83de9013fd4421865395 100644 (file)
@@ -20,7 +20,7 @@
 #include <stdexcept>
 #include <unordered_map>
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testSBuf );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestSBuf );
 
 /* let this test link sanely */
 #include "event.h"
@@ -45,7 +45,7 @@ SBuf empty_sbuf;
 SBuf literal("The quick brown fox jumped over the lazy dog");
 
 void
-testSBuf::testSBufConstructDestruct()
+TestSBuf::testSBufConstructDestruct()
 {
     /* NOTE: Do not initialize memory here because we need
      * to test correct operation before and after Mem::Init
@@ -125,14 +125,14 @@ testSBuf::testSBufConstructDestruct()
 }
 
 void
-testSBuf::testSBufConstructDestructAfterMemInit()
+TestSBuf::testSBufConstructDestructAfterMemInit()
 {
     Mem::Init();
     testSBufConstructDestruct();
 }
 
 void
-testSBuf::testEqualityTest()
+TestSBuf::testEqualityTest()
 {
     SBuf s1(fox),s2(fox);
     CPPUNIT_ASSERT_EQUAL(s1,s1); //self-equality
@@ -150,7 +150,7 @@ testSBuf::testEqualityTest()
 }
 
 void
-testSBuf::testAppendSBuf()
+TestSBuf::testAppendSBuf()
 {
     const SBuf appendix(fox1);
     const char * const rawAppendix = appendix.rawContent();
@@ -171,7 +171,7 @@ testSBuf::testAppendSBuf()
 }
 
 void
-testSBuf::testPrintf()
+TestSBuf::testPrintf()
 {
     SBuf s1,s2;
     s1.Printf("%s:%d:%03.3f","fox",10,12345.67);
@@ -180,7 +180,7 @@ testSBuf::testPrintf()
 }
 
 void
-testSBuf::testAppendCString()
+TestSBuf::testAppendCString()
 {
     SBuf s1(fox1);
     s1.append(fox2);
@@ -188,7 +188,7 @@ testSBuf::testAppendCString()
 }
 
 void
-testSBuf::testAppendStdString()
+TestSBuf::testAppendStdString()
 {
     const char *alphabet="abcdefghijklmnopqrstuvwxyz";
     {
@@ -213,7 +213,7 @@ testSBuf::testAppendStdString()
 }
 
 void
-testSBuf::testAppendf()
+TestSBuf::testAppendf()
 {
     SBuf s1,s2;
     s1.appendf("%s:%d:%03.2f",fox,1234,1234.56);
@@ -222,7 +222,7 @@ testSBuf::testAppendf()
 }
 
 void
-testSBuf::testDumpStats()
+TestSBuf::testDumpStats()
 {
     SBuf::GetStats().dump(std::cout);
     MemBlob::GetStats().dump(std::cout);
@@ -231,7 +231,7 @@ testSBuf::testDumpStats()
 }
 
 void
-testSBuf::testSubscriptOp()
+TestSBuf::testSubscriptOp()
 {
     SBuf chg(literal);
     CPPUNIT_ASSERT_EQUAL(chg[5],'u');
@@ -243,7 +243,7 @@ testSBuf::testSubscriptOp()
 // note: can't use cppunit's CPPUNIT_TEST_EXCEPTION because TextException asserts, and
 // so the test can't be properly completed.
 void
-testSBuf::testSubscriptOpFail()
+TestSBuf::testSubscriptOpFail()
 {
     char c;
     c=literal.at(literal.length()); //out of bounds by 1
@@ -318,7 +318,7 @@ testComparisonStd(const char *s1, const char *s2)
 }
 
 void
-testSBuf::testComparisons()
+TestSBuf::testComparisons()
 {
     //same length
     SBuf s1("foo"),s2("foe");
@@ -389,7 +389,7 @@ testSBuf::testComparisons()
 }
 
 void
-testSBuf::testConsume()
+TestSBuf::testConsume()
 {
     SBuf s1(literal),s2,s3;
     s2=s1.consume(4);
@@ -402,7 +402,7 @@ testSBuf::testConsume()
 }
 
 void
-testSBuf::testRawContent()
+TestSBuf::testRawContent()
 {
     SBuf s1(literal);
     SBuf s2(s1);
@@ -415,7 +415,7 @@ testSBuf::testRawContent()
 }
 
 void
-testSBuf::testRawSpace()
+TestSBuf::testRawSpace()
 {
     SBuf s1(literal);
     SBuf s2(fox1);
@@ -426,7 +426,7 @@ testSBuf::testRawSpace()
 }
 
 void
-testSBuf::testChop()
+TestSBuf::testChop()
 {
     SBuf s1(literal),s2;
     s1.chop(4,5);
@@ -490,7 +490,7 @@ testSBuf::testChop()
 }
 
 void
-testSBuf::testChomp()
+TestSBuf::testChomp()
 {
     SBuf s1("complete string");
     SBuf s2(s1);
@@ -527,7 +527,7 @@ public:
 };
 
 void
-testSBuf::testSubstr()
+TestSBuf::testSubstr()
 {
     SBuf s1(literal),s2,s3;
     s2=s1.substr(4,5);
@@ -539,7 +539,7 @@ testSBuf::testSubstr()
 }
 
 void
-testSBuf::testFindChar()
+TestSBuf::testFindChar()
 {
     const char *alphabet="abcdefghijklmnopqrstuvwxyz";
     SBuf s1(alphabet);
@@ -596,7 +596,7 @@ testSBuf::testFindChar()
 }
 
 void
-testSBuf::testFindSBuf()
+TestSBuf::testFindSBuf()
 {
     const char *alphabet="abcdefghijklmnopqrstuvwxyz";
     SBuf haystack(alphabet);
@@ -705,7 +705,7 @@ testSBuf::testFindSBuf()
 }
 
 void
-testSBuf::testRFindChar()
+TestSBuf::testRFindChar()
 {
     SBuf s1(literal);
     SBuf::size_type idx;
@@ -715,7 +715,7 @@ testSBuf::testRFindChar()
 }
 
 void
-testSBuf::testRFindSBuf()
+TestSBuf::testRFindSBuf()
 {
     SBuf haystack(literal),afox("fox");
     SBuf goobar("goobar");
@@ -760,14 +760,14 @@ testSBuf::testRFindSBuf()
 }
 
 void
-testSBuf::testSBufLength()
+TestSBuf::testSBufLength()
 {
     SBuf s(fox);
     CPPUNIT_ASSERT_EQUAL(strlen(fox),(size_t)s.length());
 }
 
 void
-testSBuf::testCopy()
+TestSBuf::testCopy()
 {
     char buf[40]; //shorter than literal()
     SBuf s(fox1),s2;
@@ -781,7 +781,7 @@ testSBuf::testCopy()
 }
 
 void
-testSBuf::testStringOps()
+TestSBuf::testStringOps()
 {
     SBuf sng(ToLower(literal)),
          ref("the quick brown fox jumped over the lazy dog");
@@ -795,7 +795,7 @@ testSBuf::testStringOps()
 }
 
 void
-testSBuf::testGrow()
+TestSBuf::testGrow()
 {
     SBuf t;
     t.assign("foo");
@@ -810,7 +810,7 @@ testSBuf::testGrow()
 }
 
 void
-testSBuf::testReserve()
+TestSBuf::testReserve()
 {
     SBufReservationRequirements requirements;
     // use unusual numbers to ensure we do not hit a lucky boundary situation
@@ -944,7 +944,7 @@ testSBuf::testReserve()
 }
 
 void
-testSBuf::testStartsWith()
+TestSBuf::testStartsWith()
 {
     static SBuf casebuf("THE QUICK");
     CPPUNIT_ASSERT(literal.startsWith(SBuf(fox1)));
@@ -961,7 +961,7 @@ testSBuf::testStartsWith()
 }
 
 void
-testSBuf::testSBufStream()
+TestSBuf::testSBufStream()
 {
     SBuf b("const.string, int 10 and a float 10.5");
     SBufStream ss;
@@ -979,7 +979,7 @@ testSBuf::testSBufStream()
 }
 
 void
-testSBuf::testFindFirstOf()
+TestSBuf::testFindFirstOf()
 {
     SBuf haystack(literal);
     SBuf::size_type idx;
@@ -1002,7 +1002,7 @@ testSBuf::testFindFirstOf()
 }
 
 void
-testSBuf::testFindFirstNotOf()
+TestSBuf::testFindFirstNotOf()
 {
     SBuf haystack(literal);
     SBuf::size_type idx;
@@ -1025,14 +1025,14 @@ testSBuf::testFindFirstNotOf()
 }
 
 void
-testSBuf::testAutoFind()
+TestSBuf::testAutoFind()
 {
     SBufFindTest test;
     test.run();
 }
 
 void
-testSBuf::testStdStringOps()
+TestSBuf::testStdStringOps()
 {
     const char *alphabet="abcdefghijklmnopqrstuvwxyz";
     std::string astr(alphabet);
@@ -1041,7 +1041,7 @@ testSBuf::testStdStringOps()
 }
 
 void
-testSBuf::testIterators()
+TestSBuf::testIterators()
 {
     SBuf text("foo"), text2("foo");
     CPPUNIT_ASSERT(text.begin() == text.begin());
@@ -1078,7 +1078,7 @@ testSBuf::testIterators()
 }
 
 void
-testSBuf::testSBufHash()
+TestSBuf::testSBufHash()
 {
     // same SBuf must have same hash
     auto hasher=std::hash<SBuf>();
index 59b0ff52869ac7872b86d44face010510487bf54..3b66acc7ca58efced0c80954d718cdf6c9294a38 100644 (file)
@@ -17,9 +17,9 @@
  * test the SBuf functionalities
  */
 
-class testSBuf : public CPPUNIT_NS::TestFixture
+class TestSBuf: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testSBuf );
+    CPPUNIT_TEST_SUITE( TestSBuf );
     CPPUNIT_TEST( testSBufConstructDestruct );
     CPPUNIT_TEST( testSBufConstructDestructAfterMemInit );
     CPPUNIT_TEST( testSBufLength );
index e607d92e308ed9727f1b1209a92766a5cce20f76..ec05c5b970bd5d6631c2132e25c46871310de9e0 100644 (file)
@@ -12,7 +12,7 @@
 #include "tests/testSBufList.h"
 #include "unitTestMain.h"
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testSBufList );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestSBufList );
 
 SBuf literal("The quick brown fox jumped over the lazy dog");
 static int sbuf_tokens_number=9;
@@ -23,7 +23,7 @@ static SBuf tokens[]= {
 };
 
 void
-testSBufList::testSBufListMembership()
+TestSBufList::testSBufListMembership()
 {
     SBufList foo;
     for (int j=0; j<sbuf_tokens_number; ++j)
@@ -34,7 +34,7 @@ testSBufList::testSBufListMembership()
 }
 
 void
-testSBufList::testSBufListJoin()
+TestSBufList::testSBufListJoin()
 {
     SBufList foo;
     CPPUNIT_ASSERT_EQUAL(SBuf(""),JoinContainerToSBuf(foo.begin(), foo.end(),SBuf()));
index 3e04a5039940dc892391a8b7d03f59bc904ca64e..a22e39e257bc7f6eee4e4c422557fd88703749cc 100644 (file)
@@ -11,9 +11,9 @@
 
 #include "compat/cppunit.h"
 
-class testSBufList : public CPPUNIT_NS::TestFixture
+class TestSBufList: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testSBufList );
+    CPPUNIT_TEST_SUITE( TestSBufList );
     CPPUNIT_TEST( testSBufListMembership );
     CPPUNIT_TEST( testSBufListJoin );
     CPPUNIT_TEST_SUITE_END();
index 4057beec694bfbd9a8f6ee65987b8015fd941862..5e71c55e776ef2a7b82c9d282862ed5dc1596eba 100644 (file)
@@ -11,7 +11,7 @@
 #include "testStatHist.h"
 #include "unitTestMain.h"
 
-CPPUNIT_TEST_SUITE_REGISTRATION(testStatHist);
+CPPUNIT_TEST_SUITE_REGISTRATION( TestStatHist );
 
 typedef enum {
     ZERO, ONE, TWO, THREE, FOUR, FIVE
@@ -41,7 +41,7 @@ InspectingStatHist::operator ==(const InspectingStatHist & src)
 }
 
 void
-testStatHist::testStatHistBaseEquality()
+TestStatHist::testStatHistBaseEquality()
 {
     InspectingStatHist raw, test;
     raw.enumInit(FIVE);
@@ -52,7 +52,7 @@ testStatHist::testStatHistBaseEquality()
 }
 
 void
-testStatHist::testStatHistBaseAssignment()
+TestStatHist::testStatHistBaseAssignment()
 {
     InspectingStatHist raw, test;
     raw.enumInit(FIVE);
@@ -64,7 +64,7 @@ testStatHist::testStatHistBaseAssignment()
 }
 
 void
-testStatHist::testStatHistLog()
+TestStatHist::testStatHistLog()
 {
     const double min=0.0, max=10000.0;
     const int capacity=10;
@@ -83,7 +83,7 @@ testStatHist::testStatHistLog()
 }
 
 void
-testStatHist::testStatHistSum()
+TestStatHist::testStatHistSum()
 {
     InspectingStatHist s1, s2;
     s1.logInit(30,1.0,100.0);
index 9c2dc39518cc9d945e506e8b4982eeab1744b7c9..c49857918431fb71f5051c368c59169e737f53d5 100644 (file)
@@ -15,9 +15,9 @@
 
 #include "compat/cppunit.h"
 
-class testStatHist : public CPPUNIT_NS::TestFixture
+class TestStatHist: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testStatHist );
+    CPPUNIT_TEST_SUITE( TestStatHist );
     CPPUNIT_TEST( testStatHistBaseEquality );
     CPPUNIT_TEST( testStatHistBaseAssignment );
     CPPUNIT_TEST( testStatHistLog );
index 1444ab312a24067d3e2db01e325549b4220234b0..7538f0d8d28aa0c2ffa9cda03dfa7f7779a6ff00 100644 (file)
 
 #include <limits>
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testStore );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestStore );
 
 int
-TestStore::callback()
+StoreControllerStub::callback()
 {
     return 1;
 }
 
 StoreEntry*
-TestStore::get(const cache_key*)
+StoreControllerStub::get(const cache_key*)
 {
     return nullptr;
 }
 
 void
-TestStore::get(String, void (*)(StoreEntry*, void*), void*)
+StoreControllerStub::get(String, void (*)(StoreEntry*, void*), void*)
 {}
 
 void
-TestStore::init()
+StoreControllerStub::init()
 {}
 
 uint64_t
-TestStore::maxSize() const
+StoreControllerStub::maxSize() const
 {
     return 3;
 }
 
 uint64_t
-TestStore::minSize() const
+StoreControllerStub::minSize() const
 {
     return 1;
 }
 
 uint64_t
-TestStore::currentSize() const
+StoreControllerStub::currentSize() const
 {
     return 2;
 }
 
 uint64_t
-TestStore::currentCount() const
+StoreControllerStub::currentCount() const
 {
     return 2;
 }
 
 int64_t
-TestStore::maxObjectSize() const
+StoreControllerStub::maxObjectSize() const
 {
     return 1;
 }
 
 void
-TestStore::getStats(StoreInfoStats &) const
+StoreControllerStub::getStats(StoreInfoStats &) const
 {
 }
 
 void
-TestStore::stat(StoreEntry &) const
+StoreControllerStub::stat(StoreEntry &) const
 {
-    const_cast<TestStore *>(this)->statsCalled = true;
+    const_cast<StoreControllerStub *>(this)->statsCalled = true;
 }
 
 StoreSearch *
-TestStore::search()
+StoreControllerStub::search()
 {
     return nullptr;
 }
 
 void
-testStore::testSetRoot()
+TestStore::testSetRoot()
 {
-    Store::Controller *aStore(new TestStore);
+    Store::Controller *aStore(new StoreControllerStub);
     Store::Init(aStore);
 
     CPPUNIT_ASSERT_EQUAL(&Store::Root(), aStore);
@@ -94,10 +94,10 @@ testStore::testSetRoot()
 }
 
 void
-testStore::testUnsetRoot()
+TestStore::testUnsetRoot()
 {
-    Store::Controller *aStore(new TestStore);
-    Store::Controller *aStore2(new TestStore);
+    Store::Controller *aStore(new StoreControllerStub);
+    Store::Controller *aStore2(new StoreControllerStub);
     Store::Init(aStore);
     Store::FreeMemory();
     Store::Init(aStore2);
@@ -106,9 +106,9 @@ testStore::testUnsetRoot()
 }
 
 void
-testStore::testStats()
+TestStore::testStats()
 {
-    TestStore *aStore(new TestStore);
+    StoreControllerStub *aStore(new StoreControllerStub);
     Store::Init(aStore);
     CPPUNIT_ASSERT_EQUAL(false, aStore->statsCalled);
     StoreEntry entry;
@@ -118,9 +118,9 @@ testStore::testStats()
 }
 
 void
-testStore::testMaxSize()
+TestStore::testMaxSize()
 {
-    Store::Controller *aStore(new TestStore);
+    Store::Controller *aStore(new StoreControllerStub);
     Store::Init(aStore);
     CPPUNIT_ASSERT_EQUAL(static_cast<uint64_t>(3), aStore->maxSize());
     Store::FreeMemory();
@@ -188,7 +188,7 @@ checkSwapMetaRawType(const RawSwapMetaType rawType)
 } // namespace Store
 
 void
-testStore::testSwapMetaTypeClassification()
+TestStore::testSwapMetaTypeClassification()
 {
     using limits = std::numeric_limits<Store::RawSwapMetaType>;
     for (auto rawType = limits::min(); true; ++rawType) {
index 2e043381ab0629c79c622172f27b33736c5fab37..72cec1061eefa6e6dfcaaae0e47c3758bd98d816 100644 (file)
@@ -18,9 +18,9 @@
  * test the store framework
  */
 
-class testStore : public CPPUNIT_NS::TestFixture
+class TestStore: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testStore );
+    CPPUNIT_TEST_SUITE( TestStore );
     CPPUNIT_TEST( testSetRoot );
     CPPUNIT_TEST( testUnsetRoot );
     CPPUNIT_TEST( testStats );
@@ -39,11 +39,11 @@ protected:
 };
 
 /// allows testing of methods without having all the other components live
-class TestStore : public Store::Controller
+class StoreControllerStub : public Store::Controller
 {
 
 public:
-    TestStore() : statsCalled (false) {}
+    StoreControllerStub() : statsCalled (false) {}
 
     bool statsCalled;
 
@@ -78,7 +78,7 @@ public:
     virtual StoreSearch *search();
 };
 
-typedef RefCount<TestStore> TestStorePointer;
+typedef RefCount<StoreControllerStub> StoreControllerStubPointer;
 
 #endif
 
index 8848dd45f9cc3077d7a8129d20b08fbe30137ce1..ff528f135f48d7d41a03b0190b97bfb3b980d51c 100644 (file)
@@ -15,7 +15,7 @@
 #include "testStoreController.h"
 #include "TestSwapDir.h"
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testStoreController );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestStoreController );
 
 static void
 addSwapDir(TestSwapDirPointer aStore)
@@ -26,7 +26,7 @@ addSwapDir(TestSwapDirPointer aStore)
 }
 
 void
-testStoreController::testStats()
+TestStoreController::testStats()
 {
     Store::Init();
     StoreEntry *logEntry = new StoreEntry;
@@ -67,7 +67,7 @@ commonInit()
 }
 
 void
-testStoreController::testMaxSize()
+TestStoreController::testMaxSize()
 {
     commonInit();
     StoreEntry *logEntry = new StoreEntry;
@@ -126,7 +126,7 @@ searchCallback(void *)
 }
 
 void
-testStoreController::testSearch()
+TestStoreController::testSearch()
 {
     commonInit();
     Store::Init();
index 2c1aff615ee8ee1336fd7a06036dc1b932da5589..5a5bcde35ee00f54a2af235d33d1ffa90f522d25 100644 (file)
@@ -15,9 +15,9 @@
  * test the store framework
  */
 
-class testStoreController : public CPPUNIT_NS::TestFixture
+class TestStoreController: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testStoreController );
+    CPPUNIT_TEST_SUITE( TestStoreController );
     CPPUNIT_TEST( testStats );
     CPPUNIT_TEST( testMaxSize );
     CPPUNIT_TEST( testSearch );
index faed92cc2c68b078a788e68b1cdd343c3a686772..7ddf48f66767535e1f6fc924406e0402c4d2d739 100644 (file)
@@ -15,7 +15,7 @@
 #include "testStoreHashIndex.h"
 #include "TestSwapDir.h"
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testStoreHashIndex );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestStoreHashIndex );
 
 static void
 addSwapDir(TestSwapDirPointer aStore)
@@ -26,7 +26,7 @@ addSwapDir(TestSwapDirPointer aStore)
 }
 
 void
-testStoreHashIndex::testStats()
+TestStoreHashIndex::testStats()
 {
     StoreEntry *logEntry = new StoreEntry;
     logEntry->createMemObject("dummy_storeId", nullptr, HttpRequestMethod());
@@ -46,7 +46,7 @@ testStoreHashIndex::testStats()
 }
 
 void
-testStoreHashIndex::testMaxSize()
+TestStoreHashIndex::testMaxSize()
 {
     StoreEntry *logEntry = new StoreEntry;
     logEntry->createMemObject("dummy_storeId", nullptr, HttpRequestMethod());
@@ -126,7 +126,7 @@ searchCallback(void *)
 }
 
 void
-testStoreHashIndex::testSearch()
+TestStoreHashIndex::testSearch()
 {
     commonInit();
     Store::Init();
index 282bbfd484186acb3c90354408add535eed9b311..0e70fc3357024cf9917c9f7fb954ee742891e380 100644 (file)
@@ -15,9 +15,9 @@
  * test the store framework
  */
 
-class testStoreHashIndex : public CPPUNIT_NS::TestFixture
+class TestStoreHashIndex: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testStoreHashIndex );
+    CPPUNIT_TEST_SUITE( TestStoreHashIndex );
     CPPUNIT_TEST( testStats );
     CPPUNIT_TEST( testMaxSize );
     CPPUNIT_TEST( testSearch );
index 34a11e95ca1d7e69173229721fc8089b4adf49de..2af7b74eda7272f39e6aeba1b44e221ec0c01be7 100644 (file)
 #include "testString.h"
 #include "unitTestMain.h"
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testString );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestString );
 
 /* init memory pools */
 
 void
-testString::setUp()
+TestString::setUp()
 {
     Mem::Init();
 }
 
 void
-testString::testCmpDefault()
+TestString::testCmpDefault()
 {
     String left, right;
     /* two default strings are equal */
@@ -33,7 +33,7 @@ testString::testCmpDefault()
 }
 
 void
-testString::testCmpEmptyString()
+TestString::testCmpEmptyString()
 {
     String left("");
     String right;
@@ -48,7 +48,7 @@ testString::testCmpEmptyString()
 }
 
 void
-testString::testCmpNotEmptyDefault()
+TestString::testCmpNotEmptyDefault()
 {
     String left("foo");
     String right;
@@ -62,7 +62,7 @@ testString::testCmpNotEmptyDefault()
     CPPUNIT_ASSERT(right.cmp("foo", 1) < 0);
 }
 
-void testString::testSubstr()
+void TestString::testSubstr()
 {
     String s("0123456789");
     String check=s.substr(3,5);
index 66f0d3d4ae3a50312db330af73da83c1f984325a..2d176276fe17cc7a5506a8324ca77de34a9d1935 100644 (file)
@@ -15,9 +15,9 @@
  * test the store framework
  */
 
-class testString : public CPPUNIT_NS::TestFixture
+class TestString: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testString );
+    CPPUNIT_TEST_SUITE( TestString );
     CPPUNIT_TEST( testCmpDefault );
     CPPUNIT_TEST( testCmpEmptyString );
     CPPUNIT_TEST( testCmpNotEmptyDefault );
index 3fd2365412894267ed48bfa16c585e469e260682..dcf0709bcb11ff672f65d95f46ac49f51aa126e1 100644 (file)
@@ -12,7 +12,7 @@
 #include "tests/testTokenizer.h"
 #include "unitTestMain.h"
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testTokenizer );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestTokenizer );
 
 SBuf text("GET http://resource.com/path HTTP/1.1\r\n"
           "Host: resource.com\r\n"
@@ -25,7 +25,7 @@ const CharacterSet tab("tab","\t");
 const CharacterSet numbers("numbers","0123456789");
 
 void
-testTokenizer::testTokenizerPrefix()
+TestTokenizer::testTokenizerPrefix()
 {
     const SBuf canary("This text should not be changed.");
 
@@ -77,7 +77,7 @@ testTokenizer::testTokenizerPrefix()
 }
 
 void
-testTokenizer::testTokenizerSkip()
+TestTokenizer::testTokenizerSkip()
 {
     Parser::Tokenizer t(text);
     SBuf s;
@@ -111,7 +111,7 @@ testTokenizer::testTokenizerSkip()
 }
 
 void
-testTokenizer::testTokenizerToken()
+TestTokenizer::testTokenizerToken()
 {
     Parser::Tokenizer t(text);
     SBuf s;
@@ -129,7 +129,7 @@ testTokenizer::testTokenizerToken()
 }
 
 void
-testTokenizer::testTokenizerSuffix()
+TestTokenizer::testTokenizerSuffix()
 {
     const SBuf canary("This text should not be changed.");
 
@@ -189,13 +189,13 @@ testTokenizer::testTokenizerSuffix()
 }
 
 void
-testTokenizer::testCharacterSet()
+TestTokenizer::testCharacterSet()
 {
 
 }
 
 void
-testTokenizer::testTokenizerInt64()
+TestTokenizer::testTokenizerInt64()
 {
     // successful parse in base 10
     {
index b3d36d73c1faab163d070960d1d2589a78a5e689..c0d519ae5e36d10b4b1a259bbf7412f02f781be1 100644 (file)
@@ -11,9 +11,9 @@
 
 #include "compat/cppunit.h"
 
-class testTokenizer : public CPPUNIT_NS::TestFixture
+class TestTokenizer: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testTokenizer );
+    CPPUNIT_TEST_SUITE( TestTokenizer );
     CPPUNIT_TEST ( testCharacterSet );
     CPPUNIT_TEST ( testTokenizerPrefix );
     CPPUNIT_TEST ( testTokenizerSuffix );
index a1af4eafb91949d40a751d833f4253ac099eee16..c18618d8b891da80ec78386e61fa5e28923c1ac9 100644 (file)
 
 #include <sstream>
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testURL );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestUri );
 
 /* init memory pools */
 
 void
-testURL::setUp()
+TestUri::setUp()
 {
     Mem::Init();
     AnyP::UriScheme::Init();
@@ -33,7 +33,7 @@ testURL::setUp()
  * This creates a URL for that scheme.
  */
 void
-testURL::testConstructScheme()
+TestUri::testConstructScheme()
 {
     AnyP::UriScheme empty_scheme;
     AnyP::Uri protoless_url(AnyP::PROTO_NONE);
@@ -50,7 +50,7 @@ testURL::testConstructScheme()
  * scheme instances.
  */
 void
-testURL::testDefaultConstructor()
+TestUri::testDefaultConstructor()
 {
     AnyP::UriScheme aScheme;
     AnyP::Uri aUrl;
index 898b0ee5b2233cab085ae1c874c6fe45632ae4fa..dc097ab6a96a68cb44621bbde95ebbe7b8ca307a 100644 (file)
 #include "compat/cppunit.h"
 
 /*
- * test the URL class.
+ * test the Anyp::Uri-related classes
  */
 
-class testURL : public CPPUNIT_NS::TestFixture
+class TestUri: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testURL );
+    CPPUNIT_TEST_SUITE( TestUri );
     CPPUNIT_TEST( testConstructScheme );
     CPPUNIT_TEST( testDefaultConstructor );
     CPPUNIT_TEST_SUITE_END();
index 3900859ea76d66d5a81080b36391094befaefea4..e094aef0f0bc0b6e8c5e6fe2cb09eb2de76b470c 100644 (file)
@@ -24,9 +24,9 @@
 
 #include <stdexcept>
 
-#define TESTDIR "testUfs_Store"
+#define TESTDIR "TestUfs_Store"
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testUfs );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestUfs );
 
 typedef RefCount<Fs::Ufs::UFSSwapDir> MySwapDirPointer;
 extern REMOVALPOLICYCREATE createRemovalPolicy_lru; /* XXX fails with --enable-removal-policies=heap */
@@ -48,7 +48,7 @@ searchCallback(void *)
 }
 
 void
-testUfs::commonInit()
+TestUfs::commonInit()
 {
     static bool inited = false;
 
@@ -81,7 +81,7 @@ testUfs::commonInit()
 }
 
 void
-testUfs::testUfsSearch()
+TestUfs::testUfsSearch()
 {
     /* test sequence
      * make a valid working ufs swapdir
@@ -160,7 +160,7 @@ testUfs::testUfsSearch()
         pe->swapOut();
         CPPUNIT_ASSERT_EQUAL(0, pe->swap_dirn);
         CPPUNIT_ASSERT_EQUAL(0, pe->swap_filen);
-        pe->unlock("testUfs::testUfsSearch vary");
+        pe->unlock("TestUfs::testUfsSearch vary");
     }
 
     storeDirWriteCleanLogs(0);
@@ -213,7 +213,7 @@ testUfs::testUfsSearch()
  * supplied on the configuration line.
  */
 void
-testUfs::testUfsDefaultEngine()
+TestUfs::testUfsDefaultEngine()
 {
     /* boring common test boilerplate */
     if (0 > system ("rm -rf " TESTDIR))
index 7277814db3251a05f99463fcb10049b80d54ada0..07c244f7c8eb956b61cf42ba8c888c39af124619 100644 (file)
@@ -15,9 +15,9 @@
  * test the store framework
  */
 
-class testUfs : public CPPUNIT_NS::TestFixture
+class TestUfs: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testUfs );
+    CPPUNIT_TEST_SUITE( TestUfs );
     CPPUNIT_TEST( testUfsSearch );
     CPPUNIT_TEST( testUfsDefaultEngine );
     CPPUNIT_TEST_SUITE_END();
index 856babf7a0eddf8acc3bb718412fab29fd40bb5c..960c054dc7e312a9eec6bb94a8210a3f64aa8ad1 100644 (file)
 
 #include <sstream>
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testUriScheme );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestUriScheme );
 
 /*
  * we should be able to assign a protocol_t to a AnyP::UriScheme for ease
  * of code conversion
  */
 void
-testUriScheme::testAssignFromprotocol_t()
+TestUriScheme::testAssignFromprotocol_t()
 {
     AnyP::UriScheme empty_scheme;
     AnyP::UriScheme scheme;
@@ -39,7 +39,7 @@ testUriScheme::testAssignFromprotocol_t()
  * of migration
  */
 void
-testUriScheme::testCastToprotocol_t()
+TestUriScheme::testCastToprotocol_t()
 {
     /* explicit cast */
     AnyP::ProtocolType protocol = static_cast<AnyP::ProtocolType>(AnyP::UriScheme());
@@ -53,7 +53,7 @@ testUriScheme::testCastToprotocol_t()
  * a default constructed AnyP::UriScheme is == AnyP::PROTO_NONE
  */
 void
-testUriScheme::testDefaultConstructor()
+TestUriScheme::testDefaultConstructor()
 {
     AnyP::UriScheme lhs;
     AnyP::UriScheme rhs(AnyP::PROTO_NONE);
@@ -64,7 +64,7 @@ testUriScheme::testDefaultConstructor()
  * we should be able to construct a AnyP::UriScheme from the old 'protocol_t' enum.
  */
 void
-testUriScheme::testConstructprotocol_t()
+TestUriScheme::testConstructprotocol_t()
 {
     AnyP::UriScheme lhs_none(AnyP::PROTO_NONE), rhs_none(AnyP::PROTO_NONE);
     CPPUNIT_ASSERT_EQUAL(lhs_none, rhs_none);
@@ -78,7 +78,7 @@ testUriScheme::testConstructprotocol_t()
  * we should be able to get a char const * version of the method.
  */
 void
-testUriScheme::testC_str()
+TestUriScheme::testC_str()
 {
     SBuf lhs("wais");
     AnyP::UriScheme wais(AnyP::PROTO_WAIS);
@@ -91,7 +91,7 @@ testUriScheme::testC_str()
  * either the left or right hand side seamlessly.
  */
 void
-testUriScheme::testEqualprotocol_t()
+TestUriScheme::testEqualprotocol_t()
 {
     CPPUNIT_ASSERT(AnyP::UriScheme() == AnyP::PROTO_NONE);
     CPPUNIT_ASSERT(not (AnyP::UriScheme(AnyP::PROTO_WAIS) == AnyP::PROTO_HTTP));
@@ -103,7 +103,7 @@ testUriScheme::testEqualprotocol_t()
  * a AnyP::UriScheme should testable for inequality with a protocol_t.
  */
 void
-testUriScheme::testNotEqualprotocol_t()
+TestUriScheme::testNotEqualprotocol_t()
 {
     CPPUNIT_ASSERT(AnyP::UriScheme(AnyP::PROTO_NONE) != AnyP::PROTO_HTTP);
     CPPUNIT_ASSERT(not (AnyP::UriScheme(AnyP::PROTO_HTTP) != AnyP::PROTO_HTTP));
@@ -115,7 +115,7 @@ testUriScheme::testNotEqualprotocol_t()
  * we should be able to send it to a stream and get the normalised version
  */
 void
-testUriScheme::testStream()
+TestUriScheme::testStream()
 {
     std::ostringstream buffer;
     buffer << AnyP::UriScheme(AnyP::PROTO_HTTP);
@@ -125,7 +125,7 @@ testUriScheme::testStream()
 }
 
 void
-testUriScheme::setUp()
+TestUriScheme::setUp()
 {
     Mem::Init();
     AnyP::UriScheme::Init();
index 5418ee5ef11a517e40d118e243aaa2660c931d08..0b9157cd7207d65a3e215df4cb7ebf5bcbf25131 100644 (file)
@@ -15,9 +15,9 @@
  * test UriScheme
  */
 
-class testUriScheme : public CPPUNIT_NS::TestFixture
+class TestUriScheme: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testUriScheme );
+    CPPUNIT_TEST_SUITE( TestUriScheme );
     CPPUNIT_TEST( testAssignFromprotocol_t );
     CPPUNIT_TEST( testCastToprotocol_t );
     CPPUNIT_TEST( testConstructprotocol_t );
index 30cc3b16b0485bfbb8348b750c5ea04728635e4d..0a7233551cd62cf8055cd1a6560f8d0c2b2acaf7 100644 (file)
 
 #include <stdexcept>
 
-CPPUNIT_TEST_SUITE_REGISTRATION( testYesNoNone );
+CPPUNIT_TEST_SUITE_REGISTRATION( TestYesNoNone );
 
 void
-testYesNoNone::testBasics()
+TestYesNoNone::testBasics()
 {
     // unconfigured, non-implicit
     {
index 05ba6ba198036b227ca36f1107dbd36a08dad168..8b797570216e7f9409987416988106c62f127aa5 100644 (file)
 
 /*
  * demonstration test file, as new idioms are made they will
- * be shown in the testYesNoNone source.
+ * be shown in the TestYesNoNone source.
  */
 
-class testYesNoNone : public CPPUNIT_NS::TestFixture
+class TestYesNoNone: public CPPUNIT_NS::TestFixture
 {
-    CPPUNIT_TEST_SUITE( testYesNoNone );
+    CPPUNIT_TEST_SUITE( TestYesNoNone );
     /* note the statement here and then the actual prototype below */
     CPPUNIT_TEST( testBasics );
     CPPUNIT_TEST_SUITE_END();