summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2008-04-07 17:25:53 +0800
committerMatthew Newhook <matthew@zeroc.com>2008-04-07 17:25:53 +0800
commitcf38d16fdb87af3a26624233deeb9678730c69f9 (patch)
tree1bc2f4fbd8747850e40ec77eacd46b33c05c7160 /cpp
parentminor fixes for C# multicast demo config files (diff)
downloadice-cf38d16fdb87af3a26624233deeb9678730c69f9.tar.bz2
ice-cf38d16fdb87af3a26624233deeb9678730c69f9.tar.xz
ice-cf38d16fdb87af3a26624233deeb9678730c69f9.zip
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=2985 - Fix bug with C# & Java input & output streams
Diffstat (limited to 'cpp')
-rw-r--r--cpp/test/Ice/stream/Client.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/cpp/test/Ice/stream/Client.cpp b/cpp/test/Ice/stream/Client.cpp
index fe3dd15dc28..498b28d571b 100644
--- a/cpp/test/Ice/stream/Client.cpp
+++ b/cpp/test/Ice/stream/Client.cpp
@@ -149,6 +149,38 @@ run(int argc, char** argv, const Ice::CommunicatorPtr& communicator)
cout << "testing primitive types... " << flush;
{
+ vector<Ice::Byte> byte;
+ in = Ice::createInputStream(communicator, byte);
+ }
+
+ {
+ out = Ice::createOutputStream(communicator);
+ out->startEncapsulation();
+ out->writeBool(true);
+ out->endEncapsulation();
+ out->finished(data);
+ out = 0;
+
+ in = Ice::createInputStream(communicator, data);
+ in->startEncapsulation();
+ test(in->readBool());
+ in->endEncapsulation();
+ }
+
+ {
+ vector<Ice::Byte> byte;
+ in = Ice::createInputStream(communicator, byte);
+ try
+ {
+ in->readBool();
+ test(false);
+ }
+ catch(const Ice::UnmarshalOutOfBoundsException&)
+ {
+ }
+ }
+
+ {
out = Ice::createOutputStream(communicator);
out->writeBool(true);
out->finished(data);