Skip to content

Commit

Permalink
Added a simple unit test for get_audio_device_ids
Browse files Browse the repository at this point in the history
  • Loading branch information
simlay committed Oct 13, 2023
1 parent c9bbe6e commit dfb12d4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/audio_unit/macos_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ pub fn get_audio_device_ids() -> Result<Vec<AudioDeviceID>, 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<bool, Error> {
let dev_scope: AudioObjectPropertyScope = match scope {
Expand Down

0 comments on commit dfb12d4

Please sign in to comment.