use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testShowBelowMain.
@Test
public void testShowBelowMain() throws Exception {
ILaunchConfigurationWorkingCopy wc = initConfig();
tab.getShowBelowMainButton().setSelection(true);
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testShowBelowMain");
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("--show-below-main=yes"));
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testAlignment.
@Test
public void testAlignment() 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(512);
tab.performApply(wc);
config = wc.doSave();
assertTrue(tab.isValid(config));
// $NON-NLS-1$
ILaunch launch = doLaunch(config, "testAlignment");
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("--alignment=512"));
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testLeakResolutionMed.
@Test
public void testLeakResolutionMed() throws Exception {
ILaunchConfigurationWorkingCopy wc = initConfig();
String[] opts = dynamicTab.getLeakResCombo().getItems();
int ix = Arrays.asList(opts).indexOf(MemcheckLaunchConstants.LEAK_RES_MED);
dynamicTab.getLeakResCombo().select(ix);
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testLeakResolutionMed");
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("--leak-resolution=med"));
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testNumCallers.
@Test
public void testNumCallers() throws Exception {
ILaunchConfigurationWorkingCopy wc = initConfig();
tab.getNumCallersSpinner().setSelection(24);
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testNumCallers");
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("--num-callers=24"));
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testPartialLoads.
@Test
public void testPartialLoads() throws Exception {
ILaunchConfigurationWorkingCopy wc = initConfig();
dynamicTab.getPartialLoadsButton().setSelection(true);
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testPartialLoads");
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("--partial-loads-ok=yes"));
}
Aggregations