Bug 262380 [Common Navigator] Test failure on Mac, I20090125-2000
macosx.carbon.ppc_5.0 Wrong text: GreenTest junit.framework.AssertionFailedError: Wrong text: GreenTest at org.eclipse.ui.tests.navigator.OverrideTest.testSimpleResLast(OverrideTest.java:61) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:354) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:206) at org.eclipse.test.UITestApplication$3.run(UITestApplication.java:195) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3340) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3069) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2388) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2352) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2204) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:499) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:333) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:492) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:138) at org.eclipse.test.UITestApplication.run(UITestApplication.java:60) at org.eclipse.test.UITestApplication.start(UITestApplication.java:210) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:32) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:550) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:505) at org.eclipse.equinox.launcher.Main.run(Main.java:1264) at org.eclipse.equinox.launcher.Main.main(Main.java:1240) at org.eclipse.core.launcher.Main.main(Main.java:30)
tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/PipelineTest.java
"The root object should be an IJavaProject, which is IAdaptable.", rootItems[0].getData() instanceof IAdaptable); 
		IProject adaptedProject = (IProject) ((IAdaptable) rootItems[0]
				.getData()).getAdapter(IProject.class);
		assertEquals(project, adaptedProject);
		IFolder sourceFolder = project.getFolder(new Path("src"));
		viewer.add(project, sourceFolder);
		TreeItem[] projectChildren = rootItems[0].getItems();
		assertTrue("There should be some items.", projectChildren.length > 0); 
		for (int i = 0; i < projectChildren.length; i++) {
			if (projectChildren[i].getData() == sourceFolder)
				fail("The src folder should not be added as an IFolder.");
		}
		
		IProject newProject = ResourcesPlugin.getWorkspace().getRoot()
				.getProject("New Project");
		viewer.add(viewer.getInput(), newProject);
		rootItems = viewer.getTree().getItems();
		assertEquals("There should be two items.", 2, rootItems.length); 
		boolean found = false;
		for (int i = 0; i < rootItems.length && !found; i++) {
			if (rootItems[i].getData() instanceof IProject) {
				IProject newProjectFromTree = (IProject) rootItems[i].getData();
				if (newProject.equals(newProjectFromTree))
					found = true;
			}
		}
		assertTrue(found);
	}
}