]> source.dussan.org Git - poi.git/commitdiff
Update test cases
authorSergey Vladimirov <sergey@apache.org>
Tue, 6 Sep 2011 11:15:36 +0000 (11:15 +0000)
committerSergey Vladimirov <sergey@apache.org>
Tue, 6 Sep 2011 11:15:36 +0000 (11:15 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1165604 13f79535-47bb-0310-9956-ffa450edef68

src/testcases/org/apache/poi/ddf/TestEscherChildAnchorRecord.java
src/testcases/org/apache/poi/ddf/TestEscherClientAnchorRecord.java
src/testcases/org/apache/poi/ddf/TestEscherClientDataRecord.java
src/testcases/org/apache/poi/ddf/TestEscherContainerRecord.java
src/testcases/org/apache/poi/ddf/TestEscherDgRecord.java
src/testcases/org/apache/poi/ddf/TestEscherDggRecord.java
src/testcases/org/apache/poi/ddf/TestEscherOptRecord.java
src/testcases/org/apache/poi/ddf/TestEscherSpRecord.java
src/testcases/org/apache/poi/ddf/TestEscherSpgrRecord.java
src/testcases/org/apache/poi/ddf/TestEscherSplitMenuColorsRecord.java
src/testcases/org/apache/poi/ddf/TestUnknownEscherRecord.java

index 757972de9f60cfb44179eae3b5c286f64fa2b78b..4f8815ade3bbee82af694c98738349008771f9dc 100644 (file)
@@ -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 +
index 3a1e5c2b60a67ecbc3b31e0182aec5bc8aac4d13..a1eb171f4a8cd414e7daac77d038fa4f3666c85b 100644 (file)
@@ -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 +
index 2f26a37c5a7bfa8fb39d6a2e42dd20fd9842e768..0282ed091dc5f0a58a356f6033a1a4882edd6527 100644 (file)
@@ -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() );
index a2fc0d7b1bbc4565fb75a6116fe622ed7f111f22..c4282ecf602cbd8fb08a585f67936c59a2967128 100644 (file)
@@ -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 +
index 523ba863d7ea25171b13e6307d9c75dceb41b76f..2e0fd4b102a94bd7f9356d3ac7e486e79e7501c9 100644 (file)
@@ -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() );
index b9628224dfb19d883e72875da0df796697d4132b..2587a3b2d0486b268a2256f70c30644624b8d77b 100644 (file)
@@ -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' +
index 975a8b5ff7ff11b7794b5f8f2963846acc510de2..b8a3e9c117d2a758e735e75db45a260a592a0c2e 100644 (file)
@@ -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 +
index b4ab900ea9e0213a09ae6c309ac8a8ab252aefac..f0daf07bd27ac0643422d104dabbf0ad6f849e45 100644 (file)
@@ -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() );
index d49e9a0d0bbf43e427eca851ef5dba67c8a2262f..e70934ec95f2d1c5a7673266a545fc7d9fab2078 100644 (file)
@@ -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' +
index 8a77bd59b4778017dc5ccf7f826c44df743b2188..60facfb33d63178fce64f816c67701bc6464ff15 100644 (file)
@@ -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' +
index 5973d8c167bd76d47afc5ad6fcd9bf961adf4e42..b42c98c6ca565ef79190cc1a694370e0dad5f415 100644 (file)
@@ -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"