From dbf7715e67c134b583fcba14df55d7260c387d61 Mon Sep 17 00:00:00 2001 From: Corwin Date: Tue, 20 Jun 2023 21:08:00 +0100 Subject: [PATCH] use assert_eq and collect --- agb/src/sound/mixer/sw_mixer.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/agb/src/sound/mixer/sw_mixer.rs b/agb/src/sound/mixer/sw_mixer.rs index b665a775..387c67fb 100644 --- a/agb/src/sound/mixer/sw_mixer.rs +++ b/agb/src/sound/mixer/sw_mixer.rs @@ -531,13 +531,16 @@ mod test { } // output will be unzipped, so input is LRLRLRLRLRLRLR... and output is LLLLLLRRRRRR - assert!(output_buffer - .iter() - .flat_map(|x| x.to_le_bytes()) - .map(|x| x as i8) - .eq([ + assert_eq!( + output_buffer + .iter() + .flat_map(|x| x.to_le_bytes()) + .map(|x| x as i8) + .collect::>(), + &[ 10, 5, -10, -6, 0, 2, 127, 127, 10, 5, -10, -6, 0, 2, 127, 127, 10, 5, -11, -6, 1, 3, -128, -128, 10, 5, -11, -6, 1, 3, -128, -128 - ])); + ] + ); } }