Add support for leaflist

Change-Id: Idcb529f85240a32e84d82934c81fcf0c3451f94e
diff --git a/tests/yang.cpp b/tests/yang.cpp
index 3d42c5e..71cb69d 100644
--- a/tests/yang.cpp
+++ b/tests/yang.cpp
@@ -419,6 +419,9 @@
         status obsolete;
     }
 
+    leaf-list addresses {
+        type string;
+    }
 })";
 
 namespace std {
@@ -809,6 +812,14 @@
                 }};
             }
 
+            SECTION("addresses")
+            {
+                node.first = "example-schema";
+                node.second = "addresses";
+                type.emplace<yang::String>();
+            }
+
+
             REQUIRE(ys.leafType(path, node) == type);
         }
         SECTION("availableNodes")
@@ -851,6 +862,7 @@
                         {"example-schema"s, "myRpc"},
                         {"example-schema"s, "systemStats"},
                         {"example-schema"s, "dummyLeaf"},
+                        {"example-schema"s, "addresses"},
                         {"example-schema"s, "subLeaf"}};
                 }
 
@@ -894,6 +906,7 @@
                         {"example-schema"s, "activeMappedPort"},
                         {"example-schema"s, "activeNumber"},
                         {"example-schema"s, "activePort"},
+                        {"example-schema"s, "addresses"},
                         {"example-schema"s, "another-duration"},
                         {"example-schema"s, "b"},
                         {"example-schema"s, "carry"},
@@ -943,6 +956,7 @@
                         {boost::none, "/example-schema:_list/contInList"},
                         {boost::none, "/example-schema:_list/number"},
                         {boost::none, "/example-schema:a"},
+                        {boost::none, "/example-schema:addresses"},
                         {boost::none, "/example-schema:a/a2"},
                         {boost::none, "/example-schema:a/a2/a3"},
                         {boost::none, "/example-schema:a/leafa"},
@@ -1129,6 +1143,8 @@
                 expectedType.emplace<yang::Int32>();
                 expectedUnits = "vt";
             }
+            auto nodeType = ys.nodeType(pathToSchemaString(path, Prefixes::WhenNeeded));
+            REQUIRE((nodeType == yang::NodeTypes::Leaf || nodeType == yang::NodeTypes::LeafList));
             REQUIRE(ys.leafType(pathToSchemaString(path, Prefixes::WhenNeeded)) == yang::TypeInfo{expectedType, expectedUnits});
         }