You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OCMock partial mocks crash when used with objc_direct methods that directly access instance variables. The code provided is a test case which shows the problem.
It's likely that nothing can be done about this, but it's worth adding a note to the documentation, in the section about Partial Mocks. In my opinion, this falls into the category of "There are some subtleties when using partial mocks."
Thank you for providing the test. With Xcode 16 I can't reproduce the crash, though. The behaviour I'm seeing is a failing test because the assertion fails:
It looks like _info is nil. That's a problem in its own right but it's different from what you are seeing. Can you confirm that you see a crash in Xcode 16? And if so, are you on Intel or Apple Silicon?
OCMock partial mocks crash when used with objc_direct methods that directly access instance variables. The code provided is a test case which shows the problem.
It's likely that nothing can be done about this, but it's worth adding a note to the documentation, in the section about Partial Mocks. In my opinion, this falls into the category of "There are some subtleties when using partial mocks."
MockingJayTests.m.zip
The text was updated successfully, but these errors were encountered: