[libcalamares] Merge locale tests files

- No need for a separate .h in most test cases
main
Adriaan de Groot 4 years ago
parent 29cfcb01da
commit b27bc11975

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> ===
*
*
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -15,13 +16,8 @@
* You should have received a copy of the GNU General Public License
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: GPL-3.0-or-later
* License-Filename: LICENSE
*
*/
#include "Tests.h"
#include "locale/LabelModel.h"
#include "locale/TimeZone.h"
#include "locale/TranslatableConfiguration.h"
@ -31,7 +27,26 @@
#include <QtTest/QtTest>
QTEST_GUILESS_MAIN( LocaleTests )
class LocaleTests : public QObject
{
Q_OBJECT
public:
LocaleTests();
~LocaleTests() override;
private Q_SLOTS:
void initTestCase();
void testLanguageModelCount();
void testEsperanto();
void testTranslatableLanguages();
void testTranslatableConfig1();
void testTranslatableConfig2();
// TimeZone testing
void testSimpleZones();
void testComplexZones();
};
LocaleTests::LocaleTests() {}
@ -257,3 +272,9 @@ LocaleTests::testComplexZones()
QCOMPARE( r.tr(), QStringLiteral( "zxc,;* vm" ) ); // Only _ is special
}
}
QTEST_GUILESS_MAIN( LocaleTests )
#include "utils/moc-warnings.h"
#include "Tests.moc"

@ -1,49 +0,0 @@
/* === This file is part of Calamares - <https://github.com/calamares> ===
*
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
*
* Calamares 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.
*
* Calamares 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 Calamares. If not, see <http://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: GPL-3.0-or-later
* License-Filename: LICENSE
*
*/
#ifndef LIBCALAMARES_LOCALE_TESTS_H
#define LIBCALAMARES_LOCALE_TESTS_H
#include <QObject>
class LocaleTests : public QObject
{
Q_OBJECT
public:
LocaleTests();
~LocaleTests() override;
private Q_SLOTS:
void initTestCase();
void testLanguageModelCount();
void testEsperanto();
void testTranslatableLanguages();
void testTranslatableConfig1();
void testTranslatableConfig2();
// TimeZone testing
void testSimpleZones();
void testComplexZones();
};
#endif
Loading…
Cancel
Save