From b4a5f63c927fcca911789d0a42a6695eb017a5fd Mon Sep 17 00:00:00 2001 From: Darin Wright Date: Fri, 11 Sep 2009 14:51:09 +0000 Subject: Bug 289157 - Add flexible hierarchy viewer tests to the org.eclipse.debug.tests plugin --- org.eclipse.debug.tests/.cvsignore | 1 + org.eclipse.debug.tests/about.html | 28 ++++++++++ .../viewer/model/VirtualViewerLazyModeTests.java | 2 +- .../org/eclipse/debug/tests/AutomatedSuite.java | 63 ++++++++++++++++++++++ org.eclipse.debug.tests/test.xml | 51 ++++++++++++++++++ 5 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 org.eclipse.debug.tests/.cvsignore create mode 100644 org.eclipse.debug.tests/about.html create mode 100644 org.eclipse.debug.tests/src/org/eclipse/debug/tests/AutomatedSuite.java create mode 100644 org.eclipse.debug.tests/test.xml (limited to 'org.eclipse.debug.tests') diff --git a/org.eclipse.debug.tests/.cvsignore b/org.eclipse.debug.tests/.cvsignore new file mode 100644 index 000000000..c5e82d745 --- /dev/null +++ b/org.eclipse.debug.tests/.cvsignore @@ -0,0 +1 @@ +bin \ No newline at end of file diff --git a/org.eclipse.debug.tests/about.html b/org.eclipse.debug.tests/about.html new file mode 100644 index 000000000..81aacb112 --- /dev/null +++ b/org.eclipse.debug.tests/about.html @@ -0,0 +1,28 @@ + + +
+ +September 11, 2009
+The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.
+ +If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.
+ + + \ No newline at end of file diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerLazyModeTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerLazyModeTests.java index 720723164..7977d286b 100644 --- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerLazyModeTests.java +++ b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerLazyModeTests.java @@ -154,7 +154,7 @@ public class VirtualViewerLazyModeTests extends TestCase { { for (int i = 0; i < requested.getChildDeltas().length; i++) { ModelDelta requestedChildDelta = (ModelDelta)requested.getChildDeltas()[i]; - ModelDelta receivedChildDelta = (ModelDelta)received.getChildDelta(requestedChildDelta.getElement()); + ModelDelta receivedChildDelta = received.getChildDelta(requestedChildDelta.getElement()); if ( receivedChildDelta == null || !deltaMatches(requestedChildDelta, receivedChildDelta) ) { return false; } diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/AutomatedSuite.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/AutomatedSuite.java new file mode 100644 index 000000000..fe757360c --- /dev/null +++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/AutomatedSuite.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright (c) 2009 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.debug.tests; + +import junit.framework.Test; +import junit.framework.TestSuite; + +import org.eclipe.debug.tests.viewer.model.JFaceViewerCheckTests; +import org.eclipe.debug.tests.viewer.model.JFaceViewerContentTests; +import org.eclipe.debug.tests.viewer.model.JFaceViewerDeltaTests; +import org.eclipe.debug.tests.viewer.model.JFaceViewerSelectionTests; +import org.eclipe.debug.tests.viewer.model.JFaceViewerStateTests; +import org.eclipe.debug.tests.viewer.model.JFaceViewerUpdateTests; +import org.eclipe.debug.tests.viewer.model.VirtualViewerDeltaTests; +import org.eclipe.debug.tests.viewer.model.VirtualViewerLazyModeTests; +import org.eclipe.debug.tests.viewer.model.VirtualViewerSelectionTests; +import org.eclipe.debug.tests.viewer.model.VirtualViewerStateTests; +import org.eclipe.debug.tests.viewer.model.VirtualViewerUpdateTests; + +/** + * Tests for integration and nightly builds. + * + * @since 3.6 + */ +public class AutomatedSuite extends TestSuite { + + /** + * Returns the suite. This is required to use the JUnit Launcher. + * + * @return the test suite + */ + public static Test suite() { + return new AutomatedSuite(); + } + + /** + * Constructs the automated test suite. Adds all tests. + */ + public AutomatedSuite() { + // JFace viewer tests + addTest(new TestSuite(JFaceViewerCheckTests.class)); + addTest(new TestSuite(JFaceViewerContentTests.class)); + addTest(new TestSuite(JFaceViewerDeltaTests.class)); + addTest(new TestSuite(JFaceViewerSelectionTests.class)); + addTest(new TestSuite(JFaceViewerStateTests.class)); + addTest(new TestSuite(JFaceViewerUpdateTests.class)); + + // Virtual viewer tests + addTest(new TestSuite(VirtualViewerDeltaTests.class)); + addTest(new TestSuite(VirtualViewerLazyModeTests.class)); + addTest(new TestSuite(VirtualViewerSelectionTests.class)); + addTest(new TestSuite(VirtualViewerStateTests.class)); + addTest(new TestSuite(VirtualViewerUpdateTests.class)); + } +} diff --git a/org.eclipse.debug.tests/test.xml b/org.eclipse.debug.tests/test.xml new file mode 100644 index 000000000..c23a3b109 --- /dev/null +++ b/org.eclipse.debug.tests/test.xml @@ -0,0 +1,51 @@ + + +