use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testDepth.
@Test
public void testDepth() throws CoreException, URISyntaxException, IOException {
ILaunchConfigurationWorkingCopy wc = initConfig();
dynamicTab.getDepthSpinner().setSelection(50);
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testDepth");
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("--depth=50"));
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testAllocFnSpace.
@Test
public void testAllocFnSpace() throws CoreException, URISyntaxException, IOException {
ILaunchConfigurationWorkingCopy wc = initConfig();
// $NON-NLS-1$
dynamicTab.getAllocFnList().add("operator new(unsigned)");
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testAllocFnSpace");
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("--alloc-fn=operator new(unsigned)"));
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testTimeUnitMilliseconds.
@Test
public void testTimeUnitMilliseconds() throws CoreException, URISyntaxException, IOException {
ILaunchConfigurationWorkingCopy wc = initConfig();
String[] items = dynamicTab.getTimeUnitCombo().getItems();
int ix = -1;
for (int i = 0; i < items.length; i++) {
if (items[i].equals(MassifToolPage.TIME_MS_STRING)) {
ix = i;
}
}
dynamicTab.getTimeUnitCombo().select(ix);
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testTimeUnitMilliseconds");
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("--time-unit=ms"));
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testStacks.
@Test
public void testStacks() throws CoreException, URISyntaxException, IOException {
ILaunchConfigurationWorkingCopy wc = initConfig();
dynamicTab.getStacksButton().setSelection(true);
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testStacks");
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("--stacks=yes"));
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testAllocFnMultiple.
@Test
public void testAllocFnMultiple() throws CoreException, URISyntaxException, IOException {
ILaunchConfigurationWorkingCopy wc = initConfig();
// $NON-NLS-1$
dynamicTab.getAllocFnList().add("foo");
// $NON-NLS-1$
dynamicTab.getAllocFnList().add("bar");
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testAllocFnMultiple");
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("--alloc-fn=foo"));
// $NON-NLS-1$
assertTrue(cmd.contains("--alloc-fn=bar"));
}
Aggregations