From: Alex Rousskov Date: Mon, 12 Sep 2011 00:29:56 +0000 (-0600) Subject: Use STUB_RETVAL() to minimize the number of stub lines. X-Git-Tag: take08~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0317d7114896211558568495ff018c5db774b21f;p=thirdparty%2Fsquid.git Use STUB_RETVAL() to minimize the number of stub lines. --- diff --git a/src/tests/stub_MemStore.cc b/src/tests/stub_MemStore.cc index 67de39a5ec..03bef5cfd0 100644 --- a/src/tests/stub_MemStore.cc +++ b/src/tests/stub_MemStore.cc @@ -20,57 +20,12 @@ void MemStore::cleanReadable(const sfileno) STUB void MemStore::get(String const, STOREGETCLIENT, void *) STUB void MemStore::init() STUB void MemStore::stat(StoreEntry &) const STUB - -int MemStore::callback() -{ - STUB - return 0; -} - -StoreEntry *MemStore::get(const cache_key *) -{ - STUB - return NULL; -} - -uint64_t MemStore::maxSize() const -{ - STUB - return 0; -} - -uint64_t MemStore::minSize() const -{ - STUB - return 0; -} - -uint64_t MemStore::currentSize() const -{ - STUB - return 0; -} - -uint64_t MemStore::currentCount() const -{ - STUB - return 0; -} - -int64_t MemStore::maxObjectSize() const -{ - STUB - return 0; -} - -StoreSearch *MemStore::search(String const, HttpRequest *) -{ - STUB - return NULL; -} - -bool MemStore::dereference(StoreEntry &) -{ - STUB - return false; -} +int MemStore::callback() STUB_RETVAL(0) +StoreEntry *MemStore::get(const cache_key *) STUB_RETVAL(NULL) +uint64_t MemStore::maxSize() const STUB_RETVAL(0) +uint64_t MemStore::minSize() const STUB_RETVAL(0) +uint64_t MemStore::currentSize() const STUB_RETVAL(0) +uint64_t MemStore::currentCount() const STUB_RETVAL(0) +int64_t MemStore::maxObjectSize() const STUB_RETVAL(0) +StoreSearch *MemStore::search(String const, HttpRequest *) STUB_RETVAL(NULL) +bool MemStore::dereference(StoreEntry &) STUB_RETVAL(false) diff --git a/src/tests/stub_Port.cc b/src/tests/stub_Port.cc index 4ac50e6259..1d7f2f9b3f 100644 --- a/src/tests/stub_Port.cc +++ b/src/tests/stub_Port.cc @@ -7,8 +7,4 @@ const char Ipc::coordinatorAddr[] = ""; const char Ipc::strandAddrPfx[] = ""; -String Ipc::Port::MakeAddr(char const*, int) -{ - STUB - return ""; -} +String Ipc::Port::MakeAddr(char const*, int) STUB_RETVAL("")