GUITESTS: Refactoring test building.
Start building each test as separate project as QtestLib tests usually are built. This commit adds the infrastructure and moves TranslationHandler test as own project.
This commit is contained in:
parent
a9e2e15e40
commit
6820fc6933
|
@ -0,0 +1,24 @@
|
|||
CONFIG += qtestlib
|
||||
#DEPENDPATH += . ..
|
||||
INCLUDEPATH += . ../.. ../../../lib
|
||||
|
||||
LIBS += -L../../../externals -lpcre
|
||||
INCLUDEPATH += ../../externals
|
||||
|
||||
BASEPATH = ../../../lib/
|
||||
include($$PWD/../../lib/lib.pri)
|
||||
|
||||
# GUI
|
||||
SOURCES += ../../erroritem.cpp \
|
||||
../../report.cpp \
|
||||
../../translationhandler.cpp \
|
||||
../../xmlreport.cpp \
|
||||
../../xmlreportv1.cpp \
|
||||
../../xmlreportv2.cpp
|
||||
|
||||
HEADERS += ../../erroritem.h \
|
||||
../../report.h \
|
||||
../../translationhandler.h \
|
||||
../../xmlreport.h \
|
||||
../../xmlreportv1.h \
|
||||
../../xmlreportv2.h
|
|
@ -1,38 +1,4 @@
|
|||
TEMPLATE = app
|
||||
TARGET = test
|
||||
CONFIG += qtestlib
|
||||
DEPENDPATH += . ..
|
||||
INCLUDEPATH += . .. ../../lib
|
||||
CONFIG += ordered
|
||||
TEMPLATE = subdirs
|
||||
|
||||
LIBS += -L../../externals -lpcre
|
||||
INCLUDEPATH += ../../externals
|
||||
|
||||
BASEPATH = ../../lib/
|
||||
include($$PWD/../../lib/lib.pri)
|
||||
|
||||
# tests
|
||||
SOURCES += main.cpp \
|
||||
testtranslationhandler.cpp \
|
||||
testxmlreport.cpp \
|
||||
testxmlreportv1.cpp \
|
||||
testxmlreportv2.cpp
|
||||
|
||||
HEADERS += testtranslationhandler.h \
|
||||
testxmlreport.h \
|
||||
testxmlreportv1.h \
|
||||
testxmlreportv2.h
|
||||
|
||||
# GUI
|
||||
SOURCES += ../erroritem.cpp \
|
||||
../report.cpp \
|
||||
../translationhandler.cpp \
|
||||
../xmlreport.cpp \
|
||||
../xmlreportv1.cpp \
|
||||
../xmlreportv2.cpp
|
||||
|
||||
HEADERS += ../erroritem.h \
|
||||
../report.h \
|
||||
../translationhandler.h \
|
||||
../xmlreport.h \
|
||||
../xmlreportv1.h \
|
||||
../xmlreportv2.h
|
||||
SUBDIRS = translationhandler
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Cppcheck - A tool for static C/C++ code analysis
|
||||
* Copyright (C) 2007-2011 Daniel Marjamäki and Cppcheck team.
|
||||
* Copyright (C) 2007-2011 Daniel Marjamäki and Cppcheck team.
|
||||
*
|
||||
* 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
|
||||
|
@ -27,3 +27,5 @@ void TestTranslationHandler::construct()
|
|||
QCOMPARE(10, handler.GetNames().size());
|
||||
QCOMPARE(QString("en"), handler.GetCurrentLanguage());
|
||||
}
|
||||
|
||||
QTEST_MAIN(TestTranslationHandler)
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Cppcheck - A tool for static C/C++ code analysis
|
||||
* Copyright (C) 2007-2011 Daniel Marjamäki and Cppcheck team.
|
||||
* Copyright (C) 2007-2011 Daniel Marjamäki and Cppcheck team.
|
||||
*
|
||||
* 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
|
|
@ -0,0 +1,13 @@
|
|||
TEMPLATE = app
|
||||
TARGET = test-translationhandler
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += .
|
||||
OBJECTS_DIR = build
|
||||
MOC_DIR = build
|
||||
|
||||
include(../common.pri)
|
||||
|
||||
# tests
|
||||
SOURCES += testtranslationhandler.cpp
|
||||
|
||||
HEADERS += testtranslationhandler.h
|
Loading…
Reference in New Issue