TreeFrogFramework  1.18
Macros
tftest.h File Reference
#include <QtTest/QtTest>
#include <QObject>
#include <QTextCodec>
#include <QByteArray>
#include <QEventLoop>
#include <TWebApplication>
#include <TAppSettings>
#include "tkvsdatabasepool.h"
Include dependency graph for tftest.h:

Go to the source code of this file.

Macros

#define TF_TEST_MAIN(TestObject)
 
#define TF_TEST_SQLLESS_MAIN(TestObject)
 

Macro Definition Documentation

#define TF_TEST_MAIN (   TestObject)
#define TF_TEST_SQLLESS_MAIN (   TestObject)
Value:
int main(int argc, char *argv[]) \
{ \
TWebApplication app(argc, argv); \
QByteArray codecName = Tf::appSettings()->value(Tf::InternalEncoding, "UTF-8").toByteArray(); \
QTextCodec *codec = QTextCodec::codecForName(codecName); \
QTextCodec::setCodecForLocale(codec); \
TestObject tc; \
return QTest::qExec(&tc, argc, argv); \
}
T_CORE_EXPORT TWebApplication * app()
Returns a global pointer referring to the unique application object.
Definition: tglobal.cpp:28
T_CORE_EXPORT TAppSettings * appSettings()
Returns a global pointer referring to the unique application settings object.
Definition: tglobal.cpp:36
Definition: tfnamespace.h:142
#define TF_SET_CODEC_FOR_TR(codec)
Definition: tglobal.h:159