X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=org.eclipse.linuxtools.tmf.core.tests%2Fsrc%2Forg%2Feclipse%2Flinuxtools%2Ftmf%2Fcore%2Ftests%2Ftrace%2FTmfExperimentTest.java;h=d3ca984e19179661c85b0ff2c7633254dbedc55c;hb=d62bb1853c3388385d5ce10b0302b3dde139c3ab;hp=4158292593a0f8864d30438db5250af28dd9310c;hpb=f78cabd0a63ac11ca41f80f0025d595a12dc37b9;p=deliverable%2Ftracecompass.git 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 4158292593..d3ca984e19 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 @@ -38,7 +38,7 @@ import org.eclipse.linuxtools.tmf.core.trace.ITmfContext; 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; @@ -190,7 +190,7 @@ public class TmfExperimentTest extends TestCase { // ------------------------------------------------------------------------ public void testSeekBadLocation() { - ITmfContext context = fExperiment.seekEvent(new TmfLocation(0L)); + ITmfContext context = fExperiment.seekEvent(new TmfLongLocation(0L)); assertNull("seekEvent", context); } @@ -244,7 +244,6 @@ public class TmfExperimentTest extends TestCase { assertEquals("Context rank", 0, context.getRank()); } - @SuppressWarnings("rawtypes") public void testGetLocationRatio() { // First event @@ -536,7 +535,7 @@ public class TmfExperimentTest extends TestCase { 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()); @@ -723,7 +722,7 @@ public class TmfExperimentTest extends TestCase { public void testGetNextAfterSeekingOnLocation_1() { - final ITmfLocation INITIAL_LOC = null; + final ITmfLocation INITIAL_LOC = null; final long INITIAL_TS = 1; final int NB_READS = 20; @@ -750,7 +749,7 @@ public class TmfExperimentTest extends TestCase { 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; @@ -775,7 +774,7 @@ public class TmfExperimentTest extends TestCase { 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; @@ -801,7 +800,7 @@ public class TmfExperimentTest extends TestCase { 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); @@ -811,7 +810,7 @@ public class TmfExperimentTest extends TestCase { 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);