diff options
Diffstat (limited to 'tests/org.eclipse.wst.jsdt.debug.core.tests')
21 files changed, 0 insertions, 1756 deletions
diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/.classpath b/tests/org.eclipse.wst.jsdt.debug.core.tests/.classpath deleted file mode 100644 index 2fbb7a2..0000000 --- a/tests/org.eclipse.wst.jsdt.debug.core.tests/.classpath +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/> - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/.project b/tests/org.eclipse.wst.jsdt.debug.core.tests/.project deleted file mode 100644 index df3f8b1..0000000 --- a/tests/org.eclipse.wst.jsdt.debug.core.tests/.project +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.wst.jsdt.debug.core.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/tests/org.eclipse.wst.jsdt.debug.core.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.wst.jsdt.debug.core.tests/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 511619d..0000000 --- a/tests/org.eclipse.wst.jsdt.debug.core.tests/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,90 +0,0 @@ -#Fri Apr 30 10:07:37 CDT 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.4 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.doc.comment.support=enabled -org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning -org.eclipse.jdt.core.compiler.problem.autoboxing=ignore -org.eclipse.jdt.core.compiler.problem.comparingIdentical=error -org.eclipse.jdt.core.compiler.problem.deadCode=error -org.eclipse.jdt.core.compiler.problem.deprecation=warning -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled -org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled -org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore -org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore -org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning -org.eclipse.jdt.core.compiler.problem.fallthroughCase=error -org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled -org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore -org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning -org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning -org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning -org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error -org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore -org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public -org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error -org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore -org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error -org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error -org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error -org.eclipse.jdt.core.compiler.problem.nullReference=warning -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.parameterAssignment=error -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error -org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore -org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore -org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error -org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled -org.eclipse.jdt.core.compiler.problem.unusedImport=error -org.eclipse.jdt.core.compiler.problem.unusedLabel=error -org.eclipse.jdt.core.compiler.problem.unusedLocal=error -org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=error -org.eclipse.jdt.core.compiler.problem.unusedParameter=error -org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error -org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.3 diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.jsdt.debug.core.tests/META-INF/MANIFEST.MF deleted file mode 100644 index 8fecced..0000000 --- a/tests/org.eclipse.wst.jsdt.debug.core.tests/META-INF/MANIFEST.MF +++ /dev/null @@ -1,17 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %Bundle-Name -Bundle-SymbolicName: org.eclipse.wst.jsdt.debug.core.tests;singleton:=true -Bundle-Version: 1.0.100.qualifier -Bundle-Activator: org.eclipse.wst.debug.core.tests.JSDTDebugTestPlugin -Bundle-Vendor: %Bundle-Vendor -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.wst.jsdt.debug.core, - org.junit;bundle-version="3.8.2", - org.eclipse.jface.text, - org.eclipse.ui, - org.eclipse.ui.ide, - org.eclipse.debug.ui, - org.eclipse.wst.jsdt.core -Bundle-RequiredExecutionEnvironment: J2SE-1.4 -Bundle-ActivationPolicy: lazy diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/OSGI-INF/l10n/bundle.properties b/tests/org.eclipse.wst.jsdt.debug.core.tests/OSGI-INF/l10n/bundle.properties deleted file mode 100644 index 4caad9a..0000000 --- a/tests/org.eclipse.wst.jsdt.debug.core.tests/OSGI-INF/l10n/bundle.properties +++ /dev/null @@ -1,12 +0,0 @@ -############################################################################### -# Copyright (c) 2010 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 -############################################################################### -Bundle-Vendor = Eclipse Web Tools Platform -Bundle-Name = JavaScript Debug Core Tests
\ No newline at end of file diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/about.html b/tests/org.eclipse.wst.jsdt.debug.core.tests/about.html deleted file mode 100755 index b4a1c56..0000000 --- a/tests/org.eclipse.wst.jsdt.debug.core.tests/about.html +++ /dev/null @@ -1,28 +0,0 @@ -<!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>March 10, 2010</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/tests/org.eclipse.wst.jsdt.debug.core.tests/build.properties b/tests/org.eclipse.wst.jsdt.debug.core.tests/build.properties deleted file mode 100644 index 317e864..0000000 --- a/tests/org.eclipse.wst.jsdt.debug.core.tests/build.properties +++ /dev/null @@ -1,9 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - OSGI-INF/l10n/bundle.properties,\ - about.html,\ - test.xml,\ - testsource/ -src.includes = about.html diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/AbstractBreakpointTest.java b/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/AbstractBreakpointTest.java deleted file mode 100644 index e3940c7..0000000 --- a/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/AbstractBreakpointTest.java +++ /dev/null @@ -1,253 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 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.wst.debug.core.tests; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import org.eclipse.core.resources.IMarkerDelta; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.IBreakpointListener; -import org.eclipse.debug.core.IBreakpointManager; -import org.eclipse.debug.core.model.IBreakpoint; -import org.eclipse.debug.ui.actions.ToggleBreakpointAction; -import org.eclipse.jface.text.Document; -import org.eclipse.jface.text.IRegion; -import org.eclipse.jface.text.source.IVerticalRulerInfo; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.progress.WorkbenchJob; -import org.eclipse.wst.jsdt.core.IJavaScriptElement; -import org.eclipse.wst.jsdt.core.IJavaScriptUnit; -import org.eclipse.wst.jsdt.core.JavaScriptCore; -import org.eclipse.wst.jsdt.debug.core.breakpoints.IJavaScriptFunctionBreakpoint; -import org.eclipse.wst.jsdt.debug.core.breakpoints.IJavaScriptLineBreakpoint; -import org.eclipse.wst.jsdt.debug.core.breakpoints.IJavaScriptLoadBreakpoint; -import org.eclipse.wst.jsdt.debug.core.model.JavaScriptDebugModel; - -/** - * Abstract test that has delegate methods to create various kinds of breakpoints with the ability - * to auto remove them after tests complete - * - * @since 1.0 - */ -public abstract class AbstractBreakpointTest extends AbstractDebugTest { - - /** - * Test project name for testing breakpoints - */ - protected static final String BP_PROJECT = "BpProject"; //$NON-NLS-1$ - - private ArrayList breakpoints = new ArrayList(); - - /** - * Constructor - * @param name - */ - public AbstractBreakpointTest(String name) { - super(name); - } - - /* (non-Javadoc) - * @see junit.framework.TestCase#tearDown() - */ - protected void tearDown() throws Exception { - try { - if(breakpoints.size() > 0) { - getBreakpointManager().removeBreakpoints((IBreakpoint[]) breakpoints.toArray(new IBreakpoint[breakpoints.size()]), true); - breakpoints.clear(); - } - } - finally { - super.tearDown(); - } - } - - /* (non-Javadoc) - * @see junit.framework.TestCase#setUp() - */ - protected void setUp() throws Exception { - super.setUp(); - assertTestProject(AbstractBreakpointTest.BP_PROJECT); - } - - /** - * Creates a line breakpoint in the given script at the given line number. - * - * @param scriptpath the absolute path to the script to create the breakpoint in - * @param line line number to install the breakpoint at - * @param condition the optional condition for the breakpoint - * @return line breakpoint - * @throws Exception - */ - protected IJavaScriptLineBreakpoint createLineBreakpoint(String scriptpath, int line, String condition) throws Exception { - assertNotNull("script path cannot be null creating a line breakpoint", scriptpath); //$NON-NLS-1$ - assertTrue("the line number must be greater than -1 to create a line breakpoint", line > -1); //$NON-NLS-1$ - IResource res = getBreakpointResource(scriptpath); - assertNotNull("failed creating line breakpoint: the breakpoint resource could not be found for ["+scriptpath+"]", res); //$NON-NLS-1$ //$NON-NLS-2$ - IJavaScriptUnit element = (IJavaScriptUnit) JavaScriptCore.create(res); - assertNotNull("failed creating line breakpoint: the javascript element could not be computed for ["+scriptpath+"]", element); //$NON-NLS-1$ //$NON-NLS-2$ - Document doc = new Document(element.getSource()); - IRegion region = doc.getLineInformation(line); - HashMap attr = new HashMap(); - int offset = region.getOffset(); - IJavaScriptLineBreakpoint bp = JavaScriptDebugModel.createLineBreakpoint(res, line, offset, offset+region.getLength(), attr, true); - bp.setCondition(condition); - breakpoints.add(bp); - forceDeltas(res.getProject()); - return bp; - } - - /** - * Creates JavaScript line breakpoints on the given array of lines - * @param resource - * @param lines - * @return the list of created breakpoints - * @throws Exception - */ - protected List createLineBreakpoints(String path, int[] lines) throws Exception { - List bps = new ArrayList(lines.length); - for (int i = 0; i < lines.length; i++) { - IBreakpoint bp = createLineBreakpoint(path, lines[i], null); - bps.add(bp); - breakpoints.add(bp); - } - return bps; - } - - /** - * Creates a new function breakpoint - * - * @param scriptpath the full absolute workspace path to the script to create a function breakpoint for - * @param fname function name - * @param sig function signature - * @param condition the optional condition for the breakpoint - * @param entry whether to break on entry - * @param exit whether to break on exit - */ - protected IJavaScriptFunctionBreakpoint createFunctionBreakpoint(String scriptpath, String fname, String sig, String condition, boolean entry, boolean exit) throws Exception { - assertNotNull("script path cannot be null creating a function breakpoint", scriptpath); //$NON-NLS-1$ - assertNotNull("function name cannot be null creating a function breakpoint", fname); //$NON-NLS-1$ - assertNotNull("function signature cannot be null creating a function breakpoint", sig); //$NON-NLS-1$ - IResource res = getBreakpointResource(scriptpath); - assertNotNull("failed creating function breakpoint: the breakpoint resource could not be found for ["+scriptpath+"]", res); //$NON-NLS-1$ //$NON-NLS-2$ - IJavaScriptElement element = JavaScriptCore.create(res); - assertNotNull("failed creating line breakpoint: the javascript element could not be computed for ["+scriptpath+"]", element); //$NON-NLS-1$ //$NON-NLS-2$ - //TODO find the function - HashMap attr = new HashMap(); - IJavaScriptFunctionBreakpoint bp = JavaScriptDebugModel.createFunctionBreakpoint(res, fname, sig, -1, -1, attr, false); - bp.setEntry(entry); - bp.setExit(exit); - bp.setCondition(condition); - breakpoints.add(bp); - forceDeltas(res.getProject()); - return bp; - } - - /** - * Creates a script load breakpoint for the given script path - * - * @param scriptpath the full absolute workspace path to the script to create a load breakpoint for - * - * @return class prepare breakpoint - * @throws Exception - */ - protected IJavaScriptLoadBreakpoint createScriptloadBreakpoint(String scriptpath) throws Exception { - assertNotNull("script path cannot be null creating a script load breakpoint", scriptpath); //$NON-NLS-1$ - IResource res = getBreakpointResource(scriptpath); - assertNotNull("failed creating script load breakpoint: the breakpoint resource could not be found for ["+scriptpath+"]", res); //$NON-NLS-1$ //$NON-NLS-2$ - IJavaScriptElement element = JavaScriptCore.create(res); - assertNotNull("failed creating line breakpoint: the javascript element could not be computed for ["+scriptpath+"]", element); //$NON-NLS-1$ //$NON-NLS-2$ - HashMap attr = new HashMap(); - IJavaScriptLoadBreakpoint bp = JavaScriptDebugModel.createScriptLoadBreakpoint(res, -1, -1, attr, false); - breakpoints.add(bp); - forceDeltas(res.getProject()); - return bp; - } - - /** - * Returns the workspace resource for the given script path or <code>null</code> - * @param scriptpath the absolute workspace path - * - * @return the {@link IResource} backing the path or <code>null</code> - */ - protected IResource getBreakpointResource(String scriptpath) { - return ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(scriptpath)); - } - - /** - * Deletes all existing breakpoints - * - * @throws Exception - */ - protected void removeAllBreakpoints() throws Exception { - IBreakpoint[] bps = getBreakpointManager().getBreakpoints(); - if(bps.length > 0) { - getBreakpointManager().removeBreakpoints(bps, true); - } - } - - /** - * Toggles a breakpoint in the editor at the given line number returning the breakpoint - * or <code>null</code> if none. - * - * @param editor - * @param lineNumber - * @return returns the created breakpoint or <code>null</code> if none. - * @throws InterruptedException - */ - protected IBreakpoint toggleBreakpoint(final IEditorPart editor, int lineNumber) throws InterruptedException { - final IVerticalRulerInfo info = new VerticalRulerInfoStub(lineNumber-1); // sub 1, as the doc lines start at 0 - WorkbenchJob job = new WorkbenchJob("toggle javascript breakpoint") { //$NON-NLS-1$ - public IStatus runInUIThread(IProgressMonitor monitor) { - ToggleBreakpointAction action = new ToggleBreakpointAction(editor, null, info); - action.run(); - return Status.OK_STATUS; - } - }; - final Object lock = new Object(); - final IBreakpoint[] bps = new IBreakpoint[1]; - IBreakpointListener listener = new IBreakpointListener() { - public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) { - synchronized (lock) { - lock.notifyAll(); - } - } - public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) { - } - public void breakpointAdded(IBreakpoint breakpoint) { - synchronized (lock) { - bps[0] = breakpoint; - lock.notifyAll(); - } - } - }; - IBreakpointManager manager = DebugPlugin.getDefault().getBreakpointManager(); - manager.addBreakpointListener(listener); - synchronized (lock) { - job.setPriority(Job.INTERACTIVE); - job.schedule(); - lock.wait(10000); - } - manager.removeBreakpointListener(listener); - if(bps[0] != null) { - breakpoints.add(bps[0]); - } - return bps[0]; - } -} diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/AbstractDebugTest.java b/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/AbstractDebugTest.java deleted file mode 100644 index d3b42f5..0000000 --- a/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/AbstractDebugTest.java +++ /dev/null @@ -1,222 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 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.wst.debug.core.tests; - -import java.io.InputStream; - -import junit.framework.TestCase; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IncrementalProjectBuilder; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.OperationCanceledException; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.IBreakpointManager; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.internal.ui.DebugUIPlugin; -import org.eclipse.debug.ui.IDebugUIConstants; -import org.eclipse.jface.util.SafeRunnable; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IPerspectiveDescriptor; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.ide.IDE; -import org.eclipse.ui.progress.WorkbenchJob; - -/** - * Abstract test for JSDT debug - * - * @since 1.0 - */ -public abstract class AbstractDebugTest extends TestCase { - - protected static final String SRC = "testsource"; //$NON-NLS-1$ - - /** - * Constructor - * @param name - */ - public AbstractDebugTest(String name) { - super(name); - SafeRunnable.setIgnoreErrors(true); - } - - /* (non-Javadoc) - * @see junit.framework.TestCase#setUp() - */ - protected void setUp() throws Exception { - super.setUp(); - switchToPerspective(IDebugUIConstants.ID_DEBUG_PERSPECTIVE); - } - /** - * Checks for the existence of a test project with the given name and creates one - * if not found - * - * @param name - * @throws Exception - */ - protected void assertTestProject(String name) throws Exception { - IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name); - if(!project.exists()) { - project.create(null); - } - if(!project.isAccessible()) { - project.open(null); - } - } - - /** - * Ensures the script specified by <code>projectname/path/scriptname</code> exists in the testing workspace. - * <br><br> - * If it does not it is looked up from the default test source location in <code>container</code> and copied - * into the test workspace to <code>projectname/path/scriptname</code>. - * @param projectname - * @param path - * @param scriptname - * @param container - * @throws Exception - */ - protected IFile loadTestSource(String projectname, String path, String scriptname, String container) throws Exception { - IPath fpath = new Path(projectname).append(path).append(scriptname); - IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(fpath); - if(!file.exists()) { - InputStream stream = Util.getSourceStream(container, scriptname); - try { - file.create(stream, true, null); - } - finally { - if(stream != null) { - stream.close(); - } - } - } - return file; - } - - /** - * Returns the launch manager - * - * @return launch manager - */ - protected ILaunchManager getLaunchManager() { - return DebugPlugin.getDefault().getLaunchManager(); - } - - /** - * Returns the breakpoint manager - * - * @return breakpoint manager - */ - protected IBreakpointManager getBreakpointManager() { - return DebugPlugin.getDefault().getBreakpointManager(); - } - - /** - * Forces marker deltas to be sent based on breakpoint creation. - * - * @param breakpoint - */ - protected void forceDeltas(IProject project) throws CoreException { - if (project != null && project.isAccessible()) { - project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null); - } - } - - /** - * Switches to the perspective with the given id in a synExec or does nothing if the id is not a valid perspective - * @param id - */ - protected void switchToPerspective(final String id) { - PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() { - public void run() { - IWorkbench workbench = PlatformUI.getWorkbench(); - IPerspectiveDescriptor descriptor = workbench.getPerspectiveRegistry().findPerspectiveWithId(id); - IWorkbenchPage activePage = workbench.getActiveWorkbenchWindow().getActivePage(); - activePage.setPerspective(descriptor); - } - }); - } - - /** - * Wait for builds to complete - */ - public static void waitForBuild() { - boolean wasInterrupted = false; - do { - try { - Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, null); - Job.getJobManager().join(ResourcesPlugin.FAMILY_MANUAL_BUILD, null); - wasInterrupted = false; - } catch (OperationCanceledException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - wasInterrupted = true; - } - } while (wasInterrupted); - } - - /** - * Opens and returns an editor on the given file or <code>null</code> - * if none. The editor will be activated. - * - * @param file - * @return editor or <code>null</code> - */ - protected IEditorPart openEditor(final IFile file) throws PartInitException, InterruptedException { - Display display = DebugUIPlugin.getStandardDisplay(); - if (Thread.currentThread().equals(display.getThread())) { - IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); - return IDE.openEditor(page, file, true); - } - final IEditorPart[] parts = new IEditorPart[1]; - WorkbenchJob job = new WorkbenchJob(display, "open editor") { //$NON-NLS-1$ - public IStatus runInUIThread(IProgressMonitor monitor) { - IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); - try { - parts[0] = IDE.openEditor(page, file, true); - } catch (PartInitException e) { - return e.getStatus(); - } - return Status.OK_STATUS; - } - }; - job.schedule(); - job.join(); - return parts[0]; - } - - /** - * Closes all editors in the active workbench page. - */ - protected void closeAllEditors() { - Runnable closeAll = new Runnable() { - public void run() { - IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); - activeWorkbenchWindow.getActivePage().closeAllEditors(false); - } - }; - Display display = DebugUIPlugin.getStandardDisplay(); - display.syncExec(closeAll); - } -} - diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/DebugEventWaiter.java b/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/DebugEventWaiter.java deleted file mode 100644 index 6c59cc7..0000000 --- a/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/DebugEventWaiter.java +++ /dev/null @@ -1,176 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 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.wst.debug.core.tests; - -import org.eclipse.debug.core.DebugEvent; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.IDebugEventSetListener; - -/** - * The <code>DebugEventWaiter</code> is - * to wait for a specific kind of debug event. - * <p> - * When a <code>DebugEventWaiter</code> is created, it - * registers itself with the <code>DebugPlugin</code> as - * a <code>IDebugEventSetListener</code>. - * <p> - * NOTE: <code>DebugEventWaiter</code> objects are intended for - * one time use only! - */ -public class DebugEventWaiter implements IDebugEventSetListener { - /** - * The kind of event the waiter is waiting for - */ - protected int fEventType; - - /** - * The number of milliseconds the waiter will wait before timing out. - */ - protected long fTimeout; - - /** - * The <code>IDebugModelManager</code> this waiter is listening to. - */ - protected DebugPlugin fDebugPlugin; - - /** - * The <code>DebugEvent</code> received. - */ - protected DebugEvent fEvent; - - /** - * The event set that was accepted - */ - protected DebugEvent[] fEventSet; - - /** - * The default timeout value if none is given (20000). - */ - public static final long DEFAULT_TIMEOUT= 15000; - - /** - * Constructor - * Creates a new <code>DebugEventWaiter</code> which - * waits for events of a kind <code>eventType</code>. - * The wait method will wait the default timeout value. - * @param eventType - */ - public DebugEventWaiter(int eventType) { - fDebugPlugin= DebugPlugin.getDefault(); - fEventType= eventType; - fTimeout= DEFAULT_TIMEOUT; - - fDebugPlugin.addDebugEventListener(this); - } - - /** - * Answers true if the <code>DebugEvent</code> is acceptable. - * @param event - * @return if the event is accepted or not - */ - public boolean accept(DebugEvent event) { - return event.getKind() == fEventType && event.getDetail() != DebugEvent.EVALUATION_IMPLICIT; - } - /** - * Answers the event name associated with the given flag. - * @return the name of the event kind - */ - public String getEventKindName() { - switch (fEventType) { - case DebugEvent.CREATE : - return "Create"; //$NON-NLS-1$ - case DebugEvent.TERMINATE : - return "Terminate"; //$NON-NLS-1$ - case DebugEvent.RESUME : - return "Resume"; //$NON-NLS-1$ - case DebugEvent.SUSPEND : - return "Suspend"; //$NON-NLS-1$ - default : - return "UNKNOWN"; //$NON-NLS-1$ - } - } - - /** - * @see org.eclipse.debug.core.IDebugEventSetListener#handleDebugEvents(org.eclipse.debug.core.DebugEvent[]) - */ - public synchronized void handleDebugEvents(DebugEvent[] events) { - //printReceived(events); - for (int i = 0; i < events.length; i++) { - if (accept(events[i])) { - fEvent= events[i]; - fEventSet = events; - unregister(); - notifyAll(); - return; - } - } - } - - /** - * Prints a message indicating which event was received. - */ - protected void printReceived(DebugEvent[] events) { - for (int i = 0; i < events.length; i++) { - System.out.println(this +" got " + events[i]); //$NON-NLS-1$ - } - } - - /** - * Sets the number of milliseconds to wait for this callback - * @param milliseconds - */ - public void setTimeout(long milliseconds) { - fTimeout= milliseconds; - } - - /** - * Unregisters this waiter as a listener - */ - public void unregister() { - fDebugPlugin.removeDebugEventListener(this); - } - - /** - * Returns the source of the accepted event, or <code>null</code> - * if no event was accepted. - * @return the source of the event or <code>null</code> - */ - public synchronized Object waitForEvent() { - if (fEvent == null) { - try { - wait(fTimeout); - } catch (InterruptedException ie) { - System.err.println("Interrupted waiting for event"); //$NON-NLS-1$ - } - } - unregister(); - if (fEvent == null) - return null; - return fEvent.getSource(); - } - - /** - * Returns the accepted event, if any. - * @return the event if any - */ - public DebugEvent getEvent() { - return fEvent; - } - - /** - * Returns the accepted event set, if any. - * @return the even if any - */ - public DebugEvent[] getEventSet() { - return fEventSet; - } -} - diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/DebugSuite.java b/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/DebugSuite.java deleted file mode 100755 index a0c0588..0000000 --- a/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/DebugSuite.java +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 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.wst.debug.core.tests; - -import java.util.Enumeration; - -import junit.framework.Test; -import junit.framework.TestResult; -import junit.framework.TestSuite; - -import org.eclipse.swt.widgets.Display; - -/** - * Debug test suite framework that runs test in a non UI thread. - */ -public abstract class DebugSuite extends TestSuite { - - /** - * Flag that indicates test are in progress - */ - protected boolean fTesting = true; - - - /** - * Construct the test suite. - */ - public DebugSuite() { - } - - /** - * Runs the tests and collects their result in a TestResult. - * The debug tests cannot be run in the UI thread or the event - * waiter blocks the UI when a resource changes. - * @see junit.framework.TestSuite#run(junit.framework.TestResult) - */ - public void run(final TestResult result) { - final Display display = Display.getCurrent(); - Thread thread = null; - try { - Runnable r = new Runnable() { - public void run() { - for (Enumeration e= tests(); e.hasMoreElements(); ) { - if (result.shouldStop() ) - break; - Test test= (Test)e.nextElement(); - runTest(test, result); - } - fTesting = false; - display.wake(); - } - }; - thread = new Thread(r); - thread.start(); - } catch (Exception e) { - e.printStackTrace(); - } - - while (fTesting) { - try { - if (!display.readAndDispatch()) - display.sleep(); - } catch (Throwable e) { - e.printStackTrace(); - } - } - } - -} - diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/JSDTDebugTestPlugin.java b/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/JSDTDebugTestPlugin.java deleted file mode 100644 index aebd414..0000000 --- a/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/JSDTDebugTestPlugin.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.eclipse.wst.debug.core.tests; - -import org.eclipse.core.runtime.Plugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class JSDTDebugTestPlugin extends Plugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.eclipse.wst.jsdt.debug.core.tests"; //$NON-NLS-1$ - - // The shared instance - private static JSDTDebugTestPlugin plugin; - - /** - * The constructor - */ - public JSDTDebugTestPlugin() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static JSDTDebugTestPlugin getDefault() { - return plugin; - } - -} diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/JavaScriptDebugTestSuite.java b/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/JavaScriptDebugTestSuite.java deleted file mode 100644 index 0215a6d..0000000 --- a/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/JavaScriptDebugTestSuite.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 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.wst.debug.core.tests; - -import org.eclipse.wst.debug.core.tests.breakpoints.LineBreakpointTests; - -import junit.framework.Test; -import junit.framework.TestSuite; - -/** - * The root {@link TestSuite} for the test bundle - * - * @since 1.1 - */ -public class JavaScriptDebugTestSuite extends DebugSuite { - - /** - * Returns the suite of tests - * - * @return the suite of tests - */ - public static Test suite() { - return new JavaScriptDebugTestSuite(); - } - - /** - * Constructor - * - * Composes the suite of tests - */ - public JavaScriptDebugTestSuite() { - addTest(new TestSuite(LineBreakpointTests.class)); - } - -} diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/Util.java b/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/Util.java deleted file mode 100644 index 2a00fdc..0000000 --- a/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/Util.java +++ /dev/null @@ -1,227 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009, 2010 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.wst.debug.core.tests; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.CharsetDecoder; -import java.nio.charset.CodingErrorAction; -import java.nio.charset.IllegalCharsetNameException; -import java.nio.charset.UnsupportedCharsetException; - -import org.eclipse.core.runtime.FileLocator; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Platform; - -/** - * Collection of utility methods for tests - * - * @since 1.0 - */ -public class Util { - - /** - */ - public static final String UTF_8 = "UTF-8"; //$NON-NLS-1$ - /** - * The name of the source container <code>scripts</code> in the test bundle - */ - public static final String SRC_SCRIPTS_CONTAINER = "scripts"; //$NON-NLS-1$ - - /** - * Constant representing the default size to read from an input stream - */ - private static final int DEFAULT_READING_SIZE = 8192; - - /** - * Returns the int value of the given {@link Number} - * @param number - * @return - */ - public static int numberAsInt(Object number) { - return ((Number) number).intValue(); - } - - /** - * Returns the OS path to the directory that contains the test plugin. - * - * @since 1.1 - */ - public static IPath getPluginDirectoryPath() { - if (Platform.isRunning()) { - try { - URL platformURL = Platform.getBundle(JSDTDebugTestPlugin.PLUGIN_ID).getEntry("/"); //$NON-NLS-1$ - return new Path(new File(FileLocator.toFileURL(platformURL).getFile()).getAbsolutePath()); - } catch (IOException e) { - e.printStackTrace(); - } - } - return new Path(System.getProperty("user.dir")); //$NON-NLS-1$ - } - - /** - * Loads the test source with the given name. If the source does not exist - * a {@link FileNotFoundException} is thrown. - * - * @param container the folder in the test project containing the source - * @param sourcename the name of the source file to load - * - * @return the {@link String} representation of the source or <code>null</code> - * @throws FileNotFoundException if the source does not exist - */ - public static String getTestSource(String container, String sourcename) throws IOException { - if (Platform.isRunning()) { - URL platformURL = Platform.getBundle(JSDTDebugTestPlugin.PLUGIN_ID).getEntry("/" + container + "/" + sourcename); //$NON-NLS-1$ //$NON-NLS-2$ - char[] chars = getInputStreamAsCharArray(platformURL.openStream(), -1, UTF_8); - if (chars != null) { - return new String(chars); - } - } - - throw new IllegalStateException("Platform not running"); //$NON-NLS-1$ - } - - /** - * Opens an {@link InputStream} to the test source found in the given container with the given name - * - * @param container - * @param sourcename - * @return the {@link InputStream} to the test source - * @throws IOException - */ - public static InputStream getSourceStream(String container, String sourcename) throws IOException { - if (Platform.isRunning()) { - URL url = Platform.getBundle(JSDTDebugTestPlugin.PLUGIN_ID).getEntry("/" + container + "/" + sourcename); //$NON-NLS-1$ //$NON-NLS-2$ - if(url != null) { - return url.openStream(); - } - throw new IOException("Could not locate the test source for [/"+container+"/"+sourcename+"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - } - throw new IllegalStateException("Platform not running"); //$NON-NLS-1$ - } - - /** - * Returns the contents of the given file as a string, or <code>null</code> - * - * @param file the file to get the contents for - * @return the contents of the file as a {@link String} or <code>null</code> - */ - public static String getFileContentAsString(File file) { - String contents = null; - FileInputStream stream = null; - try { - stream = new FileInputStream(file); - char[] array = getInputStreamAsCharArray(stream, -1, UTF_8); - contents = new String(array); - } - catch(IOException ioe) { - ioe.printStackTrace(); - } finally { - if (stream != null) { - try { - stream.close(); - } catch (IOException e) { - // ignore - } - } - } - return contents; - } - - /** - * Returns the given input stream's contents as a character array. - * If a length is specified (i.e. if length != -1), this represents the number of bytes in the stream. - * Note the specified stream is not closed in this method - * - * @param stream the stream to get convert to the char array - * @param length the length of the input stream, or -1 if unknown - * @param encoding the encoding to use when reading the stream - * @return the given input stream's contents as a character array. - * @throws IOException if a problem occurred reading the stream. - */ - public static char[] getInputStreamAsCharArray(InputStream stream, int length, String encoding) throws IOException { - Charset charset = null; - try { - charset = Charset.forName(encoding); - } catch (IllegalCharsetNameException e) { - System.err.println("Illegal charset name : " + encoding); //$NON-NLS-1$ - return null; - } catch(UnsupportedCharsetException e) { - System.err.println("Unsupported charset : " + encoding); //$NON-NLS-1$ - return null; - } - CharsetDecoder charsetDecoder = charset.newDecoder(); - charsetDecoder.onMalformedInput(CodingErrorAction.REPLACE).onUnmappableCharacter(CodingErrorAction.REPLACE); - byte[] contents = getInputStreamAsByteArray(stream, length); - ByteBuffer byteBuffer = ByteBuffer.allocate(contents.length); - byteBuffer.put(contents); - byteBuffer.flip(); - return charsetDecoder.decode(byteBuffer).array(); - } - - /** - * Returns the given input stream as a byte array - * - * @param stream the stream to get as a byte array - * @param length the length to read from the stream or -1 for unknown - * @return the given input stream as a byte array - * @throws IOException - */ - public static byte[] getInputStreamAsByteArray(InputStream stream, int length) throws IOException { - byte[] contents; - if (length == -1) { - contents = new byte[0]; - int contentsLength = 0; - int amountRead = -1; - do { - // read at least 8K - int amountRequested = Math.max(stream.available(), DEFAULT_READING_SIZE); - // resize contents if needed - if (contentsLength + amountRequested > contents.length) { - System.arraycopy(contents, - 0, - contents = new byte[contentsLength + amountRequested], - 0, - contentsLength); - } - // read as many bytes as possible - amountRead = stream.read(contents, contentsLength, amountRequested); - if (amountRead > 0) { - // remember length of contents - contentsLength += amountRead; - } - } while (amountRead != -1); - // resize contents if necessary - if (contentsLength < contents.length) { - System.arraycopy(contents, 0, contents = new byte[contentsLength], 0, contentsLength); - } - } else { - contents = new byte[length]; - int len = 0; - int readSize = 0; - while ((readSize != -1) && (len != length)) { - // See PR 1FMS89U - // We record first the read size. In this case length is the actual - // read size. - len += readSize; - readSize = stream.read(contents, len, length - len); - } - } - return contents; - } -} diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/VerticalRulerInfoStub.java b/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/VerticalRulerInfoStub.java deleted file mode 100644 index 989fe4d..0000000 --- a/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/VerticalRulerInfoStub.java +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 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.wst.debug.core.tests; - -import org.eclipse.jface.text.source.IVerticalRulerInfo; -import org.eclipse.swt.widgets.Control; - -/** - * - */ -public class VerticalRulerInfoStub implements IVerticalRulerInfo { - - private int fLineNumber = -1; - - public VerticalRulerInfoStub(int line) { - fLineNumber = line; - } - - /* (non-Javadoc) - * @see org.eclipse.jface.text.source.IVerticalRulerInfo#getControl() - */ - public Control getControl() { - return null; - } - - /* (non-Javadoc) - * @see org.eclipse.jface.text.source.IVerticalRulerInfo#getLineOfLastMouseButtonActivity() - */ - public int getLineOfLastMouseButtonActivity() { - return fLineNumber; - } - - /* (non-Javadoc) - * @see org.eclipse.jface.text.source.IVerticalRulerInfo#getWidth() - */ - public int getWidth() { - return 0; - } - - /* (non-Javadoc) - * @see org.eclipse.jface.text.source.IVerticalRulerInfo#toDocumentLineNumber(int) - */ - public int toDocumentLineNumber(int y_coordinate) { - return 0; - } - -} diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/breakpoints/LineBreakpointTests.java b/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/breakpoints/LineBreakpointTests.java deleted file mode 100644 index db474d8..0000000 --- a/tests/org.eclipse.wst.jsdt.debug.core.tests/src/org/eclipse/wst/debug/core/tests/breakpoints/LineBreakpointTests.java +++ /dev/null @@ -1,229 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 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.wst.debug.core.tests.breakpoints; - -import org.eclipse.core.resources.IFile; -import org.eclipse.debug.core.model.IBreakpoint; -import org.eclipse.ui.IEditorPart; -import org.eclipse.wst.debug.core.tests.AbstractBreakpointTest; -import org.eclipse.wst.jsdt.debug.core.breakpoints.IJavaScriptLineBreakpoint; -import org.eclipse.wst.jsdt.debug.core.model.JavaScriptDebugModel; - -/** - * Series of test for line breakpoints - * - * @since 1.1 - */ -public class LineBreakpointTests extends AbstractBreakpointTest { - - /** - * Constructor - */ - public LineBreakpointTests() { - super("Line breakpoint tests"); //$NON-NLS-1$ - } - - /** - * Tests creating a breakpoint on lines not in any closure - * - * @throws Exception - */ - public void testCreateBareLine() throws Exception { - IFile source = loadTestSource(AbstractBreakpointTest.BP_PROJECT, "", "test1.js", SRC); //$NON-NLS-1$ //$NON-NLS-2$ - assertNotNull("the test source for test1.js could not be found", source); //$NON-NLS-1$ - assertTrue("The test source does not exist for test1.js", source.exists()); //$NON-NLS-1$ - String path = source.getFullPath().toString(); - createLineBreakpoints(path, new int[] {11, 12, 14, 17}); - IBreakpoint[] breakpoints = getBreakpointManager().getBreakpoints(JavaScriptDebugModel.MODEL_ID); - assertEquals("there should have been 4 JS line breakpoints in test1.js", breakpoints.length, 4); //$NON-NLS-1$ - } - - /** - * Tests that line breakpoints can be toggled on simple lines that do not appear in any closure - * - * @throws Exception - */ - public void testToggleBareLine() throws Exception { - IFile source = loadTestSource(AbstractBreakpointTest.BP_PROJECT, "", "test1.js", SRC); //$NON-NLS-1$ //$NON-NLS-2$ - assertNotNull("the test source for test1.js could not be found", source); //$NON-NLS-1$ - assertTrue("The test source does not exist for test1.js", source.exists()); //$NON-NLS-1$ - IEditorPart editor = openEditor(source); - assertNotNull("the editor part for test1.js could not be created", editor); //$NON-NLS-1$ - IBreakpoint bp = toggleBreakpoint(editor, 11); - assertNotNull("could not toggle breakpoint on line 11 in test1.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 12); - assertNotNull("could not toggle breakpoint on line 12 in test1.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 14); - assertNotNull("could not toggle breakpoint on line 14 in test1.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 17); - assertNotNull("could not toggle breakpoint on line 17 in test1.js", bp); //$NON-NLS-1$ - - //remove them - bp = toggleBreakpoint(editor, 11); - assertNull("could not toggle to remove breakpoint on line 11 in test1.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 12); - assertNull("could not toggle to remove breakpoint on line 12 in test1.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 14); - assertNull("could not toggle to remove breakpoint on line 14 in test1.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 17); - assertNull("could not toggle to remove breakpoint on line 17 in test1.js", bp); //$NON-NLS-1$ - - assertEquals("Should be no JS breakpoints left", getBreakpointManager().getBreakpoints(JavaScriptDebugModel.MODEL_ID).length, 0); //$NON-NLS-1$ - } - - /** - * Tests creating a breakpoint on lines nested within simple function closures - * - * @throws Exception - */ - public void testCreateSimpleFunctionClosure() throws Exception { - IFile source = loadTestSource(BP_PROJECT, "", "test2.js", SRC); //$NON-NLS-1$ //$NON-NLS-2$ - assertNotNull("the test source for test2.js could not be found", source); //$NON-NLS-1$ - assertTrue("The test source does not exist for test2.js", source.exists()); //$NON-NLS-1$ - String path = source.getFullPath().toString(); - createLineBreakpoints(path, new int[] {13, 15, 19, 21, 25, 27, 31, 33}); - IBreakpoint[] breakpoints = getBreakpointManager().getBreakpoints(JavaScriptDebugModel.MODEL_ID); - assertEquals("there should have been 8 JS line breakpoints in test1.js", breakpoints.length, 8); //$NON-NLS-1$ - } - - /** - * Tests toggling a line breakpoint on lines nested within simple function closures - * - * @throws Exception - */ - public void testToggleSimpleFunctionClosure() throws Exception { - IFile source = loadTestSource(BP_PROJECT, "", "test2.js", SRC); //$NON-NLS-1$ //$NON-NLS-2$ - assertNotNull("the test source for test2.js could not be found", source); //$NON-NLS-1$ - IEditorPart editor = openEditor(source); - assertNotNull("the editor part for test2.js could not be created", editor); //$NON-NLS-1$ - IBreakpoint bp = toggleBreakpoint(editor, 13); - assertNotNull("could not toggle breakpoint on line 13 in test2.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 15); - assertNotNull("could not toggle breakpoint on line 15 in test2.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 19); - assertNotNull("could not toggle breakpoint on line 19 in test2.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 21); - assertNotNull("could not toggle breakpoint on line 21 in test2.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 25); - assertNotNull("could not toggle breakpoint on line 25 in test2.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 27); - assertNotNull("could not toggle breakpoint on line 27 in test2.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 31); - assertNotNull("could not toggle breakpoint on line 31 in test2.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 33); - assertNotNull("could not toggle breakpoint on line 33 in test2.js", bp); //$NON-NLS-1$ - - //remove them - bp = toggleBreakpoint(editor, 13); - assertNull("could not toggle to remove breakpoint on line 11 in test2.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 15); - assertNull("could not toggle to remove breakpoint on line 15 in test2.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 19); - assertNull("could not toggle to remove breakpoint on line 19 in test2.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 21); - assertNull("could not toggle to remove breakpoint on line 21 in test2.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 25); - assertNull("could not toggle to remove breakpoint on line 25 in test2.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 27); - assertNull("could not toggle to remove breakpoint on line 27 in test2.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 31); - assertNull("could not toggle to remove breakpoint on line 31 in test2.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 33); - assertNull("could not toggle to remove breakpoint on line 33 in test2.js", bp); //$NON-NLS-1$ - - assertEquals("Should be no JS breakpoints left", getBreakpointManager().getBreakpoints(JavaScriptDebugModel.MODEL_ID).length, 0); //$NON-NLS-1$ - } - - /** - * Tests creating line breakpoints at various locations in the code snippets from - * https://bugs.eclipse.org/bugs/show_bug.cgi?id=313013 - * - * @throws Exception - */ - public void testCreateBug313013() throws Exception { - IFile source = loadTestSource(BP_PROJECT, "", "test3.js", SRC); //$NON-NLS-1$ //$NON-NLS-2$ - assertNotNull("the test source for test3.js could not be found", source); //$NON-NLS-1$ - assertTrue("The test source does not exist for test3.js", source.exists()); //$NON-NLS-1$ - createLineBreakpoints(source.getFullPath().toString(), new int[] {13, 16, 20, 25}); - IBreakpoint[] bps = getBreakpointManager().getBreakpoints(JavaScriptDebugModel.MODEL_ID); - assertEquals("there should have been 4 JS line breakpoints in test3.js", bps.length, 4); //$NON-NLS-1$ - } - - /** - * Tests toggling breakpoints at various locations in the code from - * https://bugs.eclipse.org/bugs/show_bug.cgi?id=313013 - * - * @throws Exception - */ - public void testToggleBug313013() throws Exception { - IFile source = loadTestSource(AbstractBreakpointTest.BP_PROJECT, "", "test3.js", SRC); //$NON-NLS-1$ //$NON-NLS-2$ - assertNotNull("the test source for test3.js could not be found", source); //$NON-NLS-1$ - assertTrue("The test source does not exist for test3.js", source.exists()); //$NON-NLS-1$ - IEditorPart editor = openEditor(source); - assertNotNull("the editor part for test3.js could not be created", editor); //$NON-NLS-1$ - IBreakpoint bp = toggleBreakpoint(editor, 13); - assertNotNull("could not toggle breakpoint on line 13 in test3.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 16); - assertNotNull("could not toggle breakpoint on line 16 in test3.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 20); - assertNotNull("could not toggle breakpoint on line 20 in test3.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 25); - assertNotNull("could not toggle breakpoint on line 25 in test3.js", bp); //$NON-NLS-1$ - - //remove them - bp = toggleBreakpoint(editor, 13); - assertNull("could not toggle to remove breakpoint on line 13 in test3.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 16); - assertNull("could not toggle to remove breakpoint on line 16 in test3.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 20); - assertNull("could not toggle to remove breakpoint on line 20 in test3.js", bp); //$NON-NLS-1$ - bp = toggleBreakpoint(editor, 25); - assertNull("could not toggle to remove breakpoint on line 25 in test3.js", bp); //$NON-NLS-1$ - - assertEquals("Should be no JS breakpoints left", getBreakpointManager().getBreakpoints(JavaScriptDebugModel.MODEL_ID).length, 0); //$NON-NLS-1$ - } - - /** - * Tests that the breakpoint is correctly moved to the known next best line - * Specifically this test tries to toggle a line breakpoint on the closing brace of an if statement - * - * @throws Exception - */ - public void testToggleValidatedLocIfEndBrace() throws Exception { - IFile source = loadTestSource(BP_PROJECT, "", "test4.js", SRC); //$NON-NLS-1$ //$NON-NLS-2$ - assertNotNull("the test source for test4.js could not be found", source); //$NON-NLS-1$ - assertTrue("The test source does not exist for test4.js", source.exists()); //$NON-NLS-1$ - IEditorPart editor = openEditor(source); - assertNotNull("the editor part for test4.js could not be created", editor); //$NON-NLS-1$ - IBreakpoint bp = toggleBreakpoint(editor, 13); - assertTrue("the breakpoint must be a line breakpoint", bp instanceof IJavaScriptLineBreakpoint); //$NON-NLS-1$ - IJavaScriptLineBreakpoint lbp = (IJavaScriptLineBreakpoint) bp; - assertEquals("the new line number for the validated breakpoint should be line 15", lbp.getLineNumber(), 15); //$NON-NLS-1$ - } - - /** - * Tests that the breakpoint is correctly moved to the known next best line. - * Specifically this test tries to toggle a line breakpoint in an else clause. - * - * @throws Exception - */ - public void testToggleValidatedLocElse() throws Exception { - IFile source = loadTestSource(BP_PROJECT, "", "test4.js", SRC); //$NON-NLS-1$ //$NON-NLS-2$ - assertNotNull("the test source for test4.js could not be found", source); //$NON-NLS-1$ - assertTrue("The test source does not exist for test4.js", source.exists()); //$NON-NLS-1$ - IEditorPart editor = openEditor(source); - assertNotNull("the editor part for test4.js could not be created", editor); //$NON-NLS-1$ - IBreakpoint bp = toggleBreakpoint(editor, 14); - assertTrue("the breakpoint must be a line breakpoint", bp instanceof IJavaScriptLineBreakpoint); //$NON-NLS-1$ - IJavaScriptLineBreakpoint lbp = (IJavaScriptLineBreakpoint) bp; - assertEquals("the new line number for the validated breakpoint should be line 15", lbp.getLineNumber(), 15); //$NON-NLS-1$ - } -} diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/test.xml b/tests/org.eclipse.wst.jsdt.debug.core.tests/test.xml deleted file mode 100644 index 08df4f8..0000000 --- a/tests/org.eclipse.wst.jsdt.debug.core.tests/test.xml +++ /dev/null @@ -1,117 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<project - name="testsuite" - default="run" - basedir="."> - - <!-- The following properties should be passed into this script --> - <!-- ${eclipse-home} --> - <!-- ${buildDirectory} --> - <!-- ${buildLabel} --> - - <!-- should be little need to change what's above --> - <property - name="plugin-name" - value="org.eclipse.wst.jsdt.debug.core.tests" /> - <property - name="classname" - value="org.eclipse.wst.debug.core.tests.JavaScriptDebugTestSuite" /> - <property - name="testType" - value="ui-test" /> - - <!-- should be little need to change what's below --> - - <echo message="basedir: ${basedir}" /> - <echo message="eclipse-home: ${eclipse-home}" /> - <echo message="buildDirectory: ${buildDirectory}" /> - <echo message="plugin-name: ${plugin-name}" /> - <echo message="classname: ${classname}" /> - <echo message="testType ${testType}" /> - - - <property - name="library-file" - value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" /> - <property - name="workspace" - value="${eclipse-home}/junitworkspaces/${plugin-name}" /> - - <!-- 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="${plugin-name}.*xml" /> - </delete> - - <!-- - make the workspace directory, in case path doesn't exist yet - but delete to make sure fresh contents, if it does exist - --> - <delete - dir="${workspace}" - quiet="true" /> - <mkdir - dir="${workspace}" /> - </target> - - <!-- This target defines the tests that need to be run. --> - <target name="suite"> - - <ant - target="${testType}" - antfile="${library-file}" - dir="${eclipse-home}"> - <property - name="data-dir" - value="${workspace}" /> - <property - name="plugin-name" - value="${plugin-name}" /> - <property - name="classname" - value="${classname}" /> - <property - name="plugin-path" - value="${eclipse-home}/plugins/${plugin-name}" /> - </ant> - - <copy - failonerror="false" - file="${workspace}/.metadata/.log" - tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" /> - - </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"> - <!-- usually no need to delete workspace until next run, and leaving it allows inspection --> - <!-- <delete dir="${workspace}" quiet="true" /> --> - </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="${plugin-name}.*xml" /> - <property - name="output-file" - value="${plugin-name}.xml" /> - </ant> - </target> - -</project>
\ No newline at end of file diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/testsource/test1.js b/tests/org.eclipse.wst.jsdt.debug.core.tests/testsource/test1.js deleted file mode 100644 index 022d7c7..0000000 --- a/tests/org.eclipse.wst.jsdt.debug.core.tests/testsource/test1.js +++ /dev/null @@ -1,17 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 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 - *******************************************************************************/ -var v1 = 0; -var v2 = 1; - -var v3 = 3; - - -var v4 = 4; diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/testsource/test2.js b/tests/org.eclipse.wst.jsdt.debug.core.tests/testsource/test2.js deleted file mode 100644 index 5aa4f02..0000000 --- a/tests/org.eclipse.wst.jsdt.debug.core.tests/testsource/test2.js +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 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 - *******************************************************************************/ - -function f1() { - var f1v1 = 1; - - var f1v2 = 2; -} - -f2 = function() { - var f2v1 = 1; - - var f2v2 = 2; -} - -(function f3() { - var f3v1 = 1; - - var f3v2 = 2; -}) - -(f4 = function() { - var f4v1 = 1; - - var f4v2 = 2; -})
\ No newline at end of file diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/testsource/test3.js b/tests/org.eclipse.wst.jsdt.debug.core.tests/testsource/test3.js deleted file mode 100644 index c6728d0..0000000 --- a/tests/org.eclipse.wst.jsdt.debug.core.tests/testsource/test3.js +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 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 - *******************************************************************************/ -function toggle() -{ - var helloElem = document.getElementById("hello"); - var hello_againElem = document.getElementById("hello_again"); - - if(state == 'hello') - { - helloElem.style.display = 'none'; - hello_againElem.style.display = 'block'; - state='hello_again'; - } - else - { - helloElem.style.display = 'block'; - hello_againElem.style.display = 'none'; - state='hello'; - } -} - -var state = 'hello'; - -toggle = function() -{ - var helloElem = document.getElementById("hello"); - var hello_againElem = document.getElementById("hello_again"); - - if(state == 'hello') - { - helloElem.style.display = 'none'; - hello_againElem.style.display = 'block'; - state='hello_again'; - } - else - { - helloElem.style.display = 'block'; - hello_againElem.style.display = 'none'; - state='hello'; - } -};
\ No newline at end of file diff --git a/tests/org.eclipse.wst.jsdt.debug.core.tests/testsource/test4.js b/tests/org.eclipse.wst.jsdt.debug.core.tests/testsource/test4.js deleted file mode 100644 index 457d42d..0000000 --- a/tests/org.eclipse.wst.jsdt.debug.core.tests/testsource/test4.js +++ /dev/null @@ -1,16 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 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 - *******************************************************************************/ -if(foo) { - var foo1 = "yes"; -} -else { - var foo1 = "no"; -}
\ No newline at end of file |