summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/test/src/main/java/test/Ice/optional/AllTests.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/java/test/src/main/java/test/Ice/optional/AllTests.java b/java/test/src/main/java/test/Ice/optional/AllTests.java
index 56aba5aeab3..1b15928b90d 100644
--- a/java/test/src/main/java/test/Ice/optional/AllTests.java
+++ b/java/test/src/main/java/test/Ice/optional/AllTests.java
@@ -1563,7 +1563,6 @@ public class AllTests
os = new OutputStream(communicator);
os.startEncapsulation();
os.writeOptional(2, OptionalFormat.VSize);
- os.writeSize(p1.get().length + (p1.get().length > 254 ? 5 : 1));
SmallStructSeqHelper.write(os, p1.get());
os.endEncapsulation();
inEncaps = os.finished();
@@ -1571,14 +1570,12 @@ public class AllTests
in = new InputStream(communicator, inv.outParams);
in.startEncapsulation();
test(in.readOptional(1, OptionalFormat.VSize));
- in.skipSize();
SmallStruct[] arr = SmallStructSeqHelper.read(in);
for(int i = 0; i < p1.get().length; ++i)
{
test(arr[i].equals(p1.get()[i]));
}
test(in.readOptional(3, OptionalFormat.VSize));
- in.skipSize();
arr = SmallStructSeqHelper.read(in);
for(int i = 0; i < p1.get().length; ++i)
{
@@ -1586,6 +1583,10 @@ public class AllTests
}
in.endEncapsulation();
+ // Check the outEncaps size matches the expected size, 6 bytes for the encapsulation, plus 12 bytes
+ // for each sequence (1 byte tag, 1 byte size, 10 byte contents)
+ test(inv.outParams.length == 12 + 12 + 6);
+
in = new InputStream(communicator, inv.outParams);
in.startEncapsulation();
in.endEncapsulation();