import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation;
import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
import org.eclipse.linuxtools.tmf.core.trace.TmfExperiment;
-import org.eclipse.linuxtools.tmf.core.trace.TmfLocation;
+import org.eclipse.linuxtools.tmf.core.trace.TmfLongLocation;
import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfExperimentStub;
import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub;
// ------------------------------------------------------------------------
public void testSeekBadLocation() {
- ITmfContext context = fExperiment.seekEvent(new TmfLocation<Long>(0L));
+ ITmfContext context = fExperiment.seekEvent(new TmfLongLocation(0L));
assertNull("seekEvent", context);
}
assertEquals("Context rank", 0, context.getRank());
}
- @SuppressWarnings("rawtypes")
public void testGetLocationRatio() {
// First event
public void testSeekLocationOutOfScope() {
// Position trace at beginning
- ITmfContext context = fExperiment.seekEvent((ITmfLocation<?>) null);
+ ITmfContext context = fExperiment.seekEvent((ITmfLocation) null);
ITmfEvent event = fExperiment.getNext(context);
assertEquals("Event timestamp", 1, event.getTimestamp().getValue());
public void testGetNextAfterSeekingOnLocation_1() {
- final ITmfLocation<?> INITIAL_LOC = null;
+ final ITmfLocation INITIAL_LOC = null;
final long INITIAL_TS = 1;
final int NB_READS = 20;
public void testGetNextAfterSeekingOnLocation_2() {
- final ITmfLocation<?> INITIAL_LOC = fExperiment.seekEvent(1L).getLocation();
+ final ITmfLocation INITIAL_LOC = fExperiment.seekEvent(1L).getLocation();
final long INITIAL_TS = 2;
final int NB_READS = 20;
public void testGetNextAfterSeekingOnLocation_3() {
- final ITmfLocation<?> INITIAL_LOC = fExperiment.seekEvent(500L).getLocation();
+ final ITmfLocation INITIAL_LOC = fExperiment.seekEvent(500L).getLocation();
final long INITIAL_TS = 501;
final int NB_READS = 20;
public void testGetNextLocation() {
ITmfContext context1 = fExperiment.seekEvent(0);
fExperiment.getNext(context1);
- ITmfLocation<?> location = context1.getLocation().clone();
+ ITmfLocation location = context1.getLocation();
ITmfEvent event1 = fExperiment.getNext(context1);
ITmfContext context2 = fExperiment.seekEvent(location);
ITmfEvent event2 = fExperiment.getNext(context2);
public void testGetNextEndLocation() {
ITmfContext context1 = fExperiment.seekEvent(fExperiment.getNbEvents() - 1);
fExperiment.getNext(context1);
- ITmfLocation<?> location = context1.getLocation().clone();
+ ITmfLocation location = context1.getLocation();
ITmfContext context2 = fExperiment.seekEvent(location);
ITmfEvent event = fExperiment.getNext(context2);
assertNull("Event", event);