parser schema CHANGE always return non-const modules
Refs #1645
diff --git a/tests/utests/basic/test_context.c b/tests/utests/basic/test_context.c
index 4d392ed..4df9d7e 100644
--- a/tests/utests/basic/test_context.c
+++ b/tests/utests/basic/test_context.c
@@ -268,7 +268,7 @@
/* reloading module in case only the compiled module resists in the context */
assert_int_equal(LY_SUCCESS, ly_in_new_memory("module w {namespace urn:w;prefix w;revision 2018-10-24;}", &in));
- assert_int_equal(LY_SUCCESS, lys_parse(UTEST_LYCTX, in, LYS_IN_YANG, NULL, (const struct lys_module **)&mod1));
+ assert_int_equal(LY_SUCCESS, lys_parse(UTEST_LYCTX, in, LYS_IN_YANG, NULL, &mod1));
ly_in_free(in, 0);
assert_non_null(mod1->compiled);
assert_non_null(mod1->parsed);
@@ -288,7 +288,7 @@
assert_int_equal(LY_SUCCESS, ly_in_new_memory("module z {namespace urn:z;prefix z;import w {prefix w;revision-date 2018-10-24;}}", &in));
ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "module w {namespace urn:w;prefix w;revision 2018-10-24;}");
- assert_int_equal(LY_SUCCESS, lys_parse(UTEST_LYCTX, in, LYS_IN_YANG, NULL, (const struct lys_module **)&mod2));
+ assert_int_equal(LY_SUCCESS, lys_parse(UTEST_LYCTX, in, LYS_IN_YANG, NULL, &mod2));
ly_in_free(in, 0);
assert_non_null(mod2);
assert_non_null(mod1->parsed);
@@ -298,7 +298,7 @@
static void
test_imports(void **state)
{
- const struct lys_module *mod1, *mod2, *import;
+ struct lys_module *mod1, *mod2, *import;
/* use own context with extra flags */
ly_ctx_destroy(UTEST_LYCTX);
@@ -382,7 +382,7 @@
assert_non_null(ly_ctx_get_module_ns(UTEST_LYCTX, "urn:ietf:params:xml:ns:yang:ietf-datastores", "2018-02-14"));
/* select module by revision */
- assert_int_equal(LY_SUCCESS, lys_parse(UTEST_LYCTX, in1, LYS_IN_YANG, NULL, (const struct lys_module **)&mod));
+ assert_int_equal(LY_SUCCESS, lys_parse(UTEST_LYCTX, in1, LYS_IN_YANG, NULL, &mod));
/* invalid attempts - implementing module of the same name and inserting the same module */
assert_int_equal(LY_SUCCESS, lys_parse_in(UTEST_LYCTX, in2, LYS_IN_YANG, NULL, NULL, &unres.creating, &mod2));
assert_int_equal(LY_EDENIED, lys_implement(mod2, NULL, &unres));
@@ -753,7 +753,7 @@
static void
test_set_priv_parsed(void **state)
{
- const struct lys_module *mod;
+ struct lys_module *mod;
const char *schema_a;
const char **iter;
const char *check[] = {
@@ -895,7 +895,7 @@
test_explicit_compile(void **state)
{
uint32_t i;
- const struct lys_module *mod;
+ struct lys_module *mod;
const char *schema_a = "module a {\n"
" namespace urn:tests:a;\n"
" prefix a;yang-version 1.1;\n"