tests: add test for shares widget

This commit is contained in:
august-alt 2021-09-22 19:04:59 +04:00
parent 9ed216ed4c
commit 9f16d7a546
3 changed files with 105 additions and 0 deletions

View File

@ -0,0 +1,28 @@
find_package(Qt5 COMPONENTS Core Gui Widgets Test REQUIRED)
find_package(XercesC REQUIRED)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(SOURCES
shareswidgettest.cpp
../../../../../src/plugins/preferences/shares/shareswidget.cpp
../../../../../src/plugins/preferences/shares/sharesschema.cpp
../../../../../src/plugins/preferences/shares/modelbuilder.cpp
)
set(UI_FORMS
../../../../../src/plugins/preferences/shares/shareswidget.ui
)
set(MOC_HEADERS
shareswidgettest.h
../../../../../src/plugins/preferences/shares/shareswidget.h
)
qt5_wrap_ui(UI_SOURCES ${UI_FORMS})
qt5_wrap_cpp(MOC_SOURCES ${MOC_HEADERS})
add_executable(shareswidgettest ${SOURCES} ${MOC_SOURCES} ${UI_SOURCES})
target_link_libraries(shareswidgettest ${GPUI_LIBRARIES} shares-plugin Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Test XercesC::XercesC)
add_gpui_test(plugins.shareswidgettest shareswidgettest)

View File

@ -0,0 +1,41 @@
/***********************************************************************************************************************
**
** Copyright (C) 2021 BaseALT Ltd. <org@basealt.ru>
**
** This program 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 2
** of the License, or (at your option) any later version.
**
** This program 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 this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**
***********************************************************************************************************************/
#include "shareswidgettest.h"
#include <fstream>
#include "../../../../../src/plugins/preferences/shares/modelbuilder.h"
#include "../../../../../src/plugins/preferences/shares/shareroles.h"
#include "../../../../../src/plugins/preferences/shares/sharesschema.h"
#include "../../../../../src/plugins/preferences/shares/shareswidget.h"
const std::string dataPath = "../../../../data/";
namespace tests {
void SharesWidgetTest::show()
{
}
}
QTEST_MAIN(tests::SharesWidgetTest)

View File

@ -0,0 +1,36 @@
/***********************************************************************************************************************
**
** Copyright (C) 2021 BaseALT Ltd. <org@basealt.ru>
**
** This program 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 2
** of the License, or (at your option) any later version.
**
** This program 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 this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**
***********************************************************************************************************************/
#ifndef GPUI_SHARES_WIDGET_TEST_H
#define GPUI_SHARES_WIDGET_TEST_H
#include <QtTest>
namespace tests {
class SharesWidgetTest : public QObject
{
Q_OBJECT
private slots:
void show();
};
}
#endif // GPUI_SHARES_WIDGET_TEST_H