summaryrefslogtreecommitdiff
path: root/ios
diff options
context:
space:
mode:
Diffstat (limited to 'ios')
-rw-r--r--ios/UnitTest/UnitTest.xcodeproj/project.pbxproj4
-rw-r--r--ios/UnitTest/UnitTest/ViewController.mm38
2 files changed, 30 insertions, 12 deletions
diff --git a/ios/UnitTest/UnitTest.xcodeproj/project.pbxproj b/ios/UnitTest/UnitTest.xcodeproj/project.pbxproj
index aac3fafad016..a924640b500a 100644
--- a/ios/UnitTest/UnitTest.xcodeproj/project.pbxproj
+++ b/ios/UnitTest/UnitTest.xcodeproj/project.pbxproj
@@ -709,6 +709,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = J4FQ687VJK;
ENABLE_BITCODE = NO;
@@ -721,6 +722,7 @@
);
HEADER_SEARCH_PATHS = (
../../include,
+ ../../vcl/inc,
../../config_host,
../../workdir/UnoApiHeadersTarget/udkapi/comprehensive,
../../workdir/UnoApiHeadersTarget/offapi/comprehensive,
@@ -747,6 +749,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = J4FQ687VJK;
ENABLE_BITCODE = NO;
@@ -757,6 +760,7 @@
);
HEADER_SEARCH_PATHS = (
../../include,
+ ../../vcl/inc,
../../config_host,
../../workdir/UnoApiHeadersTarget/udkapi/comprehensive,
../../workdir/UnoApiHeadersTarget/offapi/comprehensive,
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);