+/*******************************************************************************
+ * Copyright (c) 2012, 2013 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Matthew Khouzam - Initial generation with CodePro tools
+ * Alexandre Montplaisir - Clean up, consolidate redundant tests
+ *******************************************************************************/
+
package org.eclipse.linuxtools.tmf.core.tests.ctfadaptor;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeTrue;
import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator;
import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfLocation;
+import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfLocationInfo;
import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfEvent;
import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace;
-import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
+import org.eclipse.linuxtools.tmf.core.tests.shared.CtfTmfTestTrace;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
/**
- * The class <code>CtfIteratorTest</code> contains tests for the class <code>{@link CtfIterator}</code>.
+ * The class <code>CtfIteratorTest</code> contains tests for the class
+ * <code>{@link CtfIterator}</code>.
*
- * @generatedBy CodePro at 03/05/12 2:29 PM
* @author ematkho
- * @version $Revision: 1.0 $
+ * @version 1.0
*/
-@SuppressWarnings("static-method")
public class CtfIteratorTest {
+
+ private static final CtfTmfTestTrace testTrace = CtfTmfTestTrace.KERNEL;
+
+ private CtfTmfTrace trace;
+ private CtfIterator iterator;
+
/**
- * Run the CtfIterator(CtfTmfTrace) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
+ * Perform pre-test initialization.
+ */
+ @Before
+ public void setUp() {
+ assumeTrue(testTrace.exists());
+ trace = testTrace.getTrace();
+ iterator = new CtfIterator(trace);
+ CtfLocation ctfLocation = new CtfLocation(new CtfLocationInfo(1, 0));
+ iterator.setLocation(ctfLocation);
+ iterator.increaseRank();
+ }
+
+ /**
+ * Perform post-test clean-up.
+ */
+ @After
+ public void tearDown() {
+ if (iterator != null) {
+ iterator.dispose();
+ }
+ }
+
+ /**
+ * Run the CtfIterator(CtfTmfTrace) constructor on a non init'ed trace.
*/
@Test
- public void testCtfIterator_1()
- throws Exception {
- CtfTmfTrace trace = createTrace();
+ public void testCtfIterator_noinit() {
CtfIterator result = new CtfIterator(trace);
assertNotNull(result);
}
/**
- * Run the CtfIterator(CtfTmfTrace) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
+ * Run the CtfIterator(CtfTmfTrace) constructor on an init'ed trace.
*/
@Test
- public void testCtfIterator_2()
- throws Exception {
- CtfTmfTrace trace = createTrace();
- trace.init("test"); //$NON-NLS-1$
-
+ public void testCtfIterator_init() {
+ trace.init("test");
CtfIterator result = new CtfIterator(trace);
assertNotNull(result);
}
/**
- * Run the CtfIterator(CtfTmfTrace,long,long) constructor test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
+ * Run the CtfIterator(CtfTmfTrace,long,long) constructor test, which
+ * specifies an initial position for the iterator.
*/
@Test
- public void testCtfIterator_3()
- throws Exception {
- CtfTmfTrace trace = createTrace();
+ public void testCtfIterator_position() {
long timestampValue = 1L;
long rank = 1L;
-
- CtfIterator result = new CtfIterator(trace, timestampValue, rank);
+ CtfIterator result = new CtfIterator(trace, new CtfLocationInfo(timestampValue, 0), rank);
assertNotNull(result);
}
/**
* Run the boolean advance() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
- */
- @Test
- public void testAdvance_1()
- throws Exception {
- CtfIterator fixture = new CtfIterator(createTrace());
- CtfLocation ctfLocation = new CtfLocation(Long.valueOf(1));
- ctfLocation.setLocation(Long.valueOf(1));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
-
- boolean result = fixture.advance();
- assertTrue(result);
- }
-
- /**
- * Run the boolean advance() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
*/
@Test
- public void testAdvance_2()
- throws Exception {
- CtfIterator fixture = new CtfIterator(createTrace());
- CtfLocation ctfLocation = new CtfLocation(Long.valueOf(1));
- ctfLocation.setLocation(Long.valueOf(1));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
-
- boolean result = fixture.advance();
-
+ public void testAdvance() {
+ boolean result = iterator.advance();
assertTrue(result);
}
/**
* Run the CtfIterator clone() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
*/
@Test
- public void testClone_1()
- throws Exception {
- CtfIterator fixture = new CtfIterator(createTrace());
- CtfLocation ctfLocation = new CtfLocation(Long.valueOf(1));
- ctfLocation.setLocation(Long.valueOf(1));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
-
- CtfIterator result = fixture.clone();
+ public void testClone() {
+ CtfIterator result = iterator.clone();
assertNotNull(result);
}
/**
* Run the int compareTo(CtfIterator) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
*/
-
@Test
- public void testCompareTo_1()
- throws Exception {
- CtfIterator fixture = new CtfIterator(createTrace());
- CtfLocation ctfLocation = new CtfLocation(Long.valueOf(1));
- ctfLocation.setLocation(Long.valueOf(1));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
- CtfIterator o = new CtfIterator(createTrace());
-
- int result = fixture.compareTo(o);
+ public void testCompareTo() {
+ CtfIterator o = new CtfIterator(trace);
+ int result = iterator.compareTo(o);
assertEquals(1L, result);
}
/**
- * @return
- * @throws TmfTraceException
- */
- private CtfTmfTrace createTrace() throws TmfTraceException {
- return TestParams.createTrace();
- }
-
- /**
- * Run the int compareTo(CtfIterator) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
+ * Run the boolean equals(Object) method test. Compare with another iterator
+ * on the same trace.
*/
@Test
- public void testCompareTo_2()
- throws Exception {
- CtfIterator fixture = new CtfIterator(createTrace());
- CtfLocation ctfLocation = new CtfLocation(Long.valueOf(1));
- ctfLocation.setLocation(Long.valueOf(1));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
- CtfIterator o = new CtfIterator(createTrace());
-
- int result = fixture.compareTo(o);
-
- assertEquals(1, result);
- }
-
- /**
- * Run the int compareTo(CtfIterator) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
- */
- @Test
- public void testCompareTo_3()
- throws Exception {
- CtfIterator fixture = new CtfIterator(createTrace());
- CtfLocation ctfLocation = new CtfLocation(Long.valueOf(1));
- ctfLocation.setLocation(Long.valueOf(1));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
- CtfIterator o = new CtfIterator(createTrace());
-
- int result = fixture.compareTo(o);
- assertEquals(1, result);
- }
-
- /**
- * Run the void dispose() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
- */
- @Test
- public void testDispose_1()
- throws Exception {
- CtfIterator fixture = new CtfIterator(createTrace());
- CtfLocation ctfLocation = new CtfLocation(Long.valueOf(1));
- ctfLocation.setLocation(Long.valueOf(1));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
-
- fixture.dispose();
- }
-
- /**
- * Run the boolean equals(Object) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
- */
- @Test
- public void testEquals_1()
- throws Exception {
- CtfIterator fixture = new CtfIterator(createTrace());
- CtfLocation ctfLocation = new CtfLocation(Long.valueOf(1));
- ctfLocation.setLocation(Long.valueOf(1));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
- CtfIterator obj = new CtfIterator(createTrace());
- CtfLocation ctfLocation1 = new CtfLocation(Long.valueOf(1));
- ctfLocation1.setLocation(Long.valueOf(1));
+ public void testEquals_other() {
+ CtfIterator obj = new CtfIterator(trace);
+ CtfLocation ctfLocation1 = new CtfLocation(new CtfLocationInfo(1, 0));
obj.setLocation(ctfLocation1);
obj.increaseRank();
- boolean result = fixture.equals(obj);
-
+ boolean result = iterator.equals(obj);
assertTrue(result);
}
/**
- * Run the boolean equals(Object) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
- */
- @Test
- public void testEquals_2()
- throws Exception {
- CtfIterator fixture = new CtfIterator(createTrace());
- CtfLocation ctfLocation = new CtfLocation(Long.valueOf(1));
- ctfLocation.setLocation(Long.valueOf(1));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
- Object obj = new Object();
-
- boolean result = fixture.equals(obj);
-
- assertFalse(result);
- }
-
- /**
- * Run the boolean equals(Object) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
+ * Run the boolean equals(Object) method test. Compare with an empty object.
*/
@Test
- public void testEquals_3()
- throws Exception {
- CtfIterator fixture = new CtfIterator(createTrace());
- CtfLocation ctfLocation = new CtfLocation(Long.valueOf(1));
- ctfLocation.setLocation(Long.valueOf(1));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
+ public void testEquals_empty() {
Object obj = new Object();
-
- boolean result = fixture.equals(obj);
+ boolean result = iterator.equals(obj);
assertFalse(result);
}
/**
* Run the CtfTmfTrace getCtfTmfTrace() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
*/
@Test
- public void testGetCtfTmfTrace_1()
- throws Exception {
- CtfIterator fixture = new CtfIterator(createTrace());
- CtfLocation ctfLocation = new CtfLocation(Long.valueOf(1));
- ctfLocation.setLocation(Long.valueOf(1));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
-
- CtfTmfTrace result = fixture.getCtfTmfTrace();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NullPointerException
- // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
- // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
- // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
+ public void testGetCtfTmfTrace() {
+ CtfTmfTrace result = iterator.getCtfTmfTrace();
assertNotNull(result);
}
/**
* Run the CtfTmfEvent getCurrentEvent() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
*/
@Test
- public void testGetCurrentEvent_1()
- throws Exception {
- CtfIterator fixture = new CtfIterator(createTrace());
- CtfLocation ctfLocation = new CtfLocation(Long.valueOf(1));
- ctfLocation.setLocation(Long.valueOf(1));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
-
- CtfTmfEvent result = fixture.getCurrentEvent();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NullPointerException
- // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
- // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
- // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
- assertNotNull(result);
- }
-
- /**
- * Run the CtfTmfEvent getCurrentEvent() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
- */
- @Test
- public void testGetCurrentEvent_2()
- throws Exception {
- CtfIterator fixture = new CtfIterator(createTrace());
- CtfLocation ctfLocation = new CtfLocation(Long.valueOf(1));
- ctfLocation.setLocation(Long.valueOf(1));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
-
- CtfTmfEvent result = fixture.getCurrentEvent();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NullPointerException
- // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
- // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
- // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
+ public void testGetCurrentEvent() {
+ CtfTmfEvent result = iterator.getCurrentEvent();
assertNotNull(result);
}
/**
* Run the CtfLocation getLocation() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
*/
@Test
- public void testGetLocation_1()
- throws Exception {
- CtfIterator fixture = new CtfIterator(createTrace());
- CtfLocation ctfLocation = new CtfLocation(Long.valueOf(1));
- ctfLocation.setLocation(Long.valueOf(1));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
-
- CtfLocation result = fixture.getLocation();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NullPointerException
- // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
- // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
- // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
+ public void testGetLocation() {
+ CtfLocation result = iterator.getLocation();
assertNotNull(result);
}
/**
* Run the long getRank() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
*/
@Test
- public void testGetRank_1()
- throws Exception {
- CtfIterator fixture = new CtfIterator(createTrace());
- CtfLocation ctfLocation = new CtfLocation(Long.valueOf(1));
- ctfLocation.setLocation(Long.valueOf(1));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
-
- long result = fixture.getRank();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NullPointerException
- // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
- // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
- // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
+ public void testGetRank() {
+ long result = iterator.getRank();
assertEquals(1L, result);
}
/**
* Run the boolean hasValidRank() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
- */
- @Test
- public void testHasValidRank_1()
- throws Exception {
- CtfIterator fixture = new CtfIterator(createTrace());
- CtfLocation ctfLocation = new CtfLocation(Long.valueOf(1));
- ctfLocation.setLocation(Long.valueOf(1));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
-
- boolean result = fixture.hasValidRank();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NullPointerException
- // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
- // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
- // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
- assertTrue(result);
- }
-
- /**
- * Run the boolean hasValidRank() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
*/
@Test
- public void testHasValidRank_2()
- throws Exception {
- CtfIterator fixture = new CtfIterator(createTrace());
- CtfLocation ctfLocation = new CtfLocation(Long.valueOf(1));
- ctfLocation.setLocation(Long.valueOf(1));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
-
- boolean result = fixture.hasValidRank();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NullPointerException
- // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
- // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
- // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
+ public void testHasValidRank() {
+ boolean result = iterator.hasValidRank();
assertTrue(result);
}
/**
* Run the int hashCode() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
*/
@Test
- public void testHashCode_1()
- throws Exception {
- CtfIterator fixture = new CtfIterator(createTrace());
- CtfLocation ctfLocation = new CtfLocation(Long.valueOf(1));
- ctfLocation.setLocation(Long.valueOf(1));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
-
- int result = fixture.hashCode();
- int result2 = fixture.hashCode();
+ public void testHashCode() {
+ int result = iterator.hashCode();
+ int result2 = iterator.hashCode();
assertEquals(result, result2);
}
/**
* Run the void increaseRank() method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
- */
- @Test
- public void testIncreaseRank_1()
- throws Exception {
- CtfIterator fixture = new CtfIterator(createTrace());
- CtfLocation ctfLocation = new CtfLocation(Long.valueOf(1));
- ctfLocation.setLocation(Long.valueOf(1));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
-
- fixture.increaseRank();
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NullPointerException
- // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
- // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
- // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
- }
-
- /**
- * Run the boolean seek(long) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
*/
@Test
- public void testSeek_1()
- throws Exception {
- CtfIterator fixture = new CtfIterator(createTrace());
- CtfLocation ctfLocation = new CtfLocation(Long.valueOf(1));
- ctfLocation.setLocation(Long.valueOf(1));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
- long timestamp = 1L;
-
- boolean result = fixture.seek(timestamp);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NullPointerException
- // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
- // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
- // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
- assertTrue(result);
+ public void testIncreaseRank() {
+ iterator.increaseRank();
}
/**
* Run the boolean seek(long) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
*/
@Test
- public void testSeek_2()
- throws Exception {
- CtfIterator fixture = new CtfIterator(createTrace());
- CtfLocation ctfLocation = new CtfLocation(Long.valueOf(1));
- ctfLocation.setLocation(Long.valueOf(1));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
+ public void testSeek() {
long timestamp = 1L;
-
- boolean result = fixture.seek(timestamp);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NullPointerException
- // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
- // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
- // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
+ boolean result = iterator.seek(timestamp);
assertTrue(result);
}
-
/**
* Run the void setLocation(ITmfLocation<?>) method test.
- *
- * @throws Exception
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
*/
@Test
- public void testSetLocation_1()
- throws Exception {
- CtfIterator fixture = new CtfIterator(createTrace());
- CtfLocation ctfLocation = new CtfLocation(Long.valueOf(1));
- ctfLocation.setLocation(Long.valueOf(1));
- fixture.setLocation(ctfLocation);
- fixture.increaseRank();
- CtfLocation location = new CtfLocation(Long.valueOf(1));
- location.setLocation(Long.valueOf(1));
-
- fixture.setLocation(location);
-
- // add additional test code here
- // An unexpected exception was thrown in user code while executing this test:
- // java.lang.NullPointerException
- // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.createStreamInputReaders(CTFTraceReader.java:152)
- // at org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader.<init>(CTFTraceReader.java:92)
- // at org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator.<init>(CtfIterator.java:40)
- }
-
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
- */
- @Before
- public void setUp()
- throws Exception {
- // add additional set up code here
- }
-
- /**
- * Perform post-test clean-up.
- *
- * @throws Exception
- * if the clean-up fails for some reason
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
- */
- @After
- public void tearDown()
- throws Exception {
- // Add additional tear down code here
- }
-
- /**
- * Launch the test.
- *
- * @param args the command line arguments
- *
- * @generatedBy CodePro at 03/05/12 2:29 PM
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(CtfIteratorTest.class);
+ public void testSetLocation() {
+ CtfLocation location = new CtfLocation(new CtfLocationInfo(1, 0));
+ iterator.setLocation(location);
}
-}
\ No newline at end of file
+}