ctf: Clean up unit tests
[deliverable/tracecompass.git] / org.eclipse.linuxtools.ctf.core.tests / src / org / eclipse / linuxtools / ctf / core / tests / types / SequenceDefinitionTest.java
index 14b8f950dcef483667a618ec7ad8d4d4afe05c9f..8f875f5ca1a67fad1f959b2f2b44c4105b64c22e 100644 (file)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Ericsson
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Matthew Khouzam - Initial API and implementation
+ *******************************************************************************/
+
 package org.eclipse.linuxtools.ctf.core.tests.types;
 
 import static org.junit.Assert.assertEquals;
@@ -6,6 +17,7 @@ import static org.junit.Assert.assertTrue;
 
 import java.nio.ByteOrder;
 
+import org.eclipse.linuxtools.ctf.core.event.io.BitBuffer;
 import org.eclipse.linuxtools.ctf.core.event.types.Definition;
 import org.eclipse.linuxtools.ctf.core.event.types.Encoding;
 import org.eclipse.linuxtools.ctf.core.event.types.IntegerDeclaration;
@@ -14,8 +26,6 @@ import org.eclipse.linuxtools.ctf.core.event.types.SequenceDefinition;
 import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration;
 import org.eclipse.linuxtools.ctf.core.event.types.StructDefinition;
 import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
-import org.eclipse.linuxtools.internal.ctf.core.event.io.BitBuffer;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -26,21 +36,12 @@ import org.junit.Test;
  * @author ematkho
  * @version $Revision: 1.0 $
  */
+@SuppressWarnings("javadoc")
 public class SequenceDefinitionTest {
 
     private SequenceDefinition fixture;
     private final static int seqLen = 15;
 
-    /**
-     * Launch the test.
-     *
-     * @param args
-     *            the command line arguments
-     */
-    public static void main(String[] args) {
-        new org.junit.runner.JUnitCore().run(SequenceDefinitionTest.class);
-    }
-
     /**
      * Perform pre-test initialization.
      * @throws CTFReaderException
@@ -52,14 +53,14 @@ public class SequenceDefinitionTest {
 
         IntegerDeclaration id = new IntegerDeclaration(8, false, 8,
                 ByteOrder.LITTLE_ENDIAN, Encoding.UTF8, null, 8);
-        String lengthName = "LengthName"; //$NON-NLS-1$
+        String lengthName = "LengthName";
         structDec = new StructDeclaration(0);
         structDec.addField(lengthName, id);
-        structDef = new StructDefinition(structDec, null, "x"); //$NON-NLS-1$
+        structDef = new StructDefinition(structDec, null, "x");
 
         structDef.lookupInteger(lengthName).setValue(seqLen);
         SequenceDeclaration sd = new SequenceDeclaration(lengthName, id);
-        fixture = new SequenceDefinition(sd, structDef, "TestX"); //$NON-NLS-1$
+        fixture = new SequenceDefinition(sd, structDef, "TestX");
         BitBuffer input = new BitBuffer(
                 java.nio.ByteBuffer.allocateDirect(seqLen * 8));
         for (int i = 0; i < seqLen; i++) {
@@ -69,14 +70,6 @@ public class SequenceDefinitionTest {
         assert (fixture != null);
     }
 
-    /**
-     * Perform post-test clean-up.
-     */
-    @After
-    public void tearDown() {
-        // Add additional tear down code here
-    }
-
     private static SequenceDefinition initNonString() throws CTFReaderException {
         StructDeclaration structDec;
         StructDefinition structDef;
@@ -84,14 +77,14 @@ public class SequenceDefinitionTest {
         int len = 32;
         IntegerDeclaration id = new IntegerDeclaration(len, false, len,
                 ByteOrder.LITTLE_ENDIAN, Encoding.UTF8, null,8);
-        String lengthName = "LengthName"; //$NON-NLS-1$
+        String lengthName = "LengthName";
         structDec = new StructDeclaration(0);
         structDec.addField(lengthName, id);
-        structDef = new StructDefinition(structDec, null, "x"); //$NON-NLS-1$
+        structDef = new StructDefinition(structDec, null, "x");
 
         structDef.lookupInteger(lengthName).setValue(seqLen);
         SequenceDeclaration sd = new SequenceDeclaration(lengthName, id);
-        SequenceDefinition ret = new SequenceDefinition(sd, structDef, "TestX"); //$NON-NLS-1$
+        SequenceDefinition ret = new SequenceDefinition(sd, structDef, "TestX");
         BitBuffer input = new BitBuffer(
                 java.nio.ByteBuffer.allocateDirect(seqLen * len));
         for (int i = 0; i < seqLen; i++) {
This page took 0.027356 seconds and 5 git commands to generate.