Function assert_equal
pub fn assert_equal<I, J>(a: I, b: J)where
I: IntoIterator,
J: IntoIterator,
<I as IntoIterator>::Item: Debug + PartialEq<<J as IntoIterator>::Item>,
<J as IntoIterator>::Item: Debug,
Available on crate feature
dep_itertools
only.Expand description
Assert that two iterables produce equal sequences, with the same
semantics as equal(a, b)
.
Panics on assertion failure with a message that shows the two different elements and the iteration index.
ⓘ
assert_equal("exceed".split('c'), "excess".split('c'));
// ^PANIC: panicked at 'Failed assertion Some("eed") == Some("ess") for iteration 1'.