Commit 77bf1e2c authored by Graham Inggs's avatar Graham Inggs

Drop backport-b426fafff.patch, no longer needed

parent 19745726
yaml-cpp (0.6.2-1) UNRELEASED; urgency=medium
[ Andreas Tille ]
* New upstream version
* debhelper 11
* Standards-Version: 4.2.0
* Point Vcs-fields to Salsa
* Fix watch file
[ Graham Inggs ]
* Drop backport-b426fafff.patch, no longer needed
-- Andreas Tille <tille@debian.org> Tue, 19 Jun 2018 14:12:09 +0200
yaml-cpp (0.5.2-4) unstable; urgency=medium
......
Description: Fix some Node::operator[] regressions from 0.5.1
Author: Paul Novotny <paul@paulnovo.us>
Bug-Debian: https://bugs.debian.org/835417
Origin: upstream, https://github.com/jbeder/yaml-cpp/commit/b426fafff
Last-Update: 2016-10-11
--- a/test/node/node_test.cpp
+++ b/test/node/node_test.cpp
@@ -131,6 +131,12 @@ TEST(NodeTest, UndefinedConstNodeWithFal
EXPECT_EQ(cn["undefined"].as<int>(3), 3);
}
+TEST(NodeTest, UndefinedConstNodeWithFallback) {
+ Node node;
+ const Node& cn = node;
+ EXPECT_EQ(cn["undefined"].as<int>(3), 3);
+}
+
TEST(NodeTest, MapIteratorWithUndefinedValues) {
Node node;
node["key"] = "value";
@@ -167,6 +173,32 @@ TEST(NodeTest, IteratorOnConstUndefinedN
count++;
}
EXPECT_EQ(0, count);
+}
+
+TEST(NodeTest, ConstIteratorOnConstUndefinedNode) {
+ Node node;
+ const Node& cn = node;
+ const Node& undefinedCn = cn["undefined"];
+
+ std::size_t count = 0;
+ for (const_iterator it = undefinedCn.begin(); it != undefinedCn.end(); ++it) {
+ count++;
+ }
+ EXPECT_EQ(0, count);
+}
+
+TEST(NodeTest, IteratorOnConstUndefinedNode) {
+ Node node;
+ const Node& cn = node;
+ const Node& undefinedCn = cn["undefined"];
+
+ Node& nonConstUndefinedNode = const_cast<Node&>(undefinedCn);
+
+ std::size_t count = 0;
+ for (iterator it = nonConstUndefinedNode.begin(); it != nonConstUndefinedNode.end(); ++it) {
+ count++;
+ }
+ EXPECT_EQ(0, count);
}
TEST(NodeTest, SimpleSubkeys) {
install-cmake-dev-files.patch
reproducible-build.patch
0003-Workaround-bug-in-googletest-fixing-bug-812284.patch
backport-b426fafff.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment