diff options
| author | Alan Conway <aconway@apache.org> | 2007-01-29 16:13:24 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-01-29 16:13:24 +0000 |
| commit | 5a1b8a846bdfa5cb517da0c507f3dc3a8ceec25d (patch) | |
| tree | f9a982b65400154a86edd02faf75da143a96404c /cpp/tests | |
| parent | 5d28464c46c1e64ded078a4585f0f49e30b8b5d6 (diff) | |
| download | qpid-python-5a1b8a846bdfa5cb517da0c507f3dc3a8ceec25d.tar.gz | |
* Added ClientAdapter - client side ChannelAdapter. Updated client side.
* Moved ChannelAdapter initialization from ctor to init(), updated broker side.
* Improved various exception messages with boost::format messages.
* Removed unnecssary virtual inheritance.
* Widespread: fixed incorrect non-const ProtocolVersion& parameters.
* Client API: pass channels by reference, not pointer.
* codegen:
- MethodBodyClass.h.templ: Added CLASS_ID, METHOD_ID and isA() template.
- Various: fixed non-const ProtocolVersion& parameters.
* cpp/bootstrap: Allow config arguments with -build.
* cpp/gen/Makefile.am: Merged codegen fixes from trunk.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@501087 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/tests')
| -rw-r--r-- | cpp/tests/TxBufferTest.cpp | 2 | ||||
| -rw-r--r-- | cpp/tests/client_test.cpp | 18 | ||||
| -rw-r--r-- | cpp/tests/echo_service.cpp | 4 | ||||
| -rw-r--r-- | cpp/tests/topic_listener.cpp | 2 | ||||
| -rw-r--r-- | cpp/tests/topic_publisher.cpp | 2 |
5 files changed, 12 insertions, 16 deletions
diff --git a/cpp/tests/TxBufferTest.cpp b/cpp/tests/TxBufferTest.cpp index 0573ad15b0..8a9b233eb9 100644 --- a/cpp/tests/TxBufferTest.cpp +++ b/cpp/tests/TxBufferTest.cpp @@ -143,7 +143,7 @@ class TxBufferTest : public CppUnit::TestCase return state == ABORTED; } - bool isOpen(){ + bool isOpen() const{ return state == OPEN; } ~MockTransactionalStore(){} diff --git a/cpp/tests/client_test.cpp b/cpp/tests/client_test.cpp index aaa7f4e9ca..bd8519db86 100644 --- a/cpp/tests/client_test.cpp +++ b/cpp/tests/client_test.cpp @@ -63,7 +63,7 @@ public: int main(int argc, char**) { verbose = argc > 1; - try{ + try { //Use a custom exchange Exchange exchange("MyExchange", Exchange::TOPIC_EXCHANGE); //Use a named, temporary queue @@ -78,7 +78,7 @@ int main(int argc, char**) //Create and open a channel on the connection through which //most functionality is exposed Channel channel; - con.openChannel(&channel); + con.openChannel(channel); if (verbose) std::cout << "Opened channel." << std::endl; //'declare' the exchange and the queue, which will create them @@ -125,17 +125,13 @@ int main(int argc, char**) } //close the channel & connection - con.closeChannel(&channel); + channel.close(); if (verbose) std::cout << "Closed channel." << std::endl; con.close(); if (verbose) std::cout << "Closed connection." << std::endl; - }catch(qpid::QpidError error){ - if (verbose) std::cout - << "Error [" << error.code << "] " - << error.msg << " (" - << error.location.file << ":" << error.location.line - << ")" << std::endl; - return 1; - } return 0; + } catch(const std::exception& e) { + std::cout << e.what() << std::endl; + } + return 1; } diff --git a/cpp/tests/echo_service.cpp b/cpp/tests/echo_service.cpp index 666c8cfa46..ff11a336fe 100644 --- a/cpp/tests/echo_service.cpp +++ b/cpp/tests/echo_service.cpp @@ -103,7 +103,7 @@ int main(int argc, char** argv){ Connection connection(args.getTrace()); connection.open(args.getHost(), args.getPort()); Channel channel; - connection.openChannel(&channel); + connection.openChannel(channel); //Setup: declare the private 'response' queue and bind it //to the direct exchange by its name which will be @@ -147,7 +147,7 @@ int main(int argc, char** argv){ Connection connection(args.getTrace()); connection.open(args.getHost(), args.getPort()); Channel channel; - connection.openChannel(&channel); + connection.openChannel(channel); //Setup: declare the 'request' queue and bind it to the direct exchange with a 'well known' name Queue request("request"); diff --git a/cpp/tests/topic_listener.cpp b/cpp/tests/topic_listener.cpp index ec457c7f57..e1dca5daa1 100644 --- a/cpp/tests/topic_listener.cpp +++ b/cpp/tests/topic_listener.cpp @@ -105,7 +105,7 @@ int main(int argc, char** argv){ Connection connection(args.getTrace()); connection.open(args.getHost(), args.getPort()); Channel channel(args.getTransactional(), args.getPrefetch()); - connection.openChannel(&channel); + connection.openChannel(channel); //declare exchange, queue and bind them: Queue response("response"); diff --git a/cpp/tests/topic_publisher.cpp b/cpp/tests/topic_publisher.cpp index 5761acc4aa..048ec47bb4 100644 --- a/cpp/tests/topic_publisher.cpp +++ b/cpp/tests/topic_publisher.cpp @@ -120,7 +120,7 @@ int main(int argc, char** argv) { Connection connection(args.getTrace()); connection.open(args.getHost(), args.getPort()); Channel channel(args.getTransactional(), args.getPrefetch()); - connection.openChannel(&channel); + connection.openChannel(channel); //declare queue (relying on default binding): Queue response("response"); |
