Commit 89dad52a authored by Francis Dupont's avatar Francis Dupont

[65-libyang-testutils] Cosmetics (trailing dots) and a '>>'

parent 7de62601
......@@ -82,7 +82,7 @@ TEST_F(AdaptorConfigTest, loadExamples4) {
"with-ddns.json" };
ElementPtr x;
for (int i = 0; i<configs.size(); i++) {
x.reset();
testFile(string(CFG_EXAMPLES) + "/kea4/" + configs[i], false, x);
......@@ -113,7 +113,7 @@ TEST_F(AdaptorConfigTest, loadExamples6) {
"stateless.json",
"with-ddns.json" };
ElementPtr x;
for (int i = 0; i<configs.size(); i++) {
x.reset();
testFile(string(CFG_EXAMPLES) + "/kea6/" + configs[i], true, x);
......
......@@ -202,13 +202,12 @@ TEST(YangReprTest, setTest) {
EXPECT_TRUE(repr.verify(testTree, sess, cerr));
}
/// @brief Tests specified configuration.
///
/// Configuration is set and then verified using YangRepr object.
///
/// @param model name of the model to be verified against
/// @param tree tree to be verified
/// @param model name of the model to be verified against.
/// @param tree tree to be verified.
void sanityCheckConfig(const std::string& model, const YRTree& tree) {
// Get a translator object to play with.
S_Connection conn(new Connection("utils unittests"));
......@@ -225,8 +224,8 @@ void sanityCheckConfig(const std::string& model, const YRTree& tree) {
EXPECT_TRUE(result);
}
// This is test environment sanity check. It verifies that every configuration
// defined in yang_configs.h is sane.
// This is test environment sanity check. It verifies that all configuration
// defined in yang_configs.h are sane.
TEST(YangReprTest, verifyConfigs) {
for (auto x : test_configs) {
cout << "Testing tree for model " << x.first << endl;
......@@ -234,5 +233,4 @@ TEST(YangReprTest, verifyConfigs) {
}
}
}; // end of anonymous namespace
......@@ -442,20 +442,19 @@ const YRTree designExampleTree = {
"disabled", SR_ENUM_T, true }
};
/// @brief Set of example configurations
const std::vector<std::pair<std::string, YRTree>> test_configs =
/// @brief Set of example configurations.
const std::vector<std::pair<std::string, YRTree> > test_configs =
{
{ exampleModel, exampleTree },
{ testModel, testTree },
{ subnetTwoPoolsModelIetf6, subnetTwoPoolsTreeIetf6 },
{ subnetTimersModel, subnetTimersIetf6 },
{ validModelIetf6, validTreeIetf6 },
{ subnetOptionsModelKeaDhcp4, subnetOptionsTreeKeaDhcp4 },
{ subnetOptionsModelKeaDhcp6, subnetOptionsTreeKeaDhcp6 },
{ designExampleModel, designExampleTree }
{ exampleModel, exampleTree },
{ testModel, testTree },
{ subnetTwoPoolsModelIetf6, subnetTwoPoolsTreeIetf6 },
{ subnetTimersModel, subnetTimersIetf6 },
{ validModelIetf6, validTreeIetf6 },
{ subnetOptionsModelKeaDhcp4, subnetOptionsTreeKeaDhcp4 },
{ subnetOptionsModelKeaDhcp6, subnetOptionsTreeKeaDhcp6 },
{ designExampleModel, designExampleTree }
};
}; // end of namespace isc::yang::test
}; // end of namespace isc::yang
}; // end of namespace isc
......
......@@ -41,11 +41,11 @@ public:
: xpath_(xpath), value_(value), type_(type), settable_(settable) {
}
/// @brief Retrieves configuration parameter from sysrepo
/// @brief Retrieves configuration parameter from sysrepo.
///
/// @param xpath The xpath of an element to be retrieved
/// @param xpath The xpath of an element to be retrieved.
/// @param session Sysrepo session.
/// @return YangReprItem instance representing configuration parameter
/// @return YangReprItem instance representing configuration parameter.
static YangReprItem get(const std::string& xpath, S_Session session);
/// @brief The xpath.
......@@ -62,8 +62,8 @@ public:
/// @brief The equal operator ignoring settable.
///
/// @param other the other object to compare with
/// @return true if equal
/// @param other the other object to compare with.
/// @return true if equal.
bool operator==(const YangReprItem& other) const {
return ((xpath_ == other.xpath_) &&
(value_ == other.value_) &&
......@@ -72,8 +72,8 @@ public:
/// @brief The unequal operator ignoring settable.
///
/// @param other the other object to compare with
/// @return false if equal
/// @param other the other object to compare with.
/// @return false if equal.
bool operator!=(const YangReprItem& other) const {
return (!(*this == other));
}
......@@ -92,7 +92,7 @@ public:
/// @param expected The expected value.
/// @param session Sysrepo session.
/// @param errs Error stream.
/// @return true if verification succeeds, false with errors displayed
/// @return true if verification succeeds, false with errors displayed.
/// on errs if it fails.
bool verify(const Tree& expected, S_Session session,
std::ostream& errs) const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment