From 72e787a706d372c9a92e424e9b13ece929cb2bce Mon Sep 17 00:00:00 2001 From: srdusr <99972264+srdusr@users.noreply.github.com> Date: Sun, 24 Aug 2025 00:44:00 +0200 Subject: Remove the stale legacy-cpp implementation The Rust rewrite (crates/) has fully superseded it - keeping both around was actively misleading (main looked like it still shipped a C++ build), and nothing here still depends on it. --- legacy-cpp/tests/test_windows_platform.cc | 100 ------------------------------ 1 file changed, 100 deletions(-) delete mode 100644 legacy-cpp/tests/test_windows_platform.cc (limited to 'legacy-cpp/tests/test_windows_platform.cc') diff --git a/legacy-cpp/tests/test_windows_platform.cc b/legacy-cpp/tests/test_windows_platform.cc deleted file mode 100644 index f4d313b..0000000 --- a/legacy-cpp/tests/test_windows_platform.cc +++ /dev/null @@ -1,100 +0,0 @@ -#include -#include "../src/platform/windows_platform.h" -#include - -class WindowsPlatformTest : public ::testing::Test { -protected: - void SetUp() override { - platform = std::make_unique(); - } - - void TearDown() override { - if (platform) { - platform->shutdown(); - } - } - - std::unique_ptr platform; -}; - -TEST_F(WindowsPlatformTest, Initialization) { - bool initialized = platform->initialize(); - - if (initialized) { - EXPECT_TRUE(platform->get_platform_name() == "Windows"); - EXPECT_TRUE(platform->is_windows()); - EXPECT_FALSE(platform->is_x11()); - EXPECT_FALSE(platform->is_wayland()); - EXPECT_FALSE(platform->is_macos()); - } -} - -TEST_F(WindowsPlatformTest, PlatformCapabilities) { - EXPECT_TRUE(platform->get_platform_name() == "Windows"); - EXPECT_TRUE(platform->is_windows()); - EXPECT_FALSE(platform->is_x11()); - EXPECT_FALSE(platform->is_wayland()); - EXPECT_FALSE(platform->is_macos()); -} - -TEST_F(WindowsPlatformTest, MonitorDetection) { - if (platform->initialize()) { - auto monitors = platform->get_monitors(); - EXPECT_FALSE(monitors.empty()); - - for (const auto& monitor : monitors) { - EXPECT_GT(monitor.id, 0); - EXPECT_FALSE(monitor.name.empty()); - EXPECT_GT(monitor.width, 0); - EXPECT_GT(monitor.height, 0); - EXPECT_GT(monitor.refresh_rate, 0); - } - } -} - -TEST_F(WindowsPlatformTest, WindowCreation) { - if (platform->initialize()) { - auto window = platform->create_window("Windows Test Window", 100, 100, 400, 300); - EXPECT_NE(window, nullptr); - - if (window) { - EXPECT_EQ(window->getTitle(), "Windows Test Window"); - EXPECT_EQ(window->getX(), 100); - EXPECT_EQ(window->getY(), 100); - EXPECT_EQ(window->getWidth(), 400); - EXPECT_EQ(window->getHeight(), 300); - } - } -} - -TEST_F(WindowsPlatformTest, DWMIntegration) { - if (platform->initialize()) { - auto window = platform->create_window("Windows Test Window", 100, 100, 400, 300); - EXPECT_NE(window, nullptr); - - if (window) { - // Test DWM border color API - platform->set_window_border_color(window.get(), 255, 0, 0); - - // Test border width - platform->set_window_border_width(window.get(), 5); - - platform->destroy_window(window.get()); - } - } -} - -TEST_F(WindowsPlatformTest, EventPolling) { - if (platform->initialize()) { - std::vector events; - bool result = platform->poll_events(events); - - // Should not crash, even if no events are available - EXPECT_TRUE(result || events.empty()); - } -} - -int main(int argc, char **argv) { - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} -- cgit v1.2.3