Apply clang-format on tests

This commit is contained in:
Martchus 2022-10-16 15:06:41 +02:00
parent 8df0a87970
commit 777cbb6fc0
3 changed files with 13 additions and 14 deletions

View File

@ -4,8 +4,8 @@
#include "../widgets/clearspinbox.h"
#include "../widgets/iconbutton.h"
#include <QPushButton>
#include <QHBoxLayout>
#include <QPushButton>
#include <QtTest/QtTest>
using namespace QtUtilities;
@ -37,7 +37,8 @@ void ButtonOverlayTests::changeBasicConfiguration(ButtonOverlay &buttonOverlay)
{
buttonOverlay.setClearButtonEnabled(false);
QVERIFY2(!buttonOverlay.isClearButtonEnabled(), "clear button disabled");
buttonOverlay.enableInfoButton(QIcon::fromTheme(QStringLiteral("data-information")).pixmap(IconButton::defaultPixmapSize), QStringLiteral("Some info"));
buttonOverlay.enableInfoButton(
QIcon::fromTheme(QStringLiteral("data-information")).pixmap(IconButton::defaultPixmapSize), QStringLiteral("Some info"));
QVERIFY2(buttonOverlay.isInfoButtonEnabled(), "info button enabled");
}

View File

@ -2,8 +2,8 @@
#include "resources/config.h"
#include <QTest>
#include <QSignalSpy>
#include <QTest>
using namespace QtUtilities;
@ -68,12 +68,10 @@ void DBusNotificationTests::semiAutomaticTest()
DBusNotification n(QStringLiteral("Semi-automatic test"), NotificationIcon::Information, 10000);
QString clickedAction, error;
const auto actionConnection = connect(&n, &DBusNotification::actionInvoked, [&clickedAction] (const QString &actionName) {
clickedAction = actionName;
});
const auto errorConnection = connect(&n, &DBusNotification::error, [&error] () {
error = QStringLiteral("error occurred (TODO: pass an error message here)");
});
const auto actionConnection
= connect(&n, &DBusNotification::actionInvoked, [&clickedAction](const QString &actionName) { clickedAction = actionName; });
const auto errorConnection
= connect(&n, &DBusNotification::error, [&error]() { error = QStringLiteral("error occurred (TODO: pass an error message here)"); });
n.setApplicationName(QStringLiteral(APP_NAME " tests; " APP_VERSION));
n.show(QStringLiteral("Some message; will append more lines later"));
for (auto i = 1; i <= 10; ++i) {

View File

@ -1,7 +1,7 @@
#include "../settingsdialog/settingsdialog.h"
#include "../settingsdialog/optioncategory.h"
#include "../settingsdialog/optioncategorymodel.h"
#include "../settingsdialog/qtsettings.h"
#include "../settingsdialog/settingsdialog.h"
#include <QtTest/QtTest>