I worked around this by making the encodings list a method argument, defaulted to the values mentioned. Then I could test by running the method with an encoding that I know will fail.
Sent from my iPhone > On May 29, 2016, at 3:23 AM, Daryle Walker <dary...@mac.com> wrote: > > I'm about to test code that uses this method. My encodings are: ASCII, UTF-8, > ISO Latin-1, then MacRoman. I think this covers all potential octet values. > My "guard" blocks (I'm using Swift.) are for a 0 return and if the optional > returned NSString can't be converted to a String. > > Can I cause some fail cases, or is that so unlikely that I should assert on > non-zero return and use "!" on the optional? > > Sent from my iPhone > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/darylew%40mac.com > > This email sent to dary...@mac.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com