2015-10-16 13:55:23 +02:00
|
|
|
/************************************************************************
|
|
|
|
**
|
2016-08-04 18:28:28 +02:00
|
|
|
** @file qttestmainlambda.cpp
|
2015-10-16 13:55:23 +02:00
|
|
|
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
2016-08-04 18:28:28 +02:00
|
|
|
** @date 31 3, 2015
|
2015-10-16 13:55:23 +02:00
|
|
|
**
|
|
|
|
** @brief
|
|
|
|
** @copyright
|
2017-10-05 11:20:01 +02:00
|
|
|
** This source code is part of the Valentina project, a pattern making
|
2015-10-16 13:55:23 +02:00
|
|
|
** 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/>.
|
|
|
|
**
|
|
|
|
*************************************************************************/
|
|
|
|
|
2016-08-04 18:28:28 +02:00
|
|
|
#include <QtTest>
|
2015-10-16 13:55:23 +02:00
|
|
|
|
2016-08-04 18:28:28 +02:00
|
|
|
#include "tst_measurementregexp.h"
|
2016-10-25 20:06:58 +02:00
|
|
|
#include "tst_buitinregexp.h"
|
2016-08-04 18:28:28 +02:00
|
|
|
#include "tst_qmuparsererrormsg.h"
|
|
|
|
#include "tst_tstranslation.h"
|
2018-02-17 19:26:25 +01:00
|
|
|
#include "tst_tslocaletranslation.h"
|
2015-10-16 13:55:23 +02:00
|
|
|
|
2016-08-04 18:28:28 +02:00
|
|
|
#include "../vmisc/def.h"
|
2018-01-21 20:42:04 +01:00
|
|
|
#include "../vmisc/testvapplication.h"
|
2015-10-16 13:55:23 +02:00
|
|
|
|
2016-08-04 18:28:28 +02:00
|
|
|
int main(int argc, char** argv)
|
2015-10-16 13:55:23 +02:00
|
|
|
{
|
2018-01-21 20:42:04 +01:00
|
|
|
TestVApplication app( argc, argv );// For QPrinter
|
2016-08-04 18:28:28 +02:00
|
|
|
|
|
|
|
int status = 0;
|
|
|
|
auto ASSERT_TEST = [&status, argc, argv](QObject* obj)
|
|
|
|
{
|
|
|
|
status |= QTest::qExec(obj, argc, argv);
|
|
|
|
delete obj;
|
|
|
|
};
|
|
|
|
|
|
|
|
ASSERT_TEST(new TST_TSTranslation());
|
|
|
|
|
2016-10-25 20:06:58 +02:00
|
|
|
const QStringList locales = SupportedLocales();
|
2018-02-17 19:26:25 +01:00
|
|
|
for(int l = 0, sz = locales.size(); l < sz; ++l)
|
2016-08-04 18:28:28 +02:00
|
|
|
{
|
2018-02-17 19:26:25 +01:00
|
|
|
for(quint32 s = 0; s < TST_MeasurementRegExp::systemCounts; ++s)
|
2016-08-04 18:28:28 +02:00
|
|
|
{
|
2016-10-25 20:06:58 +02:00
|
|
|
ASSERT_TEST(new TST_MeasurementRegExp(s, locales.at(l)));
|
2016-08-04 18:28:28 +02:00
|
|
|
}
|
|
|
|
|
2018-02-17 19:26:25 +01:00
|
|
|
ASSERT_TEST(new TST_TSLocaleTranslation(locales.at(l)));
|
2016-10-25 20:06:58 +02:00
|
|
|
ASSERT_TEST(new TST_BuitInRegExp(locales.at(l)));
|
|
|
|
ASSERT_TEST(new TST_QmuParserErrorMsg(locales.at(l)));
|
|
|
|
}
|
2016-08-04 18:28:28 +02:00
|
|
|
|
|
|
|
return status;
|
|
|
|
}
|