Add support for `empty` YANG leaf type
Change-Id: I87eafae9df9accdaa4579ace769996e70da6cb1c
diff --git a/tests/yang.cpp b/tests/yang.cpp
index 009465b..79bad71 100644
--- a/tests/yang.cpp
+++ b/tests/yang.cpp
@@ -369,9 +369,14 @@
type leafref {
path "../activeMappedPort";
}
+ type empty;
}
}
+ leaf dummyLeaf {
+ type empty;
+ }
+
leaf clockSpeed {
type int64;
config false;
@@ -800,6 +805,7 @@
std::make_unique<yang::TypeInfo>(enums)
})
}},
+ yang::TypeInfo{yang::Empty{}},
}};
}
@@ -844,6 +850,7 @@
{"example-schema"s, "obsoleteLeafWithObsoleteType"},
{"example-schema"s, "myRpc"},
{"example-schema"s, "systemStats"},
+ {"example-schema"s, "dummyLeaf"},
{"example-schema"s, "subLeaf"}};
}
@@ -893,6 +900,7 @@
{"example-schema"s, "clockSpeed"},
{"example-schema"s, "deprecatedLeaf"},
{"example-schema"s, "direction"},
+ {"example-schema"s, "dummyLeaf"},
{"example-schema"s, "duration"},
{"example-schema"s, "ethernet"},
{"example-schema"s, "foodDrinkIdentLeaf"},
@@ -951,6 +959,7 @@
{boost::none, "/example-schema:deprecatedLeaf"},
{boost::none, "/example-schema:direction"},
{boost::none, "/example-schema:duration"},
+ {boost::none, "/example-schema:dummyLeaf"},
{boost::none, "/example-schema:foodDrinkIdentLeaf"},
{boost::none, "/example-schema:foodIdentLeaf"},
{boost::none, "/example-schema:interface/caseEthernet/ethernet"},