aboutsummaryrefslogtreecommitdiff
path: root/autotests/kconfig_compiler/kconfigcompiler_test.cpp
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2021-02-22 17:38:09 +0200
committerAhmad Samir <a.samirh78@gmail.com>2021-02-22 17:38:09 +0200
commit8bed00ab34e31f2b9c70026d418d923913325798 (patch)
treef289c15575415a36bc19c047a2037998e9b11ce8 /autotests/kconfig_compiler/kconfigcompiler_test.cpp
parent186755fd56b58dc97250846c5305ef89f9487f86 (diff)
downloadkconfig-8bed00ab34e31f2b9c70026d418d923913325798.tar.gz
kconfig-8bed00ab34e31f2b9c70026d418d923913325798.tar.bz2
Run clang-format on all cpp/h files
NO_CHANGELOG
Diffstat (limited to 'autotests/kconfig_compiler/kconfigcompiler_test.cpp')
-rw-r--r--autotests/kconfig_compiler/kconfigcompiler_test.cpp153
1 files changed, 87 insertions, 66 deletions
diff --git a/autotests/kconfig_compiler/kconfigcompiler_test.cpp b/autotests/kconfig_compiler/kconfigcompiler_test.cpp
index 4467a211..090fe01d 100644
--- a/autotests/kconfig_compiler/kconfigcompiler_test.cpp
+++ b/autotests/kconfig_compiler/kconfigcompiler_test.cpp
@@ -7,77 +7,101 @@
SPDX-License-Identifier: LGPL-2.0-or-later
*/
+#include "kconfigcompiler_test.h"
#include <QDir>
#include <QProcess>
#include <QString>
#include <QTest>
#include <qstandardpaths.h>
-#include "kconfigcompiler_test.h"
// QT5 TODO QTEST_GUILESS_MAIN(KConfigCompiler_Test)
QTEST_MAIN(KConfigCompiler_Test)
typedef const char *CompilerTestSet[];
-static CompilerTestSet testCases = {
- "test1.cpp", "test1.h",
- "test2.cpp", "test2.h",
- "test3.cpp", "test3.h",
- "test3a.cpp", "test3a.h",
- "test4.cpp", "test4.h",
- "test5.cpp", "test5.h",
- "test6.cpp", "test6.h",
- "test7.cpp", "test7.h",
- "test8a.cpp", "test8a.h",
- "test8b.cpp", "test8b.h",
- "test8c.cpp", "test8c.h",
- "test9.h", "test9.cpp",
- "test10.h", "test10.cpp",
- "test11.h", "test11.cpp",
- "test11a.h", "test11a.cpp",
- "test12.h", "test12.cpp",
- "test13.h", "test13.cpp",
- "test_dpointer.cpp", "test_dpointer.h",
- "test_qdebugcategory.cpp", "test_qdebugcategory.h",
- "test_signal.cpp", "test_signal.h",
- "test_notifiers.cpp", "test_notifiers.h",
- "test_translation_kde.cpp", "test_translation_kde.h",
- "test_translation_kde_domain.cpp", "test_translation_kde_domain.h",
- "test_translation_qt.cpp", "test_translation_qt.h",
- "test_emptyentries.cpp", "test_emptyentries.h",
- "test_properties_minmax.cpp", "test_properties_minmax.h",
- "test_param_minmax.cpp", "test_param_minmax.h",
- "test_subgroups.cpp", "test_subgroups.h",
- nullptr
-};
-
-static CompilerTestSet testCasesToRun = {
- "test1",
- "test2",
- "test3",
- "test3a",
- "test4",
- "test5",
- "test6",
- "test7",
- "test8",
- "test9",
- "test10",
- "test11",
- "test12",
- "test13",
- "test_dpointer",
- "test_qdebugcategory",
- "test_signal",
- "test_translation_kde",
- "test_translation_kde_domain",
- "test_translation_qt",
- "test_emptyentries",
- "test_properties_minmax",
- "test_param_minmax",
- "test_subgroups",
- nullptr
-};
+static CompilerTestSet testCases = {"test1.cpp",
+ "test1.h",
+ "test2.cpp",
+ "test2.h",
+ "test3.cpp",
+ "test3.h",
+ "test3a.cpp",
+ "test3a.h",
+ "test4.cpp",
+ "test4.h",
+ "test5.cpp",
+ "test5.h",
+ "test6.cpp",
+ "test6.h",
+ "test7.cpp",
+ "test7.h",
+ "test8a.cpp",
+ "test8a.h",
+ "test8b.cpp",
+ "test8b.h",
+ "test8c.cpp",
+ "test8c.h",
+ "test9.h",
+ "test9.cpp",
+ "test10.h",
+ "test10.cpp",
+ "test11.h",
+ "test11.cpp",
+ "test11a.h",
+ "test11a.cpp",
+ "test12.h",
+ "test12.cpp",
+ "test13.h",
+ "test13.cpp",
+ "test_dpointer.cpp",
+ "test_dpointer.h",
+ "test_qdebugcategory.cpp",
+ "test_qdebugcategory.h",
+ "test_signal.cpp",
+ "test_signal.h",
+ "test_notifiers.cpp",
+ "test_notifiers.h",
+ "test_translation_kde.cpp",
+ "test_translation_kde.h",
+ "test_translation_kde_domain.cpp",
+ "test_translation_kde_domain.h",
+ "test_translation_qt.cpp",
+ "test_translation_qt.h",
+ "test_emptyentries.cpp",
+ "test_emptyentries.h",
+ "test_properties_minmax.cpp",
+ "test_properties_minmax.h",
+ "test_param_minmax.cpp",
+ "test_param_minmax.h",
+ "test_subgroups.cpp",
+ "test_subgroups.h",
+ nullptr};
+
+static CompilerTestSet testCasesToRun = {"test1",
+ "test2",
+ "test3",
+ "test3a",
+ "test4",
+ "test5",
+ "test6",
+ "test7",
+ "test8",
+ "test9",
+ "test10",
+ "test11",
+ "test12",
+ "test13",
+ "test_dpointer",
+ "test_qdebugcategory",
+ "test_signal",
+ "test_translation_kde",
+ "test_translation_kde_domain",
+ "test_translation_qt",
+ "test_emptyentries",
+ "test_properties_minmax",
+ "test_param_minmax",
+ "test_subgroups",
+ nullptr};
#if 0
static CompilerTestSet willFailCases = {
@@ -89,7 +113,7 @@ static CompilerTestSet willFailCases = {
void KConfigCompiler_Test::initTestCase()
{
- m_diffExe = QStandardPaths::findExecutable( QStringLiteral("diff") );
+ m_diffExe = QStandardPaths::findExecutable(QStringLiteral("diff"));
if (m_diffExe.isEmpty()) {
qDebug() << "diff command not found, detailed info on comparison failure will not be available.";
}
@@ -122,7 +146,7 @@ void KConfigCompiler_Test::testBaselineComparison()
const QByteArray content = file.readAll();
const QByteArray contentRef = fileRef.readAll();
- if (content != contentRef) {
+ if (content != contentRef) {
appendFileDiff(fileRef.fileName(), file.fileName());
}
@@ -164,10 +188,7 @@ void KConfigCompiler_Test::appendFileDiff(const QString &oldFile, const QString
return;
}
- QStringList args({
- QStringLiteral("-u"),
- QFileInfo(oldFile).absoluteFilePath(),
- QFileInfo(newFile).absoluteFilePath() });
+ QStringList args({QStringLiteral("-u"), QFileInfo(oldFile).absoluteFilePath(), QFileInfo(newFile).absoluteFilePath()});
QProcess process;
process.start(m_diffExe, args, QIODevice::ReadOnly);