Skip to content

Commit 5c8463c

Browse files
committed
More av::AudioPcmBuf tests
1 parent 401240f commit 5c8463c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cidre/src/av/audio/buffer.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ mod tests {
270270
.unwrap();
271271
let cap = 1024;
272272
let mut buf = av::AudioPcmBuf::with_format(&format, cap).unwrap();
273-
buf.set_frame_length(cap);
273+
buf.set_frame_length(cap).unwrap();
274274
let data = buf.data_f32();
275275
let (n, cap) = if format.is_interleaved() {
276276
(1, channel_count * cap)
@@ -283,6 +283,7 @@ mod tests {
283283
let sum = left.iter().sum();
284284
assert_eq!(0.0f32, sum);
285285
}
286+
286287
#[test]
287288
fn safe() {
288289
let channel_count = 2;
@@ -292,5 +293,7 @@ mod tests {
292293
let cap = 1024;
293294
let mut buf = av::AudioPcmBuf::with_format(&format, cap).unwrap();
294295
let _err = buf.set_frame_length(1025).expect_err("Should fail");
296+
buf.set_frame_length(1024)
297+
.expect("Failed to set max cap frame len");
295298
}
296299
}

0 commit comments

Comments
 (0)