Test template for future test system.
--HG-- branch : develop
This commit is contained in:
parent
6ec5cc99d1
commit
e1e995abe7
30
src/test/ValentinaTest/ValentinaTest.pro
Normal file
30
src/test/ValentinaTest/ValentinaTest.pro
Normal file
|
@ -0,0 +1,30 @@
|
|||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2015-03-31T17:27:03
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += testlib
|
||||
|
||||
QT -= gui
|
||||
|
||||
TARGET = tst_test
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
|
||||
TEMPLATE = app
|
||||
|
||||
# Use out-of-source builds (shadow builds)
|
||||
CONFIG -= debug_and_release debug_and_release_target
|
||||
|
||||
# We use C++11 standard
|
||||
CONFIG += c++11
|
||||
|
||||
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
||||
|
||||
SOURCES += \
|
||||
qttestmainlambda.cpp \
|
||||
tst_test.cpp
|
||||
|
||||
HEADERS += \
|
||||
tst_test.h
|
46
src/test/ValentinaTest/qttestmainlambda.cpp
Normal file
46
src/test/ValentinaTest/qttestmainlambda.cpp
Normal file
|
@ -0,0 +1,46 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file qttestmainlambda.cpp
|
||||
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
||||
** @date 31 3, 2015
|
||||
**
|
||||
** @brief
|
||||
** @copyright
|
||||
** This source code is part of the Valentine project, a pattern making
|
||||
** program, whose allow create and modeling patterns of clothing.
|
||||
** Copyright (C) 2015 Valentina project
|
||||
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
|
||||
**
|
||||
** Valentina 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 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** Valentina is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
|
||||
**
|
||||
*************************************************************************/
|
||||
|
||||
#include <QtTest>
|
||||
|
||||
#include "tst_test.h"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int status = 0;
|
||||
auto ASSERT_TEST = [&status, argc, argv](QObject* obj)
|
||||
{
|
||||
status |= QTest::qExec(obj, argc, argv);
|
||||
delete obj;
|
||||
};
|
||||
|
||||
ASSERT_TEST(new Test());
|
||||
//ASSERT_TEST(new Test2());
|
||||
|
||||
return status;
|
||||
}
|
46
src/test/ValentinaTest/tst_test.cpp
Normal file
46
src/test/ValentinaTest/tst_test.cpp
Normal file
|
@ -0,0 +1,46 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file tst_test.cpp
|
||||
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
||||
** @date 31 3, 2015
|
||||
**
|
||||
** @brief
|
||||
** @copyright
|
||||
** This source code is part of the Valentine project, a pattern making
|
||||
** program, whose allow create and modeling patterns of clothing.
|
||||
** Copyright (C) 2015 Valentina project
|
||||
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
|
||||
**
|
||||
** Valentina 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 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** Valentina is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
|
||||
**
|
||||
*************************************************************************/
|
||||
|
||||
#include "tst_test.h"
|
||||
|
||||
Test::Test()
|
||||
{
|
||||
}
|
||||
|
||||
void Test::initTestCase()
|
||||
{
|
||||
}
|
||||
|
||||
void Test::cleanupTestCase()
|
||||
{
|
||||
}
|
||||
|
||||
void Test::testCase1()
|
||||
{
|
||||
QVERIFY2(true, "Failure");
|
||||
}
|
48
src/test/ValentinaTest/tst_test.h
Normal file
48
src/test/ValentinaTest/tst_test.h
Normal file
|
@ -0,0 +1,48 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file tst_test.cpp
|
||||
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
||||
** @date 31 3, 2015
|
||||
**
|
||||
** @brief
|
||||
** @copyright
|
||||
** This source code is part of the Valentine project, a pattern making
|
||||
** program, whose allow create and modeling patterns of clothing.
|
||||
** Copyright (C) 2015 Valentina project
|
||||
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
|
||||
**
|
||||
** Valentina 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 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** Valentina is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
|
||||
**
|
||||
*************************************************************************/
|
||||
|
||||
#ifndef TST_TEST_H
|
||||
#define TST_TEST_H
|
||||
|
||||
#include <QString>
|
||||
#include <QtTest>
|
||||
|
||||
class Test : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Test();
|
||||
|
||||
private Q_SLOTS:
|
||||
void initTestCase();
|
||||
void cleanupTestCase();
|
||||
void testCase1();
|
||||
};
|
||||
|
||||
#endif // TST_TEST_H
|
|
@ -1,3 +1,4 @@
|
|||
TEMPLATE = subdirs
|
||||
CONFIG += ordered
|
||||
SUBDIRS = ParserTest
|
||||
SUBDIRS = ParserTest \
|
||||
ValentinaTest
|
||||
|
|
Loading…
Reference in New Issue
Block a user