From 40529164e3d9ee7b25a535ef5284fdfefdc2966d Mon Sep 17 00:00:00 2001 From: Martin Ockajak Date: Fri, 19 Jul 2024 19:56:11 +0200 Subject: [PATCH] . --- tests/extensions/sequence.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/extensions/sequence.rs b/tests/extensions/sequence.rs index e249931..d8836f0 100644 --- a/tests/extensions/sequence.rs +++ b/tests/extensions/sequence.rs @@ -282,6 +282,12 @@ where 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_with + let a = a_source.clone(); + let e = e_source.clone(); + assert_seq_equal(a.pad_left_with(5, |i| 2 * i as i64), vec![0, 2, 1, 2, 3]); + assert_seq_equal(e.pad_left_with(1, |i| 2 * i as i64), vec![2]); + // // rev // assert_equal(repeated.clone().rev(), vec![3, 2, 2, 1]); // assert_equal(empty.clone().rev(), vec![]);