Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Zolotarev <deathbaba@gmail.com>2011-10-26 18:07:11 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:26:54 +0300
commitdcfef49bae32628e68eb426be15ff6cdaae34353 (patch)
tree8165da361e120ec7dc6c3fb250022ab35fee9c92 /testing
parentbe316d7b825f55e948b998f53fe4e44b25a3d713 (diff)
[testing framework] Added define OMIM_UNIT_TEST_WITH_QT_EVENT_LOOP which will enable Qt event loop in the unit test project
Diffstat (limited to 'testing')
-rw-r--r--testing/testingmain.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/testing/testingmain.cpp b/testing/testingmain.cpp
index 7d3e82f23d..baf330cca5 100644
--- a/testing/testingmain.cpp
+++ b/testing/testingmain.cpp
@@ -1,4 +1,3 @@
-#include "../base/SRC_FIRST.hpp"
#include "testregister.hpp"
#include "testing.hpp"
#include "../base/logging.hpp"
@@ -7,10 +6,21 @@
#include "../std/string.hpp"
#include "../std/vector.hpp"
+#ifdef OMIM_UNIT_TEST_WITH_QT_EVENT_LOOP
+ #include <QCoreApplication>
+#endif
+
static bool g_bLastTestOK = true;
-int main()
+int main(int argc, char * argv[])
{
+#ifdef OMIM_UNIT_TEST_WITH_QT_EVENT_LOOP
+ QCoreApplication theApp(argc, argv);
+#else
+ UNUSED_VALUE(argc);
+ UNUSED_VALUE(argv);
+#endif
+
my::g_LogLevel = LINFO;
vector<string> testNames;