Skip to content

Commit

Permalink
use static func
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-du-car committed Jul 19, 2023
1 parent a1faf70 commit 9a534b3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/v2i-hub/CDASimAdapter/test/TestSimulationMessages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ TEST(SimulationMessages, ExternalObjectToRoutableMessage)
{
simulation::ExternalObject externalObj;
string expectedStr = "{\"metadata\":{\"is_simulation\":false,\"datum\":\"\",\"proj_string\":\"\",\"sensor_x\":0.0,\"sensor_y\":0.0,\"sensor_z\":0.0,\"infrastructure_id\":\"\",\"sensor_id\":\"\"},\"header\":{\"seq\":0,\"stamp\":{\"secs\":0,\"nsecs\":0}},\"id\":0,\"pose\":{\"pose\":{\"position\":{\"x\":0.0,\"y\":0.0,\"z\":0.0},\"orientation\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":0.0}},\"covariance\":[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]},\"velocity\":{\"twist\":{\"linear\":{\"x\":0.0,\"y\":0.0,\"z\":0.0},\"angular\":{\"x\":0.0,\"y\":0.0,\"z\":0.0}},\"covariance\":[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]},\"size\":{\"x\":0.0,\"y\":0.0,\"z\":0.0},\"confidence\":0.0,\"object_type\":\"\",\"dynamic_obj\":false}";
tmx::utils::sim::SimulationExternalObjectConverter converter;
converter.jsonToSimExternalObj(expectedStr, externalObj);
tmx::utils::sim::SimulationExternalObjectConverter::jsonToSimExternalObj(expectedStr, externalObj);
ASSERT_EQ("ExternalObject", std::string(simulation::ExternalObject::MessageSubType));
ASSERT_EQ("Simulation", std::string(simulation::ExternalObject::MessageType));
tmx::routeable_message routeableMsg;
Expand Down

0 comments on commit 9a534b3

Please sign in to comment.