~ubuntu-branches/ubuntu/utopic/eclipse-linuxtools/utopic

« back to all changes in this revision

Viewing changes to valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/internal/valgrind/massif/tests/BasicMassifTest.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2014-05-12 18:11:40 UTC
  • mfrom: (3.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20140512181140-w237r3vsah1tmybz
Tags: 2.2.1-1
* New upstream release.
* Refreshed d/patches.
* Removed eclipse-cdt-valgrind-remote package, all its functionality
  is now provided by eclipse-cdt-profiling-framework-remote.
* Added remove-license-feature.patch.
* Bump Standards-Version to 3.9.5.
* Enable eclipse-changelog package.
* Enable eclipse-rpm-editor package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
 *******************************************************************************/
11
11
package org.eclipse.linuxtools.internal.valgrind.massif.tests;
12
12
 
 
13
import static org.junit.Assert.assertEquals;
 
14
 
 
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;
16
23
 
17
24
public class BasicMassifTest extends AbstractMassifTest {
18
 
        
 
25
 
19
26
        @Override
20
 
        protected void setUp() throws Exception {
 
27
        @Before
 
28
        public void setUp() throws Exception {
21
29
                super.setUp();
22
30
                proj = createProjectAndBuild("alloctest"); //$NON-NLS-1$
23
31
        }
24
 
        
 
32
 
25
33
        @Override
26
 
        protected void tearDown() throws Exception {
 
34
        @After
 
35
        public void tearDown() throws CoreException {
27
36
                deleteProject(proj);
28
37
                super.tearDown();
29
38
        }
30
 
        
 
39
 
 
40
        @Test
31
41
        public void testNumSnapshots() throws Exception {
32
42
                ILaunchConfiguration config = createConfiguration(proj.getProject());
33
43
                doLaunch(config, "testNumSnapshots"); //$NON-NLS-1$
34
 
                
 
44
 
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);
37
49
        }
38
50
}
 
51