On Sun, 18 Nov 2012 21:26:09 -0600, William Squires said:

>What's the recommended procedure for (unit) testing the initWithCoder:
>and encodeWithCoder: methods of a class that conforms to NSCoding protocol?

I do two things: 1) a test that encodes then immediately decodes, then compares 
the original with the copy. 2) I create files on disk with serialized data, 
then build new objects from them by deserializing.  If/when your format 
changes, you then have a collection of old formats to test too.

Cheers,

-- 
____________________________________________________________
Sean McBride, B. Eng                 s...@rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada



_______________________________________________

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

Reply via email to