amitchhabra / googletest

Automatically exported from code.google.com/p/googletest
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Add macros for ObjC object equality/inequality #303

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It'd be very helpful for projects that use ObjC++ to be able to test equality 
using the |-[id<NSObject> isEqual:]| method. Currently, to do this, one does:

  EXPECT_TRUE([obj isEqual:foo]);

That produces less helpful output than

  EXPECT_NSEQ(obj, foo);

Because the latter could also print mismatch information using the 
|-description| method.

CL here: http://codereview.appspot.com/1743056

Original issue reported on code.google.com by rsesek@google.com on 4 Aug 2010 at 9:41

GoogleCodeExporter commented 9 years ago
As discussed, it's better to implement this as gmock matchers, and we are not 
ready to host objC++ code in gtest yet.  We can publish the matcher solution as 
a recipe in the wiki though.

Original comment by w...@google.com on 13 Aug 2010 at 4:36