diff options
author | Constantin Shalnev <c.shalnev@corp.mail.ru> | 2016-02-02 13:26:11 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:21:34 +0300 |
commit | af43d012a0d8759001881a45518f7e3b57a6acbf (patch) | |
tree | f969ca8fa630b2e1880a9f0610403f4a64cae44a /testing | |
parent | aaf72a9864498fa04324e64c804cfff1f8445cdb (diff) |
[new-downloader] Storage integration tests
Diffstat (limited to 'testing')
-rw-r--r-- | testing/testing.hpp | 6 | ||||
-rw-r--r-- | testing/testingmain.cpp | 27 |
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; |