mirror of https://github.com/apache/poi.git
Update test cases
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1165604 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dbfe0d76d0
commit
36bd0ba1a3
|
@ -63,7 +63,8 @@ public final class TestEscherChildAnchorRecord extends TestCase {
|
|||
|
||||
String expected = "org.apache.poi.ddf.EscherChildAnchorRecord:" + nl +
|
||||
" RecordId: 0xF00F" + nl +
|
||||
" Options: 0x0001" + nl +
|
||||
" Version: 0x0001" + nl +
|
||||
" Instance: 0x0000" + nl +
|
||||
" X1: 1" + nl +
|
||||
" Y1: 2" + nl +
|
||||
" X2: 3" + nl +
|
||||
|
|
|
@ -70,7 +70,8 @@ public class TestEscherClientAnchorRecord extends TestCase
|
|||
|
||||
String expected = "org.apache.poi.ddf.EscherClientAnchorRecord:" + nl +
|
||||
" RecordId: 0xF010" + nl +
|
||||
" Options: 0x0001" + nl +
|
||||
" Version: 0x0001" + nl +
|
||||
" Instance: 0x0000" + nl +
|
||||
" Flag: 77" + nl +
|
||||
" Col1: 55" + nl +
|
||||
" DX1: 33" + nl +
|
||||
|
|
|
@ -53,7 +53,8 @@ public class TestEscherClientDataRecord extends TestCase
|
|||
|
||||
String expected = "org.apache.poi.ddf.EscherClientDataRecord:" + nl +
|
||||
" RecordId: 0xF011" + nl +
|
||||
" Options: 0x0002" + nl +
|
||||
" Version: 0x0002" + nl +
|
||||
" Instance: 0x0000" + nl +
|
||||
" Extra Data:" + nl +
|
||||
"No Data" + nl ;
|
||||
assertEquals( expected, createRecord().toString() );
|
||||
|
|
|
@ -76,27 +76,31 @@ public final class TestEscherContainerRecord extends TestCase {
|
|||
String nl = System.getProperty("line.separator");
|
||||
assertEquals("org.apache.poi.ddf.EscherContainerRecord (SpContainer):" + nl +
|
||||
" isContainer: true" + nl +
|
||||
" options: 0x000F" + nl +
|
||||
" version: 0x000F" + nl +
|
||||
" instance: 0x0000" + nl +
|
||||
" recordId: 0xF004" + nl +
|
||||
" numchildren: 0" + nl
|
||||
, r.toString());
|
||||
|
||||
EscherOptRecord r2 = new EscherOptRecord();
|
||||
r2.setOptions((short) 0x9876);
|
||||
// don't try to shoot in foot, please -- vlsergey
|
||||
// r2.setOptions((short) 0x9876);
|
||||
r2.setRecordId(EscherOptRecord.RECORD_ID);
|
||||
|
||||
String expected;
|
||||
r.addChildRecord(r2);
|
||||
expected = "org.apache.poi.ddf.EscherContainerRecord (SpContainer):" + nl +
|
||||
" isContainer: true" + nl +
|
||||
" options: 0x000F" + nl +
|
||||
" version: 0x000F" + nl +
|
||||
" instance: 0x0000" + nl +
|
||||
" recordId: 0xF004" + nl +
|
||||
" numchildren: 1" + nl +
|
||||
" children: " + nl +
|
||||
" Child 0:" + nl +
|
||||
" org.apache.poi.ddf.EscherOptRecord:" + nl +
|
||||
" isContainer: false" + nl +
|
||||
" options: 0x0003" + nl +
|
||||
" version: 0x0003" + nl +
|
||||
" instance: 0x0000" + nl +
|
||||
" recordId: 0xF00B" + nl +
|
||||
" numchildren: 0" + nl +
|
||||
" properties:" + nl +
|
||||
|
@ -106,14 +110,16 @@ public final class TestEscherContainerRecord extends TestCase {
|
|||
r.addChildRecord(r2);
|
||||
expected = "org.apache.poi.ddf.EscherContainerRecord (SpContainer):" + nl +
|
||||
" isContainer: true" + nl +
|
||||
" options: 0x000F" + nl +
|
||||
" version: 0x000F" + nl +
|
||||
" instance: 0x0000" + nl +
|
||||
" recordId: 0xF004" + nl +
|
||||
" numchildren: 2" + nl +
|
||||
" children: " + nl +
|
||||
" Child 0:" + nl +
|
||||
" org.apache.poi.ddf.EscherOptRecord:" + nl +
|
||||
" isContainer: false" + nl +
|
||||
" options: 0x0003" + nl +
|
||||
" version: 0x0003" + nl +
|
||||
" instance: 0x0000" + nl +
|
||||
" recordId: 0xF00B" + nl +
|
||||
" numchildren: 0" + nl +
|
||||
" properties:" + nl +
|
||||
|
@ -121,7 +127,8 @@ public final class TestEscherContainerRecord extends TestCase {
|
|||
" Child 1:" + nl +
|
||||
" org.apache.poi.ddf.EscherOptRecord:" + nl +
|
||||
" isContainer: false" + nl +
|
||||
" options: 0x0003" + nl +
|
||||
" version: 0x0003" + nl +
|
||||
" instance: 0x0000" + nl +
|
||||
" recordId: 0xF00B" + nl +
|
||||
" numchildren: 0" + nl +
|
||||
" properties:" + nl +
|
||||
|
|
|
@ -54,7 +54,8 @@ public final class TestEscherDgRecord extends TestCase {
|
|||
public void testToString() {
|
||||
String expected = "org.apache.poi.ddf.EscherDgRecord:" + '\n' +
|
||||
" RecordId: 0xF008" + '\n' +
|
||||
" Options: 0x0010" + '\n' +
|
||||
" Version: 0x0000" + '\n' +
|
||||
" Instance: 0x0001" + '\n' +
|
||||
" NumShapes: 2" + '\n' +
|
||||
" LastMSOSPID: 1025" + '\n';
|
||||
assertEquals( expected, createRecord().toString() );
|
||||
|
|
|
@ -65,7 +65,8 @@ public final class TestEscherDggRecord extends TestCase {
|
|||
public void testToString() {
|
||||
String expected = "org.apache.poi.ddf.EscherDggRecord:" + '\n' +
|
||||
" RecordId: 0xF006" + '\n' +
|
||||
" Options: 0x0000" + '\n' +
|
||||
" Version: 0x0000" + '\n' +
|
||||
" Instance: 0x0000" + '\n' +
|
||||
" ShapeIdMax: 1026" + '\n' +
|
||||
" NumIdClusters: 2" + '\n' +
|
||||
" NumShapesSaved: 2" + '\n' +
|
||||
|
|
|
@ -133,13 +133,15 @@ public final class TestEscherOptRecord extends TestCase {
|
|||
public void testToString() {
|
||||
String nl = System.getProperty("line.separator");
|
||||
EscherOptRecord r = new EscherOptRecord();
|
||||
r.setOptions((short)0x000F);
|
||||
// don't try to shoot in foot, please -- vlsergey
|
||||
// r.setOptions((short)0x000F);
|
||||
r.setRecordId(EscherOptRecord.RECORD_ID);
|
||||
EscherProperty prop1 = new EscherBoolProperty((short)1, 1);
|
||||
r.addEscherProperty(prop1);
|
||||
String expected = "org.apache.poi.ddf.EscherOptRecord:" + nl +
|
||||
" isContainer: true" + nl +
|
||||
" options: 0x0013" + nl +
|
||||
" isContainer: false" + nl +
|
||||
" version: 0x0003" + nl +
|
||||
" instance: 0x0001" + nl +
|
||||
" recordId: 0x" + HexDump.toHex(EscherOptRecord.RECORD_ID) + nl +
|
||||
" numchildren: 0" + nl +
|
||||
" properties:" + nl +
|
||||
|
|
|
@ -57,7 +57,8 @@ public class TestEscherSpRecord extends TestCase
|
|||
|
||||
String expected = "org.apache.poi.ddf.EscherSpRecord:" + nl +
|
||||
" RecordId: 0xF00A" + nl +
|
||||
" Options: 0x0002" + nl +
|
||||
" Version: 0x0002" + nl +
|
||||
" ShapeType: 0x0000" + nl +
|
||||
" ShapeId: 1024" + nl +
|
||||
" Flags: GROUP|PATRIARCH (0x00000005)" + nl;
|
||||
assertEquals( expected, createRecord().toString() );
|
||||
|
|
|
@ -61,7 +61,8 @@ public final class TestEscherSpgrRecord extends TestCase {
|
|||
|
||||
String expected = "org.apache.poi.ddf.EscherSpgrRecord:" + '\n' +
|
||||
" RecordId: 0xF009" + '\n' +
|
||||
" Options: 0x0010" + '\n' +
|
||||
" Version: 0x0000" + '\n' +
|
||||
" Instance: 0x0001" + '\n' +
|
||||
" RectX: 1" + '\n' +
|
||||
" RectY: 2" + '\n' +
|
||||
" RectWidth: 3" + '\n' +
|
||||
|
|
|
@ -60,7 +60,8 @@ public final class TestEscherSplitMenuColorsRecord extends TestCase {
|
|||
public void testToString() {
|
||||
String expected = "org.apache.poi.ddf.EscherSplitMenuColorsRecord:" + '\n' +
|
||||
" RecordId: 0xF11E" + '\n' +
|
||||
" Options: 0x0040" + '\n' +
|
||||
" Version: 0x0000" + '\n' +
|
||||
" Instance: 0x0004" + '\n' +
|
||||
" Color1: 0x00000402" + '\n' +
|
||||
" Color2: 0x00000002" + '\n' +
|
||||
" Color3: 0x00000002" + '\n' +
|
||||
|
|
|
@ -146,7 +146,8 @@ public final class TestUnknownEscherRecord extends TestCase {
|
|||
|
||||
assertEquals( "org.apache.poi.ddf.UnknownEscherRecord:" + '\n' +
|
||||
" isContainer: false" + '\n' +
|
||||
" options: 0x1234" + '\n' +
|
||||
" version: 0x0004" + '\n' +
|
||||
" instance: 0x0123" + '\n' +
|
||||
" recordId: 0xF112" + '\n' +
|
||||
" numchildren: 0" + '\n' +
|
||||
": 0"
|
||||
|
|
Loading…
Reference in New Issue