ADD: added tests
This commit is contained in:
@@ -215,7 +215,10 @@ SCENARIO("Testing the SimCore SensorManager with local sensors")
|
||||
std::string tracklist1 = SensorManager_->getTracklistStringBySensor();
|
||||
std::string tracklist2 = SensorManager_->getTracklistStringFusioned();
|
||||
|
||||
LOG_S(INFO)<<tracklist2;
|
||||
LOG_S(INFO)<<tracklist1;
|
||||
|
||||
|
||||
|
||||
|
||||
THEN("check if Track attributes are correct")
|
||||
{
|
||||
@@ -234,6 +237,11 @@ SCENARIO("Testing the SimCore SensorManager with local sensors")
|
||||
REQUIRE( j2.size() == 8);
|
||||
|
||||
REQUIRE(SensorManager_->getSensorCount() == 4);
|
||||
|
||||
|
||||
REQUIRE(SensorManager_->getTrackListUpdateRaw()->getSensors().size() == 4);
|
||||
REQUIRE(SensorManager_->getTrackListUpdateRaw()->getSensors().at(0).getTracksCount() == 3);
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
||||
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ SCENARIO("Testing the SimCore Sensor")
|
||||
track->setPosition(pos);
|
||||
track->Speed.setValue(speed);
|
||||
track->Course.setValue(course);
|
||||
auto SensorTrack = std::make_shared<SimCore::SensorTrack>(track);
|
||||
|
||||
|
||||
SimCore::SensorData Sensor1(SimCore::Identifier(),"ARPA","127.0.0.1", SimCore::SensorKinds::RADAR);
|
||||
@@ -45,7 +46,7 @@ SCENARIO("Testing the SimCore Sensor")
|
||||
|
||||
WHEN("constructing Track Object with data")
|
||||
{
|
||||
List.addTrack(track);
|
||||
List.addTrack(SensorTrack);
|
||||
THEN("check if Track attributes are correct")
|
||||
{
|
||||
|
||||
@@ -55,7 +56,7 @@ SCENARIO("Testing the SimCore Sensor")
|
||||
REQUIRE(List.getTrack(id)->Course.getValue() == course);
|
||||
// REQUIRE(List.getTrack(id)->getSensorCount() == 1);
|
||||
track->Course.setValue(270);
|
||||
List.addTrack(track);
|
||||
List.addTrack(SensorTrack);
|
||||
// REQUIRE(List.getTrack(id)->Course.getValue() == 270);
|
||||
// REQUIRE(List.getTrack(id)->getSensorCount() == 2);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(3000));
|
||||
|
||||
Reference in New Issue
Block a user