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-bootstrap/tests/fflags_test.rs

25 lines
830 B
Rust

// SPDX-License-Identifier: GPL-3.0-or-later
use molotov_bootstrap::fflags::{FastFlagManager, PresetProfile};
#[test]
fn test_low_vram_preset_contains_mip_skip() {
let manager = FastFlagManager::new();
let profile = manager.get_preset(PresetProfile::LowVram);
assert_eq!(
profile.get_int("FIntDebugTextureManagerSkipMips"),
Some(1),
"Low VRAM preset must set FIntDebugTextureManagerSkipMips to 1"
);
}
#[test]
fn test_allowlist_validation_warning() {
let mut manager = FastFlagManager::new();
manager.set_flag("FIntDebugTextureManagerSkipMips", 1.into());
manager.set_flag("FUnknownArbitraryFlagExploit", true.into());
let warnings = manager.validate_against_allowlist();
assert_eq!(warnings.len(), 1);
assert_eq!(warnings[0], "FUnknownArbitraryFlagExploit");
}