From b8bd1a20a901e6739b53be7cb82f3dd172b0a572 Mon Sep 17 00:00:00 2001 From: Kaspar-Metsa Date: Wed, 7 Feb 2024 16:06:27 +0200 Subject: [PATCH] remove testroomwidget because it was too hard to test and produced cryptic mingw compilation error --- tests/CMakeLists.txt | 29 +---------------------------- tests/roompanel/TestRoomWidget.cpp | 26 -------------------------- tests/roompanel/TestRoomWidget.h | 18 ------------------ 3 files changed, 1 insertion(+), 72 deletions(-) delete mode 100644 tests/roompanel/TestRoomWidget.cpp delete mode 100644 tests/roompanel/TestRoomWidget.h diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index c79e90ba..8cb6199a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -292,31 +292,4 @@ set_target_properties( COMPILE_FLAGS "${WARNING_FLAGS}" UNITY_BUILD ${USE_UNITY_BUILD} ) -add_test(NAME TestRoomManager COMMAND TestRoomManager) - -# Room panel widget -set(room_widget - ../src/roompanel/RoomMobs.cpp - ../src/roompanel/RoomMob.cpp - ../src/roompanel/RoomManager.cpp - ../src/proxy/GmcpMessage.cpp - ../src/global/TextUtils.cpp - ../src/roompanel/RoomWidget.cpp - ../src/configuration/configuration.cpp - ../src/global/NamedColors.cpp - ../src/global/Color.cpp - ../src/global/utils.cpp -) -set(RoomWidget roompanel/TestRoomWidget.cpp) -add_executable(TestRoomWidget ${room_widget} ${RoomWidget}) -add_dependencies(TestRoomWidget glm) -target_link_libraries(TestRoomWidget Qt5::Test Qt5::Widgets Qt5::Network coverage_config) -set_target_properties( - TestRoomWidget PROPERTIES - CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS OFF - COMPILE_FLAGS "${WARNING_FLAGS}" - UNITY_BUILD ${USE_UNITY_BUILD} -) -add_test(NAME TestRoomWidget COMMAND TestRoomWidget) \ No newline at end of file +add_test(NAME TestRoomManager COMMAND TestRoomManager) \ No newline at end of file diff --git a/tests/roompanel/TestRoomWidget.cpp b/tests/roompanel/TestRoomWidget.cpp deleted file mode 100644 index 8e0b3f01..00000000 --- a/tests/roompanel/TestRoomWidget.cpp +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -// Copyright (C) 2023 The MMapper Authors - -#include "TestRoomWidget.h" - -#include - -#include "proxy/GmcpMessage.h" -#include "roompanel/RoomManager.h" - -TestRoomWidget::TestRoomWidget() = default; - -TestRoomWidget::~TestRoomWidget() = default; - -void TestRoomWidget::testRoomModelInitialization() -{ - QObject parent; // Acting as parent for RoomMobs - RoomMobs roomMobs(&parent); - RoomModel model(nullptr, roomMobs); - - QCOMPARE(model.rowCount(QModelIndex()), 1); - QCOMPARE(model.columnCount(QModelIndex()), - static_cast(RoomModel::ColumnTypeEnum::MOUNT) + 1); -} - -QTEST_MAIN(TestRoomWidget) diff --git a/tests/roompanel/TestRoomWidget.h b/tests/roompanel/TestRoomWidget.h deleted file mode 100644 index a415598d..00000000 --- a/tests/roompanel/TestRoomWidget.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once -// SPDX-License-Identifier: GPL-2.0-or-later -// Copyright (C) 2023 The MMapper Authors - -#include "roompanel/RoomWidget.h" -#include - -class TestRoomWidget final : public QObject -{ - Q_OBJECT -public: - TestRoomWidget(); - ~TestRoomWidget() final; - -private: -private Q_SLOTS: - void testRoomModelInitialization(); -};