You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2018/03/29 22:51:15 UTC
qpid-proton git commit: PROTON-1821: [cpp] Fix update method missing
'name' variable This close #137
Repository: qpid-proton
Updated Branches:
refs/heads/master 89b312390 -> 058bfce2d
PROTON-1821: [cpp] Fix update method missing 'name' variable
This close #137
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/058bfce2
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/058bfce2
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/058bfce2
Branch: refs/heads/master
Commit: 058bfce2d7b51745c1592a9404107b203239ff2c
Parents: 89b3123
Author: André Oliveira <p3...@gmail.com>
Authored: Thu Mar 1 11:03:10 2018 +0000
Committer: Andrew Stitcher <as...@apache.org>
Committed: Thu Mar 29 18:41:49 2018 -0400
----------------------------------------------------------------------
proton-c/bindings/cpp/CMakeLists.txt | 1 +
proton-c/bindings/cpp/src/link_test.cpp | 52 +++++++++++++++++++++
proton-c/bindings/cpp/src/receiver_options.cpp | 1 +
proton-c/bindings/cpp/src/sender_options.cpp | 1 +
4 files changed, 55 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/058bfce2/proton-c/bindings/cpp/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/CMakeLists.txt b/proton-c/bindings/cpp/CMakeLists.txt
index 5d50558..ab20058 100644
--- a/proton-c/bindings/cpp/CMakeLists.txt
+++ b/proton-c/bindings/cpp/CMakeLists.txt
@@ -240,3 +240,4 @@ add_cpp_test(value_test)
add_cpp_test(container_test)
add_cpp_test(url_test)
add_cpp_test(reconnect_test)
+add_cpp_test(link_test)
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/058bfce2/proton-c/bindings/cpp/src/link_test.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/link_test.cpp b/proton-c/bindings/cpp/src/link_test.cpp
new file mode 100644
index 0000000..18188c6
--- /dev/null
+++ b/proton-c/bindings/cpp/src/link_test.cpp
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+#include "test_bits.hpp"
+
+#include <proton/sender_options.hpp>
+#include <proton/receiver_options.hpp>
+#include <proton/container.hpp>
+
+#include <iostream>
+
+int test_link_name()
+{
+ proton::container c;
+
+ proton::sender_options so;
+ proton::receiver_options ro;
+
+ so.name("qpid-s");
+ ro.name("qpid-r");
+
+ proton::sender sender = c.open_sender("", so);
+ proton::receiver receiver = c.open_receiver("", ro);
+
+ ASSERT_EQUAL("qpid-s", sender.name());
+ ASSERT_EQUAL("qpid-r", receiver.name());
+
+ return 0;
+}
+
+int main(int argc, char** argv) {
+ int failed = 0;
+ RUN_ARGV_TEST(failed, test_link_name());
+ return failed;
+}
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/058bfce2/proton-c/bindings/cpp/src/receiver_options.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/receiver_options.cpp b/proton-c/bindings/cpp/src/receiver_options.cpp
index cb4ac05..f7ef5a8 100644
--- a/proton-c/bindings/cpp/src/receiver_options.cpp
+++ b/proton-c/bindings/cpp/src/receiver_options.cpp
@@ -101,6 +101,7 @@ class receiver_options::impl {
dynamic_address.update(x.dynamic_address);
source.update(x.source);
target.update(x.target);
+ name.update(x.name);
}
};
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/058bfce2/proton-c/bindings/cpp/src/sender_options.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/sender_options.cpp b/proton-c/bindings/cpp/src/sender_options.cpp
index 16595fc..1cc0643 100644
--- a/proton-c/bindings/cpp/src/sender_options.cpp
+++ b/proton-c/bindings/cpp/src/sender_options.cpp
@@ -89,6 +89,7 @@ class sender_options::impl {
auto_settle.update(x.auto_settle);
source.update(x.source);
target.update(x.target);
+ name.update(x.name);
}
};
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org