/// Intended for registration pattern APIs where the function result does not matter to the test
#define STUB_NOP { std::cerr<<"SKIP: "<<STUB_API<<" "<<__FUNCTION__<<" (not implemented).\n"; }
-/** macro to stub a function with return value.
- * Aborts unit tests requiring its definition with a message about the missing linkage
- */
+/// macro to stub a function with return value.
+/// Aborts unit tests requiring its definition with a message about the missing linkage
#define STUB_RETVAL(x) { stub_fatal(STUB_API " required"); return x; }
+/// macro to stub a void function without a fatal message and with a return value
+/// Intended for registration pattern APIs where the function result does not matter to the test
+#define STUB_RETVAL_NOP(x) { std::cerr<<"SKIP: "<<STUB_API<<" "<<__FUNCTION__<<" (not implemented).\n"; return x; }
+
+
/** macro to stub a function which returns a reference to dynamic
* Aborts unit tests requiring its definition with a message about the missing linkage
* This macro uses 'new x' to construct a stack vailable for the reference, may leak.
return true;
}
-bool
-IamDiskProcess()
-{
- std::cerr << STUB_API << " IamDiskProcess() Not implemented\n";
- return false;
-}
-
-bool
-InDaemonMode()
-{
- std::cerr << STUB_API << " InDaemonMode() Not implemented\n";
- return false;
-}
-
-bool
-UsingSmp()
-{
- std::cerr << STUB_API << " UsingSnmp() Not implemented\n";
- return false;
-}
-
+bool IamDiskProcess() STUB_RETVAL_NOP(false)
+bool InDaemonMode() STUB_RETVAL_NOP(false)
+bool UsingSmp() STUB_RETVAL_NOP(false)
bool IamCoordinatorProcess() STUB_RETVAL(false)
bool IamPrimaryProcess() STUB_RETVAL(false)
int NumberOfKids() STUB_RETVAL(0)
+
//not yet needed in the Stub, causes dependency on String
//String ProcessRoles() STUB_RETVAL(String())
void writePidFile(void) STUB