Merge branch 'master' into lttng-luna
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core.tests / src / org / eclipse / linuxtools / tmf / core / tests / ctfadaptor / CtfTmfEventTest.java
index e1bd22b4667b23567842a7295907969714738508..78332687fab18c802200a617b1b29f881ada9c5e 100644 (file)
@@ -125,6 +125,26 @@ public class CtfTmfEventTest {
         assertArrayEquals(fields2, fields);
     }
 
+    /**
+     * Run the ITmfEventField getSubFieldValue(String[]) method test.
+     */
+    @Test
+    public void testGetSubFieldValue() {
+        /* Field exists */
+        String[] names = { "pid" };
+        assertNotNull(fixture.getContent().getSubField(names));
+
+        /* First field exists, not the second */
+        String[] names2 = { "pid", "abcd" };
+        assertNull(fixture.getContent().getSubField(names2));
+
+        /* Both field do not exist */
+        String[] names3 = { "pfid", "abcd" };
+        assertNull(fixture.getContent().getSubField(names3));
+
+        /* TODO Missing case of embedded field, need event for it */
+    }
+
     /**
      * Run the long getID() method test.
      */
This page took 0.02939 seconds and 5 git commands to generate.