diff options
author | Jose <jose@zeroc.com> | 2020-04-23 19:23:00 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2020-04-23 19:23:00 +0200 |
commit | be735ae610d43ec4feab7f70c748a98b945efbe0 (patch) | |
tree | 7f3e541d39283c75590c9f5cb275cbc98548139a /csharp/test | |
parent | NuGet package build fixes (diff) | |
download | ice-be735ae610d43ec4feab7f70c748a98b945efbe0.tar.bz2 ice-be735ae610d43ec4feab7f70c748a98b945efbe0.tar.xz ice-be735ae610d43ec4feab7f70c748a98b945efbe0.zip |
Bug in optional test for tagged sequences - Close #803
Diffstat (limited to 'csharp/test')
-rw-r--r-- | csharp/test/Ice/optional/AllTests.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/csharp/test/Ice/optional/AllTests.cs b/csharp/test/Ice/optional/AllTests.cs index ff22e083443..2f64f49cd2a 100644 --- a/csharp/test/Ice/optional/AllTests.cs +++ b/csharp/test/Ice/optional/AllTests.cs @@ -1678,7 +1678,6 @@ namespace Ice os = new Ice.OutputStream(communicator); os.startEncapsulation(); os.writeOptional(2, Ice.OptionalFormat.VSize); - os.writeSize(p1.Value.Length +(p1.Value.Length > 254 ? 5 : 1)); Test.SmallStructSeqHelper.write(os, p1.Value); os.endEncapsulation(); inEncaps = os.finished(); @@ -1686,15 +1685,17 @@ namespace Ice @in = new Ice.InputStream(communicator, outEncaps); @in.startEncapsulation(); test(@in.readOptional(1, Ice.OptionalFormat.VSize)); - @in.skipSize(); Test.SmallStruct[] arr = Test.SmallStructSeqHelper.read(@in); test(ArraysEqual(arr, p1.Value)); test(@in.readOptional(3, Ice.OptionalFormat.VSize)); - @in.skipSize(); arr = Test.SmallStructSeqHelper.read(@in); test(ArraysEqual(arr, p1.Value)); @in.endEncapsulation(); + // Check the outEncaps size matches the expected size, 6 bytes for the encapsulation, plus each + // 12 bytes for each sequence ( 1 byte tag, 1 byte size, 10 byte contents) + test(outEncaps.Length == 12 + 12 + 6); + @in = new Ice.InputStream(communicator, outEncaps); @in.startEncapsulation(); @in.endEncapsulation(); |