all cstdout uses wrapped in preprocessor defines
This commit is contained in:
@ -13,13 +13,17 @@ InternalUnitTester::InternalUnitTester() {}
|
||||
InternalUnitTester::~InternalUnitTester() {}
|
||||
|
||||
ReturnValue_t InternalUnitTester::performTests() {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::info << "Running internal unit tests.." << std::endl;
|
||||
#endif
|
||||
testserialize::test_serialization();
|
||||
testmq::testMq();
|
||||
testsemaph::testBinSemaph();
|
||||
testsemaph::testCountingSemaph();
|
||||
testmutex::testMutex();
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::info << "Internal unit tests finished." << std::endl;
|
||||
#endif
|
||||
return RETURN_OK;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
#include "UnittDefinitions.h"
|
||||
|
||||
ReturnValue_t unitt::put_error(std::string errorId) {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "Unit Tester error: Failed at test ID "
|
||||
<< errorId << "\n" << std::flush;
|
||||
#endif
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
|
@ -94,8 +94,10 @@ void testsemaph::testBinSemaphoreImplementation(SemaphoreIF* binSemaph,
|
||||
result = binSemaph->acquire(SemaphoreIF::TimeoutType::WAITING, 10);
|
||||
//dur_millis_t time = stopwatch.stop();
|
||||
// if(abs(time - 10) > 2) {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
// sif::error << "UnitTester: Semaphore timeout measured incorrect."
|
||||
// << std::endl;
|
||||
#endif
|
||||
// unitt::put_error(id);
|
||||
// }
|
||||
}
|
||||
|
@ -15,8 +15,10 @@ ReturnValue_t pst::pollingSequenceInitDefault(
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
else {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "pst::pollingSequenceInitDefault: Sequence invalid!"
|
||||
<< std::endl;
|
||||
#endif
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,9 @@ StorageManagerIF* tglob::getIpcStoreHandle() {
|
||||
if(objectManager != nullptr) {
|
||||
return objectManager->get<StorageManagerIF>(objects::IPC_STORE);
|
||||
} else {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "Global object manager uninitialized" << std::endl;
|
||||
#endif
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user