commit | f44bdda24480e8f3dca424270b3dfebbb9f5eafe | [log] [tgz] |
---|---|---|
author | Václav Kubernát <kubernat@cesnet.cz> | Mon Jun 22 15:58:41 2020 +0200 |
committer | Václav Kubernát <kubernat@cesnet.cz> | Mon Jun 22 17:10:44 2020 +0200 |
tree | 74f1bfd3e515196ae832e8e2f5da755f6abe1256 | |
parent | daf40311c9ccd280cd5878b09fc91d382c0c2122 [diff] [blame] |
Fix YangSchema::enableFeature segfault on invalid modules Now throws an exception on invalid modules. Change-Id: I494813fa5bc3f8357d98e731f7b2748e2df3ee90
diff --git a/tests/yang.cpp b/tests/yang.cpp index f50d76e..833ef70 100644 --- a/tests/yang.cpp +++ b/tests/yang.cpp
@@ -1183,5 +1183,10 @@ REQUIRE_THROWS(ys.nodeType(path, node)); } + + SECTION("enableFeature - non existing module") + { + REQUIRE_THROWS_AS(ys.enableFeature("non-existing", "just-no"), std::runtime_error); + } } }