format.setParent(grid);
grid.insertChildAt(sfi2, 1);
sfi2.setParent(grid);
index = new NDimensionalIndex(new int[] {0});
assertTrue("shouldn't skip format.0",
!createPaneContext(index).ignore());
index = new NDimensionalIndex(new int[] {3});
assertTrue("shouldn't skip format.3",
!createPaneContext(index).ignore());
index = new NDimensionalIndex(new int[] {4});
assertTrue("should skip format.4",
createPaneContext(index).ignore());
index = new NDimensionalIndex(new int[] {5});
assertTrue("should skip format.5",
createPaneContext(index).ignore());
index = new NDimensionalIndex(new int[] {1000});
assertTrue("should skip format.1000",
createPaneContext(index).ignore());
index = NDimensionalIndex.ZERO_DIMENSIONS;
assertTrue("should treat format as format.0",
!createPaneContext(index).ignore());
index = new NDimensionalIndex(new int[] {1, 2, 3});
assertTrue("should treat format.1.2.3 as format.1",
!createPaneContext(index).ignore());
index = new NDimensionalIndex(new int[] {0, 0});
assertTrue("shouldn't skip format2.0.0",
!createPaneContext(index, format2).ignore());
index = new NDimensionalIndex(new int[] {3, 4});
assertTrue("shouldn't skip format2.3.4",
!createPaneContext(index, format2).ignore());
index = new NDimensionalIndex(new int[] {4, 5});
assertTrue("should skip format2.4.5",
createPaneContext(index, format2).ignore());
index = new NDimensionalIndex(new int[] {4, 6});
assertTrue("should skip format2.4.6",
createPaneContext(index, format2).ignore());
index = new NDimensionalIndex(new int[] {1000, 5});
assertTrue("should skip format2.1000.5",
createPaneContext(index, format2).ignore());
index = NDimensionalIndex.ZERO_DIMENSIONS;
assertTrue("should treat format2 as format2.0.0",
!createPaneContext(index, format2).ignore());
index = new NDimensionalIndex(new int[] {1, 2, 3});
assertTrue("should treat format2.1.2.3 as format2.1.2",
!createPaneContext(index, format3).ignore());
index = new NDimensionalIndex(new int[] {0, 0, 0});
assertTrue("shouldn't skip format3.0.0",
!createPaneContext(index, format3).ignore());
index = new NDimensionalIndex(new int[] {3, 4, 3});
assertTrue("shouldn't skip format3.3.4.3",
!createPaneContext(index, format3).ignore());
index = new NDimensionalIndex(new int[] {3, 5, 4});
assertTrue("should skip format3.3.5.4",
createPaneContext(index, format3).ignore());
index = new NDimensionalIndex(new int[] {4, 6, 1});
assertTrue("should skip format3.4.6.1",
createPaneContext(index, format3).ignore());
index = new NDimensionalIndex(new int[] {1000, 5, 2});
assertTrue("should skip format3.1000.5.2",
createPaneContext(index, format3).ignore());
index = NDimensionalIndex.ZERO_DIMENSIONS;
assertTrue("should treat format3 as format3.0.0.0",
!createPaneContext(index, format3).ignore());
index = new NDimensionalIndex(new int[] {4, 6, 3});
assertTrue("should treat format3.4.6.3.4 as format3.4.6.3",
createPaneContext(index, format3).ignore());
}