summaryrefslogtreecommitdiff
path: root/ios/UnitTest/UnitTest/ViewController.mm
diff options
context:
space:
mode:
Diffstat (limited to 'ios/UnitTest/UnitTest/ViewController.mm')
-rw-r--r--ios/UnitTest/UnitTest/ViewController.mm38
1 files changed, 26 insertions, 12 deletions
diff --git a/ios/UnitTest/UnitTest/ViewController.mm b/ios/UnitTest/UnitTest/ViewController.mm
index fa002f107f27..bcdfc492a016 100644
--- a/ios/UnitTest/UnitTest/ViewController.mm
+++ b/ios/UnitTest/UnitTest/ViewController.mm
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This file is part of the LibreOffice project.
*
@@ -15,6 +15,8 @@
#include <cppuhelper/exc_hlp.hxx>
#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
#include <com/sun/star/uno/Any.hxx>
+#include <sfx2/app.hxx>
+#include <vcl/svapp.hxx>
#include <cppunit/CompilerOutputter.h>
#include <cppunit/TestResult.h>
@@ -44,6 +46,10 @@ extern "C" {
#define CPPUNIT_PLUGIN_EXPORTED_NAME CppuUnourl
#include "../../../cppuhelper/qa/unourl/cppu_unourl.cxx"
+#undef CPPUNIT_PLUGIN_EXPORTED_NAME
+#define CPPUNIT_PLUGIN_EXPORTED_NAME BitmapTest
+#include "../../../vcl/qa/cppunit/BitmapTest.cxx"
+
#define main tilebench_main
#include "../../../libreofficekit/qa/tilebench/tilebench.cxx"
@@ -52,22 +58,30 @@ extern "C" {
- (void)viewDidLoad {
[super viewDidLoad];
- // First run some normal cppunit tests
+ // Simplest (?) way to do all the tedious initialization
+ lok_init_2(nullptr, nullptr);
+
+ {
+ // First run some normal cppunit tests. Seems that at least the BitmapTest needs to be run
+ // with the SolarMutex held.
+
+ SolarMutexGuard solarMutexGuard;
- CppUnit::TestResult result;
+ CppUnit::TestResult result;
- CppUnit::TextTestProgressListener logger;
- result.addListener(&logger);
+ CppUnit::TextTestProgressListener logger;
+ result.addListener(&logger);
- CppUnit::TestResultCollector collector;
- result.addListener(&collector);
+ CppUnit::TestResultCollector collector;
+ result.addListener(&collector);
- CppUnit::TestRunner runner;
- runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
- runner.run(result);
+ CppUnit::TestRunner runner;
+ runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
+ runner.run(result);
- CppUnit::CompilerOutputter outputter(&collector, std::cerr);
- outputter.write();
+ CppUnit::CompilerOutputter outputter(&collector, std::cerr);
+ outputter.write();
+ }
// Then some more specific stuff
tilebench_main(0, nullptr);