From 54a7a54c8d5652fc7fa44e73fc95ade990b0db47 Mon Sep 17 00:00:00 2001 From: Francois Chouinard Date: Wed, 25 Jul 2012 14:28:34 -0400 Subject: [PATCH] Fix another pile of Javadoc warnings Change-Id: I324c129736499c3cc4892898f9a0121e47fb7ac7 Signed-off-by: Francois Chouinard --- .../tmf/core/tests/AllTmfCoreTests.java | 3 + .../tmf/core/tests/TmfCorePluginTest.java | 16 +- .../tmf/core/tests/TmfCoreTestPlugin.java | 9 +- .../tmf/core/tests/component/AllTests.java | 9 + .../tests/component/TmfEventProviderTest.java | 32 ++- .../component/TmfProviderManagerTest.java | 40 ++- .../CtfTmfLightweightContextTest.java | 4 +- .../tmf/core/tests/event/AllTests.java | 7 +- .../core/tests/event/TmfEventFieldTest.java | 92 ++++++- .../tmf/core/tests/event/TmfEventTest.java | 125 +++++++-- .../tests/event/TmfEventTypeManagerTest.java | 48 +++- .../core/tests/event/TmfEventTypeTest.java | 76 ++++-- .../tests/event/TmfSimpleTimestampTest.java | 151 +++++++---- .../core/tests/event/TmfTimeRangeTest.java | 107 ++++++-- .../core/tests/event/TmfTimestampTest.java | 197 +++++++++++--- .../tmf/core/tests/request/AllTests.java | 9 + .../request/TmfCoalescedDataRequestTest.java | 19 +- .../request/TmfCoalescedEventRequestTest.java | 31 ++- .../tests/request/TmfDataRequestTest.java | 15 +- .../tests/request/TmfEventRequestTest.java | 17 +- .../tests/statesystem/VerifyHistoryFile.java | 2 +- .../tmf/core/tests/trace/AllTests.java | 7 +- .../tests/trace/TmfCheckpointIndexTest.java | 13 +- .../core/tests/trace/TmfCheckpointTest.java | 20 +- .../tmf/core/tests/trace/TmfContextTest.java | 14 +- .../TmfExperimentCheckpointIndexTest.java | 13 +- .../core/tests/trace/TmfExperimentTest.java | 73 +++--- .../tmf/core/tests/trace/TmfLocationTest.java | 59 +++-- .../trace/TmfMultiTraceExperimentTest.java | 59 +++-- .../tmf/core/tests/trace/TmfTraceTest.java | 120 +++++---- .../tmf/core/tests/uml2sd/AllTests.java | 9 + .../TmfAsyncSequenceDiagramEventTest.java | 8 +- .../TmfSyncSequenceDiagramEventTest.java | 8 +- .../tmf/core/tests/util/AllTests.java | 9 + .../core/tests/util/TmfFixedArrayTest.java | 246 +++++++++--------- .../tests/stubs/component/TmfClientStub.java | 3 +- .../stubs/component/TmfDataProviderStub.java | 6 +- .../stubs/component/TmfEventProviderStub.java | 6 +- .../TmfSyntheticEventProviderStub.java | 18 +- .../tests/stubs/event/TmfEventTypeStub.java | 6 +- .../stubs/event/TmfSyntheticEventStub.java | 5 +- .../tests/stubs/trace/TmfEventParserStub.java | 19 +- .../tests/stubs/trace/TmfExperimentStub.java | 1 + .../tmf/tests/stubs/trace/TmfIndexerStub.java | 5 +- .../tmf/tests/stubs/trace/TmfTraceStub.java | 2 +- 45 files changed, 1170 insertions(+), 568 deletions(-) diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/AllTmfCoreTests.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/AllTmfCoreTests.java index c81571122e..3708617565 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/AllTmfCoreTests.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/AllTmfCoreTests.java @@ -22,6 +22,9 @@ import junit.framework.TestSuite; */ public class AllTmfCoreTests { + /** + * @return the TMF Core test suite + */ public static Test suite() { TestSuite suite = new TestSuite(AllTmfCoreTests.class.getName()); //$JUnit-BEGIN$ diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/TmfCorePluginTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/TmfCorePluginTest.java index bd6d76e7a7..180c913294 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/TmfCorePluginTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/TmfCorePluginTest.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2010 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -30,7 +30,7 @@ public class TmfCorePluginTest extends TestCase { // Plug-in instantiation static final Activator fPlugin = new Activator(); - + // ------------------------------------------------------------------------ // Housekeping // ------------------------------------------------------------------------ @@ -56,11 +56,17 @@ public class TmfCorePluginTest extends TestCase { // Test cases // ------------------------------------------------------------------------ - public void testTmfCorePluginId() throws Exception { + /** + * + */ + public void testTmfCorePluginId() { assertEquals("Plugin ID", "org.eclipse.linuxtools.tmf.core", Activator.PLUGIN_ID); } - public void testGetDefault() throws Exception { + /** + * + */ + public void testGetDefault() { Activator plugin = Activator.getDefault(); assertEquals("getDefault()", plugin, fPlugin); } diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/TmfCoreTestPlugin.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/TmfCoreTestPlugin.java index 257dcc684f..59490775c8 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/TmfCoreTestPlugin.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/TmfCoreTestPlugin.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2010 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -29,11 +29,12 @@ public class TmfCoreTestPlugin extends Plugin { // ------------------------------------------------------------------------ // The plug-in ID - public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.tests"; + @SuppressWarnings("javadoc") + public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.tests"; // The shared instance private static TmfCoreTestPlugin fPlugin; - + // ------------------------------------------------------------------------ // Constructors // ------------------------------------------------------------------------ diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/component/AllTests.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/component/AllTests.java index e14d8da389..40eea64bc1 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/component/AllTests.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/component/AllTests.java @@ -3,8 +3,17 @@ package org.eclipse.linuxtools.tmf.core.tests.component; import junit.framework.Test; import junit.framework.TestSuite; +/** + * AllTests + *

+ * Implement me. Please. + *

+ */ public class AllTests { + /** + * @return the TMF Core Component test suite + */ public static Test suite() { TestSuite suite = new TestSuite(AllTests.class.getName()); //$JUnit-BEGIN$ diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/component/TmfEventProviderTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/component/TmfEventProviderTest.java index bc4dd1291c..273f3d0e2c 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/component/TmfEventProviderTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/component/TmfEventProviderTest.java @@ -40,6 +40,9 @@ public class TmfEventProviderTest extends TestCase { TmfEventProviderStub fEventProvider; TmfSyntheticEventProviderStub fSyntheticEventProvider; + /** + * @param name the test anme + */ public TmfEventProviderTest(String name) { super(name); } @@ -62,7 +65,9 @@ public class TmfEventProviderTest extends TestCase { // getProviders (more a sanity check than a test) // ------------------------------------------------------------------------ - @SuppressWarnings("unchecked") + /** + * + */ public void testGetProviders() { // There should be 2 TmfEvent providers: a TmfTraceStub and a @@ -85,7 +90,9 @@ public class TmfEventProviderTest extends TestCase { // getSyntheticEvent // ------------------------------------------------------------------------ - @SuppressWarnings("unchecked") + /** + * + */ public void testGetPlainEvents() { final int BLOCK_SIZE = 100; @@ -123,7 +130,9 @@ public class TmfEventProviderTest extends TestCase { } } - @SuppressWarnings("unchecked") + /** + * + */ public void testCancelRequests() { final int BLOCK_SIZE = 100; @@ -232,7 +241,6 @@ public class TmfEventProviderTest extends TestCase { } } - @SuppressWarnings("unchecked") private static void getSyntheticData(final TmfTimeRange range, final int nbEvents, final int blockSize) throws InterruptedException { @@ -269,6 +277,9 @@ public class TmfEventProviderTest extends TestCase { } } + /** + * + */ // The following tests are the same but for the size of the requested blocks // with regards to the size of the TmfSyntheticEventProviderStub block public void testGetSyntheticEvents_EqualBlockSizes() { @@ -280,6 +291,9 @@ public class TmfEventProviderTest extends TestCase { } } + /** + * + */ public void testGetSyntheticEvents_SmallerBlock() { TmfTimeRange range = new TmfTimeRange(TmfTimestamp.BIG_BANG, TmfTimestamp.BIG_CRUNCH); try { @@ -289,6 +303,9 @@ public class TmfEventProviderTest extends TestCase { } } + /** + * + */ public void testGetSyntheticEvents_LargerBlock() { TmfTimeRange range = new TmfTimeRange(TmfTimestamp.BIG_BANG, TmfTimestamp.BIG_CRUNCH); try { @@ -298,6 +315,9 @@ public class TmfEventProviderTest extends TestCase { } } + /** + * + */ public void testGetSyntheticEvents_TimeRange() { TmfTimestamp start = new TmfTimestamp(1, (byte) -3, 0); TmfTimestamp end = new TmfTimestamp(1000, (byte) -3, 0); @@ -337,7 +357,9 @@ public class TmfEventProviderTest extends TestCase { // getProviders (more a sanity check than a test) // ------------------------------------------------------------------------ - @SuppressWarnings("unchecked") + /** + * + */ public void testGetProviders2() { // There should be 2 TmfEvent providers: a TmfTraceStub and a diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/component/TmfProviderManagerTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/component/TmfProviderManagerTest.java index d78bf57401..d38657bc90 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/component/TmfProviderManagerTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/component/TmfProviderManagerTest.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2010 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -28,6 +28,9 @@ import org.eclipse.linuxtools.tmf.core.trace.ITmfContext; @SuppressWarnings({ "nls" }) public class TmfProviderManagerTest extends TestCase { + /** + * @param name the test anme + */ public TmfProviderManagerTest(String name) { super(name); } @@ -45,8 +48,8 @@ public class TmfProviderManagerTest extends TestCase { // ------------------------------------------------------------------------ // Dummy Providers // ------------------------------------------------------------------------ - - public class TestProvider1 extends TmfDataProvider { + + private class TestProvider1 extends TmfDataProvider { public TestProvider1(Class type) { super("TestProvider1", type); } @@ -64,7 +67,7 @@ public class TmfProviderManagerTest extends TestCase { } } - public class TestProvider2 extends TmfDataProvider { + private class TestProvider2 extends TmfDataProvider { public TestProvider2(Class type) { super("TestProvider2", type); } @@ -82,13 +85,14 @@ public class TmfProviderManagerTest extends TestCase { } } - public class TmfEvent3 extends TmfEvent { - public TmfEvent3(TmfEvent3 other) { + private class TmfEvent3 extends TmfEvent { + @SuppressWarnings("unused") + public TmfEvent3(TmfEvent3 other) { super(other); } } - public class TestProvider3 extends TmfDataProvider { + private class TestProvider3 extends TmfDataProvider { public TestProvider3(Class type) { super("TestProvider3", type); } @@ -110,7 +114,9 @@ public class TmfProviderManagerTest extends TestCase { // register/dispose // ------------------------------------------------------------------------ - @SuppressWarnings("unchecked") + /** + * + */ public void testRegister_0() { TmfDataProvider[] providers = (TmfDataProvider[]) TmfProviderManager.getProviders(TmfEvent.class); assertEquals("getProviders", 0, providers.length); @@ -119,7 +125,9 @@ public class TmfProviderManagerTest extends TestCase { assertEquals("getProviders", 0, providers.length); } - @SuppressWarnings("unchecked") + /** + * + */ public void testRegister_Unregister_1() { // Register a single provider @@ -143,7 +151,9 @@ public class TmfProviderManagerTest extends TestCase { assertEquals("getProviders", 0, providers.length); } - @SuppressWarnings("unchecked") + /** + * + */ public void testRegister_Unregister_2() { // Register 2 providers, same data type @@ -196,7 +206,9 @@ public class TmfProviderManagerTest extends TestCase { assertEquals("getProviders", 0, providers.length); } - @SuppressWarnings("unchecked") + /** + * + */ public void testRegister_Unregister_3() { // Register 3 providers, mixed data types @@ -291,7 +303,9 @@ public class TmfProviderManagerTest extends TestCase { assertEquals("getProviders", 0, providers.length); } - @SuppressWarnings("unchecked") + /** + * + */ public void testGetProvider() { // Register 3 providers, mixed data types diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/CtfTmfLightweightContextTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/CtfTmfLightweightContextTest.java index 6dfaa9df18..9e346f7ec6 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/CtfTmfLightweightContextTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/CtfTmfLightweightContextTest.java @@ -78,13 +78,11 @@ public class CtfTmfLightweightContextTest { * Context fuzzer. Use an amount of contexts greater than the size of the * iterator cache and have them access the trace in parallel. * - * @throws TmfTraceException - * Would fail the test * @throws InterruptedException * Would fail the test */ @Test - public void testTooManyContexts() throws TmfTraceException, InterruptedException { + public void testTooManyContexts() throws InterruptedException { final int lwcCount = 101; double increment = (end - begin) / lwcCount; final ArrayList vals = new ArrayList(); diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/AllTests.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/AllTests.java index ebe265af8c..6e10a924c6 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/AllTests.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/AllTests.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2012 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: * Francois Chouinard - Initial API and implementation * Francois Chouinard - Adjusted for new Event Model @@ -24,6 +24,9 @@ import org.eclipse.linuxtools.internal.tmf.core.Activator; @SuppressWarnings({ "nls" }) public class AllTests { + /** + * @return the CTF COre Event test suite + */ public static Test suite() { final TestSuite suite = new TestSuite("Test suite for " + Activator.PLUGIN_ID + ".event"); //$NON-NLS-1$; //$JUnit-BEGIN$ diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventFieldTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventFieldTest.java index 9c408e5299..7d8efc81d0 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventFieldTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventFieldTest.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2012 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: * Francois Chouinard - Initial API and implementation * Francois Chouinard - Adjusted for new Event Model @@ -76,6 +76,9 @@ public class TmfEventFieldTest extends TestCase { // Constructors // ------------------------------------------------------------------------ + /** + * + */ public void testTerminalStructConstructor() { assertSame("getName", fFieldName1, fStructTerminalField1.getName()); assertNull("getValue", fStructTerminalField1.getValue()); @@ -87,6 +90,9 @@ public class TmfEventFieldTest extends TestCase { assertNull("getFieldName", fStructTerminalField1.getFieldName(0)); } + /** + * + */ public void testNonTerminalStructConstructor() { assertSame("getName", fStructRootFieldName, fStructRootField.getName()); assertNull("getValue", fStructRootField.getValue()); @@ -106,6 +112,9 @@ public class TmfEventFieldTest extends TestCase { assertNull("getFieldName", fStructRootField.getFieldName(names.length)); } + /** + * + */ public void testTerminalConstructor() { assertSame("getName", fFieldName1, fField1.getName()); assertSame("getValue", fValue1, fField1.getValue()); @@ -124,6 +133,9 @@ public class TmfEventFieldTest extends TestCase { assertNull("getFieldName", fField2.getFieldName(0)); } + /** + * + */ public void testNonTerminalConstructor() { assertSame("getName", fRootFieldName, fRootField.getName()); assertNull("getValue", fRootField.getValue()); @@ -143,6 +155,9 @@ public class TmfEventFieldTest extends TestCase { assertNull("getFieldName", fRootField.getFieldName(names.length)); } + /** + * + */ public void testConstructorBadArg() { try { new TmfEventField(null, fValue1, null); @@ -151,6 +166,9 @@ public class TmfEventFieldTest extends TestCase { } } + /** + * + */ public void testTerminalCopyConstructor() { final TmfEventField copy = new TmfEventField(fField1); assertSame("getName", fFieldName1, copy.getName()); @@ -162,6 +180,9 @@ public class TmfEventFieldTest extends TestCase { assertNull("getFieldName", copy.getFieldName(0)); } + /** + * + */ public void testNonTerminalCopyConstructor() { assertSame("getName", fRootFieldName, fRootField.getName()); assertNull("getValue", fRootField.getValue()); @@ -180,6 +201,9 @@ public class TmfEventFieldTest extends TestCase { assertNull("getFieldName", fRootField.getFieldName(names.length)); } + /** + * + */ public void testCopyConstructorBadArg() { try { new TmfEventField(null); @@ -208,6 +232,9 @@ public class TmfEventFieldTest extends TestCase { } } + /** + * + */ public void testSetValue() { final TmfEventField field = new TmfEventField(fFieldName1, fValue1, null); @@ -223,7 +250,10 @@ public class TmfEventFieldTest extends TestCase { // clone // ------------------------------------------------------------------------ - public void testFieldClone() throws Exception { + /** + * + */ + public void testFieldClone() { TmfEventField clone = fField1.clone(); assertTrue("clone", fField1.clone().equals(fField1)); assertTrue("clone", clone.clone().equals(clone)); @@ -237,7 +267,10 @@ public class TmfEventFieldTest extends TestCase { assertEquals("clone", clone, fRootField); } - public void testStructFieldClone() throws Exception { + /** + * + */ + public void testStructFieldClone() { TmfEventField clone = fStructTerminalField1.clone(); assertTrue("clone", fStructTerminalField1.clone().equals(fStructTerminalField1)); assertTrue("clone", clone.clone().equals(clone)); @@ -255,7 +288,10 @@ public class TmfEventFieldTest extends TestCase { // hashCode // ------------------------------------------------------------------------ - public void testHashCode() throws Exception { + /** + * + */ + public void testHashCode() { TmfEventField copy = new TmfEventField(fField1); assertTrue("hashCode", fField1.hashCode() == copy.hashCode()); assertTrue("hashCode", fField1.hashCode() != fField2.hashCode()); @@ -269,7 +305,10 @@ public class TmfEventFieldTest extends TestCase { // equals // ------------------------------------------------------------------------ - public void testEqualsReflexivity() throws Exception { + /** + * + */ + public void testEqualsReflexivity() { assertTrue("equals", fField1.equals(fField1)); assertTrue("equals", fField2.equals(fField2)); @@ -283,7 +322,10 @@ public class TmfEventFieldTest extends TestCase { assertFalse("equals", fStructTerminalField2.equals(fStructTerminalField1)); } - public void testEqualsSymmetry() throws Exception { + /** + * + */ + public void testEqualsSymmetry() { final TmfEventField copy0 = new TmfEventField(fField1); assertTrue("equals", fField1.equals(copy0)); assertTrue("equals", copy0.equals(fField1)); @@ -293,7 +335,10 @@ public class TmfEventFieldTest extends TestCase { assertTrue("equals", copy3.equals(fField2)); } - public void testEqualsTransivity() throws Exception { + /** + * + */ + public void testEqualsTransivity() { TmfEventField copy1 = new TmfEventField(fField1); TmfEventField copy2 = new TmfEventField(copy1); assertTrue("equals", fField1.equals(copy1)); @@ -307,7 +352,10 @@ public class TmfEventFieldTest extends TestCase { assertTrue("equals", fField2.equals(copy2)); } - public void testEquals() throws Exception { + /** + * + */ + public void testEquals() { assertTrue("equals", fStructTerminalField1.equals(fStructTerminalField3)); assertTrue("equals", fStructTerminalField3.equals(fStructTerminalField1)); @@ -315,17 +363,26 @@ public class TmfEventFieldTest extends TestCase { assertFalse("equals", fField3.equals(fStructTerminalField1)); } - public void testEqualsNull() throws Exception { + /** + * + */ + public void testEqualsNull() { assertFalse("equals", fField1.equals(null)); assertFalse("equals", fField2.equals(null)); } - public void testNonEqualClasses() throws Exception { + /** + * + */ + public void testNonEqualClasses() { assertFalse("equals", fField1.equals(fStructTerminalField1)); assertFalse("equals", fField1.equals(fValue1)); } - public void testNonEqualValues() throws Exception { + /** + * + */ + public void testNonEqualValues() { final TmfEventField copy1 = new TmfEventField(fFieldName1, fValue1); TmfEventField copy2 = new TmfEventField(fFieldName1, fValue1); assertTrue("equals", copy1.equals(copy2)); @@ -340,7 +397,10 @@ public class TmfEventFieldTest extends TestCase { assertFalse("equals", copy2.equals(copy1)); } - public void testNonEquals() throws Exception { + /** + * + */ + public void testNonEquals() { assertFalse("equals", fField1.equals(fField2)); assertFalse("equals", fField2.equals(fField1)); @@ -351,6 +411,9 @@ public class TmfEventFieldTest extends TestCase { // toString // ------------------------------------------------------------------------ + /** + * + */ public void testToString() { final String expected1 = "TmfEventField [fFieldId=" + fFieldName1 + ", fValue=" + fValue1.toString() + "]"; TmfEventField field = new TmfEventField(fFieldName1, fValue1, null); @@ -365,6 +428,9 @@ public class TmfEventFieldTest extends TestCase { // makeRoot // ------------------------------------------------------------------------ + /** + * + */ public void testMakeRoot() { ITmfEventField root = TmfEventField.makeRoot(fStructFieldNames); String[] names = root.getFieldNames(); diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventTest.java index 139f1361c4..3699a6fa63 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventTest.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2012 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: * Francois Chouinard - Initial API and implementation * Francois Chouinard - Adjusted for new Event Model @@ -128,6 +128,9 @@ public class TmfEventTest extends TestCase { // Constructors // ------------------------------------------------------------------------ + /** + * + */ public void testDefaultConstructor() { final ITmfEvent event = new TmfEvent(); assertNull("getTrace", event.getTrace()); @@ -139,6 +142,9 @@ public class TmfEventTest extends TestCase { assertNull("getReference", event.getReference()); } + /** + * + */ public void testFullConstructor() { assertNull("getTrace", fEvent1.getTrace()); assertEquals("getRank", 0, fEvent1.getRank()); @@ -157,6 +163,9 @@ public class TmfEventTest extends TestCase { assertEquals("getReference", fReference2, fEvent2.getReference()); } + /** + * + */ public void testNoRankConstructor() { final TmfEvent event = new TmfEvent(null, fTimestamp1, fSource, fType, fContent1, fReference1); assertNull("getTrace", event.getTrace()); @@ -168,6 +177,9 @@ public class TmfEventTest extends TestCase { assertEquals("getReference", fReference1, event.getReference()); } + /** + * + */ public void testConstructorWithTrace() { final ITmfTrace trace = openTrace(); final TmfEvent event = new TmfEvent(trace, 0, fTimestamp1, fSource, fType, fContent1, fReference1); @@ -181,6 +193,9 @@ public class TmfEventTest extends TestCase { trace.dispose(); } + /** + * + */ public void testTmfEventCopy() { final TmfEvent event = new TmfEvent(fEvent1); assertNull("getTrace", event.getTrace()); @@ -192,7 +207,10 @@ public class TmfEventTest extends TestCase { assertEquals("getReference", fReference1, event.getReference()); } - public void testEventCopy2() throws Exception { + /** + * + */ + public void testEventCopy2() { try { new TmfEvent(null); fail("null copy"); @@ -264,6 +282,9 @@ public class TmfEventTest extends TestCase { return trace; } + /** + * + */ public void testSetTrace() { final ITmfTrace trace = setupTrace(); assertNotNull(trace); @@ -280,6 +301,9 @@ public class TmfEventTest extends TestCase { trace.dispose(); } + /** + * + */ public void testSetRank() { final TestEvent event = new TestEvent(fEvent1); assertEquals("setRank", 0, event.getRank()); @@ -294,6 +318,9 @@ public class TmfEventTest extends TestCase { assertEquals("setRank", 0, event.getRank()); } + /** + * + */ public void testSetTimestamp() { final TestEvent event = new TestEvent(fEvent1); assertEquals("setTimestamp", fTimestamp1, event.getTimestamp()); @@ -308,6 +335,9 @@ public class TmfEventTest extends TestCase { assertEquals("setTimestamp", fTimestamp1, event.getTimestamp()); } + /** + * + */ public void testSetSource() { final TestEvent event = new TestEvent(fEvent1); assertEquals("setSource", fSource, event.getSource()); @@ -323,6 +353,9 @@ public class TmfEventTest extends TestCase { assertEquals("setContent", fSource, event.getSource()); } + /** + * + */ public void testSetType() { final TestEvent event = new TestEvent(fEvent1); assertEquals("setType", fType, event.getType()); @@ -341,6 +374,9 @@ public class TmfEventTest extends TestCase { assertEquals("setType", fType, event.getType()); } + /** + * + */ public void testSetContent() { final TestEvent event = new TestEvent(fEvent1); assertEquals("setContent", fContent1, event.getContent()); @@ -355,6 +391,9 @@ public class TmfEventTest extends TestCase { assertEquals("setContent", fContent1, event.getContent()); } + /** + * + */ public void testSetReference() { final TestEvent event = new TestEvent(fEvent1); assertEquals("setReference", fReference1, event.getReference()); @@ -373,7 +412,7 @@ public class TmfEventTest extends TestCase { // clone // ------------------------------------------------------------------------ - public static class MyEvent extends TmfEvent { + private static class MyEvent extends TmfEvent { @Override public boolean equals(final Object other) { @@ -385,7 +424,10 @@ public class TmfEventTest extends TestCase { } } - public void testClone1() throws Exception { + /** + * + */ + public void testClone1() { final ITmfEvent clone = fEvent1.clone(); assertTrue("clone", fEvent1.clone().equals(fEvent1)); @@ -395,7 +437,10 @@ public class TmfEventTest extends TestCase { assertEquals("clone", clone, fEvent1); } - public void testClone2() throws Exception { + /** + * + */ + public void testClone2() { final TmfEvent event = new MyEvent(); final TmfEvent clone = event.clone(); @@ -410,7 +455,10 @@ public class TmfEventTest extends TestCase { // hashCode // ------------------------------------------------------------------------ - public void testHashCode() throws Exception { + /** + * + */ + public void testHashCode() { TmfEvent event1 = new TmfEvent(); TmfEvent event2 = new TmfEvent(); @@ -435,7 +483,10 @@ public class TmfEventTest extends TestCase { // equals // ------------------------------------------------------------------------ - public void testEqualsReflexivity() throws Exception { + /** + * + */ + public void testEqualsReflexivity() { assertTrue("equals", fEvent1.equals(fEvent1)); assertTrue("equals", fEvent2.equals(fEvent2)); @@ -443,7 +494,10 @@ public class TmfEventTest extends TestCase { assertFalse("equals", fEvent2.equals(fEvent1)); } - public void testEqualsSymmetry() throws Exception { + /** + * + */ + public void testEqualsSymmetry() { final TmfEvent event1 = new TmfEvent(fEvent1); final TmfEvent event2 = new TmfEvent(fEvent2); @@ -454,7 +508,10 @@ public class TmfEventTest extends TestCase { assertTrue("equals", fEvent2.equals(event2)); } - public void testEqualsTransivity() throws Exception { + /** + * + */ + public void testEqualsTransivity() { final TmfEvent event1 = new TmfEvent(fEvent1); final TmfEvent event2 = new TmfEvent(fEvent1); final TmfEvent event3 = new TmfEvent(fEvent1); @@ -464,17 +521,26 @@ public class TmfEventTest extends TestCase { assertTrue("equals", event1.equals(event3)); } - public void testEqualsNull() throws Exception { + /** + * + */ + public void testEqualsNull() { assertFalse("equals", fEvent1.equals(null)); assertFalse("equals", fEvent2.equals(null)); } - public void testNonEqualClasses() throws Exception { + /** + * + */ + public void testNonEqualClasses() { assertFalse("equals", fEvent1.equals(fEvent1.getType())); assertFalse("equals", fEvent1.equals(null)); } - public void testNonEqualTraces() throws Exception { + /** + * + */ + public void testNonEqualTraces() { final ITmfTrace trace1 = openTrace(); final ITmfTrace trace2 = openTrace(); @@ -495,7 +561,10 @@ public class TmfEventTest extends TestCase { trace2.dispose(); } - public void testNonEqualRanks() throws Exception { + /** + * + */ + public void testNonEqualRanks() { final TmfEvent event1 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1); TmfEvent event2 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1); assertTrue("equals", event1.equals(event2)); @@ -506,7 +575,10 @@ public class TmfEventTest extends TestCase { assertFalse("equals", event2.equals(event1)); } - public void testNonEqualTimestamps() throws Exception { + /** + * + */ + public void testNonEqualTimestamps() { final TmfEvent event1 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1); TmfEvent event2 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1); assertTrue("equals", event1.equals(event2)); @@ -521,7 +593,10 @@ public class TmfEventTest extends TestCase { assertFalse("equals", event2.equals(event1)); } - public void testNonEqualSources() throws Exception { + /** + * + */ + public void testNonEqualSources() { final TmfEvent event1 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1); TmfEvent event2 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1); assertTrue("equals", event1.equals(event2)); @@ -536,7 +611,10 @@ public class TmfEventTest extends TestCase { assertFalse("equals", event2.equals(event1)); } - public void testNonEqualTypes() throws Exception { + /** + * + */ + public void testNonEqualTypes() { final TmfEvent event1 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1); TmfEvent event2 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1); assertTrue("equals", event1.equals(event2)); @@ -555,7 +633,10 @@ public class TmfEventTest extends TestCase { assertFalse("equals", event2.equals(event1)); } - public void testNonEqualContents() throws Exception { + /** + * + */ + public void testNonEqualContents() { final TmfEvent event1 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1); TmfEvent event2 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1); assertTrue("equals", event1.equals(event2)); @@ -570,7 +651,10 @@ public class TmfEventTest extends TestCase { assertFalse("equals", event2.equals(event1)); } - public void testNonEqualReferences() throws Exception { + /** + * + */ + public void testNonEqualReferences() { final TmfEvent event1 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1); TmfEvent event2 = new TmfEvent(null, 0, fTimestamp1, fSource, fType, fContent1, fReference1); assertTrue("equals", event1.equals(event2)); @@ -589,6 +673,9 @@ public class TmfEventTest extends TestCase { // toString // ------------------------------------------------------------------------ + /** + * + */ public void testToString() { final String expected1 = "TmfEvent [fTimestamp=" + fTimestamp1 + ", fTrace=null, fRank=0, fSource=" + fSource + ", fType=" + fType + ", fContent=" + fContent1 + ", fReference=" + fReference1 + "]"; diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventTypeManagerTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventTypeManagerTest.java index 5463178f92..b5a8da94c9 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventTypeManagerTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventTypeManagerTest.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2012 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -78,6 +78,9 @@ public class TmfEventTypeManagerTest extends TestCase { // Getters // ------------------------------------------------------------------------ + /** + * + */ public void testGetContexts() { fInstance.clear(); fInstance.add(fContext1, fType0); @@ -92,6 +95,9 @@ public class TmfEventTypeManagerTest extends TestCase { assertEquals("getContexts", fContext2, contexts[1]); } + /** + * + */ public void testGetTypes() { fInstance.clear(); fInstance.add(fContext1, fType0); @@ -101,23 +107,26 @@ public class TmfEventTypeManagerTest extends TestCase { ITmfEventType[] types = fInstance.getTypes(fContext1); assertEquals("getTypes", 2, types.length); - if (fType0 == types[0]) + if (fType0 == types[0]) { assertSame("getTypes", fType1, types[1]); - else { + } else { assertSame("getTypes", fType0, types[1]); assertSame("getTypes", fType1, types[0]); } types = fInstance.getTypes(fContext2); assertEquals("getTypes", 2, types.length); - if (fType2 == types[0]) + if (fType2 == types[0]) { assertSame("getTypes", fType3, types[1]); - else { + } else { assertSame("getTypes", fType2, types[1]); assertSame("getTypes", fType3, types[0]); } } + /** + * + */ public void testGetType() { fInstance.clear(); fInstance.add(fContext1, fType0); @@ -148,6 +157,9 @@ public class TmfEventTypeManagerTest extends TestCase { // Operations // ------------------------------------------------------------------------ + /** + * + */ public void testClear() { fInstance.clear(); assertEquals("clear", 0, fInstance.getContexts().length); @@ -156,6 +168,9 @@ public class TmfEventTypeManagerTest extends TestCase { assertEquals("clear", "TmfEventTypeManager [fEventTypes={}]", fInstance.toString()); } + /** + * + */ public void testClearContext() { fInstance.clear(); fInstance.add(fContext1, fType0); @@ -179,14 +194,17 @@ public class TmfEventTypeManagerTest extends TestCase { types = fInstance.getTypes(fContext2); assertEquals("clear context", 2, types.length); - if (fType2 == types[0]) + if (fType2 == types[0]) { assertSame("clear context", fType3, types[1]); - else { + } else { assertSame("clear context", fType2, types[1]); assertSame("clear context", fType3, types[0]); } } + /** + * + */ public void testBasicAdd() { fInstance.clear(); fInstance.add(fContext1, fType0); @@ -206,6 +224,9 @@ public class TmfEventTypeManagerTest extends TestCase { assertNotSame("add", fType0, type); } + /** + * + */ public void testAdd() { fInstance.clear(); fInstance.add(fContext1, fType0); @@ -221,18 +242,18 @@ public class TmfEventTypeManagerTest extends TestCase { ITmfEventType[] types = fInstance.getTypes(fContext1); assertEquals("add", 2, types.length); - if (fType0 == types[0]) + if (fType0 == types[0]) { assertSame("add", fType1, types[1]); - else { + } else { assertSame("add", fType0, types[1]); assertSame("add", fType1, types[0]); } types = fInstance.getTypes(fContext2); assertEquals("add", 2, types.length); - if (fType2 == types[0]) + if (fType2 == types[0]) { assertSame("add", fType3, types[1]); - else { + } else { assertSame("add", fType2, types[1]); assertSame("add", fType3, types[0]); } @@ -256,6 +277,9 @@ public class TmfEventTypeManagerTest extends TestCase { // Object // ------------------------------------------------------------------------ + /** + * + */ public void testToString() { fInstance.clear(); assertEquals("toString", "TmfEventTypeManager [fEventTypes={}]", fInstance.toString()); diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventTypeTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventTypeTest.java index 9eb1b1dfa9..b705f0cc65 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventTypeTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfEventTypeTest.java @@ -72,6 +72,9 @@ public class TmfEventTypeTest extends TestCase { // Constructors // ------------------------------------------------------------------------ + /** + * + */ public void testDefaultConstructor() { final ITmfEventType type = new TmfEventType(); assertEquals("getContext", ITmfEventType.DEFAULT_CONTEXT_ID, type.getContext()); @@ -81,6 +84,9 @@ public class TmfEventTypeTest extends TestCase { assertNull("getFieldName", type.getFieldName(0)); } + /** + * + */ public void testFullConstructor() { final ITmfEventType type0 = new TmfEventType(fContext1, fTypeId1, TmfEventField.makeRoot(fLabels0)); assertEquals("getContext", fContext1, type0.getContext()); @@ -116,6 +122,9 @@ public class TmfEventTypeTest extends TestCase { assertNull("getFieldName", type2.getFieldName(labels2.length)); } + /** + * + */ public void testConstructorCornerCases() { try { new TmfEventType(null, fTypeId1, null); @@ -130,6 +139,9 @@ public class TmfEventTypeTest extends TestCase { } } + /** + * + */ public void testCopyConstructor() { final TmfEventType original = new TmfEventType(fContext1, fTypeId1, TmfEventField.makeRoot(fLabels1)); final TmfEventType copy = new TmfEventType(original); @@ -145,6 +157,9 @@ public class TmfEventTypeTest extends TestCase { assertNull("getFieldName", copy.getFieldName(labels1.length)); } + /** + * + */ public void testCopyConstructorCornerCases() { try { new TmfEventType(null); @@ -157,20 +172,10 @@ public class TmfEventTypeTest extends TestCase { // clone // ------------------------------------------------------------------------ - public static class MyEventType extends TmfEventType { - - @Override - public boolean equals(final Object other) { - return super.equals(other); - } - - @Override - public MyEventType clone() { - return (MyEventType) super.clone(); - } - } - - public void testClone() throws Exception { + /** + * + */ + public void testClone() { final ITmfEventType clone = fType1.clone(); assertTrue("clone", fType1.clone().equals(fType1)); @@ -180,7 +185,10 @@ public class TmfEventTypeTest extends TestCase { assertEquals("clone", fType1, clone); } - public void testClone2() throws Exception { + /** + * + */ + public void testClone2() { final ITmfEventType type = new TmfEventType(); final ITmfEventType clone = type.clone(); @@ -195,7 +203,10 @@ public class TmfEventTypeTest extends TestCase { // hashCode // ------------------------------------------------------------------------ - public void testHashCode() throws Exception { + /** + * + */ + public void testHashCode() { final TmfEventType copy1 = new TmfEventType(fType0); assertTrue("hashCode", fType0.hashCode() == copy1.hashCode()); @@ -206,7 +217,10 @@ public class TmfEventTypeTest extends TestCase { // equals // ------------------------------------------------------------------------ - public void testEqualsReflexivity() throws Exception { + /** + * + */ + public void testEqualsReflexivity() { assertTrue("equals", fType0.equals(fType0)); assertTrue("equals", fType3.equals(fType3)); @@ -214,7 +228,10 @@ public class TmfEventTypeTest extends TestCase { assertFalse("equals", fType3.equals(fType0)); } - public void testEqualsSymmetry() throws Exception { + /** + * + */ + public void testEqualsSymmetry() { final TmfEventType copy0 = new TmfEventType(fType0); assertTrue("equals", fType0.equals(copy0)); assertTrue("equals", copy0.equals(fType0)); @@ -228,7 +245,10 @@ public class TmfEventTypeTest extends TestCase { assertTrue("equals", copy2.equals(fType2)); } - public void testEqualsTransivity() throws Exception { + /** + * + */ + public void testEqualsTransivity() { TmfEventType copy1 = new TmfEventType(fType1); TmfEventType copy2 = new TmfEventType(copy1); assertTrue("equals", fType1.equals(copy1)); @@ -248,19 +268,28 @@ public class TmfEventTypeTest extends TestCase { assertTrue("equals", fType3.equals(copy2)); } - public void testEqualsNull() throws Exception { + /** + * + */ + public void testEqualsNull() { assertFalse("equals", fType0.equals(null)); assertFalse("equals", fType3.equals(null)); } - public void testNonEquals() throws Exception { + /** + * + */ + public void testNonEquals() { assertFalse("equals", fType0.equals(fType1)); assertFalse("equals", fType1.equals(fType2)); assertFalse("equals", fType2.equals(fType3)); assertFalse("equals", fType3.equals(fType0)); } - public void testNonEqualsClasses() throws Exception { + /** + * + */ + public void testNonEqualsClasses() { assertFalse("equals", fType1.equals(fLabels1)); } @@ -268,6 +297,9 @@ public class TmfEventTypeTest extends TestCase { // toString // ------------------------------------------------------------------------ + /** + * + */ public void testToString() { final String expected1 = "TmfEventType [fContext=" + ITmfEventType.DEFAULT_CONTEXT_ID + ", fTypeId=" + ITmfEventType.DEFAULT_TYPE_ID + "]"; diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfSimpleTimestampTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfSimpleTimestampTest.java index bb198b5650..dd87ab0198 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfSimpleTimestampTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfSimpleTimestampTest.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2012 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -57,19 +57,28 @@ public class TmfSimpleTimestampTest extends TestCase { // Constructors // ------------------------------------------------------------------------ - public void testDefaultConstructor() throws Exception { + /** + * + */ + public void testDefaultConstructor() { assertEquals("getValue", 0, ts0.getValue()); assertEquals("getscale", 0, ts0.getScale()); assertEquals("getPrecision", 0, ts0.getPrecision()); } - public void testFullConstructor() throws Exception { + /** + * + */ + public void testFullConstructor() { assertEquals("getValue", 12345, ts1.getValue()); assertEquals("getscale", 0, ts1.getScale()); assertEquals("getPrecision", 0, ts1.getPrecision()); } - public void testCopyConstructor() throws Exception { + /** + * + */ + public void testCopyConstructor() { final ITmfTimestamp copy = new TmfSimpleTimestamp(ts1); assertEquals("getValue", ts1.getValue(), copy.getValue()); @@ -81,7 +90,10 @@ public class TmfSimpleTimestampTest extends TestCase { assertEquals("getPrecision", 0, copy.getPrecision()); } - public void testCopyBadTimestamp() throws Exception { + /** + * + */ + public void testCopyBadTimestamp() { final ITmfTimestamp ts0a = new TmfTimestamp(0, 1, 0); final ITmfTimestamp ts0b = new TmfTimestamp(0, 0, 1); @@ -108,7 +120,7 @@ public class TmfSimpleTimestampTest extends TestCase { // clone // ------------------------------------------------------------------------ - public static class MyTimestamp extends TmfSimpleTimestamp { + private static class MyTimestamp extends TmfSimpleTimestamp { @Override public boolean equals(final Object other) { @@ -121,7 +133,10 @@ public class TmfSimpleTimestampTest extends TestCase { } } - public void testClone() throws Exception { + /** + * + */ + public void testClone() { final ITmfTimestamp clone = ts0.clone(); assertTrue("clone", ts0.clone().equals(ts0)); @@ -131,7 +146,10 @@ public class TmfSimpleTimestampTest extends TestCase { assertEquals("clone", ts0, clone); } - public void testClone2() throws Exception { + /** + * + */ + public void testClone2() { final MyTimestamp timestamp = new MyTimestamp(); final MyTimestamp clone = timestamp.clone(); @@ -146,7 +164,10 @@ public class TmfSimpleTimestampTest extends TestCase { // equals // ------------------------------------------------------------------------ - public void testEqualsReflexivity() throws Exception { + /** + * + */ + public void testEqualsReflexivity() { assertTrue("equals", ts0.equals(ts0)); assertTrue("equals", ts1.equals(ts1)); assertTrue("equals", ts2.equals(ts2)); @@ -161,7 +182,10 @@ public class TmfSimpleTimestampTest extends TestCase { assertTrue("equals", !ts2.equals(ts1)); } - public void testEqualsSymmetry() throws Exception { + /** + * + */ + public void testEqualsSymmetry() { final ITmfTimestamp ts0copy = new TmfSimpleTimestamp(ts0); assertTrue("equals", ts0.equals(ts0copy)); assertTrue("equals", ts0copy.equals(ts0)); @@ -171,7 +195,10 @@ public class TmfSimpleTimestampTest extends TestCase { assertTrue("equals", ts1copy.equals(ts1)); } - public void testEqualsTransivity() throws Exception { + /** + * + */ + public void testEqualsTransivity() { final ITmfTimestamp ts0copy1 = new TmfSimpleTimestamp(ts0); final ITmfTimestamp ts0copy2 = new TmfSimpleTimestamp(ts0copy1); assertTrue("equals", ts0.equals(ts0copy1)); @@ -185,13 +212,19 @@ public class TmfSimpleTimestampTest extends TestCase { assertTrue("equals", ts1.equals(ts1copy2)); } - public void testEqualsNull() throws Exception { + /** + * + */ + public void testEqualsNull() { assertTrue("equals", !ts0.equals(null)); assertTrue("equals", !ts1.equals(null)); assertTrue("equals", !ts2.equals(null)); } - public void testEqualsNonTimestamp() throws Exception { + /** + * + */ + public void testEqualsNonTimestamp() { assertFalse("equals", ts0.equals(ts0.toString())); } @@ -199,7 +232,10 @@ public class TmfSimpleTimestampTest extends TestCase { // toString // ------------------------------------------------------------------------ - public void testToString() throws Exception { + /** + * + */ + public void testToString() { assertEquals("toString", "TmfSimpleTimestamp [fValue=0]", ts0.toString()); assertEquals("toString", "TmfSimpleTimestamp [fValue=12345]", ts1.toString()); assertEquals("toString", "TmfSimpleTimestamp [fValue=-1234]", ts2.toString()); @@ -209,7 +245,10 @@ public class TmfSimpleTimestampTest extends TestCase { // hashCode // ------------------------------------------------------------------------ - public void testHashCode() throws Exception { + /** + * + */ + public void testHashCode() { final ITmfTimestamp ts0copy = new TmfTimestamp(ts0); final ITmfTimestamp ts1copy = new TmfTimestamp(ts1); final ITmfTimestamp ts2copy = new TmfTimestamp(ts2); @@ -225,7 +264,10 @@ public class TmfSimpleTimestampTest extends TestCase { // normalize // ------------------------------------------------------------------------ - public void testNormalizeScale0() throws Exception { + /** + * + */ + public void testNormalizeScale0() { ITmfTimestamp ts = ts0.normalize(0, 0); assertEquals("getValue", 0, ts.getValue()); assertEquals("getscale", 0, ts.getScale()); @@ -247,7 +289,10 @@ public class TmfSimpleTimestampTest extends TestCase { assertEquals("getPrecision", 0, ts.getPrecision()); } - public void testNormalizeScaleNot0() throws Exception { + /** + * + */ + public void testNormalizeScaleNot0() { ITmfTimestamp ts = ts0.normalize(0, 1); assertEquals("getValue", 0, ts.getValue()); assertEquals("getscale", 1, ts.getScale()); @@ -273,24 +318,30 @@ public class TmfSimpleTimestampTest extends TestCase { // compareTo // ------------------------------------------------------------------------ - public void testBasicCompareTo() throws Exception { - final ITmfTimestamp ts1 = new TmfSimpleTimestamp(900); - final ITmfTimestamp ts2 = new TmfSimpleTimestamp(1000); - final ITmfTimestamp ts3 = new TmfSimpleTimestamp(1100); + /** + * + */ + public void testBasicCompareTo() { + final ITmfTimestamp tstamp1 = new TmfSimpleTimestamp(900); + final ITmfTimestamp tstamp2 = new TmfSimpleTimestamp(1000); + final ITmfTimestamp tstamp3 = new TmfSimpleTimestamp(1100); - assertTrue(ts1.compareTo(ts1) == 0); + assertTrue(tstamp1.compareTo(tstamp1) == 0); - assertTrue("CompareTo", ts1.compareTo(ts2) < 0); - assertTrue("CompareTo", ts1.compareTo(ts3) < 0); + assertTrue("CompareTo", tstamp1.compareTo(tstamp2) < 0); + assertTrue("CompareTo", tstamp1.compareTo(tstamp3) < 0); - assertTrue("CompareTo", ts2.compareTo(ts1) > 0); - assertTrue("CompareTo", ts2.compareTo(ts3) < 0); + assertTrue("CompareTo", tstamp2.compareTo(tstamp1) > 0); + assertTrue("CompareTo", tstamp2.compareTo(tstamp3) < 0); - assertTrue("CompareTo", ts3.compareTo(ts1) > 0); - assertTrue("CompareTo", ts3.compareTo(ts2) > 0); + assertTrue("CompareTo", tstamp3.compareTo(tstamp1) > 0); + assertTrue("CompareTo", tstamp3.compareTo(tstamp2) > 0); } - public void testCompareTo() throws Exception { + /** + * + */ + public void testCompareTo() { final ITmfTimestamp ts0a = new TmfTimestamp(0, 2, 0); final ITmfTimestamp ts1a = new TmfTimestamp(123450, -1); final ITmfTimestamp ts2a = new TmfTimestamp(-12340, -1); @@ -306,32 +357,38 @@ public class TmfSimpleTimestampTest extends TestCase { // getDelta // ------------------------------------------------------------------------ - public void testDelta() throws Exception { + /** + * + */ + public void testDelta() { // Delta for same scale and precision (delta > 0) - TmfTimestamp ts0 = new TmfSimpleTimestamp(10); - TmfTimestamp ts1 = new TmfSimpleTimestamp(5); - TmfTimestamp exp = new TmfSimpleTimestamp(5); + TmfTimestamp tstamp0 = new TmfSimpleTimestamp(10); + TmfTimestamp tstamp1 = new TmfSimpleTimestamp(5); + TmfTimestamp expectd = new TmfSimpleTimestamp(5); - ITmfTimestamp delta = ts0.getDelta(ts1); - assertEquals("getDelta", 0, delta.compareTo(exp, false)); + ITmfTimestamp delta = tstamp0.getDelta(tstamp1); + assertEquals("getDelta", 0, delta.compareTo(expectd, false)); // Delta for same scale and precision (delta < 0) - ts0 = new TmfTimestamp(5); - ts1 = new TmfTimestamp(10); - exp = new TmfTimestamp(-5); + tstamp0 = new TmfTimestamp(5); + tstamp1 = new TmfTimestamp(10); + expectd = new TmfTimestamp(-5); - delta = ts0.getDelta(ts1); - assertEquals("getDelta", 0, delta.compareTo(exp, false)); + delta = tstamp0.getDelta(tstamp1); + assertEquals("getDelta", 0, delta.compareTo(expectd, false)); } - public void testDelta2() throws Exception { + /** + * + */ + public void testDelta2() { // Delta for different scale and same precision (delta > 0) - final TmfTimestamp ts0 = new TmfSimpleTimestamp(10); - final TmfTimestamp ts1 = new TmfTimestamp(1, 1); - final TmfTimestamp exp = new TmfTimestamp(0, 0); + final TmfTimestamp tstamp0 = new TmfSimpleTimestamp(10); + final TmfTimestamp tstamp1 = new TmfTimestamp(1, 1); + final TmfTimestamp expectd = new TmfTimestamp(0, 0); - final ITmfTimestamp delta = ts0.getDelta(ts1); - assertEquals("getDelta", 0, delta.compareTo(exp, false)); + final ITmfTimestamp delta = tstamp0.getDelta(tstamp1); + assertEquals("getDelta", 0, delta.compareTo(expectd, false)); } } diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfTimeRangeTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfTimeRangeTest.java index a3e3e390cb..875d89b64a 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfTimeRangeTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfTimeRangeTest.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2010, 2012 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: * Francois Chouinard - Initial API and implementation * Francois Chouinard - Adjusted for new Event Model @@ -29,6 +29,9 @@ public class TmfTimeRangeTest extends TestCase { // Housekeeping // ------------------------------------------------------------------------ + /** + * @param name the test name + */ public TmfTimeRangeTest(final String name) { super(name); } @@ -47,7 +50,10 @@ public class TmfTimeRangeTest extends TestCase { // Constructors // ------------------------------------------------------------------------ - public void testConstructor() throws Exception { + /** + * + */ + public void testConstructor() { final ITmfTimestamp ts1 = new TmfTimestamp(12345); final ITmfTimestamp ts2 = new TmfTimestamp(12350); final TmfTimeRange range = new TmfTimeRange(ts1, ts2); @@ -56,7 +62,10 @@ public class TmfTimeRangeTest extends TestCase { assertEquals("endTime", ts2, range.getEndTime()); } - public void testBadConstructor() throws Exception { + /** + * + */ + public void testBadConstructor() { try { new TmfTimeRange(TmfTimestamp.BIG_BANG, null); fail("TmfTimeRange: bad end time"); @@ -72,7 +81,10 @@ public class TmfTimeRangeTest extends TestCase { } } - public void testOpenRange1() throws Exception { + /** + * + */ + public void testOpenRange1() { final ITmfTimestamp ts2 = new TmfTimestamp(12350); final TmfTimeRange range = new TmfTimeRange(TmfTimestamp.BIG_BANG, ts2); @@ -80,7 +92,10 @@ public class TmfTimeRangeTest extends TestCase { assertEquals("endTime", ts2, range.getEndTime()); } - public void testOpenRange2() throws Exception { + /** + * + */ + public void testOpenRange2() { final ITmfTimestamp ts1 = new TmfTimestamp(12345); final TmfTimeRange range = new TmfTimeRange(ts1, TmfTimestamp.BIG_CRUNCH); @@ -88,14 +103,20 @@ public class TmfTimeRangeTest extends TestCase { assertEquals("endTime", TmfTimestamp.BIG_CRUNCH, range.getEndTime()); } - public void testOpenRange3() throws Exception { + /** + * + */ + public void testOpenRange3() { final TmfTimeRange range = new TmfTimeRange(TmfTimestamp.BIG_BANG, TmfTimestamp.BIG_CRUNCH); assertEquals("startTime", TmfTimestamp.BIG_BANG, range.getStartTime()); assertEquals("endTime", TmfTimestamp.BIG_CRUNCH, range.getEndTime()); } - public void testCopyConstructor() throws Exception { + /** + * + */ + public void testCopyConstructor() { final ITmfTimestamp ts1 = new TmfTimestamp(12345); final ITmfTimestamp ts2 = new TmfTimestamp(12350); final TmfTimeRange range0 = new TmfTimeRange(ts1, ts2); @@ -111,7 +132,10 @@ public class TmfTimeRangeTest extends TestCase { assertEquals("endTime", TmfTimestamp.BIG_CRUNCH, range3.getEndTime()); } - public void testCopyConstructor2() throws Exception { + /** + * + */ + public void testCopyConstructor2() { try { new TmfTimeRange(null); fail("TmfTimeRange: null argument"); @@ -124,7 +148,10 @@ public class TmfTimeRangeTest extends TestCase { // clone // ------------------------------------------------------------------------ - public void testClone() throws Exception { + /** + * @throws CloneNotSupportedException cloning problem + */ + public void testClone() throws CloneNotSupportedException { final ITmfTimestamp ts1 = new TmfTimestamp(12345); final ITmfTimestamp ts2 = new TmfTimestamp(12350); @@ -143,7 +170,10 @@ public class TmfTimeRangeTest extends TestCase { // hashCode // ------------------------------------------------------------------------ - public void testHashCode() throws Exception { + /** + * + */ + public void testHashCode() { final ITmfTimestamp ts1 = new TmfTimestamp(12345); final ITmfTimestamp ts2 = new TmfTimestamp(12350); final TmfTimeRange range1 = new TmfTimeRange(ts1, ts2); @@ -161,7 +191,10 @@ public class TmfTimeRangeTest extends TestCase { // equals // ------------------------------------------------------------------------ - public void testEqualsReflexivity() throws Exception { + /** + * + */ + public void testEqualsReflexivity() { final ITmfTimestamp ts1 = new TmfTimestamp(12345); final ITmfTimestamp ts2 = new TmfTimestamp(12350); final TmfTimeRange range1 = new TmfTimeRange(ts1, ts2); @@ -174,7 +207,10 @@ public class TmfTimeRangeTest extends TestCase { assertTrue("equals", !range2.equals(range1)); } - public void testEqualsSymmetry() throws Exception { + /** + * + */ + public void testEqualsSymmetry() { final ITmfTimestamp ts1 = new TmfTimestamp(12345); final ITmfTimestamp ts2 = new TmfTimestamp(12350); final TmfTimeRange range1a = new TmfTimeRange(ts1, ts2); @@ -190,7 +226,10 @@ public class TmfTimeRangeTest extends TestCase { assertTrue("equals", range2b.equals(range2a)); } - public void testEqualsTransivity() throws Exception { + /** + * + */ + public void testEqualsTransivity() { final ITmfTimestamp ts1 = new TmfTimestamp(12345); final ITmfTimestamp ts2 = new TmfTimestamp(12350); final TmfTimeRange range1a = new TmfTimeRange(ts1, ts2); @@ -202,7 +241,10 @@ public class TmfTimeRangeTest extends TestCase { assertTrue("equals", range1a.equals(range1c)); } - public void testEqualsNull() throws Exception { + /** + * + */ + public void testEqualsNull() { final ITmfTimestamp ts1 = new TmfTimestamp(12345); final ITmfTimestamp ts2 = new TmfTimestamp(12350); final TmfTimeRange range1 = new TmfTimeRange(ts1, ts2); @@ -210,7 +252,10 @@ public class TmfTimeRangeTest extends TestCase { assertTrue("equals", !range1.equals(null)); } - public void testEqualsBadType() throws Exception { + /** + * + */ + public void testEqualsBadType() { final ITmfTimestamp ts1 = new TmfTimestamp(12345); final ITmfTimestamp ts2 = new TmfTimestamp(12350); final TmfTimeRange range1 = new TmfTimeRange(ts1, ts2); @@ -218,7 +263,10 @@ public class TmfTimeRangeTest extends TestCase { assertTrue("equals", !range1.equals(ts1)); } - public void testEqualStartTime() throws Exception { + /** + * + */ + public void testEqualStartTime() { final ITmfTimestamp ts1 = new TmfTimestamp(12345); final ITmfTimestamp ts2 = new TmfTimestamp(12350); final ITmfTimestamp ts3 = new TmfTimestamp(12355); @@ -231,7 +279,10 @@ public class TmfTimeRangeTest extends TestCase { assertTrue("equals", !range1.equals(range3)); } - public void testEqualsEndTime() throws Exception { + /** + * + */ + public void testEqualsEndTime() { final ITmfTimestamp ts1 = new TmfTimestamp(12345); final ITmfTimestamp ts2 = new TmfTimestamp(12350); final ITmfTimestamp ts3 = new TmfTimestamp(12355); @@ -248,7 +299,10 @@ public class TmfTimeRangeTest extends TestCase { // toString // ------------------------------------------------------------------------ - public void testToString() throws Exception { + /** + * + */ + public void testToString() { final ITmfTimestamp ts1 = new TmfTimestamp(12345); final ITmfTimestamp ts2 = new TmfTimestamp(12350); final TmfTimeRange range = new TmfTimeRange(ts1, ts2); @@ -261,7 +315,10 @@ public class TmfTimeRangeTest extends TestCase { // contains // ------------------------------------------------------------------------ - public void testContainsTimestamp() throws Exception { + /** + * + */ + public void testContainsTimestamp() { final ITmfTimestamp ts1 = new TmfTimestamp(12345); final ITmfTimestamp ts2 = new TmfTimestamp(12350); final TmfTimeRange range = new TmfTimeRange(ts1, ts2); @@ -276,7 +333,10 @@ public class TmfTimeRangeTest extends TestCase { assertTrue("contains (zero)", range.contains(TmfTimestamp.ZERO)); } - public void testContainsRange() throws Exception { + /** + * + */ + public void testContainsRange() { final ITmfTimestamp ts1 = new TmfTimestamp(10); final ITmfTimestamp ts2 = new TmfTimestamp(20); final ITmfTimestamp ts3 = new TmfTimestamp(30); @@ -329,7 +389,10 @@ public class TmfTimeRangeTest extends TestCase { // getIntersection // ------------------------------------------------------------------------ - public void testGetIntersection() throws Exception { + /** + * + */ + public void testGetIntersection() { final ITmfTimestamp ts1a = new TmfTimestamp(1000); final ITmfTimestamp ts1b = new TmfTimestamp(2000); diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfTimestampTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfTimestampTest.java index 95e1136ee2..73d28a3fa1 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfTimestampTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/TmfTimestampTest.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2012 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: * Francois Chouinard - Initial API and implementation * Francois Chouinard - Adjusted for new Event Model @@ -58,31 +58,46 @@ public class TmfTimestampTest extends TestCase { // Constructors // ------------------------------------------------------------------------ - public void testDefaultConstructor() throws Exception { + /** + * + */ + public void testDefaultConstructor() { assertEquals("getValue", 0, ts0.getValue()); assertEquals("getscale", 0, ts0.getScale()); assertEquals("getPrecision", 0, ts0.getPrecision()); } - public void testValueConstructor() throws Exception { + /** + * + */ + public void testValueConstructor() { assertEquals("getValue", 12345, ts1.getValue()); assertEquals("getscale", 0, ts1.getScale()); assertEquals("getPrecision", 0, ts1.getPrecision()); } - public void testValueScaleConstructor() throws Exception { + /** + * + */ + public void testValueScaleConstructor() { assertEquals("getValue", 12345, ts2.getValue()); assertEquals("getscale", -1, ts2.getScale()); assertEquals("getPrecision", 0, ts2.getPrecision()); } - public void testFullConstructor() throws Exception { + /** + * + */ + public void testFullConstructor() { assertEquals("getValue", 12345, ts3.getValue()); assertEquals("getscale", 2, ts3.getScale()); assertEquals("getPrecision", 5, ts3.getPrecision()); } - public void testCopyConstructor() throws Exception { + /** + * + */ + public void testCopyConstructor() { final ITmfTimestamp ts = new TmfTimestamp(12345, 2, 5); final ITmfTimestamp copy = new TmfTimestamp(ts); @@ -95,7 +110,10 @@ public class TmfTimestampTest extends TestCase { assertEquals("getPrecision", 5, copy.getPrecision()); } - public void testCopyNullConstructor() throws Exception { + /** + * + */ + public void testCopyNullConstructor() { try { new TmfTimestamp(null); fail("TmfTimestamp: null argument"); @@ -103,21 +121,30 @@ public class TmfTimestampTest extends TestCase { } } - public void testCopyConstructorBigBang() throws Exception { + /** + * + */ + public void testCopyConstructorBigBang() { final ITmfTimestamp ts = new TmfTimestamp(TmfTimestamp.BIG_BANG); assertEquals("getValue", TmfTimestamp.BIG_BANG.getValue(), ts.getValue()); assertEquals("getscale", TmfTimestamp.BIG_BANG.getScale(), ts.getScale()); assertEquals("getPrecision", TmfTimestamp.BIG_BANG.getPrecision(), ts.getPrecision()); } - public void testCopyConstructorBigCrunch() throws Exception { + /** + * + */ + public void testCopyConstructorBigCrunch() { final ITmfTimestamp ts = new TmfTimestamp(TmfTimestamp.BIG_CRUNCH); assertEquals("getValue", TmfTimestamp.BIG_CRUNCH.getValue(), ts.getValue()); assertEquals("getscale", TmfTimestamp.BIG_CRUNCH.getScale(), ts.getScale()); assertEquals("getPrecision", TmfTimestamp.BIG_CRUNCH.getPrecision(), ts.getPrecision()); } - public void testCopyConstructorZero() throws Exception { + /** + * + */ + public void testCopyConstructorZero() { final ITmfTimestamp ts = new TmfTimestamp(TmfTimestamp.ZERO); assertEquals("getValue", TmfTimestamp.ZERO.getValue(), ts.getValue()); assertEquals("getscale", TmfTimestamp.ZERO.getScale(), ts.getScale()); @@ -128,7 +155,7 @@ public class TmfTimestampTest extends TestCase { // clone // ------------------------------------------------------------------------ - public static class MyTimestamp extends TmfTimestamp { + private static class MyTimestamp extends TmfTimestamp { @Override public boolean equals(final Object other) { @@ -141,7 +168,10 @@ public class TmfTimestampTest extends TestCase { } } - public void testClone() throws Exception { + /** + * + */ + public void testClone() { final ITmfTimestamp clone = ts0.clone(); assertTrue("clone", ts0.clone().equals(ts0)); @@ -151,7 +181,10 @@ public class TmfTimestampTest extends TestCase { assertEquals("clone", ts0, clone); } - public void testClone2() throws Exception { + /** + * + */ + public void testClone2() { final MyTimestamp timestamp = new MyTimestamp(); final MyTimestamp clone = timestamp.clone(); @@ -166,7 +199,10 @@ public class TmfTimestampTest extends TestCase { // hashCode // ------------------------------------------------------------------------ - public void testHashCode() throws Exception { + /** + * + */ + public void testHashCode() { final ITmfTimestamp ts0copy = new TmfTimestamp(ts0); final ITmfTimestamp ts1copy = new TmfTimestamp(ts1); final ITmfTimestamp ts2copy = new TmfTimestamp(ts2); @@ -182,7 +218,10 @@ public class TmfTimestampTest extends TestCase { // equals // ------------------------------------------------------------------------ - public void testEqualsReflexivity() throws Exception { + /** + * + */ + public void testEqualsReflexivity() { assertTrue("equals", ts0.equals(ts0)); assertTrue("equals", ts1.equals(ts1)); @@ -190,7 +229,10 @@ public class TmfTimestampTest extends TestCase { assertTrue("equals", !ts1.equals(ts0)); } - public void testEqualsSymmetry() throws Exception { + /** + * + */ + public void testEqualsSymmetry() { final ITmfTimestamp ts0copy = new TmfTimestamp(ts0); assertTrue("equals", ts0.equals(ts0copy)); assertTrue("equals", ts0copy.equals(ts0)); @@ -204,7 +246,10 @@ public class TmfTimestampTest extends TestCase { assertTrue("equals", ts2copy.equals(ts2)); } - public void testEqualsTransivity() throws Exception { + /** + * + */ + public void testEqualsTransivity() { final ITmfTimestamp ts0copy1 = new TmfTimestamp(ts0); final ITmfTimestamp ts0copy2 = new TmfTimestamp(ts0copy1); assertTrue("equals", ts0.equals(ts0copy1)); @@ -224,12 +269,18 @@ public class TmfTimestampTest extends TestCase { assertTrue("equals", ts2.equals(ts2copy2)); } - public void testEqualsNull() throws Exception { + /** + * + */ + public void testEqualsNull() { assertTrue("equals", !ts0.equals(null)); assertTrue("equals", !ts1.equals(null)); } - public void testEqualsNonTimestamp() throws Exception { + /** + * + */ + public void testEqualsNonTimestamp() { assertFalse("equals", ts0.equals(ts0.toString())); } @@ -237,7 +288,10 @@ public class TmfTimestampTest extends TestCase { // toString // ------------------------------------------------------------------------ - public void testToString() throws Exception { + /** + * + */ + public void testToString() { assertEquals("toString", "TmfTimestamp [fValue=0, fScale=0, fPrecision=0]", ts0.toString()); assertEquals("toString", "TmfTimestamp [fValue=12345, fScale=0, fPrecision=0]", ts1.toString()); assertEquals("toString", "TmfTimestamp [fValue=12345, fScale=-1, fPrecision=0]", ts2.toString()); @@ -248,7 +302,10 @@ public class TmfTimestampTest extends TestCase { // normalize // ------------------------------------------------------------------------ - public void testNormalizeOffset() throws Exception { + /** + * + */ + public void testNormalizeOffset() { ITmfTimestamp ts = ts0.normalize(0, 0); assertEquals("getValue", 0, ts.getValue()); assertEquals("getscale", 0, ts.getScale()); @@ -270,7 +327,10 @@ public class TmfTimestampTest extends TestCase { assertEquals("getPrecision", 0, ts.getPrecision()); } - public void testNormalizeOffsetLowerLimits() throws Exception { + /** + * + */ + public void testNormalizeOffsetLowerLimits() { final ITmfTimestamp ref = new TmfTimestamp(Long.MIN_VALUE + 5); ITmfTimestamp ts = ref.normalize(-4, 0); @@ -289,7 +349,10 @@ public class TmfTimestampTest extends TestCase { assertEquals("getPrecision", 0, ts.getPrecision()); } - public void testNormalizeOffsetUpperLimits() throws Exception { + /** + * + */ + public void testNormalizeOffsetUpperLimits() { final ITmfTimestamp ref = new TmfTimestamp(Long.MAX_VALUE - 5); ITmfTimestamp ts = ref.normalize(4, 0); @@ -308,7 +371,10 @@ public class TmfTimestampTest extends TestCase { assertEquals("getPrecision", 0, ts.getPrecision()); } - public void testNormalizeScale() throws Exception { + /** + * + */ + public void testNormalizeScale() { ITmfTimestamp ts = ts0.normalize(0, 10); assertEquals("getValue", 0, ts.getValue()); assertEquals("getscale", 10, ts.getScale()); @@ -320,7 +386,10 @@ public class TmfTimestampTest extends TestCase { assertEquals("getPrecision", 0, ts.getPrecision()); } - public void testNormalizedScaleLimits() throws Exception { + /** + * + */ + public void testNormalizedScaleLimits() { final int MAX_SCALE_DIFF = 19; // Test below limit @@ -350,14 +419,20 @@ public class TmfTimestampTest extends TestCase { } } - public void testNormalizeOffsetAndScaleTrivial() throws Exception { + /** + * + */ + public void testNormalizeOffsetAndScaleTrivial() { final ITmfTimestamp ts = ts0.normalize(0, 0); assertEquals("getValue", 0, ts.getValue()); assertEquals("getscale", 0, ts.getScale()); assertEquals("getPrecision", 0, ts.getPrecision()); } - public void testNormalizeOffsetAndScale() throws Exception { + /** + * + */ + public void testNormalizeOffsetAndScale() { final int SCALE = 12; ITmfTimestamp ts = ts0.normalize(0, SCALE); @@ -381,7 +456,10 @@ public class TmfTimestampTest extends TestCase { assertEquals("getPrecision", 0, ts.getPrecision()); } - public void testNormalizeOffsetAndScale2() throws Exception { + /** + * + */ + public void testNormalizeOffsetAndScale2() { int SCALE = 2; ITmfTimestamp ts = ts1.normalize(0, SCALE); assertEquals("getValue", 123, ts.getValue()); @@ -409,7 +487,11 @@ public class TmfTimestampTest extends TestCase { // compareTo // ------------------------------------------------------------------------ - public void testBasicCompareTo() throws Exception { + /** + * + */ + @SuppressWarnings("hiding") + public void testBasicCompareTo() { final ITmfTimestamp ts1 = new TmfTimestamp(900, 0, 50); final ITmfTimestamp ts2 = new TmfTimestamp(1000, 0, 50); final ITmfTimestamp ts3 = new TmfTimestamp(1100, 0, 50); @@ -430,7 +512,10 @@ public class TmfTimestampTest extends TestCase { assertTrue("CompareTo", ts3.compareTo(ts4) > 0); } - public void testCompareToCornerCases1() throws Exception { + /** + * + */ + public void testCompareToCornerCases1() { final ITmfTimestamp ts0a = new TmfTimestamp(ts0); final ITmfTimestamp ts0b = new TmfTimestamp(ts0.getValue(), ts0.getScale() + 1); final ITmfTimestamp ts0c = new TmfTimestamp(ts0.getValue() + 1, ts0.getScale()); @@ -443,7 +528,10 @@ public class TmfTimestampTest extends TestCase { assertTrue("compareTo", ts0.compareTo(ts0d, false) == -1); } - public void testCompareToCornerCases2() throws Exception { + /** + * + */ + public void testCompareToCornerCases2() { final ITmfTimestamp ts0a = new TmfTimestamp(Long.MAX_VALUE, Integer.MAX_VALUE - 1); final ITmfTimestamp ts0b = new TmfTimestamp(0, Integer.MAX_VALUE); final ITmfTimestamp ts0c = new TmfTimestamp(Long.MAX_VALUE, Integer.MAX_VALUE); @@ -458,7 +546,10 @@ public class TmfTimestampTest extends TestCase { assertTrue("compareTo", ts0c.compareTo(ts0b, false) == 1); } - public void testCompareToCornerCases3() throws Exception { + /** + * + */ + public void testCompareToCornerCases3() { final ITmfTimestamp ts0a = new TmfTimestamp(Long.MIN_VALUE, Integer.MAX_VALUE - 1); final ITmfTimestamp ts0b = new TmfTimestamp(0, Integer.MAX_VALUE); final ITmfTimestamp ts0c = new TmfTimestamp(Long.MIN_VALUE, Integer.MAX_VALUE); @@ -473,12 +564,19 @@ public class TmfTimestampTest extends TestCase { assertTrue("compareTo", ts0c.compareTo(ts0b, false) == -1); } - public void testCompareToCornerCases4() throws Exception { + /** + * + */ + public void testCompareToCornerCases4() { assertTrue("compareTo", ts0.compareTo(null, false) == 1); assertTrue("compareTo", ts0.compareTo(null, true) == 1); } - public void testCompareToSameScale() throws Exception { + /** + * + */ + @SuppressWarnings("hiding") + public void testCompareToSameScale() { final ITmfTimestamp ts1 = new TmfTimestamp(900, 0, 50); final ITmfTimestamp ts2 = new TmfTimestamp(1000, 0, 50); final ITmfTimestamp ts3 = new TmfTimestamp(1100, 0, 50); @@ -499,7 +597,11 @@ public class TmfTimestampTest extends TestCase { assertTrue("CompareTo", ts3.compareTo(ts4, false) > 0); } - public void testCompareToDifferentScale() throws Exception { + /** + * + */ + @SuppressWarnings("hiding") + public void testCompareToDifferentScale() { final ITmfTimestamp ts1 = new TmfTimestamp(9000, -1, 50); final ITmfTimestamp ts2 = new TmfTimestamp(1000, 0, 50); final ITmfTimestamp ts3 = new TmfTimestamp(110, 1, 50); @@ -520,7 +622,11 @@ public class TmfTimestampTest extends TestCase { assertTrue("CompareTo", ts3.compareTo(ts4, false) > 0); } - public void testCompareToWithinPrecision() throws Exception { + /** + * + */ + @SuppressWarnings("hiding") + public void testCompareToWithinPrecision() { final ITmfTimestamp ts1 = new TmfTimestamp(900, 0, 50); final ITmfTimestamp ts2 = new TmfTimestamp(1000, 0, 50); final ITmfTimestamp ts3 = new TmfTimestamp(1100, 0, 50); @@ -541,7 +647,11 @@ public class TmfTimestampTest extends TestCase { assertTrue("CompareTo", ts3.compareTo(ts4, true) == 0); } - public void testCompareToLargeScale1() throws Exception { + /** + * + */ + @SuppressWarnings("hiding") + public void testCompareToLargeScale1() { final ITmfTimestamp ts1 = new TmfTimestamp(-1, 100); final ITmfTimestamp ts2 = new TmfTimestamp(-1000, -100); final ITmfTimestamp ts3 = new TmfTimestamp(1, 100); @@ -564,7 +674,10 @@ public class TmfTimestampTest extends TestCase { assertTrue("CompareTo", ts4.compareTo(ts3, false) < 0); } - public void testCompareToLargeScale2() throws Exception { + /** + * + */ + public void testCompareToLargeScale2() { final ITmfTimestamp ts0a = new TmfTimestamp(0, Integer.MAX_VALUE); final ITmfTimestamp ts0b = new TmfTimestamp(1, Integer.MAX_VALUE); @@ -579,7 +692,11 @@ public class TmfTimestampTest extends TestCase { // getDelta // ------------------------------------------------------------------------ - public void testDelta() throws Exception { + /** + * + */ + @SuppressWarnings("hiding") + public void testDelta() { // Delta for same scale and precision (delta > 0) ITmfTimestamp ts0 = new TmfTimestamp(10, 9); ITmfTimestamp ts1 = new TmfTimestamp(5, 9); diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/AllTests.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/AllTests.java index ba88793638..e6d2e3561d 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/AllTests.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/AllTests.java @@ -5,9 +5,18 @@ import junit.framework.TestSuite; import org.eclipse.linuxtools.internal.tmf.core.Activator; +/** + * AllTests + *

+ * Implement me. Please. + *

+ */ @SuppressWarnings({ "nls" }) public class AllTests { + /** + * @return the test suite + */ public static Test suite() { TestSuite suite = new TestSuite("Test suite for " + Activator.PLUGIN_ID + ".request"); //$NON-NLS-1$); //$JUnit-BEGIN$ diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfCoalescedDataRequestTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfCoalescedDataRequestTest.java index 4d72b8eb5e..460c8c0d3f 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfCoalescedDataRequestTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfCoalescedDataRequestTest.java @@ -23,7 +23,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.request.TmfDataRequestStub; /** * Test suite for the TmfCoalescedDataRequest class. */ -@SuppressWarnings({ "nls" }) +@SuppressWarnings({"nls","javadoc"}) public class TmfCoalescedDataRequestTest extends TestCase { // ------------------------------------------------------------------------ @@ -44,7 +44,10 @@ public class TmfCoalescedDataRequestTest extends TestCase { // Housekeeping // ------------------------------------------------------------------------ - public TmfCoalescedDataRequestTest(String name) { + /** + * @param name the test name + */ + public TmfCoalescedDataRequestTest(final String name) { super(name); } @@ -99,7 +102,7 @@ public class TmfCoalescedDataRequestTest extends TestCase { // Constructors // ------------------------------------------------------------------------ - public void testTmfCoalescedDataRequest() { + public void testTmfCoalescedDataRequest() { TmfCoalescedDataRequest request = new TmfCoalescedDataRequest(TmfEvent.class); assertEquals("getRequestId", fRequestCount++, request.getRequestId()); @@ -167,7 +170,7 @@ public class TmfCoalescedDataRequestTest extends TestCase { // equals // ------------------------------------------------------------------------ - public void testEqualsReflexivity() throws Exception { + public void testEqualsReflexivity() { assertTrue("equals", fRequest1.equals(fRequest1)); assertTrue("equals", fRequest2.equals(fRequest2)); @@ -175,7 +178,7 @@ public class TmfCoalescedDataRequestTest extends TestCase { assertFalse("equals", fRequest2.equals(fRequest1)); } - public void testEqualsSymmetry() throws Exception { + public void testEqualsSymmetry() { assertTrue("equals", fRequest1.equals(fRequest1b)); assertTrue("equals", fRequest1b.equals(fRequest1)); @@ -185,13 +188,13 @@ public class TmfCoalescedDataRequestTest extends TestCase { assertFalse("equals", fRequest3.equals(fRequest2)); } - public void testEqualsTransivity() throws Exception { + public void testEqualsTransivity() { assertTrue("equals", fRequest1.equals(fRequest1b)); assertTrue("equals", fRequest1b.equals(fRequest1c)); assertTrue("equals", fRequest1.equals(fRequest1c)); } - public void testEqualsNull() throws Exception { + public void testEqualsNull() { assertFalse("equals", fRequest1.equals(null)); assertFalse("equals", fRequest2.equals(null)); } @@ -200,7 +203,7 @@ public class TmfCoalescedDataRequestTest extends TestCase { // hashCode // ------------------------------------------------------------------------ - public void testHashCode() throws Exception { + public void testHashCode() { assertTrue("hashCode", fRequest1.hashCode() == fRequest1.hashCode()); assertTrue("hashCode", fRequest2.hashCode() == fRequest2.hashCode()); assertTrue("hashCode", fRequest1.hashCode() != fRequest2.hashCode()); diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfCoalescedEventRequestTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfCoalescedEventRequestTest.java index cc706fa265..2079022941 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfCoalescedEventRequestTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfCoalescedEventRequestTest.java @@ -45,7 +45,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub; *

* Test suite for the TmfCoalescedEventRequest class. */ -@SuppressWarnings({ "nls" }) +@SuppressWarnings({"nls","javadoc"}) public class TmfCoalescedEventRequestTest extends TestCase { // ------------------------------------------------------------------------ @@ -69,6 +69,9 @@ public class TmfCoalescedEventRequestTest extends TestCase { // Housekeeping // ------------------------------------------------------------------------ + /** + * @param name the test name + */ public TmfCoalescedEventRequestTest(String name) { super(name); } @@ -192,7 +195,7 @@ public class TmfCoalescedEventRequestTest extends TestCase { // equals // ------------------------------------------------------------------------ - public void testEqualsReflexivity() throws Exception { + public void testEqualsReflexivity() { assertTrue("equals", fRequest1.equals(fRequest1)); assertTrue("equals", fRequest2.equals(fRequest2)); @@ -200,7 +203,7 @@ public class TmfCoalescedEventRequestTest extends TestCase { assertFalse("equals", fRequest2.equals(fRequest1)); } - public void testEqualsSymmetry() throws Exception { + public void testEqualsSymmetry() { assertTrue("equals", fRequest1.equals(fRequest1b)); assertTrue("equals", fRequest1b.equals(fRequest1)); @@ -210,18 +213,18 @@ public class TmfCoalescedEventRequestTest extends TestCase { assertFalse("equals", fRequest3.equals(fRequest2)); } - public void testEqualsTransivity() throws Exception { + public void testEqualsTransivity() { assertTrue("equals", fRequest1.equals(fRequest1b)); assertTrue("equals", fRequest1b.equals(fRequest1c)); assertTrue("equals", fRequest1.equals(fRequest1c)); } - public void testEqualsNull() throws Exception { + public void testEqualsNull() { assertFalse("equals", fRequest1.equals(null)); assertFalse("equals", fRequest2.equals(null)); } - public void testEqualsSuper() throws Exception { + public void testEqualsSuper() { TmfCoalescedDataRequest dataRequest1 = new TmfCoalescedDataRequest( fRequest1.getDataType(), fRequest1.getIndex(), fRequest1.getNbRequested()); TmfCoalescedDataRequest dataRequest2 = new TmfCoalescedDataRequest( @@ -239,7 +242,7 @@ public class TmfCoalescedEventRequestTest extends TestCase { // hashCode // ------------------------------------------------------------------------ - public void testHashCode() throws Exception { + public void testHashCode() { assertTrue("hashCode", fRequest1.hashCode() == fRequest1.hashCode()); assertTrue("hashCode", fRequest2.hashCode() == fRequest2.hashCode()); assertTrue("hashCode", fRequest1.hashCode() != fRequest2.hashCode()); @@ -265,7 +268,8 @@ public class TmfCoalescedEventRequestTest extends TestCase { // isCompatible // ------------------------------------------------------------------------ - public void testIsCompatible() { + @SuppressWarnings("hiding") + public void testIsCompatible() { TmfCoalescedEventRequest coalescedRequest = new TmfCoalescedEventRequest(TmfEvent.class, range1, 100, 200); TmfEventRequest request1 = new TmfEventRequestStub(TmfEvent.class, range1, 100, 200); TmfEventRequest request2 = new TmfEventRequestStub(TmfEvent.class, range2, 100, 200); @@ -280,6 +284,7 @@ public class TmfCoalescedEventRequestTest extends TestCase { // addEvent // ------------------------------------------------------------------------ + @SuppressWarnings("hiding") public void testAddEvent1() { TmfCoalescedEventRequest coalescedRequest = new TmfCoalescedEventRequest(TmfEvent.class, range1, 0, 2147483647, 200, ExecutionType.FOREGROUND); TmfEventRequest request1 = new TmfEventRequestStub(TmfEvent.class, range1, 0, 2147483647, 200); @@ -297,6 +302,7 @@ public class TmfCoalescedEventRequestTest extends TestCase { } + @SuppressWarnings("hiding") public void testAddEvent2() { TmfCoalescedEventRequest coalescedRequest = new TmfCoalescedEventRequest(TmfEvent.class, range1, 1, 2147483647, 200, ExecutionType.FOREGROUND); TmfEventRequest request1 = new TmfEventRequestStub(TmfEvent.class, range1, 1, 2147483647, 200); @@ -472,7 +478,6 @@ public class TmfCoalescedEventRequestTest extends TestCase { } @TmfSignalHandler - @SuppressWarnings("unchecked") public void trigger(final TmfTestTriggerSignal signal) { TmfTimeRange range = new TmfTimeRange(TmfTimestamp.BIG_BANG, TmfTimestamp.BIG_CRUNCH); @@ -521,7 +526,7 @@ public class TmfCoalescedEventRequestTest extends TestCase { providers[0].sendRequest(request3); } - public void runCoalescedRequest(long startIndex) throws Exception { + public void runCoalescedRequest(long startIndex) throws InterruptedException { fTrace = setupTrace(DIRECTORY + File.separator + TEST_STREAM); @@ -561,13 +566,13 @@ public class TmfCoalescedEventRequestTest extends TestCase { } } - public void testCoalescedRequest() throws Exception { + public void testCoalescedRequest() throws InterruptedException { runCoalescedRequest(0); runCoalescedRequest(1); runCoalescedRequest(5); } - public void testCancelCoalescedRequest() throws Exception { + public void testCancelCoalescedRequest() throws InterruptedException { fTrace = setupTrace(DIRECTORY + File.separator + TEST_STREAM); @@ -607,7 +612,7 @@ public class TmfCoalescedEventRequestTest extends TestCase { } // ------------------------------------------------------------------------ - // + // // ------------------------------------------------------------------------ } diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfDataRequestTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfDataRequestTest.java index 8f91d59ed2..05115c5f1f 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfDataRequestTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfDataRequestTest.java @@ -23,7 +23,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.request.TmfDataRequestStub; *

* Test suite for the TmfDataRequest class. */ -@SuppressWarnings("nls") +@SuppressWarnings({"nls","javadoc"}) public class TmfDataRequestTest extends TestCase { // ------------------------------------------------------------------------ @@ -43,6 +43,9 @@ public class TmfDataRequestTest extends TestCase { // Housekeeping // ------------------------------------------------------------------------ + /** + * @param name the test name + */ public TmfDataRequestTest(String name) { super(name); } @@ -164,7 +167,7 @@ public class TmfDataRequestTest extends TestCase { // equals // ------------------------------------------------------------------------ - public void testEqualsReflexivity() throws Exception { + public void testEqualsReflexivity() { assertTrue("equals", fRequest1.equals(fRequest1)); assertTrue("equals", fRequest2.equals(fRequest2)); @@ -172,7 +175,7 @@ public class TmfDataRequestTest extends TestCase { assertFalse("equals", fRequest2.equals(fRequest1)); } - public void testEqualsSymmetry() throws Exception { + public void testEqualsSymmetry() { assertTrue("equals", fRequest1.equals(fRequest1b)); assertTrue("equals", fRequest1b.equals(fRequest1)); @@ -182,13 +185,13 @@ public class TmfDataRequestTest extends TestCase { assertFalse("equals", fRequest3.equals(fRequest2)); } - public void testEqualsTransivity() throws Exception { + public void testEqualsTransivity() { assertTrue("equals", fRequest1.equals(fRequest1b)); assertTrue("equals", fRequest1b.equals(fRequest1c)); assertTrue("equals", fRequest1.equals(fRequest1c)); } - public void testEqualsNull() throws Exception { + public void testEqualsNull() { assertFalse("equals", fRequest1.equals(null)); assertFalse("equals", fRequest2.equals(null)); } @@ -197,7 +200,7 @@ public class TmfDataRequestTest extends TestCase { // hashCode // ------------------------------------------------------------------------ - public void testHashCode() throws Exception { + public void testHashCode() { assertTrue("hashCode", fRequest1.hashCode() == fRequest1.hashCode()); assertTrue("hashCode", fRequest2.hashCode() == fRequest2.hashCode()); assertTrue("hashCode", fRequest1.hashCode() != fRequest2.hashCode()); diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfEventRequestTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfEventRequestTest.java index 2ff23b7f5d..f2422a5c85 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfEventRequestTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfEventRequestTest.java @@ -26,7 +26,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.request.TmfEventRequestStub; *

* Test suite for the TmfEventRequest class. */ -@SuppressWarnings("nls") +@SuppressWarnings({"nls","javadoc"}) public class TmfEventRequestTest extends TestCase { // ------------------------------------------------------------------------ @@ -49,7 +49,10 @@ public class TmfEventRequestTest extends TestCase { // Housekeeping // ------------------------------------------------------------------------ - public TmfEventRequestTest(String name) { + /** + * @param name the test name + */ + public TmfEventRequestTest(final String name) { super(name); } @@ -185,7 +188,7 @@ public class TmfEventRequestTest extends TestCase { // equals // ------------------------------------------------------------------------ - public void testEqualsReflexivity() throws Exception { + public void testEqualsReflexivity() { assertTrue("equals", fRequest1.equals(fRequest1)); assertTrue("equals", fRequest2.equals(fRequest2)); @@ -193,7 +196,7 @@ public class TmfEventRequestTest extends TestCase { assertFalse("equals", fRequest2.equals(fRequest1)); } - public void testEqualsSymmetry() throws Exception { + public void testEqualsSymmetry() { assertTrue("equals", fRequest1.equals(fRequest1b)); assertTrue("equals", fRequest1b.equals(fRequest1)); @@ -203,13 +206,13 @@ public class TmfEventRequestTest extends TestCase { assertFalse("equals", fRequest3.equals(fRequest2)); } - public void testEqualsTransivity() throws Exception { + public void testEqualsTransivity() { assertTrue("equals", fRequest1.equals(fRequest1b)); assertTrue("equals", fRequest1b.equals(fRequest1c)); assertTrue("equals", fRequest1.equals(fRequest1c)); } - public void testEqualsNull() throws Exception { + public void testEqualsNull() { assertFalse("equals", fRequest1.equals(null)); assertFalse("equals", fRequest2.equals(null)); } @@ -218,7 +221,7 @@ public class TmfEventRequestTest extends TestCase { // hashCode // ------------------------------------------------------------------------ - public void testHashCode() throws Exception { + public void testHashCode() { assertTrue("hashCode", fRequest1.hashCode() == fRequest1.hashCode()); assertTrue("hashCode", fRequest2.hashCode() == fRequest2.hashCode()); assertTrue("hashCode", fRequest1.hashCode() != fRequest2.hashCode()); diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/statesystem/VerifyHistoryFile.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/statesystem/VerifyHistoryFile.java index 518dc423f6..74d7c012e0 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/statesystem/VerifyHistoryFile.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/statesystem/VerifyHistoryFile.java @@ -32,7 +32,7 @@ import org.eclipse.linuxtools.tmf.core.statesystem.IStateSystemQuerier; * @author alexmont * */ -@SuppressWarnings("nls") +@SuppressWarnings({"nls","javadoc"}) public class VerifyHistoryFile { // Enter the .ht file name to test here diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/AllTests.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/AllTests.java index cc0f583370..4dfea6c5c1 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/AllTests.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/AllTests.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2012 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: * Francois Chouinard - Initial API and implementation * Francois Chouinard - Adjusted for new Trace Model @@ -24,6 +24,9 @@ import org.eclipse.linuxtools.internal.tmf.core.Activator; @SuppressWarnings({ "nls" }) public class AllTests { + /** + * @return the test suite + */ public static Test suite() { TestSuite suite = new TestSuite("Test suite for " + Activator.PLUGIN_ID + ".trace"); //$NON-NLS-1$); //$JUnit-BEGIN$ diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfCheckpointIndexTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfCheckpointIndexTest.java index 90dc7e81d7..0854963935 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfCheckpointIndexTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfCheckpointIndexTest.java @@ -37,7 +37,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub; /** * Test suite for the TmfCheckpointIndexTest class. */ -@SuppressWarnings("nls") +@SuppressWarnings({"nls","javadoc"}) public class TmfCheckpointIndexTest extends TestCase { // ------------------------------------------------------------------------ @@ -55,7 +55,10 @@ public class TmfCheckpointIndexTest extends TestCase { // Housekeeping // ------------------------------------------------------------------------ - public TmfCheckpointIndexTest(final String name) throws Exception { + /** + * @param name the test name + */ + public TmfCheckpointIndexTest(final String name) { super(name); } @@ -144,7 +147,8 @@ public class TmfCheckpointIndexTest extends TestCase { // Verify checkpoints // ------------------------------------------------------------------------ - public void testTmfTraceIndexing() throws Exception { + @SuppressWarnings("null") + public void testTmfTraceIndexing() { assertEquals("getCacheSize", BLOCK_SIZE, fTrace.getCacheSize()); assertEquals("getTraceSize", NB_EVENTS, fTrace.getNbEvents()); assertEquals("getRange-start", 1, fTrace.getTimeRange().getStartTime().getValue()); @@ -167,7 +171,8 @@ public class TmfCheckpointIndexTest extends TestCase { } } - public void testEmptyTmfTraceIndexing() throws Exception { + @SuppressWarnings("null") + public void testEmptyTmfTraceIndexing() { assertEquals("getCacheSize", ITmfTrace.DEFAULT_TRACE_CACHE_SIZE, fEmptyTrace.getCacheSize()); assertEquals("getTraceSize", 0, fEmptyTrace.getNbEvents()); assertEquals("getRange-start", TmfTimestamp.BIG_CRUNCH, fEmptyTrace.getTimeRange().getStartTime()); diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfCheckpointTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfCheckpointTest.java index fb0872f014..f851f331c0 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfCheckpointTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfCheckpointTest.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2010, 2012 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: * Francois Chouinard - Initial API and implementation * Francois Chouinard - Adapted for TMF Trace Model 1.0 @@ -24,7 +24,7 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfLocation; /** * Test suite for the TmfCheckpoint class. */ -@SuppressWarnings("nls") +@SuppressWarnings({"nls","javadoc"}) public class TmfCheckpointTest extends TestCase { // ------------------------------------------------------------------------ @@ -83,7 +83,7 @@ public class TmfCheckpointTest extends TestCase { assertEquals("TmfCheckpoint", fLocation1, checkpoint.getLocation()); } - public void testTmfLocationCopy2() throws Exception { + public void testTmfLocationCopy2() { try { new TmfCheckpoint(null); fail("null copy"); @@ -172,7 +172,7 @@ public class TmfCheckpointTest extends TestCase { // hashCode // ------------------------------------------------------------------------ - public void testHashCode() throws Exception { + public void testHashCode() { final TmfCheckpoint checkpoint1 = new TmfCheckpoint(fCheckpoint1); final TmfCheckpoint checkpoint2 = new TmfCheckpoint(fCheckpoint2); @@ -183,7 +183,7 @@ public class TmfCheckpointTest extends TestCase { assertTrue("hashCode", fCheckpoint2.hashCode() != checkpoint1.hashCode()); } - public void testHashCodeNull() throws Exception { + public void testHashCodeNull() { final TmfCheckpoint checkpoint1 = new TmfCheckpoint(null, new TmfContext(fLocation1)); final TmfCheckpoint checkpoint2 = new TmfCheckpoint(fTimestamp1, null); final TmfCheckpoint checkpoint3 = new TmfCheckpoint(checkpoint1); @@ -200,7 +200,7 @@ public class TmfCheckpointTest extends TestCase { // equals // ------------------------------------------------------------------------ - public void testEqualsReflexivity() throws Exception { + public void testEqualsReflexivity() { assertTrue("equals", fCheckpoint1.equals(fCheckpoint1)); assertTrue("equals", fCheckpoint2.equals(fCheckpoint2)); @@ -208,7 +208,7 @@ public class TmfCheckpointTest extends TestCase { assertTrue("equals", !fCheckpoint2.equals(fCheckpoint1)); } - public void testEqualsSymmetry() throws Exception { + public void testEqualsSymmetry() { final TmfCheckpoint checkpoint1 = new TmfCheckpoint(fCheckpoint1); final TmfCheckpoint checkpoint2 = new TmfCheckpoint(fCheckpoint2); @@ -219,7 +219,7 @@ public class TmfCheckpointTest extends TestCase { assertTrue("equals", fCheckpoint2.equals(checkpoint2)); } - public void testEqualsTransivity() throws Exception { + public void testEqualsTransivity() { final TmfCheckpoint checkpoint1 = new TmfCheckpoint(fCheckpoint1); final TmfCheckpoint checkpoint2 = new TmfCheckpoint(checkpoint1); final TmfCheckpoint checkpoint3 = new TmfCheckpoint(checkpoint2); @@ -229,7 +229,7 @@ public class TmfCheckpointTest extends TestCase { assertTrue("equals", checkpoint1.equals(checkpoint3)); } - public void testNotEqual() throws Exception { + public void testNotEqual() { // Various checkpoints final TmfCheckpoint checkpoint1 = new TmfCheckpoint(fTimestamp1, new TmfContext(fLocation1)); final TmfCheckpoint checkpoint2 = new TmfCheckpoint(fTimestamp2, new TmfContext(fLocation1)); diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfContextTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfContextTest.java index bb55409592..c1feb8e364 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfContextTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfContextTest.java @@ -24,7 +24,7 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfLocation; /** * Test suite for the TmfContext class. */ -@SuppressWarnings("nls") +@SuppressWarnings({"nls","javadoc"}) public class TmfContextTest extends TestCase { // ------------------------------------------------------------------------ @@ -133,7 +133,7 @@ public class TmfContextTest extends TestCase { // equals // ------------------------------------------------------------------------ - public void testEqualsReflexivity() throws Exception { + public void testEqualsReflexivity() { assertTrue("equals", fContext1.equals(fContext1)); assertTrue("equals", fContext2.equals(fContext2)); @@ -141,7 +141,7 @@ public class TmfContextTest extends TestCase { assertFalse("equals", fContext2.equals(fContext1)); } - public void testEqualsSymmetry() throws Exception { + public void testEqualsSymmetry() { final TmfContext context1 = new TmfContext(fContext1); final TmfContext context2 = new TmfContext(fContext2); @@ -152,7 +152,7 @@ public class TmfContextTest extends TestCase { assertTrue("equals", fContext2.equals(context2)); } - public void testEqualsTransivity() throws Exception { + public void testEqualsTransivity() { final TmfContext context1 = new TmfContext(fContext1); final TmfContext context2 = new TmfContext(context1); final TmfContext context3 = new TmfContext(context2); @@ -162,7 +162,7 @@ public class TmfContextTest extends TestCase { assertTrue("equals", context1.equals(context3)); } - public void testEqualsNull() throws Exception { + public void testEqualsNull() { assertFalse("equals", fContext1.equals(null)); assertFalse("equals", fContext2.equals(null)); } @@ -170,7 +170,7 @@ public class TmfContextTest extends TestCase { private static class MyContext extends TmfContext { } - public void testNonEquals() throws Exception { + public void testNonEquals() { // Different classes final MyContext myContext = new MyContext(); @@ -202,7 +202,7 @@ public class TmfContextTest extends TestCase { // hashCode // ------------------------------------------------------------------------ - public void testHashCode() throws Exception { + public void testHashCode() { final TmfContext context1 = new TmfContext(fContext1); final TmfContext context2 = new TmfContext(fContext2); diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfExperimentCheckpointIndexTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfExperimentCheckpointIndexTest.java index c880feef09..9053a05e8c 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfExperimentCheckpointIndexTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfExperimentCheckpointIndexTest.java @@ -41,7 +41,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub; /** * Test suite for the TmfCheckpointIndexTest class. */ -@SuppressWarnings({ "nls" }) +@SuppressWarnings({"nls","javadoc"}) public class TmfExperimentCheckpointIndexTest extends TestCase { // ------------------------------------------------------------------------ @@ -62,7 +62,10 @@ public class TmfExperimentCheckpointIndexTest extends TestCase { // Housekeeping // ------------------------------------------------------------------------ - public TmfExperimentCheckpointIndexTest(final String name) throws Exception { + /** + * @param name the test name + */ + public TmfExperimentCheckpointIndexTest(final String name) { super(name); } @@ -112,7 +115,8 @@ public class TmfExperimentCheckpointIndexTest extends TestCase { // Verify checkpoints // ------------------------------------------------------------------------ - public void testTmfTraceIndexing() throws Exception { + @SuppressWarnings("null") + public void testTmfTraceIndexing() { assertEquals("getCacheSize", BLOCK_SIZE, fExperiment.getCacheSize()); assertEquals("getTraceSize", NB_EVENTS, fExperiment.getNbEvents()); assertEquals("getRange-start", 1, fExperiment.getTimeRange().getStartTime().getValue()); @@ -146,7 +150,8 @@ public class TmfExperimentCheckpointIndexTest extends TestCase { // Streaming // ------------------------------------------------------------------------ - public void testGrowingIndex() throws Exception { + @SuppressWarnings("null") + public void testGrowingIndex() { ITmfTrace[] testTraces = new TmfTraceStub[2]; try { diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfExperimentTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfExperimentTest.java index 9968c89651..448b3e549a 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfExperimentTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfExperimentTest.java @@ -45,7 +45,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub; /** * Test suite for the TmfExperiment class (single trace). */ -@SuppressWarnings({ "nls" }) +@SuppressWarnings({"nls","javadoc"}) public class TmfExperimentTest extends TestCase { // ------------------------------------------------------------------------ @@ -94,7 +94,10 @@ public class TmfExperimentTest extends TestCase { } } - public TmfExperimentTest(final String name) throws Exception { + /** + * @param name the test name + */ + public TmfExperimentTest(final String name) { super(name); } @@ -160,7 +163,7 @@ public class TmfExperimentTest extends TestCase { // getTimestamp // ------------------------------------------------------------------------ - public void testGetTimestamp() throws Exception { + public void testGetTimestamp() { assertEquals("getTimestamp", new TmfTimestamp( 1, (byte) -3), fExperiment.getTimestamp( 0)); assertEquals("getTimestamp", new TmfTimestamp( 2, (byte) -3), fExperiment.getTimestamp( 1)); assertEquals("getTimestamp", new TmfTimestamp( 11, (byte) -3), fExperiment.getTimestamp( 10)); @@ -176,7 +179,7 @@ public class TmfExperimentTest extends TestCase { // Bookmarks file handling // ------------------------------------------------------------------------ - public void testBookmarks() throws Exception { + public void testBookmarks() { assertNull("GetBookmarksFile", fExperiment.getBookmarksFile()); IFile bookmarks = (IFile) fTestTraces[0].getResource(); fExperiment.setBookmarksFile(bookmarks); @@ -187,12 +190,12 @@ public class TmfExperimentTest extends TestCase { // seekEvent by location // ------------------------------------------------------------------------ - public void testSeekBadLocation() throws Exception { + public void testSeekBadLocation() { ITmfContext context = fExperiment.seekEvent(new TmfLocation(0L)); assertNull("seekEvent", context); } - public void testSeekNoTrace() throws Exception { + public void testSeekNoTrace() { TmfExperiment experiment = new TmfExperiment(TmfEvent.class, EXPERIMENT, null); ITmfContext context = experiment.seekEvent((TmfExperimentLocation) null); assertNull("seekEvent", context); @@ -203,7 +206,7 @@ public class TmfExperimentTest extends TestCase { // seekEvent on ratio // ------------------------------------------------------------------------ - public void testSeekEventOnRatio() throws Exception { + public void testSeekEventOnRatio() { // First event ITmfContext context = fExperiment.seekEvent(0.0); @@ -243,7 +246,7 @@ public class TmfExperimentTest extends TestCase { } @SuppressWarnings("rawtypes") - public void testGetLocationRatio() throws Exception { + public void testGetLocationRatio() { // First event ITmfContext context = fExperiment.seekEvent((ITmfLocation) null); @@ -268,7 +271,7 @@ public class TmfExperimentTest extends TestCase { } // @SuppressWarnings("rawtypes") -// public void testGetCurrentLocation() throws Exception { +// public void testGetCurrentLocation() { // ITmfContext context = fExperiment.seekEvent((ITmfLocation) null); // ITmfLocation location = fExperiment.getCurrentLocation(); // assertEquals("getCurrentLocation", location, context.getLocation()); @@ -278,7 +281,7 @@ public class TmfExperimentTest extends TestCase { // seekEvent on rank // ------------------------------------------------------------------------ - public void testSeekRankOnCacheBoundary() throws Exception { + public void testSeekRankOnCacheBoundary() { long cacheSize = fExperiment.getCacheSize(); @@ -307,7 +310,7 @@ public class TmfExperimentTest extends TestCase { assertEquals("Context rank", 4 * cacheSize + 1, context.getRank()); } - public void testSeekRankNotOnCacheBoundary() throws Exception { + public void testSeekRankNotOnCacheBoundary() { long cacheSize = fExperiment.getCacheSize(); @@ -344,7 +347,7 @@ public class TmfExperimentTest extends TestCase { assertEquals("Context rank", 4501, context.getRank()); } - public void testSeekRankOutOfScope() throws Exception { + public void testSeekRankOutOfScope() { // Position trace at beginning ITmfContext context = fExperiment.seekEvent(-1); @@ -367,7 +370,7 @@ public class TmfExperimentTest extends TestCase { // seekEvent on timestamp // ------------------------------------------------------------------------ - public void testSeekTimestampOnCacheBoundary() throws Exception { + public void testSeekTimestampOnCacheBoundary() { long cacheSize = fExperiment.getCacheSize(); @@ -396,7 +399,7 @@ public class TmfExperimentTest extends TestCase { assertEquals("Context rank", 4 * cacheSize + 1, context.getRank()); } - public void testSeekTimestampNotOnCacheBoundary() throws Exception { + public void testSeekTimestampNotOnCacheBoundary() { // Position trace at event rank 1 (TS = 2) ITmfContext context = fExperiment.seekEvent(new TmfTimestamp(2, SCALE, 0)); @@ -439,7 +442,7 @@ public class TmfExperimentTest extends TestCase { assertEquals("Context rank", 4501, context.getRank()); } - public void testSeekTimestampOutOfScope() throws Exception { + public void testSeekTimestampOutOfScope() { // Position trace at beginning ITmfContext context = fExperiment.seekEvent(new TmfTimestamp(-1, SCALE, 0)); @@ -460,7 +463,7 @@ public class TmfExperimentTest extends TestCase { // seekEvent by location (context rank is undefined) // ------------------------------------------------------------------------ - public void testSeekLocationOnCacheBoundary() throws Exception { + public void testSeekLocationOnCacheBoundary() { long cacheSize = fExperiment.getCacheSize(); @@ -495,7 +498,7 @@ public class TmfExperimentTest extends TestCase { assertEquals("Event timestamp", 4 * cacheSize + 2, event.getTimestamp().getValue()); } - public void testSeekLocationNotOnCacheBoundary() throws Exception { + public void testSeekLocationNotOnCacheBoundary() { long cacheSize = fExperiment.getCacheSize(); @@ -531,7 +534,7 @@ public class TmfExperimentTest extends TestCase { assertEquals("Event timestamp", 4502, event.getTimestamp().getValue()); } - public void testSeekLocationOutOfScope() throws Exception { + public void testSeekLocationOutOfScope() { // Position trace at beginning ITmfContext context = fExperiment.seekEvent((ITmfLocation) null); @@ -544,7 +547,7 @@ public class TmfExperimentTest extends TestCase { // getNext - updates the context // ------------------------------------------------------------------------ - private void validateContextRanks(ITmfContext context) { + private static void validateContextRanks(ITmfContext context) { assertTrue("Experiment context type", context instanceof TmfExperimentContext); TmfExperimentContext ctx = (TmfExperimentContext) context; @@ -563,7 +566,7 @@ public class TmfExperimentTest extends TestCase { assertEquals("Experiment context rank", expRank, ctx.getRank()); } - public void testGetNextAfteSeekingOnTS_1() throws Exception { + public void testGetNextAfteSeekingOnTS_1() { final long INITIAL_TS = 1; final int NB_READS = 20; @@ -589,7 +592,7 @@ public class TmfExperimentTest extends TestCase { validateContextRanks(context); } - public void testGetNextAfteSeekingOnTS_2() throws Exception { + public void testGetNextAfteSeekingOnTS_2() { final long INITIAL_TS = 2; final int NB_READS = 20; @@ -615,7 +618,7 @@ public class TmfExperimentTest extends TestCase { validateContextRanks(context); } - public void testGetNextAfteSeekingOnTS_3() throws Exception { + public void testGetNextAfteSeekingOnTS_3() { final long INITIAL_TS = 500; final int NB_READS = 20; @@ -641,7 +644,7 @@ public class TmfExperimentTest extends TestCase { validateContextRanks(context); } - public void testGetNextAfterSeekingOnRank_1() throws Exception { + public void testGetNextAfterSeekingOnRank_1() { final long INITIAL_RANK = 0L; final int NB_READS = 20; @@ -667,7 +670,7 @@ public class TmfExperimentTest extends TestCase { validateContextRanks(context); } - public void testGetNextAfterSeekingOnRank_2() throws Exception { + public void testGetNextAfterSeekingOnRank_2() { final long INITIAL_RANK = 1L; final int NB_READS = 20; @@ -693,7 +696,7 @@ public class TmfExperimentTest extends TestCase { validateContextRanks(context); } - public void testGetNextAfterSeekingOnRank_3() throws Exception { + public void testGetNextAfterSeekingOnRank_3() { final long INITIAL_RANK = 500L; final int NB_READS = 20; @@ -719,7 +722,7 @@ public class TmfExperimentTest extends TestCase { validateContextRanks(context); } - public void testGetNextAfterSeekingOnLocation_1() throws Exception { + public void testGetNextAfterSeekingOnLocation_1() { final ITmfLocation INITIAL_LOC = null; final long INITIAL_TS = 1; @@ -746,7 +749,7 @@ public class TmfExperimentTest extends TestCase { validateContextRanks(context); } - public void testGetNextAfterSeekingOnLocation_2() throws Exception { + public void testGetNextAfterSeekingOnLocation_2() { final ITmfLocation INITIAL_LOC = fExperiment.seekEvent(1L).getLocation(); final long INITIAL_TS = 2; @@ -771,7 +774,7 @@ public class TmfExperimentTest extends TestCase { validateContextRanks(context); } - public void testGetNextAfterSeekingOnLocation_3() throws Exception { + public void testGetNextAfterSeekingOnLocation_3() { final ITmfLocation INITIAL_LOC = fExperiment.seekEvent(500L).getLocation(); final long INITIAL_TS = 501; @@ -796,7 +799,7 @@ public class TmfExperimentTest extends TestCase { validateContextRanks(context); } - public void testGetNextLocation() throws Exception { + public void testGetNextLocation() { ITmfContext context1 = fExperiment.seekEvent(0); fExperiment.getNext(context1); ITmfLocation location = context1.getLocation().clone(); @@ -806,7 +809,7 @@ public class TmfExperimentTest extends TestCase { assertEquals("Event timestamp", event1.getTimestamp().getValue(), event2.getTimestamp().getValue()); } - public void testGetNextEndLocation() throws Exception { + public void testGetNextEndLocation() { ITmfContext context1 = fExperiment.seekEvent(fExperiment.getNbEvents() - 1); fExperiment.getNext(context1); ITmfLocation location = context1.getLocation().clone(); @@ -814,12 +817,12 @@ public class TmfExperimentTest extends TestCase { ITmfEvent event = fExperiment.getNext(context2); assertNull("Event", event); } - + // ------------------------------------------------------------------------ // processRequest // ------------------------------------------------------------------------ - public void testProcessRequestForNbEvents() throws Exception { + public void testProcessRequestForNbEvents() throws InterruptedException { final int blockSize = 100; final int nbEvents = 1000; @@ -847,7 +850,7 @@ public class TmfExperimentTest extends TestCase { } } - public void testProcessRequestForNbEvents2() throws Exception { + public void testProcessRequestForNbEvents2() throws InterruptedException { final int blockSize = 2 * NB_EVENTS; final int nbEvents = 1000; @@ -875,7 +878,7 @@ public class TmfExperimentTest extends TestCase { } } - public void testProcessRequestForAllEvents() throws Exception { + public void testProcessRequestForAllEvents() throws InterruptedException { final int nbEvents = TmfDataRequest.ALL_DATA; final int blockSize = 1; @@ -908,7 +911,7 @@ public class TmfExperimentTest extends TestCase { // cancel // ------------------------------------------------------------------------ - public void testCancel() throws Exception { + public void testCancel() throws InterruptedException { final int nbEvents = NB_EVENTS; final int blockSize = BLOCK_SIZE; diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfLocationTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfLocationTest.java index ad121e4403..d869ce6652 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfLocationTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfLocationTest.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2010, 2012 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -21,7 +21,7 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfLocation; /** * Test suite for the TmfLocation class. */ -@SuppressWarnings("nls") +@SuppressWarnings({"nls","javadoc"}) public class TmfLocationTest extends TestCase { // ------------------------------------------------------------------------ @@ -116,7 +116,7 @@ public class TmfLocationTest extends TestCase { } } - public static class MyCloneableClass implements Cloneable, Comparable { + private static class MyCloneableClass implements Cloneable, Comparable { private String fName; public MyCloneableClass(String name) { @@ -154,18 +154,23 @@ public class TmfLocationTest extends TestCase { @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (obj == null) + } + if (obj == null) { return false; - if (!(obj instanceof MyCloneableClass)) + } + if (!(obj instanceof MyCloneableClass)) { return false; + } MyCloneableClass other = (MyCloneableClass) obj; if (fName == null) { - if (other.fName != null) + if (other.fName != null) { return false; - } else if (!fName.equals(other.fName)) + } + } else if (!fName.equals(other.fName)) { return false; + } return true; } } @@ -184,7 +189,7 @@ public class TmfLocationTest extends TestCase { } } - public static class MyUnCloneableClass implements Comparable { + private static class MyUnCloneableClass implements Comparable { private String fName; public MyUnCloneableClass(String name) { @@ -216,18 +221,23 @@ public class TmfLocationTest extends TestCase { @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (obj == null) + } + if (obj == null) { return false; - if (!(obj instanceof MyUnCloneableClass)) + } + if (!(obj instanceof MyUnCloneableClass)) { return false; + } MyUnCloneableClass other = (MyUnCloneableClass) obj; if (fName == null) { - if (other.fName != null) + if (other.fName != null) { return false; - } else if (!fName.equals(other.fName)) + } + } else if (!fName.equals(other.fName)) { return false; + } return true; } } @@ -246,7 +256,7 @@ public class TmfLocationTest extends TestCase { // hashCode // ------------------------------------------------------------------------ - public void testHashCode() throws Exception { + public void testHashCode() { TmfLocation location1 = new TmfLocation((String) null); TmfLocation location2 = new TmfLocation(aString); TmfLocation location3 = new TmfLocation(aLong); @@ -269,23 +279,23 @@ public class TmfLocationTest extends TestCase { } } - public void testEqualsWrongTypes() throws Exception { + public void testEqualsWrongTypes() { TmfLocation location1 = new TmfLocation(aString); TmfLocation2 location2 = new TmfLocation2(aString); - + assertFalse("equals", location1.equals(location2)); assertFalse("equals", location2.equals(location1)); } - public void testEqualsWithNulls() throws Exception { + public void testEqualsWithNulls() { TmfLocation location1 = new TmfLocation(aString); TmfLocation location2 = new TmfLocation((String) null); - + assertFalse("equals", location1.equals(location2)); assertFalse("equals", location2.equals(location1)); } - public void testEqualsReflexivity() throws Exception { + public void testEqualsReflexivity() { assertTrue("equals", fLocation2.equals(fLocation2)); assertTrue("equals", fLocation3.equals(fLocation3)); @@ -293,7 +303,7 @@ public class TmfLocationTest extends TestCase { assertTrue("equals", !fLocation3.equals(fLocation2)); } - public void testEqualsSymmetry() throws Exception { + public void testEqualsSymmetry() { TmfLocation location2 = new TmfLocation(aString); TmfLocation location3 = new TmfLocation(aLong); @@ -304,7 +314,7 @@ public class TmfLocationTest extends TestCase { assertTrue("equals", fLocation3.equals(location3)); } - public void testEqualsTransivity() throws Exception { + public void testEqualsTransivity() { TmfLocation location1 = new TmfLocation(aString); TmfLocation location2 = new TmfLocation(aString); TmfLocation location3 = new TmfLocation(aString); @@ -314,7 +324,7 @@ public class TmfLocationTest extends TestCase { assertTrue("equals", location3.equals(location1)); } - public void testEqualsNull() throws Exception { + public void testEqualsNull() { assertTrue("equals", !fLocation2.equals(null)); assertTrue("equals", !fLocation2.equals(null)); } @@ -323,6 +333,7 @@ public class TmfLocationTest extends TestCase { // toString // ------------------------------------------------------------------------ + @SuppressWarnings("hiding") public void testToString() { String aString = "some location"; Long aLong = 12345L; diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfMultiTraceExperimentTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfMultiTraceExperimentTest.java index 6b4c46e24a..3ce41a477f 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfMultiTraceExperimentTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfMultiTraceExperimentTest.java @@ -41,7 +41,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub; /** * Test suite for the TmfExperiment class (multiple traces). */ -@SuppressWarnings("nls") +@SuppressWarnings({"nls","javadoc"}) public class TmfMultiTraceExperimentTest extends TestCase { // ------------------------------------------------------------------------ @@ -88,7 +88,10 @@ public class TmfMultiTraceExperimentTest extends TestCase { return fTraces; } - public TmfMultiTraceExperimentTest(final String name) throws Exception { + /** + * @param name the test name + */ + public TmfMultiTraceExperimentTest(final String name) { super(name); } @@ -125,7 +128,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { // seekEvent on rank // ------------------------------------------------------------------------ - public void testSeekRankOnCacheBoundary() throws Exception { + public void testSeekRankOnCacheBoundary() { long cacheSize = fExperiment.getCacheSize(); @@ -154,7 +157,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { assertEquals("Context rank", 4 * cacheSize + 1, context.getRank()); } - public void testSeekRankNotOnCacheBoundary() throws Exception { + public void testSeekRankNotOnCacheBoundary() { long cacheSize = fExperiment.getCacheSize(); @@ -191,7 +194,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { assertEquals("Context rank", 4501, context.getRank()); } - public void testSeekRankOutOfScope() throws Exception { + public void testSeekRankOutOfScope() { // Position trace at beginning ITmfContext context = fExperiment.seekEvent(-1); @@ -214,7 +217,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { // seekEvent on timestamp // ------------------------------------------------------------------------ - public void testSeekTimestampOnCacheBoundary() throws Exception { + public void testSeekTimestampOnCacheBoundary() { long cacheSize = fExperiment.getCacheSize(); @@ -243,7 +246,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { assertEquals("Context rank", 4 * cacheSize + 1, context.getRank()); } - public void testSeekTimestampNotOnCacheBoundary() throws Exception { + public void testSeekTimestampNotOnCacheBoundary() { // Position trace at event rank 1 (TS = 2) ITmfContext context = fExperiment.seekEvent(new TmfTimestamp(2, SCALE, 0)); @@ -286,7 +289,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { assertEquals("Context rank", 4501, context.getRank()); } - public void testSeekTimestampOutOfScope() throws Exception { + public void testSeekTimestampOutOfScope() { // Position trace at beginning ITmfContext context = fExperiment.seekEvent(new TmfTimestamp(-1, SCALE, 0)); @@ -307,7 +310,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { // seekEvent by location (context rank is undefined) // ------------------------------------------------------------------------ - public void testSeekLocationOnCacheBoundary() throws Exception { + public void testSeekLocationOnCacheBoundary() { long cacheSize = fExperiment.getCacheSize(); @@ -342,7 +345,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { assertEquals("Event timestamp", 4 * cacheSize + 2, event.getTimestamp().getValue()); } - public void testSeekLocationNotOnCacheBoundary() throws Exception { + public void testSeekLocationNotOnCacheBoundary() { long cacheSize = fExperiment.getCacheSize(); @@ -378,7 +381,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { assertEquals("Event timestamp", 4502, event.getTimestamp().getValue()); } - public void testSeekLocationOutOfScope() throws Exception { + public void testSeekLocationOutOfScope() { // Position trace at beginning ITmfContext context = fExperiment.seekEvent((ITmfLocation) null); @@ -391,7 +394,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { // getNext - updates the context // ------------------------------------------------------------------------ - private void validateContextRanks(ITmfContext context) { + private static void validateContextRanks(ITmfContext context) { assertTrue("Experiment context type", context instanceof TmfExperimentContext); TmfExperimentContext ctx = (TmfExperimentContext) context; @@ -410,7 +413,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { assertEquals("Experiment context rank", expRank, ctx.getRank()); } - public void testGetNextAfteSeekingOnTS_1() throws Exception { + public void testGetNextAfteSeekingOnTS_1() { final long INITIAL_TS = 1; final int NB_READS = 20; @@ -436,7 +439,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { validateContextRanks(context); } - public void testGetNextAfteSeekingOnTS_2() throws Exception { + public void testGetNextAfteSeekingOnTS_2() { final long INITIAL_TS = 2; final int NB_READS = 20; @@ -462,7 +465,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { validateContextRanks(context); } - public void testGetNextAfteSeekingOnTS_3() throws Exception { + public void testGetNextAfteSeekingOnTS_3() { final long INITIAL_TS = 500; final int NB_READS = 20; @@ -488,7 +491,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { validateContextRanks(context); } - public void testGetNextAfterSeekingOnRank_1() throws Exception { + public void testGetNextAfterSeekingOnRank_1() { final long INITIAL_RANK = 0L; final int NB_READS = 20; @@ -514,7 +517,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { validateContextRanks(context); } - public void testGetNextAfterSeekingOnRank_2() throws Exception { + public void testGetNextAfterSeekingOnRank_2() { final long INITIAL_RANK = 1L; final int NB_READS = 20; @@ -540,7 +543,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { validateContextRanks(context); } - public void testGetNextAfterSeekingOnRank_3() throws Exception { + public void testGetNextAfterSeekingOnRank_3() { final long INITIAL_RANK = 500L; final int NB_READS = 20; @@ -566,7 +569,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { validateContextRanks(context); } - public void testGetNextAfterSeekingOnLocation_1() throws Exception { + public void testGetNextAfterSeekingOnLocation_1() { final ITmfLocation INITIAL_LOC = null; final long INITIAL_TS = 1; @@ -593,7 +596,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { validateContextRanks(context); } - public void testGetNextAfterSeekingOnLocation_2() throws Exception { + public void testGetNextAfterSeekingOnLocation_2() { final ITmfLocation INITIAL_LOC = fExperiment.seekEvent(1L).getLocation(); final long INITIAL_TS = 2; @@ -618,7 +621,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { validateContextRanks(context); } - public void testGetNextAfterSeekingOnLocation_3() throws Exception { + public void testGetNextAfterSeekingOnLocation_3() { final ITmfLocation INITIAL_LOC = fExperiment.seekEvent(500L).getLocation(); final long INITIAL_TS = 501; @@ -643,7 +646,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { validateContextRanks(context); } - public void testGetNextLocation() throws Exception { + public void testGetNextLocation() { ITmfContext context1 = fExperiment.seekEvent(0); fExperiment.getNext(context1); ITmfLocation location = context1.getLocation().clone(); @@ -653,7 +656,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { assertEquals("Event timestamp", event1.getTimestamp().getValue(), event2.getTimestamp().getValue()); } - public void testGetNextEndLocation() throws Exception { + public void testGetNextEndLocation() { ITmfContext context1 = fExperiment.seekEvent(fExperiment.getNbEvents() - 1); fExperiment.getNext(context1); ITmfLocation location = context1.getLocation().clone(); @@ -666,7 +669,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { // processRequest // ------------------------------------------------------------------------ - public void testProcessRequestForNbEvents() throws Exception { + public void testProcessRequestForNbEvents() throws InterruptedException { final int blockSize = 100; final int nbEvents = 1000; @@ -694,7 +697,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { } } - public void testProcessRequestForNbEvents2() throws Exception { + public void testProcessRequestForNbEvents2() throws InterruptedException { final int blockSize = 2 * NB_EVENTS; final int nbEvents = 1000; @@ -722,7 +725,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { } } - public void testProcessRequestForAllEvents() throws Exception { + public void testProcessRequestForAllEvents() throws InterruptedException { final int nbEvents = TmfDataRequest.ALL_DATA; final int blockSize = 1; @@ -755,7 +758,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { // cancel // ------------------------------------------------------------------------ - public void testCancel() throws Exception { + public void testCancel() throws InterruptedException { final int nbEvents = NB_EVENTS; final int blockSize = BLOCK_SIZE; @@ -791,7 +794,7 @@ public class TmfMultiTraceExperimentTest extends TestCase { // getTimestamp // ------------------------------------------------------------------------ - public void testGetTimestamp() throws Exception { + public void testGetTimestamp() { assertEquals("getTimestamp", new TmfTimestamp( 1, (byte) -3), fExperiment.getTimestamp( 0)); assertEquals("getTimestamp", new TmfTimestamp( 2, (byte) -3), fExperiment.getTimestamp( 1)); assertEquals("getTimestamp", new TmfTimestamp( 11, (byte) -3), fExperiment.getTimestamp( 10)); diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfTraceTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfTraceTest.java index a0bab9788d..345648c896 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfTraceTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfTraceTest.java @@ -44,7 +44,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub; /** * Test suite for the TmfTrace class. */ -@SuppressWarnings({ "nls" }) +@SuppressWarnings({"nls","javadoc"}) public class TmfTraceTest extends TestCase { // ------------------------------------------------------------------------ @@ -63,7 +63,10 @@ public class TmfTraceTest extends TestCase { // Housekeeping // ------------------------------------------------------------------------ - public TmfTraceTest(final String name) throws Exception { + /** + * @param name the test name + */ + public TmfTraceTest(final String name) { super(name); } @@ -106,7 +109,8 @@ public class TmfTraceTest extends TestCase { // Constructors // ------------------------------------------------------------------------ - public void testStandardConstructor() throws Exception { + @SuppressWarnings("null") + public void testStandardConstructor() throws TmfTraceException { TmfTraceStub trace = null; File testfile = null; try { @@ -135,7 +139,8 @@ public class TmfTraceTest extends TestCase { assertEquals("getEndTime", NB_EVENTS, trace.getEndTime().getValue()); } - public void testStandardConstructorCacheSize() throws Exception { + @SuppressWarnings("null") + public void testStandardConstructorCacheSize() throws TmfTraceException { TmfTraceStub trace = null; File testfile = null; try { @@ -188,7 +193,8 @@ public class TmfTraceTest extends TestCase { assertEquals("getEndTime", NB_EVENTS, trace.getEndTime().getValue()); } - public void testFullConstructor() throws Exception { + @SuppressWarnings("null") + public void testFullConstructor() throws TmfTraceException { TmfTraceStub trace = null; File testfile = null; try { @@ -217,7 +223,8 @@ public class TmfTraceTest extends TestCase { assertEquals("getEndTime", NB_EVENTS, trace.getEndTime().getValue()); } - public void testLiveTraceConstructor() throws Exception { + @SuppressWarnings("null") + public void testLiveTraceConstructor() throws TmfTraceException { TmfTraceStub trace = null; File testfile = null; final long interval = 100; @@ -247,8 +254,8 @@ public class TmfTraceTest extends TestCase { assertEquals("getEndTime", NB_EVENTS, trace.getEndTime().getValue()); } - @SuppressWarnings({ "unchecked", "rawtypes" }) - public void testCopyConstructor() throws Exception { + @SuppressWarnings({ "unchecked", "rawtypes", "null" }) + public void testCopyConstructor() throws TmfTraceException { TmfTraceStub original = null; TmfTraceStub trace = null; File testfile = null; @@ -293,7 +300,7 @@ public class TmfTraceTest extends TestCase { // Trace initialization // ------------------------------------------------------------------------ - public void testInitializeNullPath() throws Exception { + public void testInitializeNullPath() { // Instantiate an "empty" trace final TmfTraceStub trace = new TmfTraceStub(); @@ -307,8 +314,8 @@ public class TmfTraceTest extends TestCase { fail("TmfTrace.initialize() - wrong exception thrown"); } } - - public void testInitializeSimplePath() throws Exception { + + public void testInitializeSimplePath() { // Instantiate an "empty" trace final TmfTraceStub trace = new TmfTraceStub(); @@ -335,7 +342,7 @@ public class TmfTraceTest extends TestCase { assertEquals("getEndTime", Long.MIN_VALUE, trace.getEndTime().getValue()); } - public void testInitializeNormalPath() throws Exception { + public void testInitializeNormalPath() { // Instantiate an "empty" trace final TmfTraceStub trace = new TmfTraceStub(); @@ -363,7 +370,7 @@ public class TmfTraceTest extends TestCase { assertEquals("getEndTime", Long.MIN_VALUE, trace.getEndTime().getValue()); } - public void testInitTrace() throws Exception { + public void testInitTrace() throws URISyntaxException, IOException, TmfTraceException, InterruptedException { // Instantiate an "empty" trace final TmfTraceStub trace = new TmfTraceStub(); @@ -414,7 +421,7 @@ public class TmfTraceTest extends TestCase { // Set/Get streaming interval // ------------------------------------------------------------------------ - public void testSetStreamingInterval() throws Exception { + public void testSetStreamingInterval() throws TmfTraceException { final TmfTraceStub trace = new TmfTraceStub(fTrace); long interval = 0; @@ -423,15 +430,15 @@ public class TmfTraceTest extends TestCase { interval = 100; trace.setStreamingInterval(interval); assertEquals("getStreamingInterval", interval, trace.getStreamingInterval()); - + interval = -1; trace.setStreamingInterval(interval); assertEquals("getStreamingInterval", 0, trace.getStreamingInterval()); - + interval = 0; trace.setStreamingInterval(interval); assertEquals("getStreamingInterval", interval, trace.getStreamingInterval()); - + trace.dispose(); } @@ -439,7 +446,7 @@ public class TmfTraceTest extends TestCase { // Set/Get time range // ------------------------------------------------------------------------ - public void testSetTimeRange() throws Exception { + public void testSetTimeRange() throws TmfTraceException { final TmfTraceStub trace = new TmfTraceStub(fTrace); trace.indexTrace(); @@ -457,7 +464,7 @@ public class TmfTraceTest extends TestCase { trace.dispose(); } - public void testSetStartTime() throws Exception { + public void testSetStartTime() throws TmfTraceException { final TmfTraceStub trace = new TmfTraceStub(fTrace); trace.indexTrace(); @@ -475,7 +482,7 @@ public class TmfTraceTest extends TestCase { trace.dispose(); } - public void testSetEndTime() throws Exception { + public void testSetEndTime() throws TmfTraceException { final TmfTraceStub trace = new TmfTraceStub(fTrace); trace.indexTrace(); @@ -493,7 +500,7 @@ public class TmfTraceTest extends TestCase { trace.dispose(); } - public void testSetNbEvents() throws Exception { + public void testSetNbEvents() throws TmfTraceException { final TmfTraceStub trace = new TmfTraceStub(fTrace); trace.indexTrace(); @@ -518,7 +525,7 @@ public class TmfTraceTest extends TestCase { // seekEvent on location (note: does not reliably set the rank) // ------------------------------------------------------------------------ - public void testSeekEventOnCacheBoundary() throws Exception { + public void testSeekEventOnCacheBoundary() { // Position trace at event rank 0 ITmfContext context = fTrace.seekEvent(0); @@ -564,7 +571,7 @@ public class TmfTraceTest extends TestCase { assertEquals("Event rank", ITmfContext.UNKNOWN_RANK, context.getRank()); } - public void testSeekEventNotOnCacheBoundary() throws Exception { + public void testSeekEventNotOnCacheBoundary() { // Position trace at event rank 9 ITmfContext tmpContext = fTrace.seekEvent(new TmfTimestamp(10, SCALE, 0)); @@ -619,7 +626,7 @@ public class TmfTraceTest extends TestCase { assertEquals("Event rank", ITmfContext.UNKNOWN_RANK, context.getRank()); } - public void testSeekEventOutOfScope() throws Exception { + public void testSeekEventOutOfScope() { // Position trace at beginning ITmfContext tmpContext = fTrace.seekEvent(0); @@ -647,7 +654,7 @@ public class TmfTraceTest extends TestCase { // seekEvent on timestamp (note: does not reliably set the rank) // ------------------------------------------------------------------------ - public void testSeekEventOnNullTimestamp() throws Exception { + public void testSeekEventOnNullTimestamp() { // Position trace at event rank 0 ITmfContext context = fTrace.seekEvent((ITmfTimestamp) null); @@ -658,7 +665,7 @@ public class TmfTraceTest extends TestCase { assertEquals("Event rank", 0, context.getRank()); } - public void testSeekEventOnTimestampOnCacheBoundary() throws Exception { + public void testSeekEventOnTimestampOnCacheBoundary() { // Position trace at event rank 0 ITmfContext context = fTrace.seekEvent(new TmfTimestamp(1, SCALE, 0)); @@ -697,7 +704,7 @@ public class TmfTraceTest extends TestCase { assertEquals("Event rank", 4001, context.getRank()); } - public void testSeekEventOnTimestampNotOnCacheBoundary() throws Exception { + public void testSeekEventOnTimestampNotOnCacheBoundary() { // Position trace at event rank 1 ITmfContext context = fTrace.seekEvent(new TmfTimestamp(2, SCALE, 0)); @@ -760,7 +767,7 @@ public class TmfTraceTest extends TestCase { assertEquals("Event rank", 4501, context.getRank()); } - public void testSeekEventOnTimestampOutOfScope() throws Exception { + public void testSeekEventOnTimestampOutOfScope() { // Position trace at beginning ITmfContext context = fTrace.seekEvent(new TmfTimestamp(-1, SCALE, 0)); @@ -791,7 +798,7 @@ public class TmfTraceTest extends TestCase { // seekEvent on rank // ------------------------------------------------------------------------ - public void testSeekEventOnNegativeRank() throws Exception { + public void testSeekEventOnNegativeRank() { // Position trace at event rank 0 ITmfContext context = fTrace.seekEvent(-1); @@ -802,7 +809,7 @@ public class TmfTraceTest extends TestCase { assertEquals("Event rank", 0, context.getRank()); } - public void testSeekOnRankOnCacheBoundary() throws Exception { + public void testSeekOnRankOnCacheBoundary() { // On lower bound, returns the first event (ts = 1) ITmfContext context = fTrace.seekEvent(0); @@ -841,7 +848,7 @@ public class TmfTraceTest extends TestCase { assertEquals("Event rank", 4001, context.getRank()); } - public void testSeekOnRankNotOnCacheBoundary() throws Exception { + public void testSeekOnRankNotOnCacheBoundary() { // Position trace at event rank 9 ITmfContext context = fTrace.seekEvent(9); @@ -892,7 +899,7 @@ public class TmfTraceTest extends TestCase { assertEquals("Event rank", 4501, context.getRank()); } - public void testSeekEventOnRankOutOfScope() throws Exception { + public void testSeekEventOnRankOutOfScope() { // Position trace at beginning ITmfContext context = fTrace.seekEvent(-1); @@ -923,7 +930,7 @@ public class TmfTraceTest extends TestCase { // parseEvent - make sure parseEvent doesn't update the context // ------------------------------------------------------------------------ - public void testParseEvent() throws Exception { + public void testParseEvent() { final int NB_READS = 20; @@ -968,7 +975,7 @@ public class TmfTraceTest extends TestCase { // getNext - updates the context // ------------------------------------------------------------------------ - public void testGetNextAfteSeekingOnTS_1() throws Exception { + public void testGetNextAfteSeekingOnTS_1() { final long INITIAL_TS = 1; final int NB_READS = 20; @@ -990,7 +997,7 @@ public class TmfTraceTest extends TestCase { assertEquals("Event rank", INITIAL_TS + NB_READS - 1, context.getRank()); } - public void testGetNextAfteSeekingOnTS_2() throws Exception { + public void testGetNextAfteSeekingOnTS_2() { final long INITIAL_TS = 2; final int NB_READS = 20; @@ -1012,7 +1019,7 @@ public class TmfTraceTest extends TestCase { assertEquals("Event rank", INITIAL_TS + NB_READS - 1, context.getRank()); } - public void testGetNextAfteSeekingOnTS_3() throws Exception { + public void testGetNextAfteSeekingOnTS_3() { final long INITIAL_TS = 500; final int NB_READS = 20; @@ -1034,7 +1041,7 @@ public class TmfTraceTest extends TestCase { assertEquals("Event rank", INITIAL_TS + NB_READS - 1, context.getRank()); } - public void testGetNextAfterSeekingOnRank_1() throws Exception { + public void testGetNextAfterSeekingOnRank_1() { final long INITIAL_RANK = 0L; final int NB_READS = 20; @@ -1056,7 +1063,7 @@ public class TmfTraceTest extends TestCase { assertEquals("Event rank", INITIAL_RANK + NB_READS, context.getRank()); } - public void testGetNextAfterSeekingOnRank_2() throws Exception { + public void testGetNextAfterSeekingOnRank_2() { final long INITIAL_RANK = 1L; final int NB_READS = 20; @@ -1078,7 +1085,7 @@ public class TmfTraceTest extends TestCase { assertEquals("Event rank", INITIAL_RANK + NB_READS, context.getRank()); } - public void testGetNextAfterSeekingOnRank_3() throws Exception { + public void testGetNextAfterSeekingOnRank_3() { final long INITIAL_RANK = 500L; final int NB_READS = 20; @@ -1100,7 +1107,7 @@ public class TmfTraceTest extends TestCase { assertEquals("Event rank", INITIAL_RANK + NB_READS, context.getRank()); } - public void testGetNextAfterSeekingOnLocation_1() throws Exception { + public void testGetNextAfterSeekingOnLocation_1() { final ITmfLocation INITIAL_LOC = null; final long INITIAL_TS = 1; @@ -1123,7 +1130,7 @@ public class TmfTraceTest extends TestCase { assertEquals("Event rank", INITIAL_TS + NB_READS - 1, context.getRank()); } - public void testGetNextAfterSeekingOnLocation_2() throws Exception { + public void testGetNextAfterSeekingOnLocation_2() { final ITmfLocation INITIAL_LOC = fTrace.seekEvent(1L).getLocation(); final long INITIAL_TS = 2; @@ -1144,7 +1151,7 @@ public class TmfTraceTest extends TestCase { assertEquals("Event timestamp", INITIAL_TS + NB_READS, event.getTimestamp().getValue()); } - public void testGetNextAfterSeekingOnLocation_3() throws Exception { + public void testGetNextAfterSeekingOnLocation_3() { final ITmfLocation INITIAL_LOC = fTrace.seekEvent(500L).getLocation(); final long INITIAL_TS = 501; @@ -1165,7 +1172,7 @@ public class TmfTraceTest extends TestCase { assertEquals("Event timestamp", INITIAL_TS + NB_READS, event.getTimestamp().getValue()); } - public void testGetNextLocation() throws Exception { + public void testGetNextLocation() { ITmfContext context1 = fTrace.seekEvent(0); fTrace.getNext(context1); ITmfLocation location = context1.getLocation().clone(); @@ -1175,7 +1182,7 @@ public class TmfTraceTest extends TestCase { assertEquals("Event timestamp", event1.getTimestamp().getValue(), event2.getTimestamp().getValue()); } - public void testGetNextEndLocation() throws Exception { + public void testGetNextEndLocation() { ITmfContext context1 = fTrace.seekEvent(fTrace.getNbEvents() - 1); fTrace.getNext(context1); ITmfLocation location = context1.getLocation().clone(); @@ -1188,8 +1195,8 @@ public class TmfTraceTest extends TestCase { // processRequest // ------------------------------------------------------------------------ - @SuppressWarnings("unchecked") - public void testProcessEventRequestForAllEvents() throws Exception { + @SuppressWarnings("hiding") + public void testProcessEventRequestForAllEvents() throws InterruptedException { final int BLOCK_SIZE = 1; final Vector requestedEvents = new Vector(); @@ -1216,8 +1223,8 @@ public class TmfTraceTest extends TestCase { } } - @SuppressWarnings("unchecked") - public void testProcessEventRequestForNbEvents() throws Exception { + @SuppressWarnings("hiding") + public void testProcessEventRequestForNbEvents() throws InterruptedException { final int BLOCK_SIZE = 100; final int NB_EVENTS = 1000; final Vector requestedEvents = new Vector(); @@ -1245,8 +1252,8 @@ public class TmfTraceTest extends TestCase { } } - @SuppressWarnings("unchecked") - public void testProcessEventRequestForSomeEvents() throws Exception { + @SuppressWarnings("hiding") + public void testProcessEventRequestForSomeEvents() throws InterruptedException { final int BLOCK_SIZE = 1; final long startTime = 100; final int NB_EVENTS = 1000; @@ -1275,8 +1282,8 @@ public class TmfTraceTest extends TestCase { } } - @SuppressWarnings("unchecked") - public void testProcessEventRequestForOtherEvents() throws Exception { + @SuppressWarnings("hiding") + public void testProcessEventRequestForOtherEvents() throws InterruptedException { final int BLOCK_SIZE = 1; final int startIndex = 99; final long startTime = 100; @@ -1306,8 +1313,8 @@ public class TmfTraceTest extends TestCase { } } - @SuppressWarnings("unchecked") - public void testProcessDataRequestForSomeEvents() throws Exception { + @SuppressWarnings("hiding") + public void testProcessDataRequestForSomeEvents() throws InterruptedException { final int startIndex = 100; final int NB_EVENTS = 1000; final Vector requestedEvents = new Vector(); @@ -1338,8 +1345,7 @@ public class TmfTraceTest extends TestCase { // cancel // ------------------------------------------------------------------------ - @SuppressWarnings("unchecked") - public void testCancel() throws Exception { + public void testCancel() throws InterruptedException { final Vector requestedEvents = new Vector(); final TmfTimeRange range = new TmfTimeRange(TmfTimestamp.BIG_BANG, TmfTimestamp.BIG_CRUNCH); @@ -1367,7 +1373,7 @@ public class TmfTraceTest extends TestCase { // toString // ------------------------------------------------------------------------ - public void testDefaultTmfTraceStub() throws Exception { + public void testDefaultTmfTraceStub() { assertFalse ("Open trace", fTrace == null); assertEquals("getType", TmfEvent.class, fTrace.getType()); assertNull ("getResource", fTrace.getResource()); diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/uml2sd/AllTests.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/uml2sd/AllTests.java index d37cc454ef..a2bda98da9 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/uml2sd/AllTests.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/uml2sd/AllTests.java @@ -5,9 +5,18 @@ import junit.framework.TestSuite; import org.eclipse.linuxtools.internal.tmf.core.Activator; +/** + * AllTests + *

+ * Implement me. Please. + *

+ */ @SuppressWarnings({ "nls" }) public class AllTests { + /** + * @return the test suite + */ public static Test suite() { TestSuite suite = new TestSuite("Test suite for " + Activator.PLUGIN_ID + ".uml2sd"); //$NON-NLS-1$); //$JUnit-BEGIN$ diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/uml2sd/TmfAsyncSequenceDiagramEventTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/uml2sd/TmfAsyncSequenceDiagramEventTest.java index 4679385239..aef6435430 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/uml2sd/TmfAsyncSequenceDiagramEventTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/uml2sd/TmfAsyncSequenceDiagramEventTest.java @@ -21,7 +21,13 @@ import org.eclipse.linuxtools.tmf.core.event.TmfEventType; import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp; import org.eclipse.linuxtools.tmf.core.uml2sd.TmfAsyncSequenceDiagramEvent; -@SuppressWarnings("nls") +/** + * TmfAsyncSequenceDiagramEventTest + *

+ * Implement me. Please. + *

+ */ +@SuppressWarnings({"nls","javadoc"}) public class TmfAsyncSequenceDiagramEventTest extends TestCase { private final String fContext = ITmfEventType.DEFAULT_CONTEXT_ID; diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/uml2sd/TmfSyncSequenceDiagramEventTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/uml2sd/TmfSyncSequenceDiagramEventTest.java index 2de6f23b71..a7dd5acb5e 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/uml2sd/TmfSyncSequenceDiagramEventTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/uml2sd/TmfSyncSequenceDiagramEventTest.java @@ -21,7 +21,13 @@ import org.eclipse.linuxtools.tmf.core.event.TmfEventType; import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp; import org.eclipse.linuxtools.tmf.core.uml2sd.TmfSyncSequenceDiagramEvent; -@SuppressWarnings("nls") +/** + * TmfSyncSequenceDiagramEventTest + *

+ * Implement me. Please. + *

+ */ +@SuppressWarnings({"nls","javadoc"}) public class TmfSyncSequenceDiagramEventTest extends TestCase { private final String fContext = ITmfEventType.DEFAULT_CONTEXT_ID; diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/util/AllTests.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/util/AllTests.java index 1a881308ae..db1bf9dc93 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/util/AllTests.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/util/AllTests.java @@ -5,9 +5,18 @@ import junit.framework.TestSuite; import org.eclipse.linuxtools.internal.tmf.core.Activator; +/** + * AllTests + *

+ * Implement me. Please. + *

+ */ @SuppressWarnings({ "nls" }) public class AllTests { + /** + * @return the test suite + */ public static Test suite() { TestSuite suite = new TestSuite("Test suite for " + Activator.PLUGIN_ID + ".util"); //$NON-NLS-1$); //$JUnit-BEGIN$ diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/util/TmfFixedArrayTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/util/TmfFixedArrayTest.java index 7f4d6d4abe..cf58a89452 100755 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/util/TmfFixedArrayTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/util/TmfFixedArrayTest.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2011 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: * Mathieu Denis (mathieu.denis@polymtl.ca) - Initial design and implementation *******************************************************************************/ @@ -18,48 +18,55 @@ import junit.framework.TestCase; import org.eclipse.linuxtools.tmf.core.util.TmfFixedArray; +/** + * TmfFixedArrayTest + *

+ * Implement me. Please. + *

+ */ +@SuppressWarnings({"nls","javadoc"}) public class TmfFixedArrayTest extends TestCase { - + // ------------------------------------------------------------------------ // Field(s) // ------------------------------------------------------------------------ TmfFixedArray fFixedArray1 = null; TmfFixedArray fFixedArray2 = null; String fString1, fString2, fString3, fString4, fString5; - + // ------------------------------------------------------------------------ // Housekeeping // ------------------------------------------------------------------------ - + public TmfFixedArrayTest() { - fString1 = "First String"; //$NON-NLS-1$ - fString2 = "Second String"; //$NON-NLS-1$ - fString3 = "Third String"; //$NON-NLS-1$ - fString4 = "Fourth String"; //$NON-NLS-1$ - fString5 = "Fifth String"; //$NON-NLS-1$ + fString1 = "First String"; + fString2 = "Second String"; + fString3 = "Third String"; + fString4 = "Fourth String"; + fString5 = "Fifth String"; fFixedArray1 = new TmfFixedArray(fString1, fString2, fString3); fFixedArray2 = new TmfFixedArray(); // Empty array at the beginning } - + @Override protected void setUp() throws Exception { super.setUp(); } - + @Override protected void tearDown() throws Exception { super.tearDown(); } - + // ------------------------------------------------------------------------ // Get // ------------------------------------------------------------------------ - - public void testGet() throws Exception { - assertTrue("get", fString1.equals(fFixedArray1.get(0))); //$NON-NLS-1$ - assertTrue("get", fString2.equals(fFixedArray1.get(1))); //$NON-NLS-1$ - assertTrue("get", fString3.equals(fFixedArray1.get(2))); //$NON-NLS-1$ - + + public void testGet() { + assertTrue("get", fString1.equals(fFixedArray1.get(0))); + assertTrue("get", fString2.equals(fFixedArray1.get(1))); + assertTrue("get", fString3.equals(fFixedArray1.get(2))); + try { fFixedArray2.get(0); fail(); @@ -68,199 +75,196 @@ public class TmfFixedArrayTest extends TestCase { // Success } } - - public void testGetArray() throws Exception { + + public void testGetArray() { String[] stringArray = fFixedArray1.getArray(); - assertNotNull("getArray", stringArray); //$NON-NLS-1$ - assertTrue("getArray", fString1.equals(stringArray[0])); //$NON-NLS-1$ - assertTrue("getArray", fString2.equals(stringArray[1])); //$NON-NLS-1$ - assertTrue("getArray", fString3.equals(stringArray[2])); //$NON-NLS-1$ + assertNotNull("getArray", stringArray); + assertTrue("getArray", fString1.equals(stringArray[0])); + assertTrue("getArray", fString2.equals(stringArray[1])); + assertTrue("getArray", fString3.equals(stringArray[2])); } - + // ------------------------------------------------------------------------ // Equals // ------------------------------------------------------------------------ - - public void testEqualsReflexivity() throws Exception { - assertTrue("equals", fFixedArray1.equals(fFixedArray1)); //$NON-NLS-1$ - assertTrue("equals", fFixedArray2.equals(fFixedArray2)); //$NON-NLS-1$ - - assertTrue("equals", !fFixedArray1.equals(fFixedArray2)); //$NON-NLS-1$ - assertTrue("equals", !fFixedArray2.equals(fFixedArray1)); //$NON-NLS-1$ + + public void testEqualsReflexivity() { + assertTrue("equals", fFixedArray1.equals(fFixedArray1)); + assertTrue("equals", fFixedArray2.equals(fFixedArray2)); + + assertTrue("equals", !fFixedArray1.equals(fFixedArray2)); + assertTrue("equals", !fFixedArray2.equals(fFixedArray1)); } - - @SuppressWarnings("unchecked") - public void testEqualsSymmetry() throws Exception { + + public void testEqualsSymmetry() { TmfFixedArray fixedArray1 = (TmfFixedArray) fFixedArray1.clone(); TmfFixedArray fixedArray2 = (TmfFixedArray) fFixedArray2.clone(); - assertTrue("equals", fixedArray1.equals(fFixedArray1)); //$NON-NLS-1$ - assertTrue("equals", fFixedArray1.equals(fixedArray1)); //$NON-NLS-1$ + assertTrue("equals", fixedArray1.equals(fFixedArray1)); + assertTrue("equals", fFixedArray1.equals(fixedArray1)); - assertTrue("equals", fixedArray2.equals(fFixedArray2)); //$NON-NLS-1$ - assertTrue("equals", fFixedArray2.equals(fixedArray2)); //$NON-NLS-1$ + assertTrue("equals", fixedArray2.equals(fFixedArray2)); + assertTrue("equals", fFixedArray2.equals(fixedArray2)); } - - @SuppressWarnings("unchecked") - public void testEqualsTransivity() throws Exception { + + public void testEqualsTransivity() { TmfFixedArray fixedArray1 = (TmfFixedArray) fFixedArray1.clone(); TmfFixedArray fixedArray2 = (TmfFixedArray) fFixedArray1.clone(); TmfFixedArray fixedArray3 = (TmfFixedArray) fFixedArray1.clone(); - assertTrue("equals", fixedArray1.equals(fixedArray2)); //$NON-NLS-1$ - assertTrue("equals", fixedArray2.equals(fixedArray3)); //$NON-NLS-1$ - assertTrue("equals", fixedArray1.equals(fixedArray3)); //$NON-NLS-1$ + assertTrue("equals", fixedArray1.equals(fixedArray2)); + assertTrue("equals", fixedArray2.equals(fixedArray3)); + assertTrue("equals", fixedArray1.equals(fixedArray3)); } - - public void testEqualsNull() throws Exception { - assertTrue("equals", !fFixedArray1.equals(null)); //$NON-NLS-1$ - assertTrue("equals", !fFixedArray2.equals(null)); //$NON-NLS-1$ + + public void testEqualsNull() { + assertTrue("equals", !fFixedArray1.equals(null)); + assertTrue("equals", !fFixedArray2.equals(null)); } - + // ------------------------------------------------------------------------ // Append // ------------------------------------------------------------------------ public void testAppend() { - TmfFixedArray fixedArray = new TmfFixedArray(); - + TmfFixedArray fixedArray = new TmfFixedArray(); + fixedArray = fixedArray.append(fString1, fString2, fString3); - assertEquals("append", 3, fixedArray.size()); //$NON-NLS-1$ - assertTrue("append", fString1.equals(fixedArray.get(0))); //$NON-NLS-1$ - assertTrue("append", fString2.equals(fixedArray.get(1))); //$NON-NLS-1$ - assertTrue("append", fString3.equals(fixedArray.get(2))); //$NON-NLS-1$ + assertEquals("append", 3, fixedArray.size()); + assertTrue("append", fString1.equals(fixedArray.get(0))); + assertTrue("append", fString2.equals(fixedArray.get(1))); + assertTrue("append", fString3.equals(fixedArray.get(2))); fixedArray = fixedArray.append(fString4); - assertEquals("append", 4, fixedArray.size()); //$NON-NLS-1$ - assertTrue("append", fString4.equals(fixedArray.get(3))); //$NON-NLS-1$ + assertEquals("append", 4, fixedArray.size()); + assertTrue("append", fString4.equals(fixedArray.get(3))); } - - + + @SuppressWarnings("unchecked") - public void testAppendFixedArray() throws Exception { + public void testAppendFixedArray() { TmfFixedArray fixedArrayToAppend1 = new TmfFixedArray(fString4); TmfFixedArray fixedArrayToAppend2 = new TmfFixedArray(fString5); TmfFixedArray fixedArray = new TmfFixedArray(); - + fixedArray = fixedArray.append(fFixedArray1, fixedArrayToAppend1); - assertEquals("append", 4, fixedArray.size()); //$NON-NLS-1$ - assertTrue("append", fString1.equals(fixedArray.get(0))); //$NON-NLS-1$ - assertTrue("append", fString2.equals(fixedArray.get(1))); //$NON-NLS-1$ - assertTrue("append", fString3.equals(fixedArray.get(2))); //$NON-NLS-1$ - assertTrue("append", fString4.equals(fixedArray.get(3))); //$NON-NLS-1$ - + assertEquals("append", 4, fixedArray.size()); + assertTrue("append", fString1.equals(fixedArray.get(0))); + assertTrue("append", fString2.equals(fixedArray.get(1))); + assertTrue("append", fString3.equals(fixedArray.get(2))); + assertTrue("append", fString4.equals(fixedArray.get(3))); + fixedArray = fixedArray.append(fixedArrayToAppend2); - assertEquals("append", 5, fixedArray.size()); //$NON-NLS-1$ - assertTrue("append", fString5.equals(fixedArray.get(4))); //$NON-NLS-1$ + assertEquals("append", 5, fixedArray.size()); + assertTrue("append", fString5.equals(fixedArray.get(4))); } - + // ------------------------------------------------------------------------ // hashCode // ------------------------------------------------------------------------ - - @SuppressWarnings("unchecked") - public void testHashCode() throws Exception { + + public void testHashCode() { TmfFixedArray fixedArray1 = (TmfFixedArray) fFixedArray1.clone(); TmfFixedArray fixedArray2 = (TmfFixedArray) fFixedArray2.clone(); - assertTrue("hashCode", fixedArray1.hashCode() == fFixedArray1.hashCode()); //$NON-NLS-1$ - assertTrue("hashCode", fFixedArray2.hashCode() == fixedArray2.hashCode()); //$NON-NLS-1$ + assertTrue("hashCode", fixedArray1.hashCode() == fFixedArray1.hashCode()); + assertTrue("hashCode", fFixedArray2.hashCode() == fixedArray2.hashCode()); - assertTrue("hashCode", fFixedArray1.hashCode() != fixedArray2.hashCode()); //$NON-NLS-1$ - assertTrue("hashCode", fFixedArray2.hashCode() != fixedArray1.hashCode()); //$NON-NLS-1$ + assertTrue("hashCode", fFixedArray1.hashCode() != fixedArray2.hashCode()); + assertTrue("hashCode", fFixedArray2.hashCode() != fixedArray1.hashCode()); } - + // ------------------------------------------------------------------------ // toArray // ------------------------------------------------------------------------ public void testToArray() { String[] expected1 = {fString1, fString2, fString3}; - assertTrue("toArray", Arrays.equals(expected1, fFixedArray1.toArray())); //$NON-NLS-1$ - + assertTrue("toArray", Arrays.equals(expected1, fFixedArray1.toArray())); + String[] expected2 = {}; - assertTrue("toArray", Arrays.equals(expected2, fFixedArray2.toArray())); //$NON-NLS-1$ + assertTrue("toArray", Arrays.equals(expected2, fFixedArray2.toArray())); } - public void testToArrayArg() throws Exception { + public void testToArrayArg() { String[] stringArray = new String[3]; fFixedArray1.toArray(stringArray); - assertTrue("toArrayArg", stringArray[0].equals(fFixedArray1.get(0))); //$NON-NLS-1$ - assertTrue("toArrayArg", stringArray[1].equals(fFixedArray1.get(1))); //$NON-NLS-1$ - assertTrue("toArrayArg", stringArray[2].equals(fFixedArray1.get(2))); //$NON-NLS-1$ - + assertTrue("toArrayArg", stringArray[0].equals(fFixedArray1.get(0))); + assertTrue("toArrayArg", stringArray[1].equals(fFixedArray1.get(1))); + assertTrue("toArrayArg", stringArray[2].equals(fFixedArray1.get(2))); + String[] stringBigArray = new String[10]; fFixedArray1.toArray(stringBigArray); - assertNull("toArrayArg", stringBigArray[3]); //$NON-NLS-1$ - + assertNull("toArrayArg", stringBigArray[3]); + TmfFixedArray fFixedArrayObject = new TmfFixedArray(fString1); stringArray = fFixedArrayObject.toArray(new String[0]); - assertTrue("toArrayArg", stringArray[0].equals(fString1)); //$NON-NLS-1$ + assertTrue("toArrayArg", stringArray[0].equals(fString1)); } - + // ------------------------------------------------------------------------ // Size // ------------------------------------------------------------------------ public void testSize() { - assertEquals("toArray", 3, fFixedArray1.size()); //$NON-NLS-1$ - - assertEquals("toArray", 0, fFixedArray2.size()); //$NON-NLS-1$ + assertEquals("toArray", 3, fFixedArray1.size()); + + assertEquals("toArray", 0, fFixedArray2.size()); } - + // ------------------------------------------------------------------------ // SubArray // ------------------------------------------------------------------------ - public void testSubArray() throws Exception { + public void testSubArray() { TmfFixedArray subArray = fFixedArray1.subArray(1); - - assertEquals("SubArray", 2, subArray.size()); //$NON-NLS-1$ - assertTrue("SubArray", fString2.equals(subArray.get(0))); //$NON-NLS-1$ - assertTrue("SubArray", fString3.equals(subArray.get(1))); //$NON-NLS-1$ + + assertEquals("SubArray", 2, subArray.size()); + assertTrue("SubArray", fString2.equals(subArray.get(0))); + assertTrue("SubArray", fString3.equals(subArray.get(1))); } - + public void testSubArray2() { TmfFixedArray subArray = fFixedArray1.subArray(1, 2); - - assertEquals("SubArray", 2, subArray.size()); //$NON-NLS-1$ - assertTrue("SubArray", fString2.equals(subArray.get(0))); //$NON-NLS-1$ - assertTrue("SubArray", fString3.equals(subArray.get(1))); //$NON-NLS-1$ + + assertEquals("SubArray", 2, subArray.size()); + assertTrue("SubArray", fString2.equals(subArray.get(0))); + assertTrue("SubArray", fString3.equals(subArray.get(1))); } - + // ------------------------------------------------------------------------ // Set // ------------------------------------------------------------------------ - - public void testSet() throws Exception { - String[] newString = {"new FirstString", "new SecondString", "new ThirdString"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - + + public void testSet() { + String[] newString = {"new FirstString", "new SecondString", "new ThirdString"}; + fFixedArray1.set(0, newString[0]); - assertTrue("getArray", newString[0].equals(newString[0])); //$NON-NLS-1$ - + assertTrue("getArray", newString[0].equals(newString[0])); + fFixedArray1.set(1, newString[1]); - assertTrue("getArray", newString[1].equals(newString[1])); //$NON-NLS-1$ - + assertTrue("getArray", newString[1].equals(newString[1])); + fFixedArray1.set(2, newString[2]); - assertTrue("getArray", newString[2].equals(newString[2])); //$NON-NLS-1$ - + assertTrue("getArray", newString[2].equals(newString[2])); + try { - fFixedArray2.set(0, "newString"); //$NON-NLS-1$ + fFixedArray2.set(0, "newString"); fail(); } catch (Exception e) { // Success } } - + // ------------------------------------------------------------------------ // toString // ------------------------------------------------------------------------ public void testToString() { String expected1 = Arrays.asList(fString1, fString2, fString3).toString(); - assertEquals("toString", expected1, fFixedArray1.toString()); //$NON-NLS-1$ + assertEquals("toString", expected1, fFixedArray1.toString()); String expected2 = Arrays.asList().toString(); - assertEquals("toString", expected2, fFixedArray2.toString()); //$NON-NLS-1$ + assertEquals("toString", expected2, fFixedArray2.toString()); } } diff --git a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfClientStub.java b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfClientStub.java index c6b83af874..518554a3a8 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfClientStub.java +++ b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfClientStub.java @@ -22,7 +22,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.event.TmfSyntheticEventStub; *

* TODO: Implement me. Please. */ -@SuppressWarnings({ "nls" }) +@SuppressWarnings({"nls","javadoc"}) public class TmfClientStub extends TmfComponent { private TmfDataProvider[] fProviders; @@ -31,7 +31,6 @@ public class TmfClientStub extends TmfComponent { super("TmfClientStub"); } - @SuppressWarnings("unchecked") public void findProvider() { fProviders = (TmfDataProvider[]) TmfProviderManager.getProviders(TmfSyntheticEventStub.class, TmfSyntheticEventProviderStub.class); // TmfEventRequest request; diff --git a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfDataProviderStub.java b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfDataProviderStub.java index 5592b28433..2889cca5d2 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfDataProviderStub.java +++ b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfDataProviderStub.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2010 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -33,7 +33,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub; *

* TODO: Implement me. Please. */ -@SuppressWarnings("nls") +@SuppressWarnings({"nls","javadoc"}) public class TmfDataProviderStub extends TmfDataProvider { private static final String DIRECTORY = "testfiles"; diff --git a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfEventProviderStub.java b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfEventProviderStub.java index d90b6ba7f9..f105d4d423 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfEventProviderStub.java +++ b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfEventProviderStub.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2010 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -33,7 +33,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub; *

* TODO: Implement me. Please. */ -@SuppressWarnings("nls") +@SuppressWarnings({"nls","javadoc"}) public class TmfEventProviderStub extends TmfEventProvider { private static final String DIRECTORY = "testfiles"; diff --git a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfSyntheticEventProviderStub.java b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfSyntheticEventProviderStub.java index 678cb711a2..b9282e8d73 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfSyntheticEventProviderStub.java +++ b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfSyntheticEventProviderStub.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2010 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -31,7 +31,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.event.TmfSyntheticEventStub; *

* TODO: Implement me. Please. */ -@SuppressWarnings({ "nls" }) +@SuppressWarnings({"nls","javadoc"}) public class TmfSyntheticEventProviderStub extends TmfEventProvider { public static final int BLOCK_SIZE = 100; @@ -41,7 +41,6 @@ public class TmfSyntheticEventProviderStub extends TmfEventProvider request) { @@ -62,10 +61,11 @@ public class TmfSyntheticEventProviderStub extends TmfEventProvider * TODO: Implement me. Please. */ -@SuppressWarnings("nls") +@SuppressWarnings({"nls","javadoc"}) public class TmfEventTypeStub extends TmfEventType { private static final ITmfEventField FIELD_1 = new TmfEventField("Field1", null); diff --git a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/event/TmfSyntheticEventStub.java b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/event/TmfSyntheticEventStub.java index 818badc039..e996d2e232 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/event/TmfSyntheticEventStub.java +++ b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/event/TmfSyntheticEventStub.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2010 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -19,6 +19,7 @@ import org.eclipse.linuxtools.tmf.core.event.TmfEvent; *

* TODO: Implement me. Please. */ +@SuppressWarnings("javadoc") public class TmfSyntheticEventStub extends TmfEvent { diff --git a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfEventParserStub.java b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfEventParserStub.java index 44b51f8913..fefeee13a3 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfEventParserStub.java +++ b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfEventParserStub.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -32,7 +32,7 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfLocation; *

* TODO: Implement me. Please. */ -@SuppressWarnings("nls") +@SuppressWarnings({"nls","javadoc"}) public class TmfEventParserStub implements ITmfEventParser { // ------------------------------------------------------------------------ @@ -68,11 +68,11 @@ public class TmfEventParserStub implements ITmfEventParser { static final String typePrefix = "Type-"; @Override - @SuppressWarnings("unchecked") public TmfEvent parseEvent(final ITmfContext context) { - if (! (fEventStream instanceof TmfTraceStub)) + if (! (fEventStream instanceof TmfTraceStub)) { return null; + } // Highly inefficient... final RandomAccessFile stream = ((TmfTraceStub) fEventStream).getStream(); @@ -93,14 +93,17 @@ public class TmfEventParserStub implements ITmfEventParser { final Integer reference = stream.readInt(); final int typeIndex = Integer.parseInt(type.substring(typePrefix.length())); final String[] fields = new String[typeIndex]; - for (int i = 0; i < typeIndex; i++) + for (int i = 0; i < typeIndex; i++) { fields[i] = stream.readUTF(); + } final StringBuffer content = new StringBuffer("["); - if (typeIndex > 0) + if (typeIndex > 0) { content.append(fields[0]); - for (int i = 1; i < typeIndex; i++) + } + for (int i = 1; i < typeIndex; i++) { content.append(", ").append(fields[i]); + } content.append("]"); final TmfEventField root = new TmfEventField(ITmfEventField.ROOT_FIELD_ID, content.toString()); diff --git a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfExperimentStub.java b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfExperimentStub.java index b9de89e519..34eea40894 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfExperimentStub.java +++ b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfExperimentStub.java @@ -23,6 +23,7 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfExperiment; * Implement me. Please. *

*/ +@SuppressWarnings("javadoc") public class TmfExperimentStub extends TmfExperiment { public TmfExperimentStub(String name, ITmfTrace[] traces, int blockSize) { diff --git a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfIndexerStub.java b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfIndexerStub.java index a2d2659fd2..2acfa55275 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfIndexerStub.java +++ b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfIndexerStub.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2012 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -25,6 +25,7 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfCheckpointIndexer; * Implement me. Please. *

*/ +@SuppressWarnings("javadoc") public class TmfIndexerStub extends TmfCheckpointIndexer> { @SuppressWarnings({ "rawtypes", "unchecked" }) diff --git a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfTraceStub.java b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfTraceStub.java index 595796d88b..97324ed646 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfTraceStub.java +++ b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfTraceStub.java @@ -37,7 +37,7 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfTrace; *

* Dummy test trace. Use in conjunction with TmfEventParserStub. */ -@SuppressWarnings("nls") +@SuppressWarnings({"nls","javadoc"}) public class TmfTraceStub extends TmfTrace implements ITmfEventParser { // ------------------------------------------------------------------------ -- 2.34.1