Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <michael@openrobotics.org>
  • Loading branch information
mjcarroll committed Jan 27, 2022
1 parent faeca78 commit 668f1ce
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 24 deletions.
4 changes: 2 additions & 2 deletions ros_ign_bridge/src/factory_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
namespace ros_ign_bridge
{

FactoryInterface::~FactoryInterface()
FactoryInterface::~FactoryInterface()
{
}

}
} // namespace ros_ign_bridge
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

#include "ros_subscriber.hpp"

using namespace ros_subscriber;
namespace ros_subscriber
{

/////////////////////////////////////////////////
TEST(ROSSubscriberTest, Quaternion)
Expand Down Expand Up @@ -143,3 +144,5 @@ TEST(ROSSubscriberTest, Wrench)

EXPECT_TRUE(client.callbackExecuted);
}

} // namespace ros_subscriber
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

#include "ros_subscriber.hpp"

using namespace ros_subscriber;
namespace ros_subscriber
{

/////////////////////////////////////////////////
TEST(ROSSubscriberTest, Odometry)
Expand All @@ -35,3 +36,4 @@ TEST(ROSSubscriberTest, Odometry)

EXPECT_TRUE(client.callbackExecuted);
}
} // namespace ros_subscriber
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

#include "ros_subscriber.hpp"

using namespace ros_subscriber;

namespace ros_subscriber
{
/////////////////////////////////////////////////
TEST(ROSSubscriberTest, Light)
{
Expand Down Expand Up @@ -83,3 +83,4 @@ TEST(ROSSubscriberTest, Contacts)

EXPECT_TRUE(client.callbackExecuted);
}
} // namespace ros_subscriber
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ int main(int argc, char ** argv)
ros_subscriber::kTestNode = rclcpp::Node::make_shared("ros_subscriber");
return RUN_ALL_TESTS();
}

Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,19 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef ROS_SUBSCRIBER_HPP_
#define ROS_SUBSCRIBER_HPP_
#ifndef SUBSCRIBERS__ROS_SUBSCRIBER__ROS_SUBSCRIBER_HPP_
#define SUBSCRIBERS__ROS_SUBSCRIBER__ROS_SUBSCRIBER_HPP_

#include <rclcpp/rclcpp.hpp>

#include <memory>
#include <string>

#include "utils/test_utils.hpp"
#include "utils/ros_test_msg.hpp"

namespace ros_subscriber {
namespace ros_subscriber
{

/// \brief Global node to be shared by all tests
static std::shared_ptr<rclcpp::Node> kTestNode;
Expand All @@ -32,15 +34,14 @@ static std::shared_ptr<rclcpp::Node> kTestNode;
template<typename ROS_T>
class MyTestClass
{

public:
/// \brief Class constructor.
explicit MyTestClass(const std::string & _topic)
{
using std::placeholders::_1;
this->sub =
kTestNode->create_subscription<ROS_T>(_topic, 1000,
std::bind(&MyTestClass::Cb, this, _1));
this->sub = kTestNode->create_subscription<ROS_T>(
_topic, 1000,
std::bind(&MyTestClass::Cb, this, _1));
}

/// \brief Member function called each time a topic update is received.
Expand All @@ -66,4 +67,4 @@ class MyTestClass

} // namespace ros_subscriber

#endif // ROS_SUBSCRIBER_HPP_
#endif // SUBSCRIBERS__ROS_SUBSCRIBER__ROS_SUBSCRIBER_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

#include "ros_subscriber.hpp"

using namespace ros_subscriber;

namespace ros_subscriber
{
/////////////////////////////////////////////////
TEST(ROSSubscriberTest, Clock)
{
Expand All @@ -35,3 +35,4 @@ TEST(ROSSubscriberTest, Clock)

EXPECT_TRUE(client.callbackExecuted);
}
} // namespace ros_subscriber
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

#include "ros_subscriber.hpp"

using namespace ros_subscriber;

namespace ros_subscriber
{
/////////////////////////////////////////////////
TEST(ROSSubscriberTest, Image)
{
Expand Down Expand Up @@ -131,3 +131,4 @@ TEST(ROSSubscriberTest, BatteryState)

EXPECT_TRUE(client.callbackExecuted);
}
} // namespace ros_subscriber
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

#include "ros_subscriber.hpp"

using namespace ros_subscriber;

namespace ros_subscriber
{
/////////////////////////////////////////////////
TEST(ROSSubscriberTest, Color)
{
Expand Down Expand Up @@ -119,3 +119,4 @@ TEST(ROSSubscriberTest, String)

EXPECT_TRUE(client.callbackExecuted);
}
} // namespace ros_subscriber
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

#include "ros_subscriber.hpp"

using namespace ros_subscriber;

namespace ros_subscriber
{
/////////////////////////////////////////////////
TEST(ROSSubscriberTest, JointTrajectory)
{
Expand All @@ -35,4 +35,4 @@ TEST(ROSSubscriberTest, JointTrajectory)

EXPECT_TRUE(client.callbackExecuted);
}

} // namespace ros_subscriber

0 comments on commit 668f1ce

Please sign in to comment.