/** * Tests creating progress monitors under a custom progress monitor parent. This is the same as * the performance test as the same name, but it verifies correctness rather than performance. */ public void testCreateChildrenUnderCustomParent() { TestProgressMonitor monitor = new TestProgressMonitor(); createChildrenUnderParent(monitor, SubProgressTest.PROGRESS_SIZE); // We don't actually expect the progress to be optimal in this case since the progress monitor // wouldn't // know what it was rooted under and would have had to report more progress than necessary... // but we // should be able to check that there was no redundancy. Assert.assertTrue(monitor.getRedundantWorkCalls() == 0); Assert.assertTrue(monitor.getWorkCalls() >= 100); }