1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
//
// This file is part of the Marble Virtual Globe.
//
// This program is free software licensed under the GNU LGPL. You can
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
// Copyright 2008 Patrick Spendrin <ps_ml@gmx.de>
//
#include "MarbleDirs.h"
#include "PluginManager.h"
#include <QTest>
namespace Marble
{
class PluginManagerTest : public QObject
{
Q_OBJECT
private Q_SLOTS:
void loadPlugins();
};
void PluginManagerTest::loadPlugins()
{
MarbleDirs::setMarbleDataPath( DATA_PATH );
MarbleDirs::setMarblePluginPath( PLUGIN_PATH );
const int pluginNumber = MarbleDirs::pluginEntryList( "", QDir::Files ).size();
PluginManager pm;
const int renderPlugins = pm.renderPlugins().size();
const int positionPlugins = pm.positionProviderPlugins().size();
const int searchRunnerPlugins = pm.searchRunnerPlugins().size();
const int reverseGeocodingRunnerPlugins = pm.reverseGeocodingRunnerPlugins().size();
const int routingRunnerPlugins = pm.routingRunnerPlugins().size();
const int parsingRunnerPlugins = pm.parsingRunnerPlugins().size();
const int runnerPlugins = searchRunnerPlugins + reverseGeocodingRunnerPlugins + routingRunnerPlugins + parsingRunnerPlugins;
QCOMPARE( renderPlugins + positionPlugins + runnerPlugins, pluginNumber );
}
}
QTEST_MAIN( Marble::PluginManagerTest )
#include "PluginManagerTest.moc"
|