restructured test folder and enabled cmake v3 support
This commit is contained in:
1 parent
426514b9a2
commit
37463b660b
58 files changed
+132
-57
No files matched your search
@@ -0,0 +1,2 @@
|
||||
add_subdirectory(internal)
|
||||
add_subdirectory(tests)
|
||||
@@ -0,0 +1,7 @@
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
InternalUnitTester.cpp
|
||||
UnittDefinitions.cpp
|
||||
)
|
||||
|
||||
add_subdirectory(osal)
|
||||
add_subdirectory(serialize)
|
||||
@@ -0,0 +1,5 @@
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
IntTestMq.cpp
|
||||
IntTestMutex.cpp
|
||||
IntTestSemaphore.cpp
|
||||
)
|
||||
@@ -0,0 +1,3 @@
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
IntTestSerialization.cpp
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
add_subdirectory(action)
|
||||
add_subdirectory(container)
|
||||
add_subdirectory(osal)
|
||||
add_subdirectory(serialize)
|
||||
add_subdirectory(storagemanager)
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
TestActionHelper.cpp
|
||||
)
|
||||
@@ -1,8 +1,11 @@
|
||||
#include "TestActionHelper.h"
|
||||
|
||||
#include <unittest/core/CatchDefinitions.h>
|
||||
|
||||
#include <fsfw/action/ActionHelper.h>
|
||||
#include <fsfw/ipc/CommandMessage.h>
|
||||
#include <catch2/catch.hpp>
|
||||
#include "../../core/CatchDefinitions.h"
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
|
||||
TEST_CASE( "Action Helper" , "[ActionHelper]") {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <fsfw/action/HasActionsIF.h>
|
||||
#include <fsfw/ipc/MessageQueueIF.h>
|
||||
#include <fsfw/unittest/core/CatchDefinitions.h>
|
||||
#include <unittest/core/CatchDefinitions.h>
|
||||
#include <cstring>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
RingBufferTest.cpp
|
||||
TestArrayList.cpp
|
||||
TestDynamicFifo.cpp
|
||||
TestFifo.cpp
|
||||
TestFixedArrayList.cpp
|
||||
TestFixedMap.cpp
|
||||
TestFixedOrderedMultimap.cpp
|
||||
TestPlacementFactory.cpp
|
||||
)
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "../../core/CatchDefinitions.h"
|
||||
#include "../../container/SimpleRingBuffer.h"
|
||||
#include <unittest/core/CatchDefinitions.h>
|
||||
#include <fsfw/container/SimpleRingBuffer.h>
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <cstring>
|
||||
|
||||
TEST_CASE("Ring Buffer Test" , "[RingBufferTest]") {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include "../../container/ArrayList.h"
|
||||
#include "../../returnvalues/HasReturnvaluesIF.h"
|
||||
#include <fsfw/container/ArrayList.h>
|
||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include "../../core/CatchDefinitions.h"
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <unittest/core/CatchDefinitions.h>
|
||||
|
||||
/**
|
||||
* @brief Array List test
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
#include "../../../container/DynamicFIFO.h"
|
||||
#include "../../../container/FIFO.h"
|
||||
#include "../../../returnvalues/HasReturnvaluesIF.h"
|
||||
|
||||
#include "../../container/DynamicFIFO.h"
|
||||
#include "../../container/FIFO.h"
|
||||
#include "../../returnvalues/HasReturnvaluesIF.h"
|
||||
|
||||
#include <catch.hpp>
|
||||
#include <CatchDefinitions.h>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <unittest/core/CatchDefinitions.h>
|
||||
|
||||
TEST_CASE( "Dynamic Fifo Tests", "[TestDynamicFifo]") {
|
||||
INFO("Dynamic Fifo Tests");
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
#include "../../../container/DynamicFIFO.h"
|
||||
#include "../../../container/FIFO.h"
|
||||
#include "../../../returnvalues/HasReturnvaluesIF.h"
|
||||
|
||||
#include "../../container/DynamicFIFO.h"
|
||||
#include "../../container/FIFO.h"
|
||||
#include "../../returnvalues/HasReturnvaluesIF.h"
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include "../../core/CatchDefinitions.h"
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <unittest/core/CatchDefinitions.h>
|
||||
|
||||
TEST_CASE( "Static Fifo Tests", "[TestFifo]") {
|
||||
INFO("Fifo Tests");
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
#include "../../core/CatchDefinitions.h"
|
||||
#include "../../../container/FixedArrayList.h"
|
||||
#include "../../../returnvalues/HasReturnvaluesIF.h"
|
||||
|
||||
#include "../../container/FixedArrayList.h"
|
||||
#include "../../returnvalues/HasReturnvaluesIF.h"
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <unittest/core/CatchDefinitions.h>
|
||||
|
||||
|
||||
TEST_CASE( "FixedArrayList Tests", "[TestFixedArrayList]") {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include "../../container/FixedMap.h"
|
||||
#include "../../returnvalues/HasReturnvaluesIF.h"
|
||||
#include "../../../container/FixedMap.h"
|
||||
#include "../../../returnvalues/HasReturnvaluesIF.h"
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include "../../core/CatchDefinitions.h"
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <unittest/core/CatchDefinitions.h>
|
||||
|
||||
template class FixedMap<unsigned int, unsigned short>;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include "../../container/FixedOrderedMultimap.h"
|
||||
#include "../../returnvalues/HasReturnvaluesIF.h"
|
||||
#include "../../../container/FixedOrderedMultimap.h"
|
||||
#include "../../../returnvalues/HasReturnvaluesIF.h"
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include "../../core/CatchDefinitions.h"
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <unittest/core/CatchDefinitions.h>
|
||||
|
||||
TEST_CASE( "FixedOrderedMultimap Tests", "[TestFixedOrderedMultimap]") {
|
||||
INFO("FixedOrderedMultimap Tests");
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
TestMessageQueue.cpp
|
||||
TestSemaphore.cpp
|
||||
)
|
||||
@@ -1,8 +1,10 @@
|
||||
#include "../../ipc/MessageQueueIF.h"
|
||||
#include "../../ipc/QueueFactory.h"
|
||||
#include <catch.hpp>
|
||||
#include "../../../ipc/MessageQueueIF.h"
|
||||
#include "../../../ipc/QueueFactory.h"
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <unittest/core/CatchDefinitions.h>
|
||||
|
||||
#include <array>
|
||||
#include "../../core/CatchDefinitions.h"
|
||||
|
||||
TEST_CASE("MessageQueue Basic Test","[TestMq]") {
|
||||
MessageQueueIF* testSenderMq =
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
TestSerialBufferAdapter.cpp
|
||||
TestSerialization.cpp
|
||||
TestSerialLinkedPacket.cpp
|
||||
)
|
||||
@@ -1,7 +1,9 @@
|
||||
#include "../../serialize/SerialBufferAdapter.h"
|
||||
#include "../../../serialize/SerialBufferAdapter.h"
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include "../../core/CatchDefinitions.h"
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <unittest/core/CatchDefinitions.h>
|
||||
|
||||
#include <array>
|
||||
|
||||
|
||||
static bool test_value_bool = true;
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
#include "TestSerialLinkedPacket.h"
|
||||
#include "../../core/CatchDefinitions.h"
|
||||
#include <unittest/core/CatchDefinitions.h>
|
||||
|
||||
#include "../../globalfunctions/arrayprinter.h"
|
||||
#include "../../../globalfunctions/arrayprinter.h"
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <unittest/core/CatchDefinitions.h>
|
||||
|
||||
#include <array>
|
||||
|
||||
|
||||
TEST_CASE("Serial Linked Packet" , "[SerLinkPacket]") {
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
return buffer.entry.getConstBuffer();
|
||||
}
|
||||
|
||||
const size_t getBufferLength() {
|
||||
size_t getBufferLength() {
|
||||
return buffer.getSerializedSize();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#include "../../serialize/SerializeAdapter.h"
|
||||
#include "../../../serialize/SerializeAdapter.h"
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/catch_approx.hpp>
|
||||
#include <unittest/core/CatchDefinitions.h>
|
||||
|
||||
#include "catch.hpp"
|
||||
#include <array>
|
||||
#include "../../core/CatchDefinitions.h"
|
||||
|
||||
static bool test_value_bool = true;
|
||||
static uint8_t tv_uint8 {5};
|
||||
@@ -119,10 +121,10 @@ TEST_CASE("Auto Serialize Adapter testing", "[single-file]") {
|
||||
REQUIRE(tv_int16 == -829);
|
||||
REQUIRE(tv_int32 == -2312);
|
||||
|
||||
REQUIRE(tv_float == Approx(8.214921));
|
||||
REQUIRE(tv_double == Approx(9.2132142141e8));
|
||||
REQUIRE(tv_sfloat == Approx(-922.2321321));
|
||||
REQUIRE(tv_sdouble == Approx(-2.2421e19));
|
||||
REQUIRE(tv_float == Catch::Approx(8.214921));
|
||||
REQUIRE(tv_double == Catch::Approx(9.2132142141e8));
|
||||
REQUIRE(tv_sfloat == Catch::Approx(-922.2321321));
|
||||
REQUIRE(tv_sdouble == Catch::Approx(-2.2421e19));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
TestNewAccessor.cpp
|
||||
TestPool.cpp
|
||||
)
|
||||
@@ -1,10 +1,8 @@
|
||||
#include "CatchDefinitions.h"
|
||||
|
||||
#include <fsfw/objectmanager/ObjectManager.h>
|
||||
#include <fsfw/storagemanager/LocalPool.h>
|
||||
|
||||
#include <catch.hpp>
|
||||
#include <CatchDefinitions.h>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <unittest/core/CatchDefinitions.h>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
add_subdirectory(core)
|
||||
@@ -0,0 +1,11 @@
|
||||
target_sources(${TARGET_NAME}
|
||||
PRIVATE
|
||||
ipc/MissionMessageTypes.cpp
|
||||
pollingsequence/PollingSequenceFactory.cpp
|
||||
)
|
||||
|
||||
# Add include paths for the executable
|
||||
target_include_directories(${TARGET_NAME}
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,7 @@
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
CatchDefinitions.cpp
|
||||
CatchFactory.cpp
|
||||
CatchRunner.cpp
|
||||
CatchSetup.cpp
|
||||
printChar.cpp
|
||||
)
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user