diff options
author | Mark Spruiell <mes@zeroc.com> | 2012-11-12 13:15:24 -0800 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2012-11-12 13:15:24 -0800 |
commit | 93718cc38ba615c7e4993ad00643134fbe6902ea (patch) | |
tree | 925d1a6705e0ee1954ed6b49a5ce1c8ea54a85e8 /cpp/test/Ice/stream/Client.cpp | |
parent | Android chat demo minor fix (diff) | |
download | ice-93718cc38ba615c7e4993ad00643134fbe6902ea.tar.bz2 ice-93718cc38ba615c7e4993ad00643134fbe6902ea.tar.xz ice-93718cc38ba615c7e4993ad00643134fbe6902ea.zip |
ICE-4932 - accept encoding when creating streams
Diffstat (limited to 'cpp/test/Ice/stream/Client.cpp')
-rw-r--r-- | cpp/test/Ice/stream/Client.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/cpp/test/Ice/stream/Client.cpp b/cpp/test/Ice/stream/Client.cpp index 71b7c0b2685..8d5b0d9c217 100644 --- a/cpp/test/Ice/stream/Client.cpp +++ b/cpp/test/Ice/stream/Client.cpp @@ -323,6 +323,54 @@ run(int argc, char** argv, const Ice::CommunicatorPtr& communicator) } { + out = Ice::createOutputStream(communicator); + Test::OptionalClassPtr o = new Test::OptionalClass(); + o->bo = false; + o->by = 5; + o->sh = 4; + o->i = 3; + out->write(o); + out->writePendingObjects(); + out->finished(data); + in = Ice::createInputStream(communicator, data); + Test::OptionalClassPtr o2; + in->read(o2); + in->readPendingObjects(); + test(o2->bo == o->bo); + test(o2->by == o->by); + if(in->getEncoding() == Ice::Encoding_1_0) + { + test(!o2->sh); + test(!o2->i); + } + else + { + test(o2->sh == o->sh); + test(o2->i == o->i); + } + } + + { + out = Ice::createOutputStream(communicator, Ice::Encoding_1_0); + Test::OptionalClassPtr o = new Test::OptionalClass(); + o->bo = false; + o->by = 5; + o->sh = 4; + o->i = 3; + out->write(o); + out->writePendingObjects(); + out->finished(data); + in = Ice::createInputStream(communicator, data, Ice::Encoding_1_0); + Test::OptionalClassPtr o2; + in->read(o2); + in->readPendingObjects(); + test(o2->bo == o->bo); + test(o2->by == o->by); + test(!o2->sh); + test(!o2->i); + } + + { Ice::BoolSeq arr; arr.push_back(true); arr.push_back(false); |