tests CHANGE extend log checking up to 5 messages
diff --git a/tests/utests/utests.h b/tests/utests/utests.h
index 856ba10..873e224 100644
--- a/tests/utests/utests.h
+++ b/tests/utests/utests.h
@@ -912,9 +912,23 @@
_CHECK_LOG_CTX(ly_err_last(_UC->ctx)->prev->prev, MSG3, PATH3)
/**
+ * @brief Internal macro to check the last three libyang's context error.
+ */
+#define _CHECK_LOG_CTX4(MSG1, PATH1, MSG2, PATH2, MSG3, PATH3, MSG4, PATH4) \
+ _CHECK_LOG_CTX3(MSG1, PATH1, MSG2, PATH2, MSG3, PATH3); \
+ _CHECK_LOG_CTX(ly_err_last(_UC->ctx)->prev->prev->prev, MSG4, PATH4)
+
+/**
+ * @brief Internal macro to check the last three libyang's context error.
+ */
+#define _CHECK_LOG_CTX5(MSG1, PATH1, MSG2, PATH2, MSG3, PATH3, MSG4, PATH4, MSG5, PATH5) \
+ _CHECK_LOG_CTX4(MSG1, PATH1, MSG2, PATH2, MSG3, PATH3, MSG4, PATH4); \
+ _CHECK_LOG_CTX(ly_err_last(_UC->ctx)->prev->prev->prev->prev, MSG5, PATH5)
+
+/**
* @brief Internal helper macro to select _CHECK_LOG_CTX* macro according to the provided parameters.
*/
-#define _GET_CHECK_LOG_MACRO(_1, _2, _3, _4, _5, _6, NAME, ...) NAME
+#define _GET_CHECK_LOG_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, NAME, ...) NAME
/**
* @brief Check expected error(s) in libyang context.
@@ -927,7 +941,8 @@
* @param[in] PATH Expected error path.
*/
#define CHECK_LOG_CTX(...) \
- _GET_CHECK_LOG_MACRO(__VA_ARGS__, _CHECK_LOG_CTX3, _INVAL, _CHECK_LOG_CTX2, _INVAL, _CHECK_LOG_CTX1)(__VA_ARGS__); \
+ _GET_CHECK_LOG_MACRO(__VA_ARGS__, _CHECK_LOG_CTX5, _INVAL, _CHECK_LOG_CTX4, _INVAL, \
+ _CHECK_LOG_CTX3, _INVAL, _CHECK_LOG_CTX2, _INVAL, _CHECK_LOG_CTX1)(__VA_ARGS__); \
ly_err_clean(_UC->ctx, NULL)
/**