ctf: potential memory optimization
[deliverable/tracecompass.git] / org.eclipse.linuxtools.ctf.core.tests / src / org / eclipse / linuxtools / ctf / core / tests / types / DefinitionTest.java
CommitLineData
4bd7f2db
AM
1/*******************************************************************************
2 * Copyright (c) 2013 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
866e5b51
FC
12package org.eclipse.linuxtools.ctf.core.tests.types;
13
14import static org.junit.Assert.assertNotNull;
15
486efb2e 16import org.eclipse.linuxtools.ctf.core.event.io.BitBuffer;
866e5b51 17import org.eclipse.linuxtools.ctf.core.event.types.Definition;
9ac2eb62 18import org.eclipse.linuxtools.ctf.core.event.types.IDeclaration;
866e5b51 19import org.eclipse.linuxtools.ctf.core.event.types.IDefinitionScope;
866e5b51
FC
20import org.junit.Test;
21
22/**
23 * The class <code>DefinitionTest</code> contains tests for the class
24 * <code>{@link Definition}</code>.
9ac2eb62 25 *
866e5b51
FC
26 * @author ematkho
27 * @version $Revision: 1.0 $
28 */
be6df2d8 29@SuppressWarnings("javadoc")
866e5b51
FC
30public class DefinitionTest {
31
866e5b51
FC
32 /**
33 * Since Definition is abstract, we'll minimally extend it here to
34 * instantiate it.
35 */
36 class DefTest extends Definition {
37
38 public DefTest(IDefinitionScope definitionScope, String fieldName) {
39 super(definitionScope, fieldName);
40 }
41
42 @Override
43 public void read(BitBuffer input) {
44 /* Just a test, no need to implement anything */
45 }
46
9ac2eb62
MK
47 @Override
48 public IDeclaration getDeclaration() {
49 // TODO Auto-generated method stub
50 return null;
51 }
52
866e5b51
FC
53 }
54
55 @Test
79cb3749 56 public void testToString() {
4a9c1f07 57 Definition fixture = new DefTest(null, "Hello");
866e5b51
FC
58 String result = fixture.toString();
59
60 assertNotNull(result);
61 }
62}
This page took 0.052165 seconds and 5 git commands to generate.