Skip to content

Commit a85dd98

Browse files
committed
[update] test names.
1 parent f870c0f commit a85dd98

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

crates/lambda-rs-platform/src/cpal/device.rs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -863,8 +863,13 @@ mod tests {
863863
}
864864

865865
#[test]
866-
fn build_returns_host_unavailable_until_backend_is_wired() {
867-
let _result = AudioDeviceBuilder::new().build();
866+
fn build_does_not_panic() {
867+
let result = AudioDeviceBuilder::new().build();
868+
assert!(!matches!(
869+
result,
870+
Err(AudioError::InvalidSampleRate { .. })
871+
| Err(AudioError::InvalidChannels { .. })
872+
));
868873
return;
869874
}
870875

@@ -875,14 +880,17 @@ mod tests {
875880
}
876881

877882
#[test]
878-
fn build_with_output_callback_returns_host_unavailable_until_backend_is_wired(
879-
) {
883+
fn build_with_output_callback_does_not_panic() {
880884
let result = AudioDeviceBuilder::new().build_with_output_callback(
881885
|_writer, _callback_info| {
882886
return;
883887
},
884888
);
885-
let _ = result;
889+
assert!(!matches!(
890+
result,
891+
Err(AudioError::InvalidSampleRate { .. })
892+
| Err(AudioError::InvalidChannels { .. })
893+
));
886894
return;
887895
}
888896

0 commit comments

Comments
 (0)