Merge pull request 'Includes for unittest folder relative' (#285) from KSat/fsfw:mueller/unittest-fixes into development
Reviewed-on: fsfw/fsfw#285
This commit is contained in:
commit
31373e9605
@ -2,7 +2,7 @@
|
|||||||
#define FRAMEWORK_TEST_UNITTESTCLASS_H_
|
#define FRAMEWORK_TEST_UNITTESTCLASS_H_
|
||||||
|
|
||||||
#include "UnittDefinitions.h"
|
#include "UnittDefinitions.h"
|
||||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
#include "../../returnvalues/HasReturnvaluesIF.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Can be used for internal testing, for example for hardware specific
|
* @brief Can be used for internal testing, for example for hardware specific
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <fsfw/unittest/internal/UnittDefinitions.h>
|
#include "UnittDefinitions.h"
|
||||||
|
|
||||||
ReturnValue_t unitt::put_error(std::string errorId) {
|
ReturnValue_t unitt::put_error(std::string errorId) {
|
||||||
sif::error << "Unit Tester error: Failed at test ID "
|
sif::error << "Unit Tester error: Failed at test ID "
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#include <fsfw/ipc/MessageQueueIF.h>
|
#include "IntTestMq.h"
|
||||||
#include <fsfw/ipc/QueueFactory.h>
|
#include "../UnittDefinitions.h"
|
||||||
#include <fsfw/unittest/internal/osal/IntTestMq.h>
|
|
||||||
#include <fsfw/unittest/internal/UnittDefinitions.h>
|
#include "../../ipc/MessageQueueIF.h"
|
||||||
|
#include "../../ipc/QueueFactory.h"
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#include "IntTestMutex.h"
|
#include "IntTestMutex.h"
|
||||||
|
|
||||||
#include <fsfw/ipc/MutexFactory.h>
|
#include "../../ipc/MutexFactory.h"
|
||||||
#include <unittest/internal/UnittDefinitions.h>
|
#include "../UnittDefinitions.h"
|
||||||
|
|
||||||
#if defined(hosted)
|
#if defined(hosted)
|
||||||
#include <fsfw/osal/hosted/Mutex.h>
|
#include "../../osal/hosted/Mutex.h"
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <future>
|
#include <future>
|
||||||
#endif
|
#endif
|
||||||
@ -20,7 +20,7 @@ void testmutex::testMutex() {
|
|||||||
// timed_mutex from the C++ library specifies undefined behaviour if
|
// timed_mutex from the C++ library specifies undefined behaviour if
|
||||||
// the timed mutex is locked twice from the same thread.
|
// the timed mutex is locked twice from the same thread.
|
||||||
#if defined(hosted)
|
#if defined(hosted)
|
||||||
// hold on, this actually worked ? :-D This calls the function from
|
// This calls the function from
|
||||||
// another thread and stores the returnvalue in a future.
|
// another thread and stores the returnvalue in a future.
|
||||||
auto future = std::async(&MutexIF::lockMutex, mutex, 1);
|
auto future = std::async(&MutexIF::lockMutex, mutex, 1);
|
||||||
result = future.get();
|
result = future.get();
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
#include "IntTestSemaphore.h"
|
#include "IntTestSemaphore.h"
|
||||||
#include <fsfw/tasks/SemaphoreFactory.h>
|
#include "../UnittDefinitions.h"
|
||||||
#include <unittest/internal/UnittDefinitions.h>
|
|
||||||
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
#include "../../tasks/SemaphoreFactory.h"
|
||||||
#include <fsfw/timemanager/Stopwatch.h>
|
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
||||||
|
#include "../../timemanager/Stopwatch.h"
|
||||||
|
|
||||||
|
|
||||||
void testsemaph::testBinSemaph() {
|
void testsemaph::testBinSemaph() {
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
#include "IntTestSerialization.h"
|
#include "IntTestSerialization.h"
|
||||||
#include <fsfw/serialize/SerializeElement.h>
|
#include "../UnittDefinitions.h"
|
||||||
#include <fsfw/serialize/SerialBufferAdapter.h>
|
#include "../../serialize/SerializeElement.h"
|
||||||
#include <unittest/internal/UnittDefinitions.h>
|
#include "../../serialize/SerialBufferAdapter.h"
|
||||||
#include <fsfw/serialize/SerializeIF.h>
|
#include "../../serialize/SerializeIF.h"
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
using retval = HasReturnvaluesIF;
|
using retval = HasReturnvaluesIF;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#ifndef UNITTEST_INTERNAL_INTTESTSERIALIZATION_H_
|
#ifndef FSFW_UNITTEST_INTERNAL_INTTESTSERIALIZATION_H_
|
||||||
#define UNITTEST_INTERNAL_INTTESTSERIALIZATION_H_
|
#define FSFW_UNITTEST_INTERNAL_INTTESTSERIALIZATION_H_
|
||||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
|
||||||
|
#include "../../returnvalues/HasReturnvaluesIF.h"
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
namespace testserialize {
|
namespace testserialize {
|
||||||
@ -12,4 +13,4 @@ ReturnValue_t test_serial_buffer_adapter();
|
|||||||
extern std::array<uint8_t, 512> test_array;
|
extern std::array<uint8_t, 512> test_array;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* UNITTEST_INTERNAL_INTTESTSERIALIZATION_H_ */
|
#endif /* FSFW_UNITTEST_INTERNAL_INTTESTSERIALIZATION_H_ */
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include <fsfw/container/SimpleRingBuffer.h>
|
|
||||||
#include <catch2/catch.hpp>
|
|
||||||
#include "../../core/CatchDefinitions.h"
|
#include "../../core/CatchDefinitions.h"
|
||||||
|
#include "../../container/SimpleRingBuffer.h"
|
||||||
|
|
||||||
|
#include <catch2/catch.hpp>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
TEST_CASE("Ring Buffer Test" , "[RingBufferTest]") {
|
TEST_CASE("Ring Buffer Test" , "[RingBufferTest]") {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include <fsfw/container/ArrayList.h>
|
#include "../../container/ArrayList.h"
|
||||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
#include "../../returnvalues/HasReturnvaluesIF.h"
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch.hpp>
|
||||||
#include "../../core/CatchDefinitions.h"
|
#include "../../core/CatchDefinitions.h"
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
#include <fsfw/container/DynamicFIFO.h>
|
#include "../../container/DynamicFIFO.h"
|
||||||
#include <fsfw/container/FIFO.h>
|
#include "../../container/FIFO.h"
|
||||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
#include "../../returnvalues/HasReturnvaluesIF.h"
|
||||||
|
|
||||||
#include <catch.hpp>
|
#include <catch.hpp>
|
||||||
#include <CatchDefinitions.h>
|
#include <CatchDefinitions.h>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
#include <fsfw/container/DynamicFIFO.h>
|
#include "../../container/DynamicFIFO.h"
|
||||||
#include <fsfw/container/FIFO.h>
|
#include "../../container/FIFO.h"
|
||||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
#include "../../returnvalues/HasReturnvaluesIF.h"
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch.hpp>
|
||||||
#include "../../core/CatchDefinitions.h"
|
#include "../../core/CatchDefinitions.h"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "../../core/CatchDefinitions.h"
|
#include "../../core/CatchDefinitions.h"
|
||||||
|
|
||||||
#include <fsfw/container/FixedArrayList.h>
|
#include "../../container/FixedArrayList.h"
|
||||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
#include "../../returnvalues/HasReturnvaluesIF.h"
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch.hpp>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include <fsfw/container/FixedMap.h>
|
#include "../../container/FixedMap.h"
|
||||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
#include "../../returnvalues/HasReturnvaluesIF.h"
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch.hpp>
|
||||||
#include "../../core/CatchDefinitions.h"
|
#include "../../core/CatchDefinitions.h"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include <fsfw/container/FixedOrderedMultimap.h>
|
#include "../../container/FixedOrderedMultimap.h"
|
||||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
#include "../../returnvalues/HasReturnvaluesIF.h"
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch.hpp>
|
||||||
#include "../../core/CatchDefinitions.h"
|
#include "../../core/CatchDefinitions.h"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#include <fsfw/ipc/MessageQueueIF.h>
|
#include "../../ipc/MessageQueueIF.h"
|
||||||
#include <fsfw/ipc/QueueFactory.h>
|
#include "../../ipc/QueueFactory.h"
|
||||||
#include "catch.hpp"
|
#include <catch.hpp>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include "core/CatchDefinitions.h"
|
#include "../../core/CatchDefinitions.h"
|
||||||
|
|
||||||
TEST_CASE("MessageQueue Basic Test","[TestMq]") {
|
TEST_CASE("MessageQueue Basic Test","[TestMq]") {
|
||||||
MessageQueueIF* testSenderMq =
|
MessageQueueIF* testSenderMq =
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <fsfw/serialize/SerialBufferAdapter.h>
|
#include "../../serialize/SerialBufferAdapter.h"
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch.hpp>
|
||||||
#include "../../core/CatchDefinitions.h"
|
#include "../../core/CatchDefinitions.h"
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
#include <fsfw/globalfunctions/arrayprinter.h>
|
#include "TestSerialLinkedPacket.h"
|
||||||
|
#include "../../core/CatchDefinitions.h"
|
||||||
|
|
||||||
|
#include "../../globalfunctions/arrayprinter.h"
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch.hpp>
|
||||||
#include "../../core/CatchDefinitions.h"
|
|
||||||
#include "TestSerialLinkedPacket.h"
|
|
||||||
|
|
||||||
|
|
||||||
TEST_CASE("Serial Linked Packet" , "[SerLinkPacket]") {
|
TEST_CASE("Serial Linked Packet" , "[SerLinkPacket]") {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <fsfw/serialize/SerializeAdapter.h>
|
#include "../../serialize/SerializeAdapter.h"
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
#include <array>
|
#include <array>
|
||||||
|
Loading…
Reference in New Issue
Block a user