erikdoe / ocmock

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

Fix comparison of struct type representation. #343

Closed sdefresne closed 7 years ago

sdefresne commented 7 years ago

When building with iOS 11 SDK and running on iOS 10 device, the type representation, some of structure type are incompatible and are not considered equal even though they are.

This fixes the comparison by:

  1. properly parsing nested subtypes like {Foo={Bar={B}}}
  2. considering that a struct without a name {} is equal to any struct
  3. not use NSGetSizeAndAlignment to parse subtype like {__rep}

Fixes issue #342.