tmf.core: Introduce TmfTimestamp factory methods
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.core.tests / src / org / eclipse / tracecompass / tmf / core / tests / trace / indexer / TmfMemoryIndexTest.java
index 65c4a260650e0a431ae0b8003b0e3eb0bd0856d7..6c4ad43db88c0463882092331fc9a2b3699ec9ca 100644 (file)
@@ -43,7 +43,7 @@ public class TmfMemoryIndexTest extends AbstractCheckpointCollectionTest {
     @Override
     @Test
     public void testInsert() {
-        TmfCheckpoint checkpoint = new TmfCheckpoint(new TmfTimestamp(12345), new TmfLongLocation(123456L), 0);
+        TmfCheckpoint checkpoint = new TmfCheckpoint(TmfTimestamp.fromSeconds(12345), new TmfLongLocation(123456L), 0);
         fMemoryIndex.insert(checkpoint);
 
         ITmfCheckpoint indexCheckpoint = fMemoryIndex.get(0);
@@ -59,11 +59,11 @@ public class TmfMemoryIndexTest extends AbstractCheckpointCollectionTest {
     @Test
     public void testBinarySearch() {
         for (long i = 0; i < CHECKPOINTS_INSERT_NUM; i++) {
-            TmfCheckpoint checkpoint = new TmfCheckpoint(new TmfTimestamp(i), new TmfLongLocation(i), 0);
+            TmfCheckpoint checkpoint = new TmfCheckpoint(TmfTimestamp.fromSeconds(i), new TmfLongLocation(i), 0);
             fMemoryIndex.insert(checkpoint);
         }
 
-        TmfCheckpoint expectedCheckpoint = new TmfCheckpoint(new TmfTimestamp(122), new TmfLongLocation(122L), 0);
+        TmfCheckpoint expectedCheckpoint = new TmfCheckpoint(TmfTimestamp.fromSeconds(122), new TmfLongLocation(122L), 0);
         int expectedRank = 122;
 
         long rank = fMemoryIndex.binarySearch(expectedCheckpoint);
This page took 0.024001 seconds and 5 git commands to generate.