10
10
*******************************************************************************/
11
11
package org.eclipse.linuxtools.internal.valgrind.massif.tests;
13
import static org.junit.Assert.assertEquals;
15
import org.eclipse.core.runtime.CoreException;
13
16
import org.eclipse.debug.core.ILaunchConfiguration;
17
import org.eclipse.linuxtools.internal.valgrind.massif.MassifSnapshot;
14
18
import org.eclipse.linuxtools.internal.valgrind.massif.MassifViewPart;
15
19
import org.eclipse.linuxtools.internal.valgrind.ui.ValgrindUIPlugin;
20
import org.junit.After;
21
import org.junit.Before;
22
import org.junit.Test;
17
24
public class BasicMassifTest extends AbstractMassifTest {
20
protected void setUp() throws Exception {
28
public void setUp() throws Exception {
22
30
proj = createProjectAndBuild("alloctest"); //$NON-NLS-1$
26
protected void tearDown() throws Exception {
35
public void tearDown() throws CoreException {
27
36
deleteProject(proj);
31
41
public void testNumSnapshots() throws Exception {
32
42
ILaunchConfiguration config = createConfiguration(proj.getProject());
33
43
doLaunch(config, "testNumSnapshots"); //$NON-NLS-1$
35
45
MassifViewPart view = (MassifViewPart) ValgrindUIPlugin.getDefault().getView().getDynamicView();
36
assertEquals(14, view.getSnapshots().length);
46
MassifSnapshot[] snapshots = view.getSnapshots();
47
assertEquals(14, snapshots.length);
48
checkSnapshots(snapshots , 40, 16);