2015-03-31 16:48:58 +02:00
|
|
|
/************************************************************************
|
|
|
|
**
|
|
|
|
** @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>
|
|
|
|
|
2015-04-15 14:11:13 +02:00
|
|
|
#include "tst_vposter.h"
|
2016-11-18 11:58:47 +01:00
|
|
|
#include "tst_vabstractpiece.h"
|
2015-05-07 15:12:53 +02:00
|
|
|
#include "tst_vspline.h"
|
2015-05-11 14:59:53 +02:00
|
|
|
#include "tst_nameregexp.h"
|
2015-05-17 17:31:17 +02:00
|
|
|
#include "tst_vlayoutdetail.h"
|
2015-06-09 12:21:10 +02:00
|
|
|
#include "tst_varc.h"
|
2016-02-19 10:45:36 +01:00
|
|
|
#include "tst_vellipticalarc.h"
|
2015-10-15 12:41:42 +02:00
|
|
|
#include "tst_qmutokenparser.h"
|
2015-10-16 10:13:23 +02:00
|
|
|
#include "tst_vmeasurements.h"
|
2015-10-26 09:31:36 +01:00
|
|
|
#include "tst_vlockguard.h"
|
2015-10-31 13:41:52 +01:00
|
|
|
#include "tst_misc.h"
|
2015-11-09 19:02:38 +01:00
|
|
|
#include "tst_vcommandline.h"
|
2017-01-22 14:29:23 +01:00
|
|
|
#include "tst_vpiece.h"
|
2016-01-25 18:06:36 +01:00
|
|
|
#include "tst_findpoint.h"
|
2016-03-15 16:38:07 +01:00
|
|
|
#include "tst_vabstractcurve.h"
|
2016-03-19 15:20:09 +01:00
|
|
|
#include "tst_vcubicbezierpath.h"
|
2016-08-16 17:23:38 +02:00
|
|
|
#include "tst_vgobject.h"
|
2016-09-10 13:17:08 +02:00
|
|
|
#include "tst_vsplinepath.h"
|
2016-09-10 15:40:38 +02:00
|
|
|
#include "tst_vpointf.h"
|
2017-01-03 10:14:32 +01:00
|
|
|
#include "tst_readval.h"
|
|
|
|
#include "tst_vtranslatevars.h"
|
2015-03-31 16:48:58 +02:00
|
|
|
|
2016-08-03 13:49:46 +02:00
|
|
|
#include "../vmisc/def.h"
|
2017-01-03 10:14:32 +01:00
|
|
|
#include "../qmuparser/qmudef.h"
|
2017-02-06 16:19:59 +01:00
|
|
|
#include "../vmisc/vabstractapplication.h"
|
2016-08-03 13:49:46 +02:00
|
|
|
|
2017-02-06 16:19:59 +01:00
|
|
|
class TestVApplication : public VAbstractApplication
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
TestVApplication(int &argc, char ** argv);
|
|
|
|
virtual ~TestVApplication();
|
|
|
|
|
|
|
|
virtual const VTranslateVars *TrVars();
|
|
|
|
virtual void OpenSettings();
|
|
|
|
virtual bool IsAppInGUIMode() const;
|
|
|
|
virtual void InitTrVars();
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
TestVApplication::TestVApplication(int &argc, char **argv)
|
|
|
|
: VAbstractApplication(argc, argv)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
TestVApplication::~TestVApplication()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
const VTranslateVars *TestVApplication::TrVars()
|
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void TestVApplication::OpenSettings()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
bool TestVApplication::IsAppInGUIMode() const
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
void TestVApplication::InitTrVars()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2015-03-31 16:48:58 +02:00
|
|
|
int main(int argc, char** argv)
|
|
|
|
{
|
2015-10-16 10:13:23 +02:00
|
|
|
Q_INIT_RESOURCE(schema);
|
|
|
|
|
2017-02-06 16:19:59 +01:00
|
|
|
TestVApplication app( argc, argv );// For QPrinter
|
2015-04-15 14:11:13 +02:00
|
|
|
|
2015-03-31 16:48:58 +02:00
|
|
|
int status = 0;
|
|
|
|
auto ASSERT_TEST = [&status, argc, argv](QObject* obj)
|
|
|
|
{
|
|
|
|
status |= QTest::qExec(obj, argc, argv);
|
|
|
|
delete obj;
|
|
|
|
};
|
|
|
|
|
2017-02-06 16:56:51 +01:00
|
|
|
ASSERT_TEST(new TST_FindPoint());
|
2017-01-22 14:29:23 +01:00
|
|
|
ASSERT_TEST(new TST_VPiece());
|
2017-02-06 16:56:51 +01:00
|
|
|
ASSERT_TEST(new TST_VPoster());
|
|
|
|
ASSERT_TEST(new TST_VAbstractPiece());
|
|
|
|
ASSERT_TEST(new TST_VSpline());
|
|
|
|
ASSERT_TEST(new TST_VSplinePath());
|
|
|
|
ASSERT_TEST(new TST_NameRegExp());
|
|
|
|
ASSERT_TEST(new TST_VLayoutDetail());
|
|
|
|
ASSERT_TEST(new TST_VArc());
|
|
|
|
ASSERT_TEST(new TST_VEllipticalArc());
|
|
|
|
ASSERT_TEST(new TST_QmuTokenParser());
|
|
|
|
ASSERT_TEST(new TST_VMeasurements());
|
|
|
|
ASSERT_TEST(new TST_VLockGuard());
|
|
|
|
ASSERT_TEST(new TST_Misc());
|
|
|
|
ASSERT_TEST(new TST_VCommandLine());
|
|
|
|
ASSERT_TEST(new TST_VAbstractCurve());
|
|
|
|
ASSERT_TEST(new TST_VCubicBezierPath());
|
|
|
|
ASSERT_TEST(new TST_VGObject());
|
|
|
|
ASSERT_TEST(new TST_VPointF());
|
|
|
|
ASSERT_TEST(new TST_ReadVal());
|
|
|
|
ASSERT_TEST(new TST_VTranslateVars());
|
2015-03-31 16:48:58 +02:00
|
|
|
|
|
|
|
return status;
|
|
|
|
}
|