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 :
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";
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!");
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()
//*** 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
// 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();
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();