Files
qt-creator/share/qtcreator/templates/wizards/autotest/files/main.cpp
Christian Stenger 63e158b4d4 AutoTest: Enhance wizard to support GTest
Initially this adds basic gtest testing - to be improved later on.

Change-Id: I2121cd24493a8d65c5acd0be5c9dd5858702645d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-27 10:00:49 +00:00

32 lines
649 B
C++

%{Cpp:LicenseTemplate}\
@if "%{TestFrameWork}" == "QtTest"
@if "%{RequireGUI}" == "true"
%{JS: QtSupport.qtIncludes([ 'QtGui/QApplication' ],
[ 'QtWidgets/QApplication' ]) }\
@else
%{JS: QtSupport.qtIncludes([ 'QtCore/QCoreApplication' ],
[ 'QtCore/QCoreApplication' ]) }\
@endif
// add necessary includes here
int main(int argc, char *argv[])
{
@if "%{RequireGUI}" == "true"
QApplication a(argc, argv);
@else
QCoreApplication a(argc, argv);
@endif
return a.exec();
}
@else
#include <iostream>
int main(int , char **)
{
std::cout << "Hello World!\\n";
return 0;
}
@endif