1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
19#include <cppunit/CompilerOutputter.h>
20#include <cppunit/TestResult.h>
21#include <cppunit/TestResultCollector.h>
22#include <cppunit/TestRunner.h>
23#include <cppunit/TextTestProgressListener.h>
24
25#import <LibreOfficeKit/LibreOfficeKit.hxx>
26
27extern "C" {
28#import <native-code.h>
29}
30
31#include <premac.h>
32#import <CoreGraphics/CoreGraphics.h>
33#import "ViewController.h"
34#include <postmac.h>
35
36@interface ViewController ()
37
38@end
39
40#define CPPUNIT_PLUGIN_EXPORTED_NAME CppuMisc
41#include "../../../cppuhelper/qa/misc/test_misc.cxx"
42
43#undef CPPUNIT_PLUGIN_EXPORTED_NAME
44#define CPPUNIT_PLUGIN_EXPORTED_NAME CppuUnourl
45#include "../../../cppuhelper/qa/unourl/cppu_unourl.cxx"
46
47#define main tilebench_main
48#include "../../../libreofficekit/qa/tilebench/tilebench.cxx"
49
50@implementation ViewController
51
52- (void)viewDidLoad {
53    [super viewDidLoad];
54
55    // First run some normal cppunit tests
56
57    CppUnit::TestResult result;
58
59    CppUnit::TextTestProgressListener logger;
60    result.addListener(&logger);
61
62    CppUnit::TestResultCollector collector;
63    result.addListener(&collector);
64
65    CppUnit::TestRunner runner;
66    runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
67    runner.run(result);
68
69    CppUnit::CompilerOutputter outputter(&collector, std::cerr);
70    outputter.write();
71
72    // Then some more specific stuff
73    tilebench_main(0, nullptr);
74}
75
76@end
77