use of org.apache.poi.hssf.record.pivottable.ViewFieldsRecord in project poi by apache.
the class TestViewFieldsRecord method testUnicodeFlag_bug46693.
public void testUnicodeFlag_bug46693() {
byte[] data = HexRead.readFromString("01 00 01 00 01 00 04 00 05 00 00 6D 61 72 63 6F");
RecordInputStream in = TestcaseRecordInputStream.create(ViewFieldsRecord.sid, data);
ViewFieldsRecord rec = new ViewFieldsRecord(in);
if (in.remaining() == 1) {
throw new AssertionFailedError("Identified bug 46693b");
}
assertEquals(0, in.remaining());
assertEquals(4 + data.length, rec.getRecordSize());
}
use of org.apache.poi.hssf.record.pivottable.ViewFieldsRecord in project poi by apache.
the class TestViewFieldsRecord method confirmSerialize.
private static ViewFieldsRecord confirmSerialize(String hexDump) {
byte[] data = HexRead.readFromString(hexDump);
RecordInputStream in = TestcaseRecordInputStream.create(ViewFieldsRecord.sid, data);
ViewFieldsRecord rec = new ViewFieldsRecord(in);
assertEquals(0, in.remaining());
assertEquals(4 + data.length, rec.getRecordSize());
byte[] data2 = rec.serialize();
TestcaseRecordInputStream.confirmRecordEncoding(ViewFieldsRecord.sid, data, data2);
return rec;
}
Aggregations