Parse key values as leaf_data
Change-Id: Ib70a47dd4bcea0426d3b2063a845d4ce075d81f4
diff --git a/tests/leaf_editing.cpp b/tests/leaf_editing.cpp
index d7703c0..61704f6 100644
--- a/tests/leaf_editing.cpp
+++ b/tests/leaf_editing.cpp
@@ -47,6 +47,7 @@
schema->addLeafEnum("/", "mod:leafEnum", {"lol", "data", "coze"});
schema->addLeaf("/mod:contA", "mod:leafInCont", yang::LeafDataTypes::String);
schema->addList("/", "mod:list", {"number"});
+ schema->addLeaf("/mod:list", "mod:number", yang::LeafDataTypes::Int32);
schema->addLeaf("/mod:list", "mod:leafInList", yang::LeafDataTypes::String);
schema->addLeafRef("/", "mod:refToString", "/mod:leafString");
schema->addLeafRef("/", "mod:refToInt8", "/mod:leafInt8");
@@ -100,8 +101,8 @@
SECTION("set mod:list[number=1]/leafInList \"another_data\"")
{
input = "set mod:list[number=1]/leafInList \"another_data\"";
- auto keys = std::map<std::string, std::string>{
- {"number", "1"}};
+ auto keys = std::map<std::string, leaf_data_>{
+ {"number", int32_t{1}}};
expected.m_path.m_nodes.push_back(dataNode_{module_{"mod"}, listElement_("list", keys)});
expected.m_path.m_nodes.push_back(dataNode_{leaf_("leafInList")});
expected.m_data = std::string("another_data");