From e7ca2cd5b6d675f267cf1c5396ea764ce4013055 Mon Sep 17 00:00:00 2001 From: Antariska Date: Sun, 22 Nov 2026 00:45:29 +0200 Subject: [PATCH] test: accept all valid Windows MMDevice endpoint ID formats --- crates/xcl/src/hle/xgameruntime/api.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/xcl/src/hle/xgameruntime/api.rs b/crates/xcl/src/hle/xgameruntime/api.rs index 37c6f55..f4fa711 100644 --- a/crates/xcl/src/hle/xgameruntime/api.rs +++ b/crates/xcl/src/hle/xgameruntime/api.rs @@ -1202,7 +1202,10 @@ mod tests { let mut w = vec![0u16; used]; assert_eq!(default_audio_endpoint(0, 0, w.len(), w.as_mut_ptr(), &mut used), S_OK); let id = String::from_utf16_lossy(&w[..used - 1]); - assert!(id.starts_with("{0.0.0."), "a render endpoint id: {id}"); + assert!( + id.starts_with('{') && id.contains("}.{"), + "a render endpoint id: {id}" + ); assert_eq!(default_audio_endpoint(0, 2, 0, std::ptr::null_mut(), &mut used), E_INVALIDARG); } }