diff options
author | Andrew Overholt | 2009-08-11 15:34:33 +0000 |
---|---|---|
committer | Andrew Overholt | 2009-08-11 15:34:33 +0000 |
commit | d7ff177e92e641590c38bfb48579158b8a52a5ae (patch) | |
tree | 5a3f567b8d9beba635d1b39c71d112814fe9ba2b /systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests | |
parent | 5500323611c3d73e6a0795f9e23443b1cb1164a4 (diff) | |
download | org.eclipse.linuxtools-d7ff177e92e641590c38bfb48579158b8a52a5ae.tar.gz org.eclipse.linuxtools-d7ff177e92e641590c38bfb48579158b8a52a5ae.tar.xz org.eclipse.linuxtools-d7ff177e92e641590c38bfb48579158b8a52a5ae.zip |
Branch for 0.3
Diffstat (limited to 'systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests')
11 files changed, 367 insertions, 0 deletions
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/.classpath new file mode 100644 index 0000000000..751c8f2e50 --- /dev/null +++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/.project b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/.project new file mode 100644 index 0000000000..21f24f7a45 --- /dev/null +++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.linuxtools.systemtap.ui.consolelog.tests</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/ChangeLog new file mode 100644 index 0000000000..1f18bac74c --- /dev/null +++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/ChangeLog @@ -0,0 +1,20 @@ +2009-08-07 Andrew Overholt <overholt@redhat.com> + + * META-INF/MANIFEST.MF: Make version 0.3.0.qualifier. + +2009-08-07 Andrew Overholt <overholt@redhat.com> + + * META-INF/MANIFEST.MF: Change provider from IBM to Eclipse. + +2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com> + + * .classpath: New file. + * .project: New file. + * build.properties: New file. + * META-INF/MANIFEST.MF: New file. + * src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/AllTests.java: New file. + * src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ConsoleStreamDaemonTest.java: New file. + * src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ErrorStreamDaemonTest.java: New file. + * src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ErrorTableDisplayTest.java: New file. + * src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ScriptConsoleTest.java: New file. + * src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/views/ErrorViewTest.java:
\ No newline at end of file diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..8fa1850e95 --- /dev/null +++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/META-INF/MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %Bundle-Name.0 +Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.consolelog.tests +Bundle-Version: 0.3.0.qualifier +Bundle-Vendor: Eclipse +Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.consolelog.tests.ConsoleLogPlugin +Bundle-Localization: plugin +Bundle-ActivationPolicy: lazy +Import-Package: junit.framework, + org.eclipse.linuxtools.systemtap.ui.consolelog, + org.eclipse.linuxtools.systemtap.ui.consolelog.structures, + org.eclipse.linuxtools.systemtap.ui.structures.runnable, + org.eclipse.ui.console +Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/build.properties new file mode 100644 index 0000000000..34d2e4d2da --- /dev/null +++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/build.properties @@ -0,0 +1,4 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/AllTests.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/AllTests.java new file mode 100644 index 0000000000..f6add33796 --- /dev/null +++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/AllTests.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright (c) 2006 IBM Corporation. + * 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 - Jeff Briggs, Henry Hughes, Ryan Morse + *******************************************************************************/ + +package org.eclipse.linuxtools.systemtap.ui.consolelog.test; + +import org.eclipse.linuxtools.systemtap.ui.consolelog.test.structures.ConsoleStreamDaemonTest; +import org.eclipse.linuxtools.systemtap.ui.consolelog.test.structures.ErrorStreamDaemonTest; +import org.eclipse.linuxtools.systemtap.ui.consolelog.test.structures.ErrorTableDisplayTest; +import org.eclipse.linuxtools.systemtap.ui.consolelog.test.structures.ScriptConsoleTest; +import org.eclipse.linuxtools.systemtap.ui.consolelog.test.views.ErrorViewTest; + +import junit.framework.Test; +import junit.framework.TestSuite; + +public class AllTests { + public static Test suite() { + TestSuite suite = new TestSuite("Test for org.eclipse.linuxtools.systemtap.ui.consolelog.test"); + + //Structures + suite.addTestSuite(ConsoleStreamDaemonTest.class); + suite.addTestSuite(ErrorStreamDaemonTest.class); + suite.addTestSuite(ErrorTableDisplayTest.class); + suite.addTestSuite(ScriptConsoleTest.class); + + //views + suite.addTestSuite(ErrorViewTest.class); + + return suite; + } +} diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ConsoleStreamDaemonTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ConsoleStreamDaemonTest.java new file mode 100644 index 0000000000..2906906471 --- /dev/null +++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ConsoleStreamDaemonTest.java @@ -0,0 +1,65 @@ +/******************************************************************************* + * Copyright (c) 2006 IBM Corporation. + * 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 - Jeff Briggs, Henry Hughes, Ryan Morse + *******************************************************************************/ + +package org.eclipse.linuxtools.systemtap.ui.consolelog.test.structures; + +import org.eclipse.linuxtools.systemtap.ui.structures.runnable.StreamGobbler; +import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ConsoleStreamDaemon; +import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ScriptConsole; + +import junit.framework.TestCase; + +public class ConsoleStreamDaemonTest extends TestCase { + public ConsoleStreamDaemonTest(String name) { + super(name); + } + + protected void setUp() throws Exception { + super.setUp(); + + StreamGobbler gobbler = new StreamGobbler(System.in); + gobbler.start(); + daemon = new ConsoleStreamDaemon(null); + } + + public void testConsoleStreamDaemon() { + assertNotNull(daemon); + + ConsoleStreamDaemon csd = new ConsoleStreamDaemon(null); + assertNotNull(csd); + + csd = new ConsoleStreamDaemon(ScriptConsole.getInstance("test")); + assertNotNull(csd); + } + + public void testHandleDataEvent() { + daemon.handleDataEvent(""); + assertNotNull(daemon); + } + + public void testIsDisposed() { + ConsoleStreamDaemon csd = new ConsoleStreamDaemon(null); + assertFalse(csd.isDisposed()); + csd.dispose(); + assertTrue(csd.isDisposed()); + } + + public void testDispose() { + daemon.dispose(); + assertNotNull(daemon); + } + + protected void tearDown() throws Exception { + super.tearDown(); + } + + private ConsoleStreamDaemon daemon; +}
\ No newline at end of file diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ErrorStreamDaemonTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ErrorStreamDaemonTest.java new file mode 100644 index 0000000000..adca740b56 --- /dev/null +++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ErrorStreamDaemonTest.java @@ -0,0 +1,66 @@ +/******************************************************************************* + * Copyright (c) 2006 IBM Corporation. + * 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 - Jeff Briggs, Henry Hughes, Ryan Morse + *******************************************************************************/ + +package org.eclipse.linuxtools.systemtap.ui.consolelog.test.structures; + +import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ConsoleStreamDaemon; +import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ErrorStreamDaemon; +import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ScriptConsole; +import org.eclipse.linuxtools.systemtap.ui.structures.runnable.StreamGobbler; + +import junit.framework.TestCase; + +public class ErrorStreamDaemonTest extends TestCase { + public ErrorStreamDaemonTest(String name) { + super(name); + } + + protected void setUp() throws Exception { + super.setUp(); + + StreamGobbler gobbler = new StreamGobbler(System.in); + gobbler.start(); + daemon = new ErrorStreamDaemon(null, null, null); + } + + public void testConsoleStreamDaemon() { + assertNotNull(daemon); + + ConsoleStreamDaemon csd = new ConsoleStreamDaemon(null); + assertNotNull(csd); + + csd = new ConsoleStreamDaemon(ScriptConsole.getInstance("test")); + assertNotNull(csd); + } + + public void testHandleDataEvent() { + daemon.handleDataEvent(""); + assertNotNull(daemon); + } + + public void testIsDisposed() { + ConsoleStreamDaemon csd = new ConsoleStreamDaemon(null); + assertFalse(csd.isDisposed()); + csd.dispose(); + assertTrue(csd.isDisposed()); + } + + public void testDispose() { + daemon.dispose(); + assertNotNull(daemon); + } + + protected void tearDown() throws Exception { + super.tearDown(); + } + + private ErrorStreamDaemon daemon; +} diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ErrorTableDisplayTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ErrorTableDisplayTest.java new file mode 100644 index 0000000000..42bc72496a --- /dev/null +++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ErrorTableDisplayTest.java @@ -0,0 +1,28 @@ +/******************************************************************************* + * Copyright (c) 2006 IBM Corporation. + * 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 - Jeff Briggs, Henry Hughes, Ryan Morse + *******************************************************************************/ + +package org.eclipse.linuxtools.systemtap.ui.consolelog.test.structures; + +import junit.framework.TestCase; + +public class ErrorTableDisplayTest extends TestCase { + public ErrorTableDisplayTest(String name) { + super(name); + } + + protected void setUp() throws Exception { + super.setUp(); + } + + protected void tearDown() throws Exception { + super.tearDown(); + } +} diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ScriptConsoleTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ScriptConsoleTest.java new file mode 100644 index 0000000000..3f5ac718fb --- /dev/null +++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ScriptConsoleTest.java @@ -0,0 +1,65 @@ +package org.eclipse.linuxtools.systemtap.ui.consolelog.test.structures; + +import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ScriptConsole; + + +import junit.framework.TestCase; + +public class ScriptConsoleTest extends TestCase { + + public ScriptConsoleTest(String name) { + super(name); + } + + protected void setUp() throws Exception { + super.setUp(); + + console = ScriptConsole.getInstance("test"); + } + + public void testGetInstance() { + assertNotNull(console); + assertSame(console, ScriptConsole.getInstance("test")); + ScriptConsole console2 = ScriptConsole.getInstance("a"); + assertNotNull(console2); + assertNotSame(console, console2); + } + + public void testRun() { + + } + + public void testIsRunning() { + + } + + public void testIsDisposed() { + + } + + public void testSaveStream() { + + } + + public void testGetCommand() { + + } + + public void testStop() { + + } + + public void testDispose() { + + } + + public void testSetName() { + + } + + protected void tearDown() throws Exception { + super.tearDown(); + } + + ScriptConsole console; +} diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/views/ErrorViewTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/views/ErrorViewTest.java new file mode 100644 index 0000000000..685832323c --- /dev/null +++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/views/ErrorViewTest.java @@ -0,0 +1,31 @@ +package org.eclipse.linuxtools.systemtap.ui.consolelog.test.views; + +import junit.framework.TestCase; + +public class ErrorViewTest extends TestCase { + public ErrorViewTest(String name) { + super(name); + } + + public void testCreatePartControl() { + } + + public void testAdd() { +/* view.add(null); + view.add(new String[] {}); + view.add(new String[] {"asdf"}); + view.add(new String[] {"test", "one", "two"}); +*/ } + + public void testClear() { +// view.clear(); + } + + public void testSetFocus() { +// view.setFocus(); + } + + public void testDispose() { +// view.dispose(); + } +} |