The OCMock version included in Chrome is 2.0 (2012). The latest version is 3.3 and the latest 2.x version is 2.2.4.
It would be very nice if it was possible to mock class methods, which is available in 2.1 and beyond.
Could we update the included OCMock?
I don't have any problems with rolling the revision, as long as all of our existing tests still work (or possibly updating our tests if they don't). This is coming from the iOS perspective.
+rsesek@ to see if there are any concerns on the Mac side.
gambard@ suspected 3+ may not be compatible with 2.0.
I can do some investigation next week with different versions and the iOS + Mac tests, and see what happens.
I'm fine with revving OCMock so long as the test code changes are minimal. I think we were on such an old version because Mac for a while had an old deployment target and SDK.
No RVG here necessary.
It seems that OCMock 3 is backward compatible.
From http://ocmock.org/download/ :
Build SDK for OCMock 3 :OS X 10.11, iOS 9.2, tvOS 9.1
Deployment target for OCMock 3 : OS X 10.6, iOS 5, tvOS 9.0
The license also changed to Apache2 (from "non-standard BSD-style license with attribution clause").
Cool!
Mac still uses the 10.10 SDK, though...
A license switch will require a new OSPO third-party review (just as if we were adding a new third_party library) but not a new security review.
Robert pointed me to this thread. It seems that the version we have checked in does not support dynamic properties which is blocking properly testing code dependent on the NSUSerNotificationCenter (like https://codereview.chromium.org/2143613002)
Sorry for the delay. I just glanced, and it looks that this lives in Chromium (i.e. isn't DEPS'd in). I'll try to experiment locally this week, and see if maybe we can use trunk, and get rid of the fork.
I'll flip the bug to Started when I am actively working on it, so if it's going too slow feel free to speak up or take the bug.
Are you considering going straight to 3.3 or should we try to just move to DEPS for 2.4 as a first step?
I have very little experience (as in one day and two tests :) ) with OCMock so I'd never dare to take away. I can gurantee that it will get done faster and better if you do it even it's at a super slow pace :)
Sorry, I haven't had a time to start on this. It shouldn't be too terrible, but we've just had more high priority things to work on. It's still on my radar, or I can see if someone else on the team has some cycles later this month.
I have created a patch to test the update to OCMock 2.2.4: https://codereview.chromium.org/2410583002/ and there are 5 unittests which fail for mac. I will take a look at it but if you have an idea, please tell.
It is worth mentioning that I modified the OCMock code, replacing typeof by __typeof__ in OCMock/NSInvocation+OCMAdditions.m because it was not compiling.
Sorry, I fixed them and forgot to update the bug.
It seems that OCMock 2.2.4 is OK without any major change to our code base.
I am currently testing OCMock 3.1.5.
Comment 1 by baxley@chromium.org
, Jun 23 2016Components: Test