Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2009-12-16 21:23:17 +0000
committerDarin Wright2009-12-16 21:23:17 +0000
commit9825646c2a7b2a350412f0a66f93ae83cf8cef5a (patch)
treee7dd4082a971b8b33009aa95082f820f1b22ddeb /org.eclipse.debug.tests
parent6d212182e9b60f0382a29cc9e1e8524cc2b1b448 (diff)
downloadeclipse.platform.debug-9825646c2a7b2a350412f0a66f93ae83cf8cef5a.tar.gz
eclipse.platform.debug-9825646c2a7b2a350412f0a66f93ae83cf8cef5a.tar.xz
eclipse.platform.debug-9825646c2a7b2a350412f0a66f93ae83cf8cef5a.zip
Bug 297965 - Add launch time attribute to ILaunch
Diffstat (limited to 'org.eclipse.debug.tests')
-rw-r--r--org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchConfigurationTests.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchConfigurationTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchConfigurationTests.java
index 71d9ad534..cb211ecc2 100644
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchConfigurationTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchConfigurationTests.java
@@ -34,6 +34,8 @@ import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationListener;
import org.eclipse.debug.core.ILaunchConfigurationType;
@@ -1045,6 +1047,23 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
IPath location = workingCopy.getLocation();
assertEquals("Wrong path for local working copy", LaunchManager.LOCAL_LAUNCH_CONFIGURATION_CONTAINER_PATH.append("test-get-location.launch"), location);
}
+
+ /**
+ * Tests that the framework adds time stamps to launch objects.
+ */
+ public void testLaunchTimeStamp() throws CoreException {
+ ILaunchConfigurationWorkingCopy workingCopy = newConfiguration(null, "test-time-stamp");
+ ILaunch launch = workingCopy.launch(ILaunchManager.DEBUG_MODE, null);
+ try {
+ String stamp = launch.getAttribute(DebugPlugin.ATTR_LAUNCH_TIMESTAMP);
+ assertNotNull("missing time stamp", stamp);
+ Long.parseLong(stamp); // should be a long - will throw NumberFormatException if not
+ } finally {
+ if (launch != null) {
+ getLaunchManager().removeLaunch(launch);
+ }
+ }
+ }
}

Back to the top