2010-11-09 Francois Chouinard <fchouinard@gmail.com> Contribution for Bug315307
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng.tests / src / org / eclipse / linuxtools / lttng / tests / event / LttngEventContentTest.java
index 1c4da0355378eab67157d9e077843ddd5cf16b1f..e18a3f93213bd3b04505c4d6c9c4694f0d4373bd 100644 (file)
@@ -5,12 +5,18 @@ import java.net.URL;
 import java.util.HashMap;
 
 import junit.framework.TestCase;
+
 import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.Path;
-import org.eclipse.linuxtools.lttng.event.*;
+import org.eclipse.linuxtools.lttng.event.LttngEvent;
+import org.eclipse.linuxtools.lttng.event.LttngEventContent;
+import org.eclipse.linuxtools.lttng.event.LttngEventField;
+import org.eclipse.linuxtools.lttng.event.LttngEventType;
+import org.eclipse.linuxtools.lttng.event.LttngTimestamp;
 import org.eclipse.linuxtools.lttng.tests.LTTngCoreTestPlugin;
 import org.eclipse.linuxtools.lttng.trace.LTTngTextTrace;
-import org.eclipse.linuxtools.tmf.trace.TmfTraceContext;
+import org.eclipse.linuxtools.tmf.trace.TmfContext;
+import org.eclipse.linuxtools.tmf.trace.TmfLocation;
 
 /*
  Functions tested here :
@@ -36,9 +42,10 @@ import org.eclipse.linuxtools.tmf.trace.TmfTraceContext;
     public String toString()
  */
 
+@SuppressWarnings("nls")
 public class LttngEventContentTest extends TestCase {
     private final static String tracepath1="traceset/trace-15316events_nolost_newformat.txt";
-    private final static boolean skipIndexing=true;
+//    private final static boolean skipIndexing=true;
     
     private final static String firstEventContentFirstField    = "alignment:0";
     private final static String firstEventContentFirstFieldName = "alignment";
@@ -80,7 +87,7 @@ public class LttngEventContentTest extends TestCase {
                try {
                        testStream = null;
                    LTTngTextTrace tmpStream = initializeEventStream();
-                       tmpEventContent = (LttngEventContent)tmpStream.getNextEvent( new TmfTraceContext(0L, new LttngTimestamp(0L), 0) ).getContent();
+                       tmpEventContent = (LttngEventContent)tmpStream.getNextEvent( new TmfContext(new TmfLocation<Long>(0L), 0) ).getContent();
                }
                catch (Exception e) {
                        fail("ERROR : Failed to get content!");
@@ -138,11 +145,11 @@ public class LttngEventContentTest extends TestCase {
                LttngEventContent testContent = null;
        LTTngTextTrace tmpStream = null;
        LttngEvent tmpEvent = null;
-       TmfTraceContext tmpContext = null;
+       TmfContext tmpContext = null;
        
        // Require an event
        tmpStream = initializeEventStream();
-       tmpContext = new TmfTraceContext(0L, new LttngTimestamp(0L), 0);
+       tmpContext = new TmfContext(new TmfLocation<Long>(0L), 0);
        tmpEvent = (LttngEvent)tmpStream.getNextEvent(tmpContext);
                testContent = prepareToTest();
        // getFieldS()
@@ -168,7 +175,7 @@ public class LttngEventContentTest extends TestCase {
        
        //*** To test getFields with a fields number >0, we need to move to an event that have some more
        tmpStream = initializeEventStream();
-       tmpContext = new TmfTraceContext(0L, new LttngTimestamp(0L), 0);
+       tmpContext = new TmfContext(new TmfLocation<Long>(0L), 0);
        // Skip first events and seek to event pass metadata
        tmpContext= tmpStream.seekEvent(new LttngTimestamp(timestampAfterMetadata) );
        // Skip first one 
@@ -201,11 +208,11 @@ public class LttngEventContentTest extends TestCase {
        // It's pointless to test with a getter...
        LTTngTextTrace tmpStream = null;
        LttngEvent tmpEvent = null;
-       TmfTraceContext tmpContext = null;
+       TmfContext tmpContext = null;
        
        // Require an event
        tmpStream = initializeEventStream();
-       tmpContext = new TmfTraceContext(0L, new LttngTimestamp(0L), 0);
+       tmpContext = new TmfContext(new TmfLocation<Long>(0L), 0);
        tmpEvent = (LttngEvent)tmpStream.getNextEvent(tmpContext);
                
        LttngEventContent tmpContent = prepareToTest();
@@ -230,11 +237,11 @@ public class LttngEventContentTest extends TestCase {
                LttngEventContent testContent = null;
        LTTngTextTrace tmpStream = null;
        LttngEvent tmpEvent = null;
-       TmfTraceContext tmpContext = null;
+       TmfContext tmpContext = null;
        
        // Require an event
        tmpStream = initializeEventStream();
-       tmpContext = new TmfTraceContext(0L, new LttngTimestamp(0L), 0);
+       tmpContext = new TmfContext(new TmfLocation<Long>(0L), 0);
        tmpEvent = (LttngEvent)tmpStream.getNextEvent(tmpContext);
        // Get the content
        testContent = tmpEvent.getContent();
This page took 0.037222 seconds and 5 git commands to generate.