Adjust test, make it extra-clear when we're missing something

This commit is contained in:
Paul Adenot 2024-04-24 16:20:54 +02:00
Родитель ee8a6a2535
Коммит 4ca174cf83
2 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -207,7 +207,11 @@ impl From<CAChannelLabel> for mixer::Channel {
sys::kAudioChannelLabel_TopBackCenter => mixer::Channel::TopBackCenter,
sys::kAudioChannelLabel_TopBackRight => mixer::Channel::TopBackRight,
sys::kAudioChannelLabel_Unknown => mixer::Channel::Discrete,
_ => panic!("Label not handled"),
sys::kAudioChannelLabel_Unused => mixer::Channel::Silence,
v => {
eprintln!("Warning: channel label value {} isn't handled", v);
mixer::Channel::Silence
}
}
}
}

Просмотреть файл

@ -376,7 +376,6 @@ fn test_get_default_device_id_with_inout_type() {
#[test]
fn test_convert_channel_layout() {
let pairs = [
(vec![kAudioObjectUnknown], vec![mixer::Channel::Silence]),
(
vec![kAudioChannelLabel_Mono],
vec![mixer::Channel::FrontCenter],
@ -398,7 +397,7 @@ fn test_convert_channel_layout() {
vec![
mixer::Channel::FrontLeft,
mixer::Channel::FrontRight,
mixer::Channel::Silence,
mixer::Channel::Discrete,
],
),
(