repaired windows unittests

This commit is contained in:
Robin Müller 2020-12-27 15:15:51 +01:00
parent f60f02c5b8
commit 254b1437e9
4 changed files with 16 additions and 15 deletions

View File

@ -1,8 +1,8 @@
#include "IntTestMq.h"
#include "../UnittDefinitions.h"
#include <fsfw/unittest/internal/UnittDefinitions.h>
#include "../../../ipc/MessageQueueIF.h"
#include "../../../ipc/QueueFactory.h"
#include <fsfw/ipc/MessageQueueIF.h>
#include <fsfw/ipc/QueueFactory.h>
#include <array>

View File

@ -1,10 +1,10 @@
#include "IntTestMutex.h"
#include "../../../ipc/MutexFactory.h"
#include "../UnittDefinitions.h"
#include <fsfw/ipc/MutexFactory.h>
#include <fsfw/unittest/internal/UnittDefinitions.h>
#if defined(hosted)
#include "../../osal/hosted/Mutex.h"
#include <fsfw/osal/hosted/Mutex.h>
#include <thread>
#include <future>
#endif

View File

@ -1,10 +1,11 @@
#include "IntTestSemaphore.h"
#include "../UnittDefinitions.h"
#include <fsfw/unittest/internal/UnittDefinitions.h>
#include "../../../tasks/SemaphoreFactory.h"
#include "../../../serviceinterface/ServiceInterfaceStream.h"
#include "../../../timemanager/Stopwatch.h"
#include <fsfw/tasks/SemaphoreFactory.h>
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
#include <fsfw/timemanager/Stopwatch.h>
#include <cstdlib>
void testsemaph::testBinSemaph() {
std::string id = "[BinSemaphore]";
@ -138,7 +139,7 @@ void testsemaph::testCountingSemaphImplementation(SemaphoreIF* countingSemaph,
// attempt to take when count is 0, measure time
result = countingSemaph->acquire(SemaphoreIF::TimeoutType::WAITING, 10);
dur_millis_t time = stopwatch.stop();
if(abs(time - 10) > 1) {
if(std::abs(static_cast<int32_t>(time - 10)) > 1) {
unitt::put_error(id);
}
}

View File

@ -1,9 +1,9 @@
#include "IntTestSerialization.h"
#include "../UnittDefinitions.h"
#include <fsfw/unittest/internal/UnittDefinitions.h>
#include "../../../serialize/SerializeElement.h"
#include "../../../serialize/SerialBufferAdapter.h"
#include "../../../serialize/SerializeIF.h"
#include <fsfw/serialize/SerializeElement.h>
#include <fsfw/serialize/SerialBufferAdapter.h>
#include <fsfw/serialize/SerializeIF.h>
#include <array>