Unit test fix

* Use correct version of loadAndResolveP3DSimConnect/loadAndResolveFsxSimConnect
* use CLogCategory::driver() for SimConnectSymbols
* added load(common_pre/post)
This commit is contained in:
Klaus Basan
2018-11-12 03:06:07 +01:00
parent db05388bea
commit fe28c220fa
3 changed files with 17 additions and 7 deletions

View File

@@ -18,6 +18,7 @@
#include "plugins/simulator/fsxcommon/simconnectdatadefinition.h"
#include "plugins/simulator/fsxcommon/simconnectsymbols.h"
#include "plugins/simulator/fsxcommon/simulatorfsxcommon.h"
#include <QTest>
using namespace BlackSimPlugin::FsxCommon;
@@ -26,7 +27,11 @@ namespace BlackSimPluginFsxP3D
{
void CSimPluginFsxP3d::resolveSymbols()
{
QVERIFY2(loadAndResolveSimConnect(false), "Could not load and resolve SimConnect library!");
#ifdef Q_OS_WIN64
QVERIFY2(loadAndResolveP3DSimConnect(P3DSimConnectv42), "Could not load and resolve SimConnect library!");
#else
QVERIFY2(loadAndResolveFsxSimConnect(false), "Could not load and resolve SimConnect library!");
#endif
HANDLE hSimConnect;
SimConnect_Open(&hSimConnect, "Test", nullptr, 0, nullptr, 0);
SimConnect_Close(hSimConnect);