This repository has been archived on 2026-10-10. You can view files and clone it, but cannot push or open issues or pull requests.
molotov/crates/molotov-core/tests/window_manager_test.rs

23 lines
668 B
Rust

// SPDX-License-Identifier: GPL-3.0-or-later
use molotov_core::graphics::window::{WindowConfig, WindowManager};
#[test]
fn test_window_manager_configuration_and_resize() {
let config = WindowConfig {
title: "Roblox".to_string(),
width: 1280,
height: 720,
fullscreen: false,
vulkan: true,
};
let mut manager = WindowManager::new(config);
assert_eq!(manager.width(), 1280);
assert_eq!(manager.height(), 720);
// Simulate display resize
manager.handle_resize(1920, 1080);
assert_eq!(manager.width(), 1920);
assert_eq!(manager.height(), 1080);
assert_eq!(manager.surface.width(), 1920);
}