diff --git a/src/widgets/room/autotests/messagelinewidgettest.cpp b/src/widgets/room/autotests/messagelinewidgettest.cpp index f020e3e2..0542a468 100644 --- a/src/widgets/room/autotests/messagelinewidgettest.cpp +++ b/src/widgets/room/autotests/messagelinewidgettest.cpp @@ -1,30 +1,40 @@ /* Copyright (c) 2020 Laurent Montel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License or ( at your option ) version 3 or, at the discretion of KDE e.V. ( which shall act as a proxy as in section 14 of the GPLv3 ), any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "messagelinewidgettest.h" #include "room/messagelinewidget.h" +#include #include QTEST_MAIN(MessageLineWidgetTest) MessageLineWidgetTest::MessageLineWidgetTest(QObject *parent) : QObject(parent) { } + +void MessageLineWidgetTest::shouldHaveDefaultValues() +{ + MessageLineWidget w; + QHBoxLayout *mainLayout = w.findChild(QStringLiteral("mainLayout")); + QVERIFY(mainLayout); + QCOMPARE(mainLayout->contentsMargins(), QMargins(0, 0, 0, 0)); + //TODO +} diff --git a/src/widgets/room/autotests/messagelinewidgettest.h b/src/widgets/room/autotests/messagelinewidgettest.h index 81ba34bb..2a5f1188 100644 --- a/src/widgets/room/autotests/messagelinewidgettest.h +++ b/src/widgets/room/autotests/messagelinewidgettest.h @@ -1,34 +1,36 @@ /* Copyright (c) 2020 Laurent Montel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License or ( at your option ) version 3 or, at the discretion of KDE e.V. ( which shall act as a proxy as in section 14 of the GPLv3 ), any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef MESSAGELINEWIDGETTEST_H #define MESSAGELINEWIDGETTEST_H #include class MessageLineWidgetTest : public QObject { Q_OBJECT public: explicit MessageLineWidgetTest(QObject *parent = nullptr); ~MessageLineWidgetTest() = default; +private Q_SLOTS: + void shouldHaveDefaultValues(); }; #endif // MESSAGELINEWIDGETTEST_H diff --git a/src/widgets/room/messagelinewidget.h b/src/widgets/room/messagelinewidget.h index 9ec695a2..7fbc4627 100644 --- a/src/widgets/room/messagelinewidget.h +++ b/src/widgets/room/messagelinewidget.h @@ -1,35 +1,35 @@ /* Copyright (c) 2020 Laurent Montel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License or ( at your option ) version 3 or, at the discretion of KDE e.V. ( which shall act as a proxy as in section 14 of the GPLv3 ), any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef MESSAGELINEWIDGET_H #define MESSAGELINEWIDGET_H #include - -class MessageLineWidget : public QWidget +#include "libruqolawidgets_private_export.h" +class LIBRUQOLAWIDGETS_TESTS_EXPORT MessageLineWidget : public QWidget { Q_OBJECT public: explicit MessageLineWidget(QWidget *parent = nullptr); ~MessageLineWidget(); }; #endif // MESSAGELINEWIDGET_H