Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
623 B
C++
Raw Permalink Normal View History

2022-05-02 19:59:49 +02:00
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "pythonrunner.h"
#include <QCoreApplication>
2025-05-29 11:03:51 +02:00
#include <uibase/iplugingame.h>
2022-05-02 19:59:49 +02:00
#include "MockOrganizer.h"
using namespace MOBase;
TEST(IPluginGame, Simple)
{
const auto plugins_folder = QString(std::getenv("PLUGIN_DIR"));
auto runner = mo2::python::createPythonRunner();
2022-05-02 19:59:49 +02:00
runner->initialize();
// load objects
const auto objects = runner->load(plugins_folder + "/dummy-game.py");
EXPECT_EQ(objects.size(), 1);
// load the IPlugin
IPluginGame* plugin = qobject_cast<IPluginGame*>(objects[0]);
EXPECT_NE(plugin, nullptr);
}