diff options
author | Darin Wright | 2009-09-11 14:51:09 +0000 |
---|---|---|
committer | Darin Wright | 2009-09-11 14:51:09 +0000 |
commit | b4a5f63c927fcca911789d0a42a6695eb017a5fd (patch) | |
tree | 1c78ca5d7faf3281cbce4ae351cc186b1513d6b3 | |
parent | b5e7db3dad4fd30322b6cec01d8c1e2ab4bec533 (diff) | |
download | eclipse.platform.debug-b4a5f63c927fcca911789d0a42a6695eb017a5fd.tar.gz eclipse.platform.debug-b4a5f63c927fcca911789d0a42a6695eb017a5fd.tar.xz eclipse.platform.debug-b4a5f63c927fcca911789d0a42a6695eb017a5fd.zip |
Bug 289157 - Add flexible hierarchy viewer tests to the org.eclipse.debug.tests plugin
5 files changed, 144 insertions, 1 deletions
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 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<title>About</title> +</head> +<body lang="EN-US"> +<h2>About This Content</h2> + +<p>September 11, 2009</p> +<h3>License</h3> + +<p>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 <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. +For purposes of the EPL, "Program" will mean the Content.</p> + +<p>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 <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> + +</body> +</html>
\ 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 @@ +<?xml version="1.0"?> + +<project name="testsuite" default="run" basedir="."> + <!-- The property ${eclipse-home} should be passed into this script --> + <!-- Set a meaningful default value for when it is not. --> + <property name="eclipse-home" value="${basedir}\..\.."/> + + <!-- sets the properties eclipse-home, and library-file --> + <property name="plugin-name" value="org.eclipse.debug.tests"/> + <property name="library-file" + value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/> + + <!-- This target holds all initialization code that needs to be done for --> + <!-- all tests that are to be run. Initialization for individual tests --> + <!-- should be done within the body of the suite target. --> + <target name="init"> + <tstamp/> + <delete> + <fileset dir="${eclipse-home}" includes="org*.xml"/> + </delete> + </target> + + <!-- This target defines the regression tests that need to be run. --> + <target name="suite"> + <property name="platform-debug-folder" + value="${eclipse-home}/platform_debug_folder"/> + <delete dir="${platform-debug-folder}" quiet="true"/> + <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}"> + <property name="data-dir" value="${platform-debug-folder}"/> + <property name="plugin-name" value="${plugin-name}"/> + <property name="classname" + value="org.eclipse.debug.tests.AutomatedSuite"/> + </ant> + </target> + + <!-- This target holds code to cleanup the testing environment after --> + <!-- after all of the tests have been run. You can use this target to --> + <!-- delete temporary files that have been created. --> + <target name="cleanup"> + </target> + + <!-- This target runs the test suite. Any actions that need to happen --> + <!-- after all the tests have been run should go here. --> + <target name="run" depends="init,suite,cleanup"> + <ant target="collect" antfile="${library-file}" dir="${eclipse-home}"> + <property name="includes" value="org*.xml"/> + <property name="output-file" value="${plugin-name}.xml"/> + </ant> + </target> + +</project> |