On 23.03.2013 15:12, Fred Kiefer wrote:
On 23.03.2013 07:09, Richard Frith-Macdonald wrote:

On 22 Mar 2013, at 19:58, Gregory Casamento wrote:

I think putting tests in GUI for archiving is important since the
point is not so much to test the archiver itself but that the GUI
classes are, indeed, archiving themselves in a way which is universal
for all platforms.

Sure ... my point was simply that we already have them built in to the
test framework itsself ... so the GUI testsuite should use the
functionality we already have.

The current coding testing functions test whether the decoded object
is the same as the original object by calling -isEqual:
For classes where the standard equlity test isn't enough we can
implement -isEqualAfterCoding: in a category on the class.

Of course, no standardised test code can possibly cope with all
situations, but I'd recommend you start by calling test_NSCoding() and
test_keyed_NSCoding() for all the GUI classes, then think about how
things might be extended to handle any special cases.

Thank you for providing this new method. I used to override the isEqual:
method for the current gui coding tests, but will switch to the new
method now.

This didn't work out. For NSBezierPath even the copying tests fail when I use your new -isEqualAfterCoding: method.

I tried under MacOS and there the behaviour is the same. I think the best solution would be to use the same method for the equality check on copies as well. It looks like Apple has a very strict understanding of equality for gui classes.

_______________________________________________
Gnustep-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to