diff options
author | Bernard Normier <bernard@zeroc.com> | 2017-01-12 14:39:56 -0500 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2017-01-12 14:39:56 -0500 |
commit | 21d56ef199fe0002c90b57d873878ac9ba4a32e1 (patch) | |
tree | a39441e45379a574beb6563cb5b5c34cdcdf5cb1 /cpp/test/Ice/proxy/AllTests.cpp | |
parent | Revert "Replaced Borders by Paddings to eliminate deprecation warnings" (diff) | |
download | ice-21d56ef199fe0002c90b57d873878ac9ba4a32e1.tar.bz2 ice-21d56ef199fe0002c90b57d873878ac9ba4a32e1.tar.xz ice-21d56ef199fe0002c90b57d873878ac9ba4a32e1.zip |
Reject empty endpoint in OA endpoint list
Diffstat (limited to 'cpp/test/Ice/proxy/AllTests.cpp')
-rw-r--r-- | cpp/test/Ice/proxy/AllTests.cpp | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/cpp/test/Ice/proxy/AllTests.cpp b/cpp/test/Ice/proxy/AllTests.cpp index 269988a9119..82655d278e5 100644 --- a/cpp/test/Ice/proxy/AllTests.cpp +++ b/cpp/test/Ice/proxy/AllTests.cpp @@ -236,7 +236,7 @@ allTests(const Ice::CommunicatorPtr& communicator) try { - b1 = communicator->stringToProxy("test:tcp@adapterId"); + communicator->stringToProxy("test:tcp@adapterId"); test(false); } catch(const Ice::EndpointParseException&) @@ -254,7 +254,37 @@ allTests(const Ice::CommunicatorPtr& communicator) //} try { - b1 = communicator->stringToProxy("test::tcp"); + communicator->stringToProxy("test: :tcp"); + test(false); + } + catch(const Ice::EndpointParseException&) + { + } + + // + // Test invalid endpoint syntax + // + try + { + communicator->createObjectAdapterWithEndpoints("BadAdapter", " : "); + test(false); + } + catch(const Ice::EndpointParseException&) + { + } + + try + { + communicator->createObjectAdapterWithEndpoints("BadAdapter", "tcp: "); + test(false); + } + catch(const Ice::EndpointParseException&) + { + } + + try + { + communicator->createObjectAdapterWithEndpoints("BadAdapter", ":tcp"); test(false); } catch(const Ice::EndpointParseException&) |