erikdoe / ocmock

Mock objects for Objective-C
http://ocmock.org
Apache License 2.0
2.16k stars 606 forks source link

Silence strict selector matching warning #376

Closed rahul-malik closed 5 years ago

rahul-malik commented 5 years ago

If you enable -wstrict-selector-matching in your unit tests you'll get many errors with OCMock mock objects since they will be of type id and any selector that is referenced must be unique across all types in order to avoid this error.

Given this is a pretty fundamental aspect of how mocks and OCMock work, I believe silencing errors here is the right strategy vs disabling this warning entirely for unit test code.

rahul-malik commented 5 years ago

Thanks @erikdoe !