From 6b8c85df7ced820f596f8d1f0c337897eafd34bc Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Fri, 14 Jan 2011 19:59:25 -0300 Subject: [PATCH] Additional testing for outline view archiving. --- Tests/AppKit/CPOutlineViewTest.j | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Tests/AppKit/CPOutlineViewTest.j b/Tests/AppKit/CPOutlineViewTest.j index 7bac8a20d..af61c64a8 100644 --- a/Tests/AppKit/CPOutlineViewTest.j +++ b/Tests/AppKit/CPOutlineViewTest.j @@ -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