Skip to content

Commit e5100d1

Browse files
committed
Fix a test in audio.rs
Assert that stereo buffers are *at least* twice the original size, rather than more than twice the size.
1 parent 0472c00 commit e5100d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sdl2/audio.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ mod test {
829829
assert!(cvt.is_conversion_needed());
830830

831831
// since we're going from mono to stereo, our capacity must be at least twice the original (255) vec size
832-
assert!(cvt.capacity(255) > 255*2, "capacity must be able to hold the converted audio sample");
832+
assert!(cvt.capacity(255) >= 255*2, "capacity must be able to hold the converted audio sample");
833833

834834
let new_buffer = cvt.convert(buffer);
835835
assert_eq!(new_buffer.len(), new_buffer_expected.len(), "capacity must be exactly equal to twice the original vec size");

0 commit comments

Comments
 (0)