Skip to content

verify macro replaces argument type with id #148

@jeremy-w

Description

@jeremy-w

If Xcode complains about multiple methods with the same name, cast verify to the mocked class.

Without the cast, autocomplete is also less helpful.

I've been able to fix both by rewriting verify:

#define verify(mock) (typeof(mock))MKTVerify(mock)

Would this be worth PRing as a change to OCMockito's own definition of verify?

Version: OCMockito v5.0.1, OCHamcrest v7.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions