From 0c3c913989fad426d28a1e6b281ef410c32cd1dc Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Sun, 30 Mar 2025 20:59:12 -0400 Subject: [PATCH] chore: remove unused MainWindowTest --- src/test/integtests/gui/MainWindowTests.cpp | 65 --------------------- 1 file changed, 65 deletions(-) delete mode 100644 src/test/integtests/gui/MainWindowTests.cpp diff --git a/src/test/integtests/gui/MainWindowTests.cpp b/src/test/integtests/gui/MainWindowTests.cpp deleted file mode 100644 index ba97fc0e9..000000000 --- a/src/test/integtests/gui/MainWindowTests.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Deskflow -- mouse and keyboard sharing utility - * SPDX-FileCopyrightText: (C) 2024 Symless Ltd. - * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception - */ - -#if 0 // TODO: reintroduce main window integ test once moved to the `gui` lib - -// TODO: fix test freezing only on windows -#ifndef WIN32 - -#include "MainWindow.h" - -#include "test/shared/gui/QtTest.h" - -#include -#include - -class MainWindowTests : public QtTest { -public: - static void SetUpTestSuite() { - QtTest::SetUpTestSuite(); - qRegisterMetaType("Edition"); - } -}; - -class TestMainWindow { -public: - class MainWindowProxy : public MainWindow { - public: - explicit MainWindowProxy(AppConfig &appConfig) : MainWindow(appConfig) {} - - bool _checkSecureSocket(const char *test) { - return MainWindow::checkSecureSocket(test); - } - }; - - TestMainWindow() { - m_mainWindow = std::make_shared(m_appConfig); - } - - AppConfig m_appConfig; - std::shared_ptr m_mainWindow; -}; - -TEST_F(MainWindowTests, checkSecureSocket_noMatch_expectFalse) { - TestMainWindow testMainWindow; - - bool result = testMainWindow.m_mainWindow->_checkSecureSocket("test"); - - EXPECT_FALSE(result); -} - -TEST_F(MainWindowTests, checkSecureSocket_match_expectTrue) { - TestMainWindow testMainWindow; - - const char *test = "network encryption protocol: test"; - bool result = testMainWindow.m_mainWindow->_checkSecureSocket(test); - - EXPECT_TRUE(result); -} - -#endif // WIN32 - -#endif // 0