erikdoe / ocmock

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

Add location recording to all macros. #431

Open dmaclach opened 4 years ago

dmaclach commented 4 years ago

For large CI systems it can be costly to generate debug information. Recording location data for all of the stub/expect/reject macros makes it a lot easier to record/find failures.

Also renames location to ocm_location to avoid conflicts with objects that we are mocking that already have a location/setLocation method.

dmaclach commented 4 years ago

Removed the references to self from OCMStub, OCMExpect and OCMReject because it caused a couple of issues: 1) Some set up code was in C functions that didn't have a self to reference 2) It caused potential retain loop warnings/issues for calls that were made in blocks 3) It wasn't being used by the code anyhow, and nil is a perfectly fine value for it.