use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testAlignmentBad.
@Test
public void testAlignmentBad() throws CoreException {
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 testThreshold.
@Test
public void testThreshold() throws CoreException, URISyntaxException, IOException {
ILaunchConfigurationWorkingCopy wc = initConfig();
dynamicTab.getThresholdSpinner().setSelection(20);
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testThreshold");
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("--threshold=2.0"));
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testPeakInaccuracy.
@Test
public void testPeakInaccuracy() throws CoreException, URISyntaxException, IOException {
ILaunchConfigurationWorkingCopy wc = initConfig();
dynamicTab.getPeakInaccuracySpinner().setSelection(0);
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testPeakInaccuracy");
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("--peak-inaccuracy=0.0"));
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testDefaults.
@Test
public void testDefaults() throws CoreException, URISyntaxException, IOException {
ILaunchConfigurationWorkingCopy wc = initConfig();
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testDefaults");
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("--tool=massif"));
// $NON-NLS-1$
assertFalse(cmd.contains("--xml=yes"));
// $NON-NLS-1$
assertTrue(cmd.contains("-q"));
// $NON-NLS-1$
assertTrue(cmd.contains("--trace-children=no"));
// $NON-NLS-1$
assertTrue(cmd.contains("--child-silent-after-fork=yes"));
// $NON-NLS-1$
assertTrue(cmd.contains("--demangle=yes"));
// $NON-NLS-1$
assertTrue(cmd.contains("--num-callers=12"));
// $NON-NLS-1$
assertTrue(cmd.contains("--error-limit=yes"));
// $NON-NLS-1$
assertTrue(cmd.contains("--show-below-main=no"));
// $NON-NLS-1$
assertFalse(cmd.contains("--suppressions"));
// $NON-NLS-1$
assertTrue(cmd.contains("--max-stackframe=2000000"));
// $NON-NLS-1$
assertTrue(cmd.contains("--run-libc-freeres=yes"));
// $NON-NLS-1$
assertTrue(cmd.contains("--heap=yes"));
// $NON-NLS-1$
assertTrue(cmd.contains("--heap-admin=8"));
// $NON-NLS-1$
assertTrue(cmd.contains("--stacks=no"));
// $NON-NLS-1$
assertFalse(cmd.contains("--alloc-fn"));
// $NON-NLS-1$
assertTrue(cmd.contains("--threshold=1.0"));
// $NON-NLS-1$
assertTrue(cmd.contains("--peak-inaccuracy=1.0"));
// $NON-NLS-1$
assertTrue(cmd.contains("--time-unit=i"));
// $NON-NLS-1$
assertTrue(cmd.contains("--detailed-freq=10"));
// $NON-NLS-1$
assertTrue(cmd.contains("--max-snapshots=100"));
// $NON-NLS-1$
assertFalse(cmd.contains("--alignment="));
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method initConfig.
private ILaunchConfigurationWorkingCopy initConfig() throws CoreException {
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
tab.setDefaults(wc);
tab.createControl(testShell);
tab.initializeFrom(config);
int ix = Arrays.asList(tab.getTools()).indexOf(MassifPlugin.TOOL_ID);
tab.getToolsCombo().select(ix);
ILaunchConfigurationTab dynamicTab = tab.getDynamicTab();
this.dynamicTab = (MassifToolPage) dynamicTab;
return wc;
}
Aggregations