1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ 2/* 3 * This file is part of the LibreOffice project. 4 * 5 * This Source Code Form is subject to the terms of the Mozilla Public 6 * License, v. 2.0. If a copy of the MPL was not distributed with this 7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 8 */ 9 10#include <cassert> 11#include <iostream> 12 13#include <sal/config.h> 14 15#include <cppuhelper/exc_hlp.hxx> 16#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp> 17#include <com/sun/star/uno/Any.hxx> 18#include <sfx2/app.hxx> 19#include <vcl/svapp.hxx> 20 21#include <cppunit/CompilerOutputter.h> 22#include <cppunit/TestResult.h> 23#include <cppunit/TestResultCollector.h> 24#include <cppunit/TestRunner.h> 25#include <cppunit/TextTestProgressListener.h> 26 27#import <LibreOfficeKit/LibreOfficeKit.hxx> 28 29extern "C" { 30#import <native-code.h> 31} 32 33#include <premac.h> 34#import <CoreGraphics/CoreGraphics.h> 35#import "ViewController.h" 36#include <postmac.h> 37 38@interface ViewController () 39 40@end 41 42#define CPPUNIT_PLUGIN_EXPORTED_NAME CppuMisc 43#include "../../../cppuhelper/qa/misc/test_misc.cxx" 44 45#undef CPPUNIT_PLUGIN_EXPORTED_NAME 46#define CPPUNIT_PLUGIN_EXPORTED_NAME CppuUnourl 47#include "../../../cppuhelper/qa/unourl/cppu_unourl.cxx" 48 49#undef CPPUNIT_PLUGIN_EXPORTED_NAME 50#define CPPUNIT_PLUGIN_EXPORTED_NAME BitmapTest 51#include "../../../vcl/qa/cppunit/BitmapTest.cxx" 52 53#define main tilebench_main 54#include "../../../libreofficekit/qa/tilebench/tilebench.cxx" 55 56@implementation ViewController 57 58- (void)viewDidLoad { 59 [super viewDidLoad]; 60 61 // Simplest (?) way to do all the tedious initialization 62 lok_init_2(nullptr, nullptr); 63 64 { 65 // First run some normal cppunit tests. Seems that at least the BitmapTest needs to be run 66 // with the SolarMutex held. 67 68 SolarMutexGuard solarMutexGuard; 69 70 CppUnit::TestResult result; 71 72 CppUnit::TextTestProgressListener logger; 73 result.addListener(&logger); 74 75 CppUnit::TestResultCollector collector; 76 result.addListener(&collector); 77 78 CppUnit::TestRunner runner; 79 runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest()); 80 runner.run(result); 81 82 CppUnit::CompilerOutputter outputter(&collector, std::cerr); 83 outputter.write(); 84 } 85 86 // Then some more specific stuff 87 tilebench_main(0, nullptr); 88} 89 90@end 91