Fix leafTypeName returning names of primitive types

This means describe won't tell me
"example-schema:leaf: string (a string)", but just
"example-schema:leaf: (a string)".

Change-Id: I736bf655f3301a61b76485b15cf123448459047e
diff --git a/tests/yang.cpp b/tests/yang.cpp
index 79bad71..58a0f01 100644
--- a/tests/yang.cpp
+++ b/tests/yang.cpp
@@ -1184,6 +1184,12 @@
             REQUIRE(ys.defaultValue("/example-schema:leafInt32") == std::nullopt);
         }
 
+        SECTION("leafTypeName")
+        {
+            REQUIRE(ys.leafTypeName("/example-schema:leafEnumTypedefRestricted") == "enumTypedef");
+            REQUIRE(ys.leafTypeName("/example-schema:leafInt32") == std::nullopt);
+        }
+
         SECTION("moduleNodes")
         {
         }