erikdoe/ocmock — pull request #89 by carllindberg (2014-05-25 06:43:13+00:00)
Title: Support for converting between NSNumber/NSValue types for boxed return values

Implement support for converting between NSNumber/NSValue types, but raise if the conversion is lossy (values out of range, non-whole-number float values to integers, etc.).

Solves a number of problems with different BOOL types ('c' vs 'B') and method signature vs NSValue types which can differ a little in different architectures.

This is using the approach I outlined in the comments to #58 but with a couple of additional range checks which Apple seems to intentionally allow for back-compatibility reasons.

The unit tests passed when tested against OCMock 2.x. This is converted to merge against master, and should compile, but I get infinite recursion when running unit tests on the master branch right now so I can't verify they pass there.