File tree Expand file tree Collapse file tree
crates/lambda-rs-platform/src/cpal Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments