From: Sergey Vladimirov Date: Tue, 6 Sep 2011 11:15:36 +0000 (+0000) Subject: Update test cases X-Git-Tag: REL_3_8_BETA5~185 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=36bd0ba1a31daf30f3ed25814f8a8c6e42cc1fd0;p=poi.git Update test cases git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1165604 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/testcases/org/apache/poi/ddf/TestEscherChildAnchorRecord.java b/src/testcases/org/apache/poi/ddf/TestEscherChildAnchorRecord.java index 757972de9f..4f8815ade3 100644 --- a/src/testcases/org/apache/poi/ddf/TestEscherChildAnchorRecord.java +++ b/src/testcases/org/apache/poi/ddf/TestEscherChildAnchorRecord.java @@ -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 + diff --git a/src/testcases/org/apache/poi/ddf/TestEscherClientAnchorRecord.java b/src/testcases/org/apache/poi/ddf/TestEscherClientAnchorRecord.java index 3a1e5c2b60..a1eb171f4a 100644 --- a/src/testcases/org/apache/poi/ddf/TestEscherClientAnchorRecord.java +++ b/src/testcases/org/apache/poi/ddf/TestEscherClientAnchorRecord.java @@ -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 + diff --git a/src/testcases/org/apache/poi/ddf/TestEscherClientDataRecord.java b/src/testcases/org/apache/poi/ddf/TestEscherClientDataRecord.java index 2f26a37c5a..0282ed091d 100644 --- a/src/testcases/org/apache/poi/ddf/TestEscherClientDataRecord.java +++ b/src/testcases/org/apache/poi/ddf/TestEscherClientDataRecord.java @@ -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() ); diff --git a/src/testcases/org/apache/poi/ddf/TestEscherContainerRecord.java b/src/testcases/org/apache/poi/ddf/TestEscherContainerRecord.java index a2fc0d7b1b..c4282ecf60 100644 --- a/src/testcases/org/apache/poi/ddf/TestEscherContainerRecord.java +++ b/src/testcases/org/apache/poi/ddf/TestEscherContainerRecord.java @@ -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 + diff --git a/src/testcases/org/apache/poi/ddf/TestEscherDgRecord.java b/src/testcases/org/apache/poi/ddf/TestEscherDgRecord.java index 523ba863d7..2e0fd4b102 100644 --- a/src/testcases/org/apache/poi/ddf/TestEscherDgRecord.java +++ b/src/testcases/org/apache/poi/ddf/TestEscherDgRecord.java @@ -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() ); diff --git a/src/testcases/org/apache/poi/ddf/TestEscherDggRecord.java b/src/testcases/org/apache/poi/ddf/TestEscherDggRecord.java index b9628224df..2587a3b2d0 100644 --- a/src/testcases/org/apache/poi/ddf/TestEscherDggRecord.java +++ b/src/testcases/org/apache/poi/ddf/TestEscherDggRecord.java @@ -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' + diff --git a/src/testcases/org/apache/poi/ddf/TestEscherOptRecord.java b/src/testcases/org/apache/poi/ddf/TestEscherOptRecord.java index 975a8b5ff7..b8a3e9c117 100644 --- a/src/testcases/org/apache/poi/ddf/TestEscherOptRecord.java +++ b/src/testcases/org/apache/poi/ddf/TestEscherOptRecord.java @@ -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 + diff --git a/src/testcases/org/apache/poi/ddf/TestEscherSpRecord.java b/src/testcases/org/apache/poi/ddf/TestEscherSpRecord.java index b4ab900ea9..f0daf07bd2 100644 --- a/src/testcases/org/apache/poi/ddf/TestEscherSpRecord.java +++ b/src/testcases/org/apache/poi/ddf/TestEscherSpRecord.java @@ -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() ); diff --git a/src/testcases/org/apache/poi/ddf/TestEscherSpgrRecord.java b/src/testcases/org/apache/poi/ddf/TestEscherSpgrRecord.java index d49e9a0d0b..e70934ec95 100644 --- a/src/testcases/org/apache/poi/ddf/TestEscherSpgrRecord.java +++ b/src/testcases/org/apache/poi/ddf/TestEscherSpgrRecord.java @@ -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' + diff --git a/src/testcases/org/apache/poi/ddf/TestEscherSplitMenuColorsRecord.java b/src/testcases/org/apache/poi/ddf/TestEscherSplitMenuColorsRecord.java index 8a77bd59b4..60facfb33d 100644 --- a/src/testcases/org/apache/poi/ddf/TestEscherSplitMenuColorsRecord.java +++ b/src/testcases/org/apache/poi/ddf/TestEscherSplitMenuColorsRecord.java @@ -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' + diff --git a/src/testcases/org/apache/poi/ddf/TestUnknownEscherRecord.java b/src/testcases/org/apache/poi/ddf/TestUnknownEscherRecord.java index 5973d8c167..b42c98c6ca 100644 --- a/src/testcases/org/apache/poi/ddf/TestUnknownEscherRecord.java +++ b/src/testcases/org/apache/poi/ddf/TestUnknownEscherRecord.java @@ -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"