Skip to content

unittest: "in" Matcher #137

Closed
Closed
@DartBot

Description

@DartBot

<img src="https://avatars.githubusercontent.com/u/444270?v=3" align="left" width="96" height="96"hspace="10"> Issue by seaneagan
Originally opened as dart-lang/sdk#3679


I think an inverse of the "contains" Matcher would be even more useful, since the Collection/Map/String is more likely the pattern you want to match against. Could call it "in":

Matcher in(container);

//e.g.

expect(x, in([1, 2, 3]));
expect(k, in({"x": 1, "y": 2, "z": 3}));
expect(s, in("xyz"));

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions