From 26c503d862b02edc3de52239d31cb34250354810 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Thu, 10 Mar 2022 19:38:39 +0100 Subject: [PATCH] Remove accidentally copied tests --- src/buffer/samples.rs | 67 ------------------------------------------- 1 file changed, 67 deletions(-) diff --git a/src/buffer/samples.rs b/src/buffer/samples.rs index 3a0c02eb..6700836a 100644 --- a/src/buffer/samples.rs +++ b/src/buffer/samples.rs @@ -245,70 +245,3 @@ impl<'slice, 'sample> ChannelSamples<'slice, 'sample> { } } } - -#[cfg(any(miri, test))] -mod miri { - use super::*; - - #[test] - fn repeated_access() { - let mut real_buffers = vec![vec![0.0; 512]; 2]; - let mut buffer = Buffer::default(); - unsafe { - buffer.with_raw_vec(|output_slices| { - let (first_channel, other_channels) = real_buffers.split_at_mut(1); - *output_slices = vec![&mut first_channel[0], &mut other_channels[0]]; - }) - }; - - for samples in buffer.iter_samples() { - for sample in samples { - *sample += 0.001; - } - } - - for mut samples in buffer.iter_samples() { - for _ in 0..2 { - for sample in samples.iter_mut() { - *sample += 0.001; - } - } - } - - assert_eq!(real_buffers[0][0], 0.003); - } - - #[test] - fn repeated_slices() { - let mut real_buffers = vec![vec![0.0; 512]; 2]; - let mut buffer = Buffer::default(); - unsafe { - buffer.with_raw_vec(|output_slices| { - let (first_channel, other_channels) = real_buffers.split_at_mut(1); - *output_slices = vec![&mut first_channel[0], &mut other_channels[0]]; - }) - }; - - // These iterators should not alias - let mut blocks = buffer.iter_blocks(16); - let (_block1_offset, block1) = blocks.next().unwrap(); - let (_block2_offset, block2) = blocks.next().unwrap(); - for channel in block1 { - for sample in channel.iter_mut() { - *sample += 0.001; - } - } - for channel in block2 { - for sample in channel.iter_mut() { - *sample += 0.001; - } - } - - for i in 0..32 { - assert_eq!(real_buffers[0][i], 0.001); - } - for i in 32..48 { - assert_eq!(real_buffers[0][i], 0.0); - } - } -}