use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testTrackOrigins.
@Test
public void testTrackOrigins() throws Exception {
ILaunchConfigurationWorkingCopy wc = initConfig();
IProject project = CDebugUtils.verifyCProject(config).getProject();
Version ver = ValgrindLaunchPlugin.getDefault().getValgrindVersion(project);
if (ver.compareTo(ValgrindLaunchPlugin.VER_3_4_0) >= 0) {
dynamicTab.getTrackOriginsButton().setSelection(true);
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testTrackOrigins");
IProcess[] p = launch.getProcesses();
assertTrue("process array should not be empty", p.length > 0);
String cmd = p[0].getAttribute(IProcess.ATTR_CMDLINE);
assertEquals(0, p[0].getExitValue());
// $NON-NLS-1$
assertTrue(cmd.contains("--track-origins=yes"));
} else {
assertNull(dynamicTab.getTrackOriginsButton());
}
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testAlignmentBad.
@Test
public void testAlignmentBad() throws Exception {
ILaunchConfigurationWorkingCopy wc = initConfig();
assertFalse(dynamicTab.getAlignmentSpinner().getEnabled());
dynamicTab.getAlignmentButton().setSelection(true);
dynamicTab.getAlignmentButton().notifyListeners(SWT.Selection, null);
assertTrue(dynamicTab.getAlignmentSpinner().getEnabled());
dynamicTab.getAlignmentSpinner().setSelection(63);
tab.performApply(wc);
config = wc.doSave();
assertFalse(tab.isValid(config));
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testFreeListVol.
@Test
public void testFreeListVol() throws Exception {
ILaunchConfigurationWorkingCopy wc = initConfig();
dynamicTab.getFreelistSpinner().setSelection(2000000);
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testFreeListVol");
IProcess[] p = launch.getProcesses();
assertTrue("process array should not be empty", p.length > 0);
String cmd = p[0].getAttribute(IProcess.ATTR_CMDLINE);
assertEquals(0, p[0].getExitValue());
// $NON-NLS-1$
assertTrue(cmd.contains("--freelist-vol=2000000"));
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testExtraOptions.
@Test
public void testExtraOptions() throws Exception {
ILaunchConfigurationWorkingCopy wc = initConfig();
tab.getExtraOptionsText().setText(" -v -v");
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testExtraOptions");
IProcess[] p = launch.getProcesses();
assertTrue("process array should not be empty", p.length > 0);
String cmd = p[0].getAttribute(IProcess.ATTR_CMDLINE);
assertEquals(0, p[0].getExitValue());
// $NON-NLS-1$
assertTrue(cmd.contains("-v -v"));
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testDemangle.
@Test
public void testDemangle() throws Exception {
ILaunchConfigurationWorkingCopy wc = initConfig();
tab.getDemangleButton().setSelection(false);
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testDemangle");
IProcess[] p = launch.getProcesses();
assertTrue(p.length > 0);
String cmd = p[0].getAttribute(IProcess.ATTR_CMDLINE);
assertEquals(0, p[0].getExitValue());
// $NON-NLS-1$
assertTrue(cmd.contains("--demangle=no"));
}
Aggregations