From 22e332a5f0f62da2158915e84f316c796886d8bf Mon Sep 17 00:00:00 2001 From: Aditya Agrawal Date: Fri, 5 Apr 2024 16:29:15 +0800 Subject: [PATCH] fixed formatting --- src/parser_urdf.cc | 6 +++--- src/parser_urdf_TEST.cc | 30 +++++++++++++++--------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/parser_urdf.cc b/src/parser_urdf.cc index 40c5ee66a..71a3b7cc0 100644 --- a/src/parser_urdf.cc +++ b/src/parser_urdf.cc @@ -2108,7 +2108,7 @@ void InsertSDFExtensionVisual(tinyxml2::XMLElement *_elem, void InsertSDFExtensionLink(tinyxml2::XMLElement *_elem, const std::string &_linkName) { - bool link_found = false; + bool link_found = false; for (StringSDFExtensionPtrMap::iterator sdfIt = g_extensions.begin(); sdfIt != g_extensions.end(); ++sdfIt) @@ -2159,8 +2159,8 @@ void InsertSDFExtensionLink(tinyxml2::XMLElement *_elem, // If we didn't find the link, emit a warning if (!link_found) { sdfwarn << " tag with reference[" << _linkName << "] does not exist in the URDF model. Please " - << "ensure that the referenced attribute matches the name of a link, consider checking unicode " - << "representation for reference attribute in case of invisible characters and homoglyphs"; + << "ensure that the referenced attribute matches the name of a link, consider checking unicode " + << "representation for reference attribute in case of invisible characters and homoglyphs"; } } diff --git a/src/parser_urdf_TEST.cc b/src/parser_urdf_TEST.cc index 5c8d55318..125067ca5 100644 --- a/src/parser_urdf_TEST.cc +++ b/src/parser_urdf_TEST.cc @@ -2463,7 +2463,7 @@ TEST(URDFParser, ZeroMassLeafLink) ///////////////////////////////////////////////// TEST(URDFParser, ParseGazeboRefDoesntExistWarningMessage) { -// Redirect sdfwarn output + // Redirect sdfwarn output std::stringstream buffer; sdf::testing::RedirectConsoleStream redir( sdf::Console::Instance()->GetMsgStream(), &buffer); @@ -2476,9 +2476,9 @@ TEST(URDFParser, ParseGazeboRefDoesntExistWarningMessage) }); #endif - // test if reference to link exists - { - // clear the contents of the buffer + // test if reference to link exists + { + // clear the contents of the buffer buffer.str(""); std::string str = R"( @@ -2505,17 +2505,17 @@ TEST(URDFParser, ParseGazeboRefDoesntExistWarningMessage) sdf::ParserConfig config; parser.InitModelString(str, config, &sdfResult); - EXPECT_PRED2(sdf::testing::contains, buffer.str(), - " tag with reference[link1] does not exist in the URDF model. Please " - "ensure that the referenced attribute matches the name of a link, consider checking unicode " - "representation for reference attribute in case of invisible characters and homoglyphs"); - } - - // TODO: Similar tests for - - // InsertSDFExtensionCollision, - // InsertSDFExtensionRobot, - // InsertSDFExtensionVisual, - // InsertSDFExtensionJoint + EXPECT_PRED2(sdf::testing::contains, buffer.str(), + " tag with reference[link1] does not exist in the URDF model. Please " + "ensure that the referenced attribute matches the name of a link, consider checking unicode " + "representation for reference attribute in case of invisible characters and homoglyphs"); + } + + // TODO: Similar tests for - + // InsertSDFExtensionCollision, + // InsertSDFExtensionRobot, + // InsertSDFExtensionVisual, + // InsertSDFExtensionJoint } /////////////////////////////////////////////////