tests CHANGE add unit test for parse_namespace yin parser function
diff --git a/src/parser_yin.c b/src/parser_yin.c
index e7e600c..c060b5b 100644
--- a/src/parser_yin.c
+++ b/src/parser_yin.c
@@ -169,15 +169,6 @@
return LY_SUCCESS;
}
-/**
- * @brief Parse namespace statement.
- *
- * @param[in] xml_ctx xml context.
- * @param[in, out] data Data to read from.
- * @param[in, out] namespace Where namespace value should be stored.
- *
- * @return LY_ERR values.
- */
LY_ERR
parse_namespace(struct lyxml_context *xml_ctx, const char **data, const char **namespace)
{
@@ -186,7 +177,7 @@
ret = yin_parse_attribute(xml_ctx, data, YIN_ARG_URI, namespace);
LY_CHECK_RET(ret != LY_SUCCESS, ret);
- return LY_SUCCESS;
+ return ret;
}
/**
diff --git a/src/parser_yin.h b/src/parser_yin.h
index 6aa08e5..01cae2b 100644
--- a/src/parser_yin.h
+++ b/src/parser_yin.h
@@ -42,5 +42,16 @@
*/
LY_ERR parse_text_element(struct lyxml_context *xml_ctx, const char **data, const char **value);
+/**
+ * @brief Parse namespace statement.
+ *
+ * @param[in] xml_ctx xml context.
+ * @param[in, out] data Data to read from.
+ * @param[in, out] namespace Where namespace value should be stored.
+ *
+ * @return LY_ERR values.
+ */
+LY_ERR
+parse_namespace(struct lyxml_context *xml_ctx, const char **data, const char **namespace);
#endif /* LY_PARSER_YIN_H_*/