Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <[email protected]>
  • Loading branch information
chapulina committed Mar 30, 2022
1 parent 5fcff84 commit 176401f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
5 changes: 4 additions & 1 deletion src/Helpers_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
#include "ignition/gui/Helpers.hh"

int gg_argc = 1;
char **gg_argv = new char *[gg_argc];
char* gg_argv[] =
{
reinterpret_cast<char*>(const_cast<char*>("./Helpers_TEST")),
};

using namespace ignition;
using namespace gui;
Expand Down
6 changes: 4 additions & 2 deletions src/MainWindow_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,8 @@ void FindExitDialogButtons(
QObject *buttonBox{nullptr};
for (const auto& c : dialog->findChildren<QObject *>())
{
if (c->metaObject()->className() == std::string("QQuickDialogButtonBox"))
if (std::string(c->metaObject()->className()).find("ButtonBox") !=
std::string::npos)
{
const auto& p = c->property("standardButtons");
if (p.isValid() && p.toInt() != 0)
Expand All @@ -543,7 +544,8 @@ void FindExitDialogButtons(
Q_RETURN_ARG(QQuickItem *, button),
Q_ARG(int, index));

ASSERT_STREQ("QQuickButton", button->metaObject()->className());
ASSERT_NE(std::string::npos,
std::string(button->metaObject()->className()).find("Button"));
buttons.push_back(button);
}

Expand Down
5 changes: 4 additions & 1 deletion test/integration/minimal_scene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
#include "ignition/gui/MainWindow.hh"

int g_argc = 1;
char **g_argv = new char *[g_argc];
char* g_argv[] =
{
reinterpret_cast<char*>(const_cast<char*>("./MinimalScene_TEST")),
};

using namespace ignition;
using namespace gui;
Expand Down
9 changes: 6 additions & 3 deletions test/integration/transport_scene_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@
#include "ignition/gui/MainWindow.hh"

int g_argc = 1;
char **g_argv = new char *[g_argc];
char* g_argv[] =
{
reinterpret_cast<char*>(const_cast<char*>("./TransportSceneManager_TEST")),
};

using namespace ignition;
using namespace gui;

/////////////////////////////////////////////////
TEST(MinimalSceneTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Load))
TEST(TransportSceneManagerTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Load))
{
common::Console::SetVerbosity(4);

Expand Down Expand Up @@ -77,7 +80,7 @@ TEST(MinimalSceneTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Load))
}

/////////////////////////////////////////////////
TEST(MinimalSceneTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Config))
TEST(TransportSceneManagerTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Config))
{
bool sceneRequested{false};
std::function<bool(msgs::Scene &)> sceneService =
Expand Down

0 comments on commit 176401f

Please sign in to comment.