ctf: Attempt to gracefully recover from a malformed packet context
[deliverable/tracecompass.git] / ctf / org.eclipse.tracecompass.ctf.core.tests / src / org / eclipse / tracecompass / ctf / core / tests / trace / CTFStreamInputPacketIndexTest.java
1 /*******************************************************************************
2 * Copyright (c) 2013, 2014 Ericsson
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * Matthew Khouzam - Initial API and implementation
10 *******************************************************************************/
11
12 package org.eclipse.tracecompass.ctf.core.tests.trace;
13
14 import static org.junit.Assert.assertNotNull;
15
16 import org.eclipse.tracecompass.ctf.core.CTFException;
17 import org.eclipse.tracecompass.internal.ctf.core.trace.StreamInputPacketIndex;
18 import org.eclipse.tracecompass.internal.ctf.core.trace.StreamInputPacketIndexEntry;
19 import org.junit.Before;
20 import org.junit.Test;
21
22 /**
23 * The class <code>StreamInputPacketIndexTest</code> contains tests for the
24 * class <code>{@link StreamInputPacketIndex}</code>.
25 *
26 * @author Matthew Khouzam
27 */
28 @SuppressWarnings("javadoc")
29 public class CTFStreamInputPacketIndexTest {
30
31 private StreamInputPacketIndex fixture;
32
33 /**
34 * Perform pre-test initialization.
35 *
36 * @throws CTFException
37 */
38 @Before
39 public void setUp() {
40 fixture = new StreamInputPacketIndex();
41 fixture.append(new StreamInputPacketIndexEntry(1L,0L));
42 }
43
44 /**
45 * Run the StreamInputPacketIndex() constructor test.
46 */
47 @Test
48 public void testStreamInputPacketIndex() {
49 assertNotNull(fixture);
50 assertNotNull(fixture.getElement(0));
51 }
52
53 }
This page took 0.035594 seconds and 5 git commands to generate.