From: Alexandre Montplaisir Date: Wed, 18 Jul 2012 19:20:04 +0000 (-0400) Subject: tmf: Update the ctfadaptor tests for the new formatting X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=6c327eec13d11d6a26a2679c17fbece196e307e5;p=deliverable%2Ftracecompass.git tmf: Update the ctfadaptor tests for the new formatting Since 9dc3ba9, the .toString() method for integer CTF fields will correctly format the value as per the formatting info in the metadata. Some unit tests have to be updated to cope with the new values, for octal and hex integers. Change-Id: I0aa8e7c919bbc8227cf7d9c5cc286561b172ece6 Signed-off-by: Alexandre Montplaisir --- diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/CtfTmfEventFieldTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/CtfTmfEventFieldTest.java index 21acfd0351..300a27c68d 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/CtfTmfEventFieldTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/CtfTmfEventFieldTest.java @@ -134,7 +134,7 @@ public class CtfTmfEventFieldTest { Definition fieldDef = fixture.lookupDefinition(INT); CtfTmfEventField result = CtfTmfEventField.parseField(fieldDef, NAME); String result2 =CtfTmfEventField.copyFrom(result).toString(); - assertEquals( result2, "test=2"); //$NON-NLS-1$ + assertEquals( result2, "test=02"); //$NON-NLS-1$ } /** diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/CtfTmfEventTest.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/CtfTmfEventTest.java index a121ab1d9b..1ba0e32e4d 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/CtfTmfEventTest.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/CtfTmfEventTest.java @@ -216,6 +216,6 @@ public class CtfTmfEventTest { @Test public void testToString() { String s = fixture.getContent().toString(); - assertEquals("pid=1922, inode=917738, flags=134217845, end=3074342912, start=3074334720, pgoff=0", s); //$NON-NLS-1$ + assertEquals("pid=1922, inode=917738, flags=0x8000075, end=0xb73ec000, start=0xb73ea000, pgoff=0", s); //$NON-NLS-1$ } }