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:
authorConstantin Shalnev <c.shalnev@corp.mail.ru>2016-02-02 13:26:11 +0300
committerSergey Yershov <yershov@corp.mail.ru>2016-03-23 16:21:34 +0300
commitaf43d012a0d8759001881a45518f7e3b57a6acbf (patch)
treef969ca8fa630b2e1880a9f0610403f4a64cae44a /testing
parentaaf72a9864498fa04324e64c804cfff1f8445cdb (diff)
[new-downloader] Storage integration tests
Diffstat (limited to 'testing')
-rw-r--r--testing/testing.hpp6
-rw-r--r--testing/testingmain.cpp27
2 files changed, 33 insertions, 0 deletions
diff --git a/testing/testing.hpp b/testing/testing.hpp
index 4c82ac6ffa..6bbfe3b0ef 100644
--- a/testing/testing.hpp
+++ b/testing/testing.hpp
@@ -40,6 +40,12 @@ namespace my
}
}
+namespace testing
+{
+ void RunEventLoop();
+ void StopEventLoop();
+} // namespace testing
+
// This struct contains parsed command line options. It may contain pointers to argc contents.
struct CommandLineOptions
{
diff --git a/testing/testingmain.cpp b/testing/testingmain.cpp
index 5c3dddf114..1d081b1b94 100644
--- a/testing/testingmain.cpp
+++ b/testing/testingmain.cpp
@@ -32,6 +32,33 @@
#endif
#endif
+namespace testing
+{
+
+void RunEventLoop()
+{
+#ifdef OMIM_OS_IPHONE_DEVICE
+ CFRunLoopRun();
+#else
+# ifdef QAPP
+ QAPP::exec();
+# endif
+#endif
+}
+
+void StopEventLoop()
+{
+#ifdef OMIM_OS_IPHONE_DEVICE
+ CFRunLoopStop(CFRunLoopGetMain());
+#else
+# ifdef QAPP
+ QAPP::exit();
+# endif
+#endif
+}
+
+} // namespace testing
+
namespace
{
bool g_bLastTestOK = true;