23 lines
668 B
Rust
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);
|
|
}
|