Don't catch the FileNotFound exception in CTF tests
authorAlexandre Montplaisir <alexandre.montplaisir@gmail.com>
Thu, 15 Mar 2012 18:10:50 +0000 (14:10 -0400)
committerFrancois Chouinard <fchouinard@gmail.com>
Mon, 19 Mar 2012 21:43:50 +0000 (17:43 -0400)
This just makes it more annoying when the file doesn't exist, which
can easily happen since the test traces are not in the git tree itself.

18 files changed:
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/TestParams.java
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceReaderTest.java
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceTest.java
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/MetadataTest.java
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputPacketReaderTest.java
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderComparatorTest.java
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderTest.java
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderTimestampComparatorTest.java
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputTest.java
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamTest.java
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/ArrayDefinitionTest.java
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/EventDeclarationTest.java
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/IntegerDefinitionTest.java
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/StringDefinitionTest.java
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/StructDefinitionTest.java
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/VariantDeclarationTest.java
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/VariantDefinitionTest.java
org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/metadata/IOStructGen.java

index 45609ecc84ed99964a86ef5907c35037eae70934..cf3dbc61e4e1ab5eca896337c263d25c6fd5fb5e 100644 (file)
@@ -37,14 +37,9 @@ public abstract class TestParams {
         return emptyTrace;
     }
     
-    public static CTFTrace createTrace() {
+    public static CTFTrace createTrace() throws CTFReaderException {
         if (testTrace1 == null) {
-            try {
-                testTrace1 = new CTFTrace(testTracePath1);
-            } catch (CTFReaderException e) {
-                /* We know this trace should exist */
-                throw new RuntimeException(e);
-            }
+            testTrace1 = new CTFTrace(testTracePath1);
         }
         return testTrace1;
     }
index bede1db948872812112728f56d6b5c9511e2e861..5c8b9282c162224ce5069bf3e10ee19667e7261d 100644 (file)
@@ -36,9 +36,10 @@ public class CTFTraceReaderTest {
 
     /**
      * Perform pre-test initialization.
+     * @throws CTFReaderException 
      */
     @Before
-    public void setUp() {
+    public void setUp() throws CTFReaderException {
         fixture = new CTFTraceReader(TestParams.createTrace());
     }
 
@@ -53,9 +54,10 @@ public class CTFTraceReaderTest {
     /**
      * Run the CTFTraceReader(CTFTrace) constructor test. Open a known good
      * trace.
+     * @throws CTFReaderException 
      */
     @Test
-    public void testOpen_existing() {
+    public void testOpen_existing() throws CTFReaderException {
         CTFTrace trace = TestParams.createTrace();
 
         CTFTraceReader result = new CTFTraceReader(trace);
@@ -139,9 +141,10 @@ public class CTFTraceReaderTest {
      *
      * Both trace reader are different objects, so they shouldn't "equals" each
      * other.
+     * @throws CTFReaderException 
      */
     @Test
-    public void testEquals() {
+    public void testEquals() throws CTFReaderException {
         CTFTraceReader fixture2 = new CTFTraceReader(TestParams.createTrace());
         assertFalse(fixture.equals(fixture2));
     }
index bad5b119c005c3442335d97a7545333da10d8c88..5f4546f5321723afbb75b9e1dc87873633228a87 100644 (file)
@@ -97,9 +97,10 @@ public class CTFTraceTest {
      * Run the void addStream(Stream) method test.
      * 
      * @throws ParseException
+     * @throws CTFReaderException 
      */
     @Test
-    public void testAddStream() throws ParseException {
+    public void testAddStream() throws ParseException, CTFReaderException {
         Stream stream = new Stream(TestParams.createTrace());
         stream.setId(1L);
         fixture.addStream(stream);
index 077ad141d23f39f01ed2c361985baddad034e5ff..4d21fdec2effd688d8da6b822aed28b67d170007 100644 (file)
@@ -35,9 +35,11 @@ public class MetadataTest {
 
     /**
      * Perform pre-test initialization.
+     * 
+     * @throws CTFReaderException 
      */
     @Before
-    public void setUp() {
+    public void setUp() throws CTFReaderException {
         fixture = new Metadata(TestParams.createTrace());
     }
 
index b8aee7bcd3856ba2e081519871ffb127b7a3cbb7..b113ffe96394cf566ccac41a6c6b058ad261f33f 100644 (file)
@@ -41,9 +41,11 @@ public class StreamInputPacketReaderTest {
 
     /**
      * Perform pre-test initialization.
+     * 
+     * @throws CTFReaderException 
      */
     @Before
-    public void setUp() {
+    public void setUp() throws CTFReaderException {
         // FIXME The test is broken here. "FileChannel" can't be null because we
         // need it further in. Heck this whole thing shouldn't be public in the
         // first place, perhaps fixing that is the best way to go.
@@ -62,9 +64,11 @@ public class StreamInputPacketReaderTest {
 
     /**
      * Run the StreamInputPacketReader(StreamInputReader) constructor test.
+     * 
+     * @throws CTFReaderException 
      */
     @Test
-    public void testStreamInputPacketReader() {
+    public void testStreamInputPacketReader() throws CTFReaderException {
         StreamInputReader streamInputReader;
         StreamInputPacketReader result;
 
index 27280c4b236221736f8532d3d2d1af47b426c3fd..5c4e27892035b164d38500ee6cc0503a315b6280 100644 (file)
@@ -7,6 +7,7 @@ import java.nio.channels.FileChannel;
 import org.eclipse.linuxtools.ctf.core.event.EventDeclaration;
 import org.eclipse.linuxtools.ctf.core.event.EventDefinition;
 import org.eclipse.linuxtools.ctf.core.tests.TestParams;
+import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
 import org.eclipse.linuxtools.ctf.core.trace.Stream;
 import org.eclipse.linuxtools.ctf.core.trace.StreamInput;
 import org.eclipse.linuxtools.ctf.core.trace.StreamInputReader;
@@ -60,9 +61,11 @@ public class StreamInputReaderComparatorTest {
 
     /**
      * Run the int compare(StreamInputReader,StreamInputReader) method test.
+     * 
+     * @throws CTFReaderException 
      */
     @Test
-    public void testCompare() {
+    public void testCompare() throws CTFReaderException {
         StreamInputReader sir1, sir2;
         EventDefinition ed1, ed2;
 
index 4ecd4be9985edb154b65beb30c7db706a62fa682..d9a6573877a0866b81c4b07ec580e33179b43033 100644 (file)
@@ -43,13 +43,15 @@ public class StreamInputReaderTest {
 
     /**
      * Perform pre-test initialization.
+     * 
+     * @throws CTFReaderException 
      */
     @Before
-    public void setUp() {
-        fixture = createStreamInputReader();
+    public void setUp() throws CTFReaderException {
+        fixture = getStreamInputReader();
         fixture.setName(1);
         fixture.setCurrentEvent(new EventDefinition(new EventDeclaration(),
-                createStreamInputReader()));
+                getStreamInputReader()));
     }
 
     /**
@@ -60,7 +62,7 @@ public class StreamInputReaderTest {
         // Add additional tear down code here
     }
 
-    private static StreamInputReader createStreamInputReader() {
+    private static StreamInputReader getStreamInputReader() throws CTFReaderException {
         CTFTrace trace = TestParams.createTrace();
         Stream s = trace.getStream((long) 0);
         Set<StreamInput> streamInput = s.getStreamInputs();
@@ -178,11 +180,13 @@ public class StreamInputReaderTest {
     /**
      * Run the seek test. Seek by passing an EventDefinition to which we've
      * given the timestamp we want.
+     * 
+     * @throws CTFReaderException 
      */
     @Test
-    public void testSeek_eventDefinition() {
+    public void testSeek_eventDefinition() throws CTFReaderException {
         EventDefinition eventDefinition = new EventDefinition(
-                new EventDeclaration(), createStreamInputReader());
+                new EventDeclaration(), getStreamInputReader());
         eventDefinition.timestamp = 1L;
         fixture.setCurrentEvent(eventDefinition);
     }
index d17099eade6fa0bdcbf93c6977c5607c267b2db1..1d3a3ca73e4fb852d6495e93ce4503faf7dbf2e0 100644 (file)
@@ -6,6 +6,7 @@ import static org.junit.Assert.assertNotNull;
 import java.nio.channels.FileChannel;
 
 import org.eclipse.linuxtools.ctf.core.tests.TestParams;
+import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
 import org.eclipse.linuxtools.ctf.core.trace.Stream;
 import org.eclipse.linuxtools.ctf.core.trace.StreamInput;
 import org.eclipse.linuxtools.ctf.core.trace.StreamInputReader;
@@ -59,9 +60,11 @@ public class StreamInputReaderTimestampComparatorTest {
 
     /**
      * Run the int compare(StreamInputReader,StreamInputReader) method test.
+     * 
+     * @throws CTFReaderException 
      */
     @Test
-    public void testCompare() {
+    public void testCompare() throws CTFReaderException {
         StreamInputReader a, b;
         a = new StreamInputReader(new StreamInput(new Stream(
                 TestParams.createTrace()), (FileChannel) null,
index 84686a073a43306b6c3c425dbc45cc1edaf37a07..4a71dc3ac860f4beda325c4d821ceb96ee80a740 100644 (file)
@@ -9,6 +9,7 @@ import java.nio.channels.FileChannel;
 
 import org.eclipse.linuxtools.ctf.core.event.types.Definition;
 import org.eclipse.linuxtools.ctf.core.tests.TestParams;
+import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
 import org.eclipse.linuxtools.ctf.core.trace.Stream;
 import org.eclipse.linuxtools.ctf.core.trace.StreamInput;
 import org.eclipse.linuxtools.ctf.core.trace.StreamInputPacketIndex;
@@ -39,9 +40,11 @@ public class StreamInputTest {
 
     /**
      * Perform pre-test initialization.
+     * 
+     * @throws CTFReaderException 
      */
     @Before
-    public void setUp() {
+    public void setUp() throws CTFReaderException {
         fixture = new StreamInput(new Stream(TestParams.createTrace()),
                 (FileChannel) null, createFile());
         fixture.setTimestampEnd(1L);
index b0b2a5dd203c5a66786573bf8e69ac6ffc571c94..fd3ea36f7044f7fcc7a1a789794a64baf7d98ba5 100644 (file)
@@ -11,6 +11,7 @@ import org.eclipse.linuxtools.ctf.core.event.EventDeclaration;
 import org.eclipse.linuxtools.ctf.core.event.metadata.exceptions.ParseException;
 import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration;
 import org.eclipse.linuxtools.ctf.core.tests.TestParams;
+import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
 import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
 import org.eclipse.linuxtools.ctf.core.trace.Stream;
 import org.eclipse.linuxtools.ctf.core.trace.StreamInput;
@@ -41,9 +42,11 @@ public class StreamTest {
 
     /**
      * Perform pre-test initialization.
+     * 
+     * @throws CTFReaderException 
      */
     @Before
-    public void setUp() {
+    public void setUp() throws CTFReaderException {
         fixture = new Stream(TestParams.createTrace());
         fixture.setEventContext(new StructDeclaration(1L));
         fixture.setPacketContext(new StructDeclaration(1L));
@@ -63,9 +66,11 @@ public class StreamTest {
 
     /**
      * Run the Stream(CTFTrace) constructor test.
+     * 
+     * @throws CTFReaderException 
      */
     @Test
-    public void testStream() {
+    public void testStream() throws CTFReaderException {
         CTFTrace trace = TestParams.createTrace();
         Stream result = new Stream(trace);
         assertNotNull(result);
index f22a6adf41a48e4f3e8b548b695f93e565ec2e44..43e6109d6970f2649a2c984a836f066a8d9a6f37 100644 (file)
@@ -20,6 +20,7 @@ import org.eclipse.linuxtools.ctf.core.event.types.StringDeclaration;
 import org.eclipse.linuxtools.ctf.core.event.types.StringDefinition;
 import org.eclipse.linuxtools.ctf.core.event.types.StructDefinition;
 import org.eclipse.linuxtools.ctf.core.tests.TestParams;
+import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
 import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
 import org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader;
 import org.junit.After;
@@ -53,10 +54,12 @@ public class ArrayDefinitionTest {
      * 
      * structDef shouldn't be null after parsing the CTFTraceReader object, so
      * we can ignore the warning.
+     * 
+     * @throws CTFReaderException 
      */
-
+    @SuppressWarnings("null")
     @Before
-    public void setUp() {
+    public void setUp() throws CTFReaderException {
         this.trace = TestParams.createTrace();
 
         CTFTraceReader tr = new CTFTraceReader(this.trace);
index cbee082c995d1544d00a9da6ae50d8153b8f385e..f129c9a9e7c51e20fc11fa3ea83f9af246d73b15 100644 (file)
@@ -12,6 +12,7 @@ import org.eclipse.linuxtools.ctf.core.event.EventDeclaration;
 import org.eclipse.linuxtools.ctf.core.event.EventDefinition;
 import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration;
 import org.eclipse.linuxtools.ctf.core.tests.TestParams;
+import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
 import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
 import org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader;
 import org.eclipse.linuxtools.ctf.core.trace.Stream;
@@ -44,9 +45,11 @@ public class EventDeclarationTest {
 
     /**
      * Perform pre-test initialization.
+     * 
+     * @throws CTFReaderException 
      */
     @Before
-    public void setUp() {
+    public void setUp() throws CTFReaderException {
         fixture = new EventDeclaration();
         fixture.setContext(new StructDeclaration(1L));
         fixture.setId(1L);
@@ -94,9 +97,11 @@ public class EventDeclarationTest {
 
     /**
      * Run the EventDefinition createDefinition(StreamInputReader) method test.
+     * 
+     * @throws CTFReaderException 
      */
     @Test
-    public void testCreateDefinition() {
+    public void testCreateDefinition() throws CTFReaderException {
         StreamInputReader streamInputReader = new StreamInputReader(
                 new StreamInput(new Stream(TestParams.createTrace()),
                         (FileChannel) null, TestParams.getEmptyFile()));
@@ -107,9 +112,11 @@ public class EventDeclarationTest {
 
     /**
      * Run the boolean equals(Object) method test.
+     * 
+     * @throws CTFReaderException 
      */
     @Test
-    public void testEquals() {
+    public void testEquals() throws CTFReaderException {
         EventDeclaration obj = new EventDeclaration();
         obj.setContext(new StructDeclaration(1L));
         obj.setId(1L);
@@ -326,9 +333,11 @@ public class EventDeclarationTest {
 
     /**
      * Test for the EventDefinition class
+     * 
+     * @throws CTFReaderException 
      */
     @Test
-    public void testEventDefinition() {
+    public void testEventDefinition() throws CTFReaderException {
         CTFTrace trace = TestParams.createTrace();
         CTFTraceReader tr = new CTFTraceReader(trace);
         tr.advance();
index 6070aa694f0265f63142ffeb9e0470b0c2e2bbad..c00155fcf19c2b0f8fbc491cfe0d8e265e34757d 100644 (file)
@@ -14,6 +14,7 @@ import org.eclipse.linuxtools.ctf.core.event.types.IntegerDeclaration;
 import org.eclipse.linuxtools.ctf.core.event.types.IntegerDefinition;
 import org.eclipse.linuxtools.ctf.core.event.types.StructDefinition;
 import org.eclipse.linuxtools.ctf.core.tests.TestParams;
+import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
 import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
 import org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader;
 import org.junit.After;
@@ -44,9 +45,11 @@ public class IntegerDefinitionTest {
     /**
      * Perform pre-test initialization. We know the structDef won't be null (or
      * else the tests will fail), so we can safely suppress the warning.
+     * 
+     * @throws CTFReaderException 
      */
     @Before
-    public void setUp() {
+    public void setUp() throws CTFReaderException {
         CTFTrace trace = TestParams.createTrace();
         CTFTraceReader tr = new CTFTraceReader(trace);
         String name = ""; //$NON-NLS-1$
index 12409ef0300af4b57fedfccdc5540bc8f08460c5..a80df32b7244703efd08e7163fc295b5be1f7e15 100644 (file)
@@ -10,6 +10,7 @@ import org.eclipse.linuxtools.ctf.core.event.types.StringDeclaration;
 import org.eclipse.linuxtools.ctf.core.event.types.StringDefinition;
 import org.eclipse.linuxtools.ctf.core.event.types.StructDefinition;
 import org.eclipse.linuxtools.ctf.core.tests.TestParams;
+import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
 import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
 import org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader;
 
@@ -40,9 +41,11 @@ public class StringDefinitionTest {
 
     /**
      * Perform pre-test initialization.
+     * 
+     * @throws CTFReaderException 
      */
     @Before
-    public void setUp() {
+    public void setUp() throws CTFReaderException {
         CTFTrace trace = TestParams.createTrace();
         CTFTraceReader tr = new CTFTraceReader(trace);
         String name = ""; //$NON-NLS-1$
index b5a4d71352b0d5cda9f30ada6d3357a1b8589d7e..0d4bce83f3660d7a26dc4fb12554bfa17e71395a 100644 (file)
@@ -18,6 +18,7 @@ import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration;
 import org.eclipse.linuxtools.ctf.core.event.types.StructDefinition;
 import org.eclipse.linuxtools.ctf.core.event.types.VariantDefinition;
 import org.eclipse.linuxtools.ctf.core.tests.TestParams;
+import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
 import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
 import org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader;
 
@@ -50,9 +51,11 @@ public class StructDefinitionTest {
 
     /**
      * Perform pre-test initialization.
+     * 
+     * @throws CTFReaderException 
      */
     @Before
-    public void setUp() {
+    public void setUp() throws CTFReaderException {
         CTFTrace c = TestParams.createTrace();
         CTFTraceReader tr = new CTFTraceReader(c);
         EventDefinition ed = tr.getCurrentEventDef();
@@ -85,15 +88,6 @@ public class StructDefinitionTest {
         assertNotNull(result);
     }
 
-    /**
-     * Run the String getPath() method test.
-     */
-    @Test
-    public void testGetPath() {
-        String result = fixture.getPath();
-        assertNotNull(result);
-    }
-
     /**
      * Run the ArrayDefinition lookupArray(String) method test.
      */
index 9aef3b642b1617554a16d40a0f8478df00906c14..6bb8728e40fdc3b15077f9b2d4cc5cd7fadf3df7 100644 (file)
@@ -11,6 +11,7 @@ import org.eclipse.linuxtools.ctf.core.event.types.StructDefinition;
 import org.eclipse.linuxtools.ctf.core.event.types.VariantDeclaration;
 import org.eclipse.linuxtools.ctf.core.event.types.VariantDefinition;
 import org.eclipse.linuxtools.ctf.core.tests.TestParams;
+import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -77,9 +78,11 @@ public class VariantDeclarationTest {
     /**
      * Run the VariantDefinition createDefinition(DefinitionScope,String) method
      * test.
+     * 
+     * @throws CTFReaderException 
      */
     @Test
-    public void testCreateDefinition() {
+    public void testCreateDefinition() throws CTFReaderException {
         fixture.setTag(""); //$NON-NLS-1$
         IDefinitionScope definitionScope = createDefinitionScope();
         String fieldName = ""; //$NON-NLS-1$
@@ -89,7 +92,7 @@ public class VariantDeclarationTest {
         assertNotNull(result);
     }
 
-    private static IDefinitionScope createDefinitionScope() {
+    private static IDefinitionScope createDefinitionScope() throws CTFReaderException {
         VariantDeclaration declaration = new VariantDeclaration();
         declaration.setTag(""); //$NON-NLS-1$
         VariantDeclaration variantDeclaration = new VariantDeclaration();
index b145b2cf2537120e27ee6f3eea59a06cca2dd200..d03bbfdbfe3be5230b0959ce8ba86a7ee1e3590e 100644 (file)
@@ -21,6 +21,7 @@ import org.eclipse.linuxtools.ctf.core.event.types.StructDefinition;
 import org.eclipse.linuxtools.ctf.core.event.types.VariantDeclaration;
 import org.eclipse.linuxtools.ctf.core.event.types.VariantDefinition;
 import org.eclipse.linuxtools.ctf.core.tests.TestParams;
+import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -50,9 +51,11 @@ public class VariantDefinitionTest {
      * Perform pre-test initialization.
      * 
      * Not sure it needs to be that complicated, oh well...
+     * 
+     * @throws CTFReaderException 
      */
     @Before
-    public void setUp() {
+    public void setUp() throws CTFReaderException {
         VariantDeclaration vDecl1, vDecl2, vDecl3;
         VariantDefinition vDef1, vDef2;
         StructDefinition sDef1, sDef2;
@@ -90,9 +93,11 @@ public class VariantDefinitionTest {
 
     /**
      * Run the VariantDefinition(VariantDeclaration,DefinitionScope,String)
+     * 
+     * @throws CTFReaderException 
      */
     @Test
-    public void testVariantDefinition() {
+    public void testVariantDefinition() throws CTFReaderException {
         VariantDeclaration declaration = new VariantDeclaration();
         declaration.setTag(""); //$NON-NLS-1$
         VariantDeclaration variantDeclaration = new VariantDeclaration();
@@ -271,9 +276,11 @@ public class VariantDefinitionTest {
 
     /**
      * Run the void setTagDefinition(EnumDefinition) method test.
+     * 
+     * @throws CTFReaderException 
      */
     @Test
-    public void testSetTagDefinition() {
+    public void testSetTagDefinition() throws CTFReaderException {
         VariantDeclaration vDecl;
         VariantDefinition vDef;
         StructDefinition structDef;
index 66a74fc089e1cd1febf1cb7a0f862e9fd87d72f3..051fb407930bc583b6ea44502a593b7dfd5dad1e 100644 (file)
@@ -702,8 +702,8 @@ public class IOStructGen {
                 throw new ParseException("fields expects a type specifier"); //$NON-NLS-1$
             }
 
-            IDeclaration fieldsDecl = parseTypeSpecifierList(typeSpecifier,
-                    null);
+            IDeclaration fieldsDecl;
+            fieldsDecl = parseTypeSpecifierList(typeSpecifier, null);
 
             if (!(fieldsDecl instanceof StructDeclaration)) {
                 throw new ParseException("fields expects a struct"); //$NON-NLS-1$
This page took 0.052563 seconds and 5 git commands to generate.