style: Apply clang-format to all C++ files
- Format MainWindow.cpp, MainWindow.h, main.cpp - Format test files (test_main.cpp, test_mainwindow.cpp) - Fixes Jenkins clang-format policy check Entire-Checkpoint: ea47c089bf3a Signed-off-by: twi-devel <torsten.wierschin@life-maps.com>
This commit is contained in:
5 files changed
+36
-28
No files matched your search
@@ -4,7 +4,7 @@ class TestMainWindow : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
private slots:
|
||||
private slots:
|
||||
void testValidateInputValid();
|
||||
void testValidateInputInvalid();
|
||||
void testValidateInputEmpty();
|
||||
@@ -15,7 +15,7 @@ void TestMainWindow::testValidateInputValid()
|
||||
{
|
||||
// Test valid input patterns
|
||||
QRegularExpression pattern(R"(^[A-Za-z]+\d+$)");
|
||||
|
||||
|
||||
QVERIFY(pattern.match("Test123").hasMatch());
|
||||
QVERIFY(pattern.match("abc456").hasMatch());
|
||||
QVERIFY(pattern.match("ABC789").hasMatch());
|
||||
@@ -25,7 +25,7 @@ void TestMainWindow::testValidateInputInvalid()
|
||||
{
|
||||
// Test invalid input patterns
|
||||
QRegularExpression pattern(R"(^[A-Za-z]+\d+$)");
|
||||
|
||||
|
||||
QVERIFY(!pattern.match("123Test").hasMatch());
|
||||
QVERIFY(!pattern.match("Test").hasMatch());
|
||||
QVERIFY(!pattern.match("123").hasMatch());
|
||||
@@ -42,7 +42,7 @@ void TestMainWindow::testValidateInputEmpty()
|
||||
void TestMainWindow::testValidateInputMixedCase()
|
||||
{
|
||||
QRegularExpression pattern(R"(^[A-Za-z]+\d+$)");
|
||||
|
||||
|
||||
QVERIFY(pattern.match("TeSt123").hasMatch());
|
||||
QVERIFY(pattern.match("aBcDeF999").hasMatch());
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
#include <QtTest/QtTest>
|
||||
#include <QApplication>
|
||||
#include "MainWindow.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
class TestMainWindowWidget : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
private slots:
|
||||
private slots:
|
||||
void testMainWindowCreation();
|
||||
void testWindowTitle();
|
||||
void testValidateInputMethod();
|
||||
@@ -28,7 +29,7 @@ void TestMainWindowWidget::testWindowTitle()
|
||||
void TestMainWindowWidget::testValidateInputMethod()
|
||||
{
|
||||
MainWindow window;
|
||||
|
||||
|
||||
QVERIFY(window.validateInput(u"Test123"_s));
|
||||
QVERIFY(window.validateInput(u"abc456"_s));
|
||||
QVERIFY(!window.validateInput(u"123Test"_s));
|
||||
|
||||
Reference in new issue
Block a user