package org.eclipse.linuxtools.tmf.core.tests.ctfadaptor;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertArrayEquals;
import java.nio.ByteOrder;
import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration;
import org.eclipse.linuxtools.ctf.core.event.types.StructDefinition;
import org.eclipse.linuxtools.ctf.core.event.types.VariantDeclaration;
+import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfEventField;
import org.junit.Before;
import org.junit.Test;
/**
* Perform pre-test initialization.
+ * @throws CTFReaderException error
*/
@Before
- public void setUp() {
+ public void setUp() throws CTFReaderException {
StructDeclaration sDec = new StructDeclaration(1l);
StringDeclaration strDec = new StringDeclaration();
IntegerDeclaration intDec = new IntegerDeclaration(8, false, 8,
public void testParseField_sequence_value() {
Definition fieldDef = fixture.lookupDefinition(SEQ);
CtfTmfEventField result = CtfTmfEventField.parseField(fieldDef, NAME);
- assertEquals("[2, 2]", result.getValue().toString());
+ long[] values = (long[]) result.getValue();
+ long[] expected = new long[] { 2, 2 };
+ assertArrayEquals(expected, values);
}
/**