Skip to content

unittest: "in" Matcher #3679

Closed
Closed
@DartBot

Description

@DartBot

This issue was originally filed by @seaneagan


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

    area-pkgUsed for miscellaneous pkg/ packages not associated with specific area- teams.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