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 <alexmonthy@voxpopuli.im>
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$
}
/**
@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$
}
}