mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 20:51:16 +00:00
Add test for an empty string not being null
This commit is contained in:
@@ -171,6 +171,11 @@ TEST(LoadNodeTest, ResetNode) {
|
|||||||
EXPECT_EQ(node, other);
|
EXPECT_EQ(node, other);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(LoadNodeTest, EmptyString) {
|
||||||
|
Node node = Load("\"\"");
|
||||||
|
EXPECT_TRUE(!node.IsNull());
|
||||||
|
}
|
||||||
|
|
||||||
TEST(LoadNodeTest, DereferenceIteratorError) {
|
TEST(LoadNodeTest, DereferenceIteratorError) {
|
||||||
Node node = Load("[{a: b}, 1, 2]");
|
Node node = Load("[{a: b}, 1, 2]");
|
||||||
EXPECT_THROW(node.begin()->first.as<int>(), InvalidNode);
|
EXPECT_THROW(node.begin()->first.as<int>(), InvalidNode);
|
||||||
|
Reference in New Issue
Block a user