From 2ae9fde31644bd1b974ec3327436d40b7fcaca0a Mon Sep 17 00:00:00 2001 From: Martin Ockajak Date: Fri, 19 Jul 2024 19:54:09 +0200 Subject: [PATCH] . --- tests/extensions/sequence.rs | 12 ++++++------ tests/extensions/traits.rs | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/extensions/sequence.rs b/tests/extensions/sequence.rs index b8bc1b9..e249931 100644 --- a/tests/extensions/sequence.rs +++ b/tests/extensions/sequence.rs @@ -8,7 +8,7 @@ use crate::extensions::util::{assert_seq_equal, assert_vec_seq_equal, Equal}; #[allow(box_pointers)] pub(crate) fn test_sequence<'a, C, I>() where - I: DoubleEndedIterator, + I: DoubleEndedIterator + ExactSizeIterator, C: Sequence + FromIterator + IntoIterator @@ -276,11 +276,11 @@ where assert_seq_equal(a.move_at(1, 1), vec![1, 2, 3]); assert!(panic::catch_unwind(|| { e.move_at(0, 0) }).is_err()); - // pad_left - FIXME - implement test - // let a = a_source.clone(); - // let e = e_source.clone(); - // assert_seq_equal(a.pad_left(5, 4), vec![4, 4, 1, 2, 3]); - // assert_seq_equal(e.pad_left(1, 1), vec![1]); + // pad_left + let a = a_source.clone(); + let e = e_source.clone(); + assert_seq_equal(a.pad_left(5, 4), vec![4, 4, 1, 2, 3]); + assert_seq_equal(e.pad_left(1, 1), vec![1]); // // rev // assert_equal(repeated.clone().rev(), vec![3, 2, 2, 1]); diff --git a/tests/extensions/traits.rs b/tests/extensions/traits.rs index 83bcacd..43e2ed1 100644 --- a/tests/extensions/traits.rs +++ b/tests/extensions/traits.rs @@ -50,7 +50,7 @@ where pub(crate) fn test_sequence_traits<'a, C, I>(empty: C) where - I: DoubleEndedIterator, + I: DoubleEndedIterator + ExactSizeIterator, C: Traversable + Collectible + Ordered @@ -77,7 +77,7 @@ where pub(crate) fn test_list_traits<'a, C, I>(empty: C) where - I: DoubleEndedIterator, + I: DoubleEndedIterator + ExactSizeIterator, C: Traversable + Collectible + Ordered