forked from opengisch/QField
-
Notifications
You must be signed in to change notification settings - Fork 0
/
catch2.h
50 lines (44 loc) · 1.61 KB
/
catch2.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/***************************************************************************
catch2.h
-----------------------
begin : Aug 2021
copyright : (C) 2021 by Matthias Kuhn
email : [email protected]
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifdef QFIELDTEST_MAIN
#define CATCH_CONFIG_RUNNER
#endif
#include <QString>
#include <QtGlobal>
#include <catch2/catch_all.hpp>
#ifdef QFIELDTEST_MAIN
#include <qgsapplication.h>
int main( int argc, char *argv[] )
{
int ac = 0;
char **av;
QgsApplication app( ac, av, false );
app.init();
app.setPrefixPath( CMAKE_INSTALL_PREFIX, true );
app.initQgis();
app.setAttribute( Qt::AA_Use96Dpi, true );
int result = Catch::Session().run( argc, argv );
app.exitQgis();
return result;
}
#endif
QT_BEGIN_NAMESPACE
std::ostream &operator<<( std::ostream &os, const QString &value )
{
os << qUtf8Printable( value );
return os;
}
QT_END_NAMESPACE