ctf: replace HashMaps with ArrayLists for EventDeclaration storage
[deliverable/tracecompass.git] / org.eclipse.linuxtools.ctf.core.tests / src / org / eclipse / linuxtools / ctf / core / tests / trace / IOstructgenTest.java
index 9424f184caa4d5359dce80da98948b83c2f74513..9b2f7a17037ec3cfaf50d4c9c5b02f4db3f217e2 100644 (file)
@@ -21,7 +21,8 @@ import java.io.FileWriter;
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.nio.ByteOrder;
-import java.util.Map;
+import java.util.ArrayList;
+import java.util.List;
 
 import org.eclipse.linuxtools.ctf.core.event.IEventDeclaration;
 import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
@@ -509,8 +510,8 @@ public class IOstructgenTest {
         trace = new CTFTrace(tempTraceDir);
         assertNotNull(trace);
 
-        Map<Long, IEventDeclaration> events = trace.getEvents(0L);
-        final EventDeclaration eventDeclaration = (EventDeclaration) events.get(2L);
+        final List<IEventDeclaration> eventDeclarations = new ArrayList<>(trace.getEventDeclarations(0L));
+        final EventDeclaration eventDeclaration = (EventDeclaration) eventDeclarations.get(2);
         assertEquals("http://example.com/path_to_model?q=ust_tests_demo:done",
                 eventDeclaration.getCustomAttribute("model.emf.uri"));
     }
This page took 0.025057 seconds and 5 git commands to generate.