From dfb12d4e20c3c239cec1274f13df8ff08f38f7ac Mon Sep 17 00:00:00 2001 From: Sebastian Imlay Date: Thu, 12 Oct 2023 22:28:29 -0400 Subject: [PATCH] Added a simple unit test for get_audio_device_ids --- src/audio_unit/macos_helpers.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/audio_unit/macos_helpers.rs b/src/audio_unit/macos_helpers.rs index bd7c9815a..2cb997b70 100644 --- a/src/audio_unit/macos_helpers.rs +++ b/src/audio_unit/macos_helpers.rs @@ -173,6 +173,11 @@ pub fn get_audio_device_ids() -> Result, Error> { get_audio_device_ids_for_scope(Scope::Global) } +#[test] +fn test_get_audio_device_ids() { + let _ = get_audio_device_ids().expect("Failed to get audio device ids"); +} + /// does this device support input / ouptut? pub fn get_audio_device_supports_scope(devid: AudioDeviceID, scope: Scope) -> Result { let dev_scope: AudioObjectPropertyScope = match scope {