/**
 * @file   utests.h
 * @author Radek Iša <isa@cesnet.cz>
 * @author Radek Krejci <rkrejci@cesnet.cz>
 * @brief  this file contains macros for simplification test writing
 *
 * Copyright (c) 2020 CESNET, z.s.p.o.
 *
 * This source code is licensed under BSD 3-Clause License (the "License").
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://opensource.org/licenses/BSD-3-Clause
 */

#ifndef _UTESTS_H_
#define _UTESTS_H_

#define _POSIX_C_SOURCE 200809L /* strdup */

#include <setjmp.h>
#include <stdarg.h>
#include <stddef.h>

#include <cmocka.h>

#include <string.h>

#include "libyang.h"
#include "tests/config.h"

/**
 * TESTS OVERVIEW
 *
 * To include utest's environment, just include "utests.h" in the test's source
 * code. In case it is the main source code for a cmocka test group (there is a
 * main() function), define _UTEST_MAIN_ before including this header.
 *
 * TESTS VARIABLES
 *
 * Checking macros use internal storage to store various variables necessary
 * during the checking. It is possible to access these variables using the
 * following macros:
 *
 * UTEST_LYCTX    - libyang context
 * UTEST_IN       - input handler
 * UTEST_OUT      - output handler
 *
 * All these variables are cleaned with test's teardown.
 *
 * TESTS SETUP
 *
 * CMocka's CMUnitTest list definition macros (cmoka_unit_test*()) are replaced
 * by UTEST macro with possibility to specify own setup and teardown functions:
 *
 * UTEST(test_func) - only implicit setup and teardown functions are used
 * UTEST(test_func, setup) - implicit teardown but own setup
 * UTEST(test_func, setup, teardown) - both setup and teardown are test-specific
 *
 * Note that the tests environment always provide (and need) internal setup and
 * teardown functions. In case the test-specific setup or teardown are used, they
 * are supposed to include UTEST_SETUP at the setup beginning and UTEST_TEARDOWN
 * at the teardown end.
 *
 * Libyang context is part of the prepared environment. To add a schema into the
 * context (despite it is in the test-specific setup or in test function itself),
 * use UTEST_ADD_MODULE macro.
 *
 * LOGGING
 *
 * There are 2 macros to check content of the log from the previously called
 * libyang function. CHECK_LOG macro test only the last error message and path
 * stored directly via logging callback. CHECK_LOG_CTX gets error message and
 * path from the libyang context (in case the function does not store the error
 * information into the libyang context, the message cannot be checked this way).
 * libyang is set to store multiple error information, so multiple couples of
 * error message and path can be provided to be checked (the first couple
 * corresponds to the latest error). The macro also cleanups the errors list, so
 * it is fine to check that there is no error after succeeding successful
 * function call.
 */

/**
 * @brief Test's context to provide common storage for various variables.
 */
struct utest_context {
    struct ly_ctx *ctx;  /**< libyang context */

    char *err_msg;       /**< Directly logged error message */
    char *err_path;      /**< Directly logged error path */

    struct ly_in *in;    /**< Input handler */
    struct ly_out *out;  /**< Outpu handler */
};

/**
 * @brief Shortcut to access utest_context.
 */
#define _UC ((struct utest_context *)*state)

/**
 * @brief libyang context provider.
 */
#define UTEST_LYCTX (_UC->ctx)

/**
 * @brief Context's input handler provider
 */
#define UTEST_IN (_UC->in)

/**
 * @brief Context's input handler provider
 */
#define UTEST_OUT (_UC->out)

/**
 * @brief Parse (and validate) data from the input handler as a YANG data tree.
 *
 * @param[in] INPUT The input data in the specified @p format to parse (and validate)
 * @param[in] INPUT_FORMAT Format of the input data to be parsed. Can be 0 to try to detect format from the input handler.
 * @param[in] PARSE_OPTIONS Options for parser, see @ref dataparseroptions.
 * @param[in] VALIDATE_OPTIONS Options for the validation phase, see @ref datavalidationoptions.
 * @param[in] OUT_STATUS expected return status
 * @param[out] OUT_NODE Resulting data tree built from the input data. Note that NULL can be a valid result as a representation of an empty YANG data tree.
 * The returned data are expected to be freed using LYD_TREE_DESTROY().
 */
#define CHECK_PARSE_LYD_PARAM(INPUT, INPUT_FORMAT, PARSE_OPTIONS, VALIDATE_OPTIONS, OUT_STATUS, OUT_NODE) \
    assert_int_equal(OUT_STATUS, lyd_parse_data_mem(_UC->ctx, INPUT, INPUT_FORMAT, PARSE_OPTIONS, VALIDATE_OPTIONS, &OUT_NODE)); \
    if (OUT_STATUS == LY_SUCCESS) { \
        assert_non_null(OUT_NODE); \
    } else { \
        assert_null(OUT_NODE); \
    }

/**
 * @brief Check if lyd_node and his subnodes have correct values. Print lyd_node and his sunodes int o string in json or xml format.
 * @param[in] NODE pointer to lyd_node
 * @param[in] TEXT expected output string in json or xml format.
 * @param[in] FORMAT format of input text. LYD_JSON, LYD_XML
 * @param[in] PARAM  options [Data printer flags](@ref dataprinterflags).
 */
#define CHECK_LYD_STRING_PARAM(NODE, TEXT, FORMAT, PARAM) \
    { \
        char *test; \
        lyd_print_mem(&test, NODE, FORMAT, PARAM); \
        assert_string_equal(test, TEXT); \
        free(test); \
    }

/**
 * @brief Compare two lyd_node structure. Macro print lyd_node structure into string and then compare string. Print function use these two parameters. LYD_PRINT_WITHSIBLINGS | LYD_PRINT_SHRINK;
 * @param[in] NODE_1 pointer to lyd_node
 * @param[in] NODE_2 pointer to lyd_node
 */
#define CHECK_LYD(NODE_1, NODE_2) \
    { \
        char *test_1; \
        char *test_2; \
        lyd_print_mem(&test_1, NODE_1, LYD_XML, LYD_PRINT_WITHSIBLINGS | LYD_PRINT_SHRINK); \
        lyd_print_mem(&test_2, NODE_2, LYD_XML, LYD_PRINT_WITHSIBLINGS | LYD_PRINT_SHRINK); \
        assert_string_equal(test_1, test_2); \
        free(test_1); \
        free(test_2); \
    }

/*
 * SUPPORT MACROS
 */

/**
 * @brief Internal macro witch assert that two given string are equal or are both null.
 *
 * @param[in] STRING string to check
 * @param[in] TEXT   string to compare
 */
#define CHECK_STRING(STRING, TEXT)\
    if (TEXT == NULL) { \
        assert_null(STRING); \
    } else { \
        assert_non_null(STRING); \
        assert_string_equal(STRING, TEXT); \
    }

/**
 * @brief Internal macro witch assert that pointer is null when flag is 0.
 *
 * @param[in] POINTER pointer to check
 * @param[in] FLAG    0 -> pointer is NULL, 1 -> pointer is not null
 */
#define CHECK_POINTER(POINTER, FLAG) \
    assert_true(FLAG == 0 ? POINTER == NULL : POINTER != NULL)

/**
 * @brief Internal macro check size of [sized array](@ref sizedarrays)'s
 *
 * @param[in] ARRAY pointer to [sized array](@ref sizedarrays)
 * @param[in] SIZE  expected [sized array](@ref sizedarrays) size of array
 */
#define CHECK_ARRAY(ARRAY, SIZE) \
    assert_true((SIZE == 0) ? \
                (ARRAY == NULL) : \
                (ARRAY != NULL && SIZE == LY_ARRAY_COUNT(ARRAY)));

/*
 *   LIBYANG NODE CHECKING
 */

/**
 * @brief assert that lysp_action_inout structure members are correct
 * @param[in] NODE      pointer to lysp_action_inout variable
 * @param[in] DATA      0 -> check if pointer to data is NULL, 1 -> check if pointer to data is not null
 * @param[in] EXTS      expected [sized array](@ref sizedarrays) size of extens list
 * @param[in] GROUPINGS expected [sized array](@ref sizedarrays) size of grouping list
 * @param[in] MUSTS     expected [sized array](@ref sizedarrays) size of must restriction list
 * @param[in] NODETYPE  node type. LYS_INPUT or LYS_OUTPUT
 * @param[in] PARENT    0 -> check if node is root, 1 -> check if node is not root
 * @param[in] TYPEDEFS  expected [sized array](@ref sizedarrays) size of typedefs list
 */
#define CHECK_LYSP_ACTION_INOUT(NODE, DATA, EXTS, GROUPINGS, MUSTS, NODETYPE, PARENT, TYPEDEFS) \
    assert_non_null(NODE); \
    CHECK_POINTER((NODE)->child, DATA); \
    CHECK_ARRAY((NODE)->exts, EXTS); \
    CHECK_POINTER((NODE)->groupings, GROUPINGS); \
    CHECK_ARRAY((NODE)->musts, MUSTS); \
    assert_int_equal((NODE)->nodetype, NODETYPE); \
    CHECK_POINTER((NODE)->parent, PARENT); \
    CHECK_ARRAY((NODE)->typedefs, TYPEDEFS);

/**
 * @brief assert that lysp_action structure members are correct
 * @param[in] NODE    pointer to lysp_action variable
 * @param[in] DSC     expected description
 * @param[in] EXTS    expected [sized array](@ref sizedarrays) size of extension list
 * @param[in] FLAGS   expected [schema node flags](@ref snodeflags)
 * @param[in] GROUPINGS expected [sized array](@ref sizedarrays) size of grouping list
 * @param[in] IFFEATURES expected [sized array](@ref sizedarrays) size of if-feature expressions list
 * @param[in] INPUT_*    ::LYSP_ACTION_INOUT_CHECK
 * @param[in] NAME     expected name
 * @param[in] NODETYPE node type. LYS_RPC or LYS_ACTION
 * @param[in] OUTPUT_*    ::LYSP_ACTION_INOUT_CHECK
 * @param[in] PARENT   0-> check if node is root, 1-> check if node is not root
 * @param[in] REF      expected reference
 * @param[in] TYPEDEFS expected [sized array](@ref sizedarrays) size of list of typedefs
 */
#define CHECK_LYSP_ACTION(NODE, DSC, EXTS, FLAGS, GROUPINGS, IFFEATURES, \
            INPUT_DATA, INPUT_EXTS, INPUT_GROUPINGS, INPUT_MUSTS, \
            INPUT_PARENT, INPUT_TYPEDEFS, \
            NAME, NODETYPE, \
            OUTPUT_DATA, OUTPUT_EXTS, OUTPUT_GROUPINGS, OUTPUT_MUSTS, \
            OUTPUT_PARENT, OUTPUT_TYPEDEFS, \
            PARENT, REF, TYPEDEFS) \
    assert_non_null(NODE); \
    CHECK_STRING((NODE)->dsc, DSC); \
    CHECK_ARRAY((NODE)->exts, EXTS); \
    assert_int_equal((NODE)->flags, FLAGS); \
    CHECK_POINTER((NODE)->groupings, GROUPINGS); \
    CHECK_ARRAY((NODE)->iffeatures, IFFEATURES); \
    CHECK_LYSP_ACTION_INOUT(&((NODE)->input), INPUT_DATA, INPUT_EXTS, INPUT_GROUPINGS, \
                INPUT_MUSTS, LYS_INPUT, INPUT_PARENT, INPUT_TYPEDEFS); \
    assert_string_equal((NODE)->name, NAME); \
    assert_int_equal((NODE)->nodetype, NODETYPE); \
    CHECK_LYSP_ACTION_INOUT(&((NODE)->output), OUTPUT_DATA, OUTPUT_EXTS, OUTPUT_GROUPINGS, \
                OUTPUT_MUSTS, LYS_OUTPUT, OUTPUT_PARENT, OUTPUT_TYPEDEFS); \
    CHECK_POINTER((NODE)->parent, PARENT); \
    CHECK_STRING((NODE)->ref, REF); \
    CHECK_ARRAY((NODE)->typedefs, TYPEDEFS) \

/**
 * @brief assert that lysp_when structure members are correct
 * @param[in] NODE pointer to lysp_when variable
 * @param[in] COND expected string specifid condition
 * @param[in] DSC  expected string description statement
 * @param[in] EXTS expected [sized array](@ref sizedarrays) size of list of extension array
 * @param[in] REF  expected string reference
 */
#define CHECK_LYSP_WHEN(NODE, COND, DSC, EXTS, REF) \
    assert_non_null(NODE); \
    assert_string_equal((NODE)->cond, COND); \
    CHECK_STRING((NODE)->dsc, DSC); \
    CHECK_ARRAY((NODE)->exts, EXTS); \
    if (REF == NULL) { \
        assert_null((NODE)->ref); \
    } else { \
        assert_non_null((NODE)->ref); \
        assert_string_equal((NODE)->ref, REF); \
    }

/**
 * @brief assert that lysp_restr structure members are correct
 * @param[in] NODE pointer to lysp_restr variable
 * @param[in] ARG_STR expected string. The restriction expression/value
 * @param[in] DSC     expected descrition
 * @param[in] EAPPTAG expected string reprezenting error-app-tag value
 * @param[in] EMSG    expected string reprezenting error message
 * @param[in] EXTS    expected [sized array](@ref sizedarrays) size of list of extension array
 * @param[in] REF     expected reference
 */

#define CHECK_LYSP_RESTR(NODE, ARG_STR, DSC, EAPPTAG, EMSG, EXTS, REF) \
    assert_non_null(NODE); \
    assert_non_null((NODE)->arg.mod); \
    assert_string_equal((NODE)->arg.str, ARG_STR); \
    CHECK_STRING((NODE)->dsc, DSC); \
    CHECK_STRING((NODE)->eapptag, EAPPTAG); \
    CHECK_STRING((NODE)->emsg, EMSG); \
    CHECK_ARRAY((NODE)->exts, EXTS); \
    CHECK_STRING((NODE)->ref, REF);

/**
 * @brief assert that lysp_import structure members are correct
 * @param[in] NODE   pointer to lysp_import variable
 * @param[in] DSC    expected description or NULL
 * @param[in] EXTS   expected [sized array](@ref sizedarrays) size of list of extensions
 * @param[in] NAME   expected name of imported module
 * @param[in] PREFIX expected prefix for the data from the imported schema
 * @param[in] REF    expected reference
 * @prame[in] REV    expected reprezenting date in format "11-10-2020"
 */
#define CHECK_LYSP_IMPORT(NODE, DSC, EXTS, NAME, PREFIX, REF, REV) \
    assert_non_null(NODE); \
    CHECK_STRING((NODE)->dsc, DSC); \
    CHECK_ARRAY((NODE)->exts, EXTS); \
    /*assert_non_null((NODE)->module); // ?? it is mandatory but in some test it doesnt work */ \
    assert_string_equal((NODE)->name, NAME); \
    assert_string_equal((NODE)->prefix, PREFIX); \
    CHECK_STRING((NODE)->ref, REF); \
    CHECK_STRING((NODE)->rev, REV); \

/**
 * @brief assert that lysp_ext structure members are correct
 * @param[in] NODE pointer to lysp_ext_instance variable
 * @param[in] ARGUMENT expected argument name
 * @param[in] COMPILED 0 -> compiled data dosnt exists, 1 -> compiled data exists
 * @param[in] DSC      expected string reprezent description
 * @param[in] EXTS     expected [sized array](@ref sizedarrays) size of list of extension instances
 * @param[in] FLAGS    expected LYS_STATUS_* and LYS_YINELEM_* values (@ref snodeflags)
 * @param[in] NAME     expected name
 * @param[in] REF      expected ref
 */
#define CHECK_LYSP_EXT(NODE, ARGUMENT, COMPILED, DSC, EXTS, FLAGS, NAME, REF) \
    assert_non_null(NODE); \
    CHECK_STRING((NODE)->argument, ARGUMENT); \
    CHECK_POINTER((NODE)->compiled, COMPILED); \
    CHECK_STRING((NODE)->dsc, DSC); \
    CHECK_ARRAY((NODE)->exts, EXTS); \
    assert_int_equal((NODE)->flags, FLAGS); \
    assert_string_equal((NODE)->name, NAME); \
    CHECK_STRING((NODE)->ref, REF);

/**
 * @brief assert that lysp_ext_instance structure members are correct
 * @param[in] NODE      pointer to lysp_ext_instance variable
 * @param[in] ARGUMENT  expected optional value of the extension's argument
 * @param[in] CHILD     0 -> node doesnt have child, 1 -> node have children
 * @param[in] COMPILED  0 -> compiled data dosnt exists, 1 -> compiled data exists
 * @param[in] INSUBSTMS expected value identifying placement of the extension instance
 * @param[in] INSUBSTMS_INDEX expected indentifi index
 * @param[in] PARENT    0-> check if node is root, 1-> check if node is not root
 * @param[in] PARENT_TYPE expected parent type ::LYEXT_PARENT. not relevat if PARENT == 0
 * @param[in] YIN       expected flag for YIN source format, can be set to LYS_YIN
 */
#define CHECK_LYSP_EXT_INSTANCE(NODE, ARGUMENT, CHILD, COMPILED, INSUBSTMT, INSUBSTMT_INDEX, NAME, HAS_PARENT, PARENT_TYPE, YIN) \
    assert_non_null(NODE); \
    CHECK_STRING((NODE)->argument, ARGUMENT); \
    CHECK_POINTER((NODE)->child, CHILD); \
    CHECK_POINTER((NODE)->compiled, COMPILED); \
    /*assert_int_equal((NODE)->flags, LYS_INTERNAL);*/ \
    assert_int_equal((NODE)->insubstmt, INSUBSTMT); \
    assert_int_equal((NODE)->insubstmt_index, INSUBSTMT_INDEX); \
    assert_string_equal((NODE)->name, NAME); \
    if (HAS_PARENT) { \
        assert_non_null((NODE)->parent); \
        assert_int_equal((NODE)->parent_type, PARENT_TYPE); \
    } else { \
        assert_null((NODE)->parent); \
    } \
    assert_int_equal((NODE)->yin, YIN);

/**
 * @brief assert that lysp_stmt structure members are correct
 * @param[in] NODE  pointer to lysp_stmt variable
 * @param[in] ARG   expected statemet argumet
 * @param[in] CHILD 0 -> node doesnt have child, 1 -> node have children
 * @param[in] FLAGS expected statement flags, can be set to LYS_YIN_ATTR
 * @param[in] KW    expected numeric respresentation of the stmt value
 * @param[in] NEXT  0 -> pointer is NULL, 1 -> pointer is not null
 * @param[in] STMS  expected identifier of the statement
 */
#define CHECK_LYSP_STMT(NODE, ARG, CHILD, FLAGS, KW, NEXT, STMT) \
    assert_non_null(NODE); \
    CHECK_STRING((NODE)->arg, ARG); \
    CHECK_POINTER((NODE)->child, CHILD); \
    assert_int_equal((NODE)->flags, FLAGS); \
    assert_int_equal((NODE)->kw, KW); \
    CHECK_POINTER((NODE)->next, NEXT); \
    assert_string_equal((NODE)->stmt, STMT); \

/**
 * @brief assert that lysp_type_enum structure members are correct
 * @param[in] NODE pointer to lysp_type_enum variable
 * @param[in] DSC   expected description
 * @param[in] EXTS  expected [sized array](@ref sizedarrays) size of list of the extension instances
 * @param[in] FLAGS only LYS_STATUS_ and LYS_SET_VALUE values are allowed
 * @param[in] IFFEATURES expected [sized array](@ref sizedarrays) size of list of the extension instances
 * @param[in] NAME  expected name
 * @param[in] REF   expected reference statement
 * @param[in] VALUE expected enum's value or bit's position
 */
#define CHECK_LYSP_TYPE_ENUM(NODE, DSC, EXTS, FLAGS, IFFEATURES, NAME, REF, VALUE) \
    assert_non_null(NODE); \
    CHECK_STRING((NODE)->dsc, DSC); \
    CHECK_ARRAY((NODE)->exts, EXTS); \
    assert_int_equal((NODE)->flags, FLAGS); \
    CHECK_ARRAY((NODE)->iffeatures, IFFEATURES); \
    CHECK_STRING((NODE)->name, NAME); \
    CHECK_STRING((NODE)->ref, REF); \
    assert_int_equal(VALUE, (NODE)->value);

/**
 * @brief assert that lysp_node structure members are correct
 * @param[in] NODE  pointer to lysp_node variable
 * @param[in] DSC   expected description statement
 * @param[in] EXTS  expected [sized array](@ref sizedarrays) size of list of the extension instances
 * @param[in] FLAGS [schema node flags](@ref snodeflags)
 * @param[in] IFFEATURES expected [sized array](@ref sizedarrays) size of list of the extension instances
 * @param[in] NAME  expected name
 * @param[in] NEXT  0 pointer is null, 1 pointer is not null
 * @param[in] NODETYPE  node type LYS_UNKNOWN, LYS_CONTAINER, LYS_CHOICE, LYS_LEAF, LYS_LEAFLIST,
 *                      LYS_LIST, LYS_ANYXML, LYS_ANYDATA, LYS_CASE, LYS_RPC, LYS_ACTION, LYS_NOTIF,
 *                      LYS_USES, LYS_INPUT, LYS_OUTPUT, LYS_GROUPING, LYS_AUGMENT
 * @param[in] PARENT    0-> check if node is root, 1-> check if node is not root
 * @param[in] REF       expected reference statement
 * @param[in] WHEN      0-> pointer is null, 1 -> pointer is not null
 */
#define CHECK_LYSP_NODE(NODE, DSC, EXTS, FLAGS, IFFEATURES, NAME, NEXT, NODETYPE, PARENT, REF, WHEN) \
    assert_non_null(NODE); \
    CHECK_STRING((NODE)->dsc, DSC); \
    CHECK_ARRAY((NODE)->exts, EXTS); \
    assert_int_equal((NODE)->flags, FLAGS); \
    CHECK_ARRAY((NODE)->iffeatures, IFFEATURES); \
    CHECK_STRING((NODE)->name, NAME); \
    CHECK_POINTER((NODE)->next, NEXT); \
    assert_int_equal((NODE)->nodetype, NODETYPE); \
    CHECK_POINTER((NODE)->parent, PARENT); \
    CHECK_STRING((NODE)->ref, REF); \
    CHECK_POINTER(lysp_node_when((struct lysp_node *)NODE), WHEN);

/**
 * @brief assert that lysc_notif structure members are correct
 * @param[in] NODE    pointer to lysp_notif variable
 * @param[in] DATA    0 pointer is null, 1 pointer is not null
 * @param[in] DSC     expected description
 * @param[in] EXTS    expected [sized array](@ref sizedarrays) size of list of the extension instances
 * @param[in] FLAGS   [schema node flags](@ref snodeflags)
 * @param[in] MODULE  0 pointer is null, 1 pointer is not null
 * @param[in] MUSTS   expected [sized array](@ref sizedarrays) size of list of must restriction
 * @param[in] NAME    expected name
 * @param[in] PARENT  0-> check if node is root, 1-> check if node is not root
 * @param[in] PRIV    0-> pointer is null, 1-> pointer is not null
 * @param[in] REF     expected reference
 * @param[in] WHEN    expected [sized array](@ref sizedarrays) size of list of pointers to when statements
 */
#define CHECK_LYSC_NOTIF(NODE, DATA, DSC, EXTS, FLAGS, MODULE, MUSTS, NAME, PARENT, PRIV, REF, WHEN) \
    assert_non_null(NODE); \
    CHECK_POINTER((NODE)->child, DATA); \
    CHECK_STRING((NODE)->dsc, DSC); \
    CHECK_ARRAY((NODE)->exts, EXTS); \
    assert_int_equal((NODE)->flags, FLAGS); \
    CHECK_POINTER((NODE)->module, MODULE); \
    CHECK_ARRAY((NODE)->musts, MUSTS); \
    assert_string_equal((NODE)->name, NAME); \
    assert_int_equal((NODE)->nodetype, LYS_NOTIF); \
    CHECK_POINTER((NODE)->parent, PARENT); \
    CHECK_POINTER((NODE)->priv, PRIV); \
    CHECK_STRING((NODE)->ref, REF); \
    CHECK_ARRAY(lysc_node_when((struct lysc_node *)NODE), WHEN);

/**
 * @brief assert that lysc_action_inout structure members are correct
 * @param[in] NODE      pointer to lysp_notif variable
 * @param[in] DATA      0 pointer is null, 1 pointer is not null
 * @param[in] MUST      expected [sized array](@ref sizedarrays) size of list of must restrictions
 * @param[in] NODETYPE  LYS_INPUT or LYS_OUTPUT
 */
#define CHECK_LYSC_ACTION_INOUT(NODE, DATA, MUST, NODETYPE) \
    assert_non_null(NODE); \
    CHECK_POINTER((NODE)->child, DATA); \
    CHECK_ARRAY((NODE)->musts, MUST); \
    assert_int_equal((NODE)->nodetype, NODETYPE);

/**
 * @brief assert that lysc_action structure members are correct
 * @param[in] NODE    pointer to lysp_action variable
 * @param[in] DSC     string description statement
 * @param[in] EXTS    expected [sized array](@ref sizedarrays) size of list of the extension instances
 * @param[in] FLAGS   [schema node flags](@ref snodeflags)
 * @param[in] INPUT_DATA 0 pointer is null, 1 pointer is not null
 * @param[in] INPUT_MUST expected [sized array](@ref sizedarrays) size of input list of must restrictions
 * @param[in] INPUT_EXTS expected [sized array](@ref sizedarrays) size of the input extension instances of input
 * @param[in] MODULE  0 pointer is null, 1 pointer is not null
 * @param[in] NAME    expected name
 * @param[in] NODETYPE    LYS_RPC, LYS_ACTION
 * @param[in] OUTPUT_DATA 0 pointer is null, 1 pointer is not null
 * @param[in] OUTPUT_MUST expected [sized array](@ref sizedarrays) size of output list of must restrictions
 * @param[in] OUTPUT_EXTS expected [sized array](@ref sizedarrays) size of the output extension instances of input
 * @param[in] PARENT  0-> check if node is root, 1-> check if node is not root
 * @param[in] PRIV    0-> pointer is null, 1-> pointer is not null
 * @param[in] REF     expected reference
 * @param[in] WHEN    expected [sized array](@ref sizedarrays) size of list of pointers to when statements
 */
#define CHECK_LYSC_ACTION(NODE, DSC, EXTS, FLAGS, INPUT_DATA, INPUT_MUST, INPUT_EXTS, MODULE, NAME, NODETYPE, \
            OUTPUT_DATA, OUTPUT_MUST, OUTPUT_EXTS, PARENT, PRIV, REF, WHEN) \
    assert_non_null(NODE); \
    CHECK_STRING((NODE)->dsc, DSC); \
    CHECK_ARRAY((NODE)->exts, EXTS); \
    assert_int_equal((NODE)->flags, FLAGS); \
    CHECK_LYSC_ACTION_INOUT(&(NODE)->input, INPUT_DATA, INPUT_MUST, LYS_INPUT); \
    CHECK_ARRAY((NODE)->input.exts, INPUT_EXTS); \
    CHECK_POINTER((NODE)->module, MODULE); \
    assert_string_equal((NODE)->name, NAME); \
    assert_int_equal((NODE)->nodetype, NODETYPE); \
    CHECK_LYSC_ACTION_INOUT(&(NODE)->output, OUTPUT_DATA, OUTPUT_MUST, LYS_OUTPUT); \
    CHECK_ARRAY((NODE)->output.exts, OUTPUT_EXTS); \
    CHECK_POINTER((NODE)->parent, PARENT); \
    CHECK_POINTER((NODE)->priv, PRIV); \
    CHECK_STRING((NODE)->ref, REF); \
    CHECK_ARRAY(lysc_node_when((struct lysc_node *)NODE), WHEN);

/**
 * @brief assert that lysc_node structure members are correct
 * @param[in] NODE    pointer to lysc_node variable
 * @param[in] DSC     expected description
 * @param[in] EXTS    expected [sized array](@ref sizedarrays) size of list of the extension instances
 * @param[in] FLAGS   [schema node flags](@ref snodeflags)
 * @param[in] MODULE  0 pointer is null, 1 pointer is not null
 * @param[in] NAME    expected name
 * @param[in] NEXT    0 pointer is null, 1 pointer is not null
 * @param[in] NODETYPE    type of the node  LYS_UNKNOWN, LYS_CONTAINER, LYS_CHOICE, LYS_LEAF,
 *                    LYS_LEAFLIST, LYS_LIST, LYS_ANYXML, LYS_ANYDATA, LYS_CASE, LYS_RPC,
 *                    LYS_ACTION, LYS_NOTIF, LYS_USES, LYS_INPUT, LYS_OUTPUT, LYS_GROUPING,
 *                    LYS_AUGMENT
 * @param[in] PARENT  0-> check if node is root, 1-> check if node is not root
 * @param[in] PRIV    0-> pointer is null, 1-> pointer is not null
 * @param[in] REF     expected reference
 * @param[in] WHEN    expected [sized array](@ref sizedarrays) size of list of pointers to when statements
 */
#define CHECK_LYSC_NODE(NODE, DSC, EXTS, FLAGS, MODULE, NAME, NEXT, NODETYPE, PARENT, PRIV, REF, WHEN) \
    assert_non_null(NODE); \
    CHECK_STRING((NODE)->dsc, DSC); \
    CHECK_ARRAY((NODE)->exts, EXTS); \
    assert_int_equal((NODE)->flags, FLAGS); \
    CHECK_POINTER((NODE)->module, MODULE); \
    assert_string_equal((NODE)->name, NAME); \
    CHECK_POINTER((NODE)->next, NEXT); \
    assert_int_equal((NODE)->nodetype, NODETYPE); \
    CHECK_POINTER((NODE)->parent, PARENT); \
    assert_non_null((NODE)->prev); \
    CHECK_POINTER((NODE)->priv, PRIV); \
    CHECK_STRING((NODE)->ref, REF); \
    CHECK_ARRAY(lysc_node_when(NODE), WHEN);

/**
 * @brief assert that lyd_meta structure members are correct
 * @param[in] NODE       pointer to lyd_meta variable
 * @param[in] ANNOTATION 0 pointer is null, 1 pointer is not null
 * @param[in] NAME       expected name
 * @param[in] NEXT       0 pointer is null, 1 pointer is not null
 * @param[in] TYPE_VAL value type. EMPTY, UNION, BITS, INST, ENUM, INT8, INT16, UINT8, STRING, LEAFREF, DEC64, BINARY, BOOL, IDENT
 *                     part of text reprezenting LY_DATA_TYPE.
 * @param[in] ...              ::CHECK_LYD_VALUE
 */
#define CHECK_LYD_META(NODE, ANNOTATION, NAME, NEXT, PARENT, TYPE_VAL, ...) \
    assert_non_null(NODE); \
    CHECK_POINTER((NODE)->annotation, ANNOTATION); \
    assert_string_equal((NODE)->name, NAME); \
    CHECK_POINTER((NODE)->next, NEXT); \
    CHECK_POINTER((NODE)->parent, PARENT); \
    CHECK_LYD_VALUE((NODE)->value, TYPE_VAL, ##__VA_ARGS__);

/**
 * @brief assert that lyd_node_term structure members are correct
 * @param[in] NODE             pointer to lyd_node_term variable
 * @param[in] FLAGS            expected [data node flags](@ref dnodeflags)
 * @param[in] META             0 -> meta is not prezent, 1 -> meta is prezent
 * @param[in] NEXT             0 -> next node is not prezent, 1 -> next node is prezent
 * @param[in] TYPE_VAL value type. EMPTY, UNION, BITS, INST, ENUM, INT8, INT16, UINT8, STRING, LEAFREF, DEC64, BINARY, BOOL, IDENT
 *                     part of text reprezenting LY_DATA_TYPE.
 * @param[in] ...              ::CHECK_LYD_VALUE
 */
#define CHECK_LYD_NODE_TERM(NODE, FLAGS, META, NEXT, PARENT, SCHEMA, VALUE_TYPE, ...) \
    assert_non_null(NODE); \
    assert_int_equal((NODE)->flags, FLAGS); \
    CHECK_POINTER((NODE)->meta, META); \
    CHECK_POINTER((NODE)->next, NEXT); \
    CHECK_POINTER((NODE)->parent, PARENT); \
    assert_non_null((NODE)->prev); \
    CHECK_POINTER((NODE)->schema, SCHEMA); \
    CHECK_LYD_VALUE((NODE)->value, VALUE_TYPE, ##__VA_ARGS__);

/**
 * @brief assert that lyd_node_any structure members are correct
 * @param[in] NODE       pointer to lyd_node_term variable
 * @param[in] FLAGS      expected [data node flags](@ref dnodeflags)
 * @param[in] META       0 meta isnt present , 1 meta is present
 * @param[in] PARENT     0 it is root node , 1 node have parent
 * @param[in] VALUE_TYPE value type ::lyd_node_any.value
 */
#define CHECK_LYD_NODE_ANY(NODE, FLAGS, META, PARENT, VALUE_TYPE) \
    assert_non_null(NODE); \
    assert_int_equal((NODE)->flags, FLAGS); \
    CHECK_POINTER((NODE)->meta, META); \
    CHECK_POINTER((NODE)->meta, PARENT); \
    assert_non_null((NODE)->prev); \
    assert_non_null((NODE)->schema); \
    assert_int_equal((NODE)->value_type, VALUE_TYPE);

/**
 * @brief assert that lyd_node_opaq structure members are correct
 * @param[in] NODE     pointer to lyd_node_opaq variable
 * @param[in] ATTR     0 if pointer is null ,1 if pointer is not null
 * @param[in] CHILD    0 if pointer is null ,1 if pointer is not null
 * @param[in] FORMAT   LY_PREF_XML or LY_PREF_JSON
 * @param[in] VAL_PREFS 0 if pointer is null ,1 if pointer is not null
 * @param[in] NAME     expected name
 * @param[in] value    expected orignal value
 */
#define CHECK_LYD_NODE_OPAQ(NODE, ATTR, CHILD, FORMAT, NAME, NEXT, PARENT, PREFIX, VAL_PREFS, VALUE) \
    assert_non_null(NODE); \
    CHECK_POINTER((NODE)->attr, ATTR); \
    CHECK_POINTER((NODE)->child, CHILD); \
    assert_ptr_equal((NODE)->ctx, UTEST_LYCTX); \
    assert_int_equal((NODE)->flags, 0); \
    assert_true((NODE)->format == FORMAT); \
    assert_int_equal((NODE)->hash, 0); \
    assert_string_equal((NODE)->name.name, NAME); \
    assert_non_null((NODE)->prev); \
    assert_null((NODE)->schema); \
    CHECK_POINTER((NODE)->val_prefix_data, VAL_PREFS); \
    assert_string_equal((NODE)->value, VALUE);

/**
 * @brief assert that lyd_value structure members are correct
 * @param[in] NODE     lyd_value
 * @param[in] TYPE_VAL value type. EMPTY, UNION, BITS, INST, ENUM, INT8, INT16, UINT8, STRING, LEAFREF, DEC64, BINARY, BOOL, IDENT
 *                     part of text reprezenting LY_DATA_TYPE.
 * @param[in] ...      Unspecified parameters. Type and numbers of parameters are specified
 *                     by type of value. These parameters are passed to macro
 *                     CHECK_LYD_VALUE_ ## TYPE_VAL.
 */
#define CHECK_LYD_VALUE(NODE, TYPE_VAL, ...) \
    CHECK_LYD_VALUE_ ## TYPE_VAL (NODE, ##__VA_ARGS__);

/*
 * LYD VALUES CHECKING SPECIALIZATION
 */

/**
 * @brief Internal macro. Assert that lyd_value structure members are correct. Lyd value is type EMPTY
 *        Example CHECK_LYD_VALUE(node->value, EMPTY, "");
 * @param[in] NODE           lyd_value variable
 * @param[in] CANNONICAL_VAL expected cannonical value
 */
#define CHECK_LYD_VALUE_EMPTY(NODE, CANNONICAL_VAL) \
    assert_non_null((NODE).canonical); \
    assert_string_equal((NODE).canonical, CANNONICAL_VAL); \
    assert_non_null((NODE).realtype); \
    assert_int_equal((NODE).realtype->basetype, LY_TYPE_EMPTY);

/**
 * @brief Internal macro. Assert that lyd_value structure members are correct. Lyd value is type UNION
 *        Example CHECK_LYD_VALUE(node->value, UNION, "12", INT8, "12", 12);
 * @warning   type of subvalue cannot be UNION. Example of calling
 * @param[in] NODE           lyd_value variable
 * @param[in] CANNONICAL_VAL expected cannonical value
 * @param[in] TYPE_VAL value type. EMPTY, UNION, BITS, INST, ENUM, INT8, INT16, UINT8, STRING, LEAFREF, DEC64, BINARY, BOOL, IDENT
 * @param[in] ...      Unspecified parameters. Type and numbers of parameters are specified
 *                     by type of value. These parameters are passed to macro
 *                     CHECK_LYD_VALUE_ ## TYPE_VAL.
 */
#define CHECK_LYD_VALUE_UNION(NODE, CANNONICAL_VAL, TYPE_VAL, ...) \
    assert_non_null((NODE).canonical); \
    assert_string_equal((NODE).canonical, CANNONICAL_VAL); \
    assert_non_null((NODE).realtype); \
    assert_int_equal(LY_TYPE_UNION, (NODE).realtype->basetype); \
    assert_non_null((NODE).subvalue); \
    assert_non_null((NODE).subvalue->prefix_data); \
    CHECK_LYD_VALUE_ ## TYPE_VAL ((NODE).subvalue->value, ## __VA_ARGS__)

/**
 * @brief Internal macro. Assert that lyd_value structure members are correct. Lyd value is type BITS
 *        Example arr[] = {"a", "b"}; CHECK_LYD_VALUE(node->value, BITS, "a b", arr);
 * @param[in] NODE           lyd_value variable
 * @param[in] CANNONICAL_VAL expected cannonical value
 * @param[in] VALUE          expected array of bits names
 */
#define CHECK_LYD_VALUE_BITS(NODE, CANNONICAL_VAL, VALUE) \
    assert_non_null((NODE).canonical); \
    assert_string_equal((NODE).canonical, CANNONICAL_VAL); \
    assert_non_null((NODE).realtype); \
    assert_int_equal(LY_TYPE_BITS, (NODE).realtype->basetype); \
    { \
        LY_ARRAY_COUNT_TYPE arr_size = sizeof(VALUE) / sizeof(VALUE[0]); \
        assert_int_equal(arr_size, LY_ARRAY_COUNT((NODE).bits_items)); \
        for (LY_ARRAY_COUNT_TYPE it = 0; it < arr_size; it++) { \
            assert_string_equal(VALUE[it], (NODE).bits_items[it]->name); \
        } \
    }

/**
 * @brief Internal macro. Assert that lyd_value structure members are correct. Lyd value is type INST
 * @param[in] NODE           lyd_value variable
 * @param[in] CANNONICAL_VAL expected cannonical value
 * @param[in] VALUE          expected array of enum ly_path_pred_type
 * @brief Example enum arr[] = {0x0, 0x1}; CHECK_LYD_VALUE(node->value, INST, "test/d", arr);
 */
#define CHECK_LYD_VALUE_INST(NODE, CANNONICAL_VAL, VALUE) \
    assert_non_null((NODE).canonical); \
    assert_string_equal((NODE).canonical, CANNONICAL_VAL); \
    assert_non_null((NODE).realtype); \
    assert_int_equal(LY_TYPE_INST, (NODE).realtype->basetype); \
    { \
        LY_ARRAY_COUNT_TYPE arr_size = sizeof(VALUE) / sizeof(VALUE[0]); \
        assert_int_equal(arr_size, LY_ARRAY_COUNT((NODE).target)); \
        for (LY_ARRAY_COUNT_TYPE it = 0; it < arr_size; it++) { \
            assert_int_equal(VALUE[it], (NODE).target[it].pred_type); \
        } \
    }

/**
 * @brief Internal macro. Assert that lyd_value structure members are correct. Lyd value is type ENUM.
 *        Example CHECK_LYD_VALUE(node->value, ENUM, "item_name", "item_name");
 * @param[in] NODE           lyd_value variable
 * @param[in] CANNONICAL_VAL expected cannonical value
 * @param[in] VALUE          expected enum item name
 */
#define CHECK_LYD_VALUE_ENUM(NODE, CANNONICAL_VAL, VALUE) \
    assert_non_null((NODE).canonical); \
    assert_string_equal((NODE).canonical, CANNONICAL_VAL); \
    assert_non_null((NODE).realtype); \
    assert_int_equal(LY_TYPE_ENUM, (NODE).realtype->basetype); \
    assert_string_equal(VALUE, (NODE).enum_item->name);

/**
 * @brief Internal macro. Assert that lyd_value structure members are correct. Lyd value is type INT8
 *        Example CHECK_LYD_VALUE(node->value, INT8, "12", 12);
 * @param[in] NODE           lyd_value variable
 * @param[in] CANNONICAL_VAL expected cannonical value
 * @param[in] VALUE          expected inteager value (-128 to 127).
 */
#define CHECK_LYD_VALUE_INT8(NODE, CANNONICAL_VAL, VALUE) \
    assert_non_null((NODE).canonical); \
    assert_string_equal((NODE).canonical, CANNONICAL_VAL); \
    assert_non_null((NODE).realtype); \
    assert_int_equal(LY_TYPE_INT8, (NODE).realtype->basetype); \
    assert_int_equal(VALUE, (NODE).int8);

/**
 * @brief Internal macro. Assert that lyd_value structure members are correct. Lyd value is type INT16
 *        Example CHECK_LYD_VALUE(node->value, INT8, "12", 12);
 * @param[in] NODE           lyd_value variable
 * @param[in] CANNONICAL_VAL expected cannonical value
 * @param[in] VALUE          expected inteager value.
 */
#define CHECK_LYD_VALUE_INT16(NODE, CANNONICAL_VAL, VALUE) \
    assert_non_null((NODE).canonical); \
    assert_string_equal((NODE).canonical, CANNONICAL_VAL); \
    assert_non_null((NODE).realtype); \
    assert_int_equal(LY_TYPE_INT16, (NODE).realtype->basetype); \
    assert_int_equal(VALUE, (NODE).int16);

/**
 * @brief Internal macro. Assert that lyd_value structure members are correct. Lyd value is type UINT8.
 *        Example CHECK_LYD_VALUE(node->value, UINT8, "12", 12);
 * @param[in] NODE           lyd_value variable
 * @param[in] CANNONICAL_VAL expected cannonical value
 * @param[in] VALUE          expected inteager (0 to 255).
 */
#define CHECK_LYD_VALUE_UINT8(NODE, CANNONICAL_VAL, VALUE) \
    assert_non_null((NODE).canonical); \
    assert_string_equal((NODE).canonical, CANNONICAL_VAL); \
    assert_non_null((NODE).realtype); \
    assert_int_equal(LY_TYPE_UINT8, (NODE).realtype->basetype); \
    assert_int_equal(VALUE, (NODE).uint8);

/**
 * @brief Internal macro. Assert that lyd_value structure members are correct. Lyd value is type STRING.
 *        Example CHECK_LYD_VALUE(node->value, STRING, "text");
 * @param[in] NODE           lyd_value variable
 * @param[in] CANNONICAL_VAL expected cannonical value
 */
#define CHECK_LYD_VALUE_STRING(NODE, CANNONICAL_VAL) \
    assert_non_null((NODE).canonical); \
    assert_string_equal((NODE).canonical, CANNONICAL_VAL); \
    assert_non_null((NODE).realtype); \
    assert_int_equal(LY_TYPE_STRING, (NODE).realtype->basetype);

/**
 * @brief Internal macro. Assert that lyd_value structure members are correct. Lyd value is type LEAFREF
 * @brief Example CHECK_LYD_VALUE(node->value, LEAFREF, "");
 * @param[in] NODE           lyd_value variable
 * @param[in] CANNONICAL_VAL expected cannonical value
 */
#define CHECK_LYD_VALUE_LEAFREF(NODE, CANNONICAL_VAL) \
    assert_non_null((NODE).canonical); \
    assert_string_equal((NODE).canonical, CANNONICAL_VAL); \
    assert_non_null((NODE).realtype); \
    assert_int_equal(LY_TYPE_LEAFREF, (NODE).realtype->basetype); \
    assert_non_null((NODE).ptr)

/**
 * @brief Internal macro. Assert that lyd_value structure members are correct. Lyd value is type DEC64
 *        Example CHECK_LYD_VALUE(node->value, DEC64, "125", 125);
 * @param[in] NODE           lyd_value variable
 * @param[in] CANNONICAL_VAL expected cannonical value
 * @param[in] VALUE          expected value 64bit inteager
*/
#define CHECK_LYD_VALUE_DEC64(NODE, CANNONICAL_VAL, VALUE) \
    assert_non_null((NODE).canonical); \
    assert_string_equal((NODE).canonical, CANNONICAL_VAL); \
    assert_non_null((NODE).realtype); \
    assert_int_equal(LY_TYPE_DEC64, (NODE).realtype->basetype); \
    assert_int_equal(VALUE, (NODE).dec64);

/**
 * @brief Internal macro. Assert that lyd_value structure members are correct. Lyd value is type BINARY.
 *        Example CHECK_LYD_VALUE(node->value, BINARY, "aGVs\nbG8=");
 * @param[in] NODE           lyd_value variable
 * @param[in] CANNONICAL_VAL expected cannonical value
*/
#define CHECK_LYD_VALUE_BINARY(NODE, CANNONICAL_VAL) \
    assert_non_null((NODE).canonical); \
    assert_string_equal((NODE).canonical, CANNONICAL_VAL); \
    assert_non_null((NODE).realtype); \
    assert_int_equal(LY_TYPE_BINARY, (NODE).realtype->basetype);

/**
 * @brief Internal macro. Assert that lyd_value structure members are correct. Lyd value is type BOOL.
 *        Example CHECK_LYD_VALUE(node->value, BOOL, "true", 1);
 * @param[in] NODE           lyd_value variable
 * @param[in] CANNONICAL_VAL expected cannonical value
 * @param[in] VALUE          expected boolean value 0,1
*/
#define CHECK_LYD_VALUE_BOOL(NODE, CANNONICAL_VAL, VALUE) \
    assert_non_null((NODE).canonical); \
    assert_string_equal((NODE).canonical, CANNONICAL_VAL); \
    assert_non_null((NODE).realtype); \
    assert_int_equal(LY_TYPE_BOOL, (NODE).realtype->basetype); \
    assert_int_equal(VALUE, (NODE).boolean);

/**
 * @brief Internal macro. Assert that lyd_value structure members are correct. Lyd value is type IDENT.
 *        Example CHECK_LYD_VALUE(node->value, IDENT, "types:gigabit-ethernet", "gigabit-ethernet");
 * @param[in] NODE           lyd_value variable
 * @param[in] CANNONICAL_VAL expected cannonical value
 * @param[in] VALUE          expected ident name
*/
#define CHECK_LYD_VALUE_IDENT(NODE, CANNONICAL_VAL, VALUE) \
    assert_non_null((NODE).canonical); \
    assert_string_equal((NODE).canonical, CANNONICAL_VAL); \
    assert_non_null((NODE).realtype); \
    assert_int_equal(LY_TYPE_IDENT, (NODE).realtype->basetype); \
    assert_string_equal(VALUE, (NODE).ident->name);

/**
 * @brief Add module (from a string) into the used libyang context.
 * @param[in] DATA     String storing the schema module representation.
 * @param[in] FORMAT   Schema format of the @p DATA
 * @param[in] FEATURES Array of module's features to enable
 * @param[out] MOD     Optional parameter as a pointer to variable to store the resulting module.
 */
#define UTEST_ADD_MODULE(DATA, FORMAT, FEATURES, MOD) \
    assert_int_equal(LY_SUCCESS, ly_in_new_memory(DATA, &_UC->in)); \
    assert_int_equal(LY_SUCCESS, lys_parse(_UC->ctx, _UC->in, FORMAT, FEATURES, MOD)); \
    ly_in_free(_UC->in, 0); \
    _UC->in = NULL

/**
 * @brief Internal macro to compare error info record with the expected error message and path.
 * If NULL is provided as MSG, no error info record (NULL) is expected.
 * @param[in] ERR Error information record from libyang context.
 * @param[in] MSG Expected error message.
 * @param[in] PATH Expected error path.
 *
 */
#define _CHECK_LOG_CTX(ERR, MSG, PATH) \
    if (!MSG) { \
        assert_null(ERR); \
    } else { \
        assert_non_null(ERR); \
        CHECK_STRING((ERR)->msg, MSG); \
        CHECK_STRING((ERR)->path, PATH); \
    }

/**`
 * @brief Internal macro to check the last libyang's context error.
 */
#define _CHECK_LOG_CTX1(MSG, PATH) \
    _CHECK_LOG_CTX(ly_err_last(_UC->ctx), MSG, PATH)

/**
 * @brief Internal macro to check the last two libyang's context error.
 */
#define _CHECK_LOG_CTX2(MSG1, PATH1, MSG2, PATH2) \
        _CHECK_LOG_CTX(ly_err_last(_UC->ctx), MSG1, PATH1); \
        _CHECK_LOG_CTX(ly_err_last(_UC->ctx)->prev, MSG2, PATH2)

/**
 * @brief Internal macro to check the last three libyang's context error.
 */
#define _CHECK_LOG_CTX3(MSG1, PATH1, MSG2, PATH2, MSG3, PATH3) \
        _CHECK_LOG_CTX2(MSG1, PATH1, MSG2, PATH2); \
        _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, _7, _8, _9, _10, NAME, ...) NAME

/**
 * @brief Check expected error(s) in libyang context.
 *
 * Macro has variadic parameters expected to be provided in pairs of error message and error path starting
 * from the latest error. Current limit is checking at most 3 last errors. After checking, macro cleans up
 * all the errors from the libyang context.
 *
 * @param[in] MSG Expected error message.
 * @param[in] PATH Expected error path.
 */
#define CHECK_LOG_CTX(...) \
    _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)

/**
 * @brief Clean up the logging callback's storage.
 */
#define UTEST_LOG_CLEAN \
    free(_UC->err_msg); \
    free(_UC->err_path); \
    _UC->err_msg = NULL; \
    _UC->err_path = NULL;

/**
 * @brief Check expected error directly logged via logging callback.
 * Useful mainly for messages logged by functions without access to libyang context.
 * @param[in] MSG Expected error message.
 * @param[in] PATH Expected error path.
 */
#define CHECK_LOG(MSG, PATH) \
    CHECK_STRING(_UC->err_msg, MSG); \
    CHECK_STRING(_UC->err_path, PATH); \
    UTEST_LOG_CLEAN

#ifdef _UTEST_MAIN_
/*
 * Functions inlined into each C source file including this header with _UTEST_MAIN_ defined
 */

/**
 * @brief Global variable holding the tests context to simplify access to it.
 */
struct utest_context *current_utest_context;

/* set to 0 to printing error messages to stderr instead of checking them in code */
#define ENABLE_LOGGER_CHECKING 1

/**
 * @brief Logging callback for libyang.
 */
static void
_utest_logger(LY_LOG_LEVEL level, const char *msg, const char *path)
{
    (void) level; /* unused */

    if (ENABLE_LOGGER_CHECKING == 0) {
        printf("ERROR:\n\tMESSAGE: %s\n\tPATH: %s\n\tLEVEL: %i\n", msg, path, level);
    } else {
        free(current_utest_context->err_msg);
        current_utest_context->err_msg = msg ? strdup(msg) : NULL;
        free(current_utest_context->err_path);
        current_utest_context->err_path = path ? strdup(path) : NULL;
    }
}

/**
 * @brief Generic utest's setup
 */
static int
utest_setup(void **state)
{
    /* setup the logger */
    ly_set_log_clb(_utest_logger, 1);
    ly_log_options(LY_LOLOG | LY_LOSTORE);

    current_utest_context = calloc(1, sizeof *current_utest_context);
    assert_non_null(current_utest_context);
    *state = current_utest_context;

    /* libyang context */
    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, 0, &current_utest_context->ctx));

    return 0;
}

/**
 * @brief macro to include generic utest's setup into the test-specific setup.
 *
 * Place at the beginning of the test-specific setup
 */
#define UTEST_SETUP \
    assert_int_equal(0, utest_setup(state))

/**
 * @brief Generic utest's teardown
 */
static int
utest_teardown(void **state)
{
    *state = NULL;

    /* libyang context */
    ly_ctx_destroy(current_utest_context->ctx, NULL);

    /* utest context */
    ly_in_free(current_utest_context->in, 0);
    free(current_utest_context->err_msg);
    free(current_utest_context->err_path);
    free(current_utest_context);
    current_utest_context = NULL;

    return 0;
}

/**
 * @brief macro to include generic utest's teardown into the test-specific teardown.
 *
 * Place at the end of the test-specific teardown
 */
#define UTEST_TEARDOWN \
    assert_int_equal(0, utest_teardown(state))

/**
 * @brief Internal macro for utest setup with test-specific setup and teardown
 */
#define _UTEST_SETUP_TEARDOWN(FUNC, SETUP, TEARDOWN) \
    cmocka_unit_test_setup_teardown(FUNC, SETUP, TEARDOWN)

/**
 * @brief Internal macro for utest setup with test-specific setup and generic teardown
 */
#define _UTEST_SETUP(FUNC, SETUP) \
    cmocka_unit_test_setup_teardown(FUNC, SETUP, utest_teardown)

/**
 * @brief Internal macro for utest setup with generic setup and teardown
 */
#define _UTEST(FUNC) \
    cmocka_unit_test_setup_teardown(FUNC, utest_setup, utest_teardown)

/**
 * @brief Internal helper macro to select _UTEST* macro according to the provided parameters.
 */
#define _GET_UTEST_MACRO(_1, _2, _3, NAME, ...) NAME

/**
 * @brief Macro to specify test function using utest environment. Macro has variadic parameters
 * to provide test-specific setup/teardown functions:
 *
 * UTEST(test_func) - only implicit setup and teardown functions are used
 * UTEST(test_func, setup) - implicit teardown but own setup
 * UTEST(test_func, setup, teardown) - both setup and teardown are test-specific
 */
#define UTEST(...) \
    _GET_UTEST_MACRO(__VA_ARGS__, _UTEST_SETUP_TEARDOWN, _UTEST_SETUP, _UTEST)(__VA_ARGS__)

#else /* _UTEST_MAIN_ */

extern struct utest_context *current_utest_context;

#endif /* _UTEST_MAIN_ */

#endif /* _UTESTS_H_ */
