Skip to content

Objective-C counterpart for variadic argument contain matcher in Swift #27

Description

@modocache

I can write the following, very convenient, assertion in Swift:

// Swift

expect(["whale", "dolphin", "starfish"]).to(contain("dolphin", "starfish"))

But in Objective-C, I can't pass multiple arguments to contain, so I have to write two lines:

// Objective-C

expect(@[@"whale", @"dolphin", @"starfish"]).to(contain(@"dolphin"));
expect(@[@"whale", @"dolphin", @"starfish"]).to(contain(@"starfish"));

It'd be nice if Objective-C contain supported multiple arguments somehow (the same goes for beginWith and endWith).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions