Commit | Line | Data |
---|---|---|
e1c43333 | 1 | /******************************************************************************* |
61759503 | 2 | * Copyright (c) 2012, 2013 Ericsson |
e1c43333 AM |
3 | * |
4 | * All rights reserved. This program and the accompanying materials are | |
5 | * made available under the terms of the Eclipse Public License v1.0 which | |
6 | * accompanies this distribution, and is available at | |
7 | * http://www.eclipse.org/legal/epl-v10.html | |
8 | * | |
9 | * Contributors: | |
10 | * Alexandre Montplaisir - Initial API and implementation | |
11 | ******************************************************************************/ | |
12 | ||
13 | package org.eclipse.linuxtools.tmf.core.tests.statistics; | |
14 | ||
5dd1fa65 AM |
15 | import static org.junit.Assume.assumeTrue; |
16 | ||
e1c43333 AM |
17 | import java.io.File; |
18 | import java.io.IOException; | |
19 | ||
5dd1fa65 | 20 | import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace; |
e1c43333 AM |
21 | import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException; |
22 | import org.eclipse.linuxtools.tmf.core.statistics.TmfStateStatistics; | |
5dd1fa65 | 23 | import org.eclipse.linuxtools.tmf.core.tests.shared.CtfTmfTestTraces; |
e1c43333 AM |
24 | import org.junit.BeforeClass; |
25 | ||
26 | /** | |
27 | * Unit tests for the {@link TmfStateStatistics} | |
28 | * | |
29 | * @author Alexandre Montplaisir | |
30 | */ | |
31 | public class TmfStateStatisticsTest extends TmfStatisticsTest { | |
32 | ||
33 | /** | |
34 | * Set up the fixture (build the state history, etc.) once for all tests. | |
35 | */ | |
36 | @BeforeClass | |
37 | public static void setUpClass() { | |
5dd1fa65 | 38 | assumeTrue(CtfTmfTestTraces.tracesExist()); |
e1c43333 | 39 | try { |
cad06250 | 40 | File htFile = File.createTempFile("stats-test", ".ht"); |
e1c43333 | 41 | htFile.deleteOnExit(); |
5dd1fa65 AM |
42 | CtfTmfTrace trace = CtfTmfTestTraces.getTestTrace(TRACE_INDEX); |
43 | backend = new TmfStateStatistics(trace, htFile); | |
e1c43333 AM |
44 | } catch (TmfTraceException e) { |
45 | e.printStackTrace(); | |
46 | } catch (IOException e) { | |
47 | e.printStackTrace(); | |
48 | } | |
49 | } | |
50 | } |