Skip to content

Commit

Permalink
Fixed tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanFabian committed May 11, 2021
1 parent 77d4dff commit 6e12825
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions test/image_transport_subscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ void processSomeEvents( int n = 10, int sleep_duration_us = 5000 )
usleep( sleep_duration_us );
QCoreApplication::processEvents();
ros::spinOnce();
RosQml::getInstance().spinOnce();
}
}

Expand Down Expand Up @@ -141,6 +142,7 @@ TEST( ImageTransportSubscriber, testWrongFormat )
mock_surface.stop();
processSomeEvents();

EXPECT_FALSE( mock_surface.last_frame.isValid());
EXPECT_FALSE( subscriber.subscribed());
}

Expand Down
4 changes: 1 addition & 3 deletions test/message_comparison.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ template<>
::testing::AssertionResult mapAndMessageEqual( const QVariant &map, const geometry_msgs::Pose msg,
const std::string &path, double precision )
{
bool ok;
::testing::AssertionResult result = ::testing::AssertionSuccess();
if ( !(result = mapAndMessageEqual( map.toHash()["position"], msg.position, path + ".position", precision )))
return result;
Expand All @@ -292,7 +291,6 @@ template<>
::testing::AssertionResult mapAndMessageEqual( const QVariant &map, const geometry_msgs::PoseStamped msg,
const std::string &path, double precision )
{
bool ok;
::testing::AssertionResult result = ::testing::AssertionSuccess();
if ( !(result = mapAndMessageEqual( map.toHash()["header"], msg.header, path + ".strings", precision )))
return result;
Expand Down Expand Up @@ -421,7 +419,7 @@ ::testing::AssertionResult messageEqual( const CompoundMessage &compound, const

template<>
::testing::AssertionResult mapAndMessageEqual( const QVariant &map, const roscpp_tutorials::TwoIntsRequest msg,
const std::string &path, double precision )
const std::string &path, double )
{
bool ok;
if ( map.toHash()["a"].toLongLong( &ok ) != msg.a )
Expand Down

0 comments on commit 6e12825

Please sign in to comment.