Skip to content

Commit

Permalink
const ref and more messages for visual at test
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <louise@openrobotics.org>
  • Loading branch information
chapulina committed Feb 24, 2021
1 parent 9bc24ef commit 42d6758
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ogre2/src/Ogre2RenderEngine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ std::string Ogre2RenderEngine::CreateRenderWindow(const std::string &_handle,
window = this->ogreRoot->createRenderWindow(
stream.str(), _width, _height, false, &params);
}
catch(std::exception _e)
catch(const std::exception &_e)
{
ignerr << " Unable to create the rendering window: " << _e.what()
<< std::endl;
Expand Down
10 changes: 6 additions & 4 deletions test/integration/camera.cc
Original file line number Diff line number Diff line change
Expand Up @@ -242,25 +242,27 @@ void CameraTest::VisualAt(const std::string &_renderEngine)

if (x <= 100)
{
EXPECT_EQ(nullptr, vis);
EXPECT_EQ(nullptr, vis)
<< "Found [" << vis->Name() << "] at X [" << x << "]";
}
else if (x > 100 && x <= 300)
{
// Don't end test here on failure, this condition is flaky
EXPECT_NE(nullptr, vis) << x;
EXPECT_NE(nullptr, vis) << "X: " << x;
if (vis)
{
EXPECT_EQ("sphere", vis->Name());
}
}
else if (x > 300 && x <= 400)
{
EXPECT_EQ(nullptr, vis);
EXPECT_EQ(nullptr, vis)
<< "Found [" << vis->Name() << "] at X [" << x << "]";
}
else if (x > 400 && x <= 700)
{
// Don't end test here on failure, this condition is flaky
EXPECT_NE(nullptr, vis) << x;
EXPECT_NE(nullptr, vis) << "X: " << x;
if (vis)
{
EXPECT_EQ("box", vis->Name());
Expand Down

0 comments on commit 42d6758

Please sign in to comment.