containsAllInOrder function

Matcher containsAllInOrder (Iterable expected)

Matches Iterables which contain an element matching every value in expected in the same order, but may contain additional values interleaved throughout.

For example: [0, 1, 0, 2, 0] matches containsAllInOrder([1, 2]) but not containsAllInOrder([2, 1]) or containsAllInOrder([1, 2, 3]).

Will only match values which implement Iterable.

Implementation

Matcher containsAllInOrder(Iterable expected) =>
    new _ContainsAllInOrder(expected);