From: Francesco Chemolli Date: Wed, 8 Aug 2012 07:35:10 +0000 (+0200) Subject: Moved to STUB API stubs for DelayId.cc, HelperChildconfig.cc, debug.cc X-Git-Tag: sourceformat-review-1~126^2~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54311b7026f3f5af011cd808127103d4ed4e6795;p=thirdparty%2Fsquid.git Moved to STUB API stubs for DelayId.cc, HelperChildconfig.cc, debug.cc --- diff --git a/src/tests/stub_DelayId.cc b/src/tests/stub_DelayId.cc index 2828531bdf..3fb5ac0922 100644 --- a/src/tests/stub_DelayId.cc +++ b/src/tests/stub_DelayId.cc @@ -38,12 +38,12 @@ #include "squid-old.h" #include "DelayId.h" -DelayId::DelayId() {} - -void -DelayId::delayRead(DeferredRead const&) -{} +#define STUB_API "stub_DelayId.cc" +#include "tests/STUB.h" +DelayId::DelayId() {} DelayId::~DelayId() {} +void DelayId::delayRead(DeferredRead const&) STUB_NOP + #endif /* USE_DELAY_POOLS */ diff --git a/src/tests/stub_HelperChildConfig.cc b/src/tests/stub_HelperChildConfig.cc index 0fede5afad..55e4be97bd 100644 --- a/src/tests/stub_HelperChildConfig.cc +++ b/src/tests/stub_HelperChildConfig.cc @@ -2,6 +2,9 @@ #include "HelperChildConfig.h" #include "globals.h" +#define STUB_API "stub_HelperChildconfig.cc" +#include "tests/STUB.h" + #include HelperChildConfig::HelperChildConfig(const unsigned int m): @@ -26,9 +29,4 @@ HelperChildConfig::needNew() const return (n_max - n_active); } -void -HelperChildConfig::parseConfig() -{ - fprintf(stderr, "HelperChildConfig::parseConfig not implemented."); - exit(1); -} +void HelperChildConfig::parseConfig() STUB diff --git a/src/tests/stub_debug.cc b/src/tests/stub_debug.cc index 1c2edff675..50e73fe225 100644 --- a/src/tests/stub_debug.cc +++ b/src/tests/stub_debug.cc @@ -1,6 +1,9 @@ /* * A stub implementation of the Debug.h API. * For use by test binaries which do not need the full context debugging + * + * Note: it doesn't use the STUB API as the functions defined here must + * not abort the unit test. */ #include "squid.h" #include "Debug.h"