Additional testing for outline view archiving.

This commit is contained in:
Alexander Ljungberg
2011-01-14 19:59:25 -03:00
parent cce4e3ded8
commit 6b8c85df7c
+7 -3
View File
@@ -162,13 +162,17 @@
}
/*!
Test that the outline view is properly careful about not encoding its
non-encodable delegate and data source.
Test that the outline view archives properly.
*/
- (void)testCoding
{
// This should simply not crash.
var decoded = [CPKeyedUnarchiver unarchiveObjectWithData:[CPKeyedArchiver archivedDataWithRootObject:outlineView]];
outlineView = decoded;
// Expansion state does not archive.
[outlineView expandItem:nil expandChildren:YES];
// While not exhaustive, if this test works nothing is majorly broken with the unarchived outline view.
[self testCollapse];
}
@end