ソースを参照

Improved test output.

Sascha Zelzer 10 年 前
コミット
39de825757

+ 1 - 1
Libs/PluginFramework/Testing/FrameworkTestPlugins/app_test/ctkTestApp.cpp

@@ -23,7 +23,6 @@
 #include "ctkTestApp_p.h"
 
 #include <ctkPluginContext.h>
-#include <service/application/ctkApplicationLauncher.h>
 #include <service/application/ctkApplicationException.h>
 
 #include <QDebug>
@@ -123,6 +122,7 @@ void MyAppHandle::destroy()
 QVariant MyAppHandle::run(const QVariant& /*context*/)
 {
   Q_ASSERT_X(QThread::currentThread() == QCoreApplication::instance()->thread(), "MyAppHandle::run", "Not running in main thread");
+  QCoreApplication::instance()->setProperty("app_test.success", true);
   return QVariant();
 }
 

+ 3 - 0
Libs/PluginFramework/Testing/FrameworkTestPlugins/app_test/ctkTestAppMain.cpp

@@ -56,4 +56,7 @@ int main(int argc, char** argv)
   ctkPluginFrameworkLauncher::setFrameworkProperties(fwProps);
   ctkPluginFrameworkLauncher::addSearchPath(pluginDir);
   ctkPluginFrameworkLauncher::run();
+
+  Q_ASSERT_X(QCoreApplication::instance()->property("app_test.success").toBool(), "MyAppContainer", "App did not run");
+  qDebug() << "App run successful";
 }