ADD: added new SimTrack class to replace all other tracks

This commit is contained in:
hwinkel
2023-06-08 22:10:47 +02:00
parent d4c12f3b09
commit 8a6dae6adc
11 changed files with 2202 additions and 3 deletions

37
tests/test_DataClass.cpp Normal file
View File

@@ -0,0 +1,37 @@
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <SimCore/data.hpp>
#include <string>
#include <SimCore/Position.hpp>
// SimCore::Identifier OwnID, SimCore::Identifier ParentID, SimCore::SensorKinds SensorKind,std::uint32_t GroundTruthPort, std::uint32_t ParentPort,std::string ParentIPAddress
SCENARIO("Testing the SimCore Sensor")
{
GIVEN("different Attributes for a Track in different forms")
{
SimCore::Data<std::string> Name;
Name.setValue("hello world");
WHEN("constructing Track Object with data")
{
THEN("check if Track attributes are correct")
{
REQUIRE(Name.getValue() == "hello world");
REQUIRE(Name.getValidity() == true);
REQUIRE(Name.getWriteTime() < std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count());
} //THEN
} // WHEN
} // GIVEN
} //SCENARIO