diff --git a/tests/src/CMakeLists.txt b/tests/src/CMakeLists.txt
index bce0d9a..b369789 100644
--- a/tests/src/CMakeLists.txt
+++ b/tests/src/CMakeLists.txt
@@ -4,13 +4,15 @@
     src_context
     src_hash_table
     src_xml
-    src_parser_yang)
+    src_parser_yang
+    src_tree_schema_compile)
 set(local_tests_wraps
     " "
     "-Wl,--wrap=realloc"
     "-Wl,--wrap=ly_set_add"
     " "
     " "
+    " "
     " ")
 set(tests ${tests} ${local_tests} PARENT_SCOPE)
 set(tests_wraps ${tests_wraps} ${local_tests_wraps} PARENT_SCOPE)
diff --git a/tests/src/test_parser_yang.c b/tests/src/test_parser_yang.c
index 1020b0a..e9d814a 100644
--- a/tests/src/test_parser_yang.c
+++ b/tests/src/test_parser_yang.c
@@ -865,6 +865,7 @@
 test_identity(void **state)
 {
     (void) state; /* unused */
+    int dict = 1; /* magic variable for FREE macros */
 
     struct ly_parser_ctx ctx;
     struct lysp_ident *ident = NULL;
@@ -909,6 +910,7 @@
 test_feature(void **state)
 {
     (void) state; /* unused */
+    int dict = 1; /* magic variable for FREE macros */
 
     struct ly_parser_ctx ctx;
     struct lysp_feature *features = NULL;
@@ -953,6 +955,7 @@
 test_deviation(void **state)
 {
     (void) state; /* unused */
+    int dict = 1; /* magic variable for FREE macros */
 
     struct ly_parser_ctx ctx;
     struct lysp_deviation *d = NULL;
@@ -1016,7 +1019,7 @@
     /* invalid cardinality */
 #define TEST_DUP(TYPE, MEMBER, VALUE1, VALUE2) \
     TEST_DUP_GENERIC(TYPE" {", MEMBER, VALUE1, VALUE2, parse_deviate, \
-                     &d, "1", lysp_deviate_free(ctx.ctx, d); free(d); d = NULL)
+                     &d, "1", lysp_deviate_free(ctx.ctx, d, 1); free(d); d = NULL)
 
     TEST_DUP("add", "config", "true", "false");
     TEST_DUP("replace", "default", "int8", "uint8");
@@ -1031,29 +1034,29 @@
     assert_int_equal(LY_SUCCESS, parse_deviate(&ctx, &str, &d));
     assert_non_null(d);
     assert_string_equal(" ...", str);
-    lysp_deviate_free(ctx.ctx, d); free(d); d = NULL;
+    lysp_deviate_free(ctx.ctx, d, 1); free(d); d = NULL;
     str = " add {units meters; must 1; must 2; unique x; unique y; default a; default b; config true; mandatory true; min-elements 1; max-elements 2; prefix:ext;} ...";
     assert_int_equal(LY_SUCCESS, parse_deviate(&ctx, &str, &d));
     assert_non_null(d);
     assert_string_equal(" ...", str);
-    lysp_deviate_free(ctx.ctx, d); free(d); d = NULL;
+    lysp_deviate_free(ctx.ctx, d, 1); free(d); d = NULL;
     str = " delete {units meters; must 1; must 2; unique x; unique y; default a; default b; prefix:ext;} ...";
     assert_int_equal(LY_SUCCESS, parse_deviate(&ctx, &str, &d));
     assert_non_null(d);
     assert_string_equal(" ...", str);
-    lysp_deviate_free(ctx.ctx, d); free(d); d = NULL;
+    lysp_deviate_free(ctx.ctx, d, 1); free(d); d = NULL;
     str = " replace {type string; units meters; default a; config true; mandatory true; min-elements 1; max-elements 2; prefix:ext;} ...";
     assert_int_equal(LY_SUCCESS, parse_deviate(&ctx, &str, &d));
     assert_non_null(d);
     assert_string_equal(" ...", str);
-    lysp_deviate_free(ctx.ctx, d); free(d); d = NULL;
+    lysp_deviate_free(ctx.ctx, d, 1); free(d); d = NULL;
 
     /* invalid substatements */
 #define TEST_NOT_SUP(DEV, STMT, VALUE) \
     str = " "DEV" {"STMT" "VALUE";}..."; \
     assert_int_equal(LY_EVALID, parse_deviate(&ctx, &str, &d)); \
     logbuf_assert("Deviate \""DEV"\" does not support keyword \""STMT"\". Line number 1."); \
-    lysp_deviate_free(ctx.ctx, d); free(d); d = NULL
+    lysp_deviate_free(ctx.ctx, d, 1); free(d); d = NULL
 
     TEST_NOT_SUP("not-supported", "units", "meters");
     TEST_NOT_SUP("not-supported", "must", "1");
diff --git a/tests/src/test_tree_schema_compile.c b/tests/src/test_tree_schema_compile.c
new file mode 100644
index 0000000..291e515
--- /dev/null
+++ b/tests/src/test_tree_schema_compile.c
@@ -0,0 +1,113 @@
+/*
+ * @file test_parser_yang.c
+ * @author: Radek Krejci <rkrejci@cesnet.cz>
+ * @brief unit tests for functions from parser_yang.c
+ *
+ * Copyright (c) 2018 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
+ */
+
+#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
+#include <stdarg.h>
+#include <stddef.h>
+#include <setjmp.h>
+#include <cmocka.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include "libyang.h"
+#include "../../src/parser_yang.c"
+#include "../../src/tree_schema.c"
+
+#define BUFSIZE 1024
+char logbuf[BUFSIZE] = {0};
+
+/* set to 0 to printing error messages to stderr instead of checking them in code */
+#define ENABLE_LOGGER_CHECKING 1
+
+#if ENABLE_LOGGER_CHECKING
+static void
+logger(LY_LOG_LEVEL level, const char *msg, const char *path)
+{
+    (void) level; /* unused */
+
+    if (path) {
+        snprintf(logbuf, BUFSIZE - 1, "%s %s", msg, path);
+    } else {
+        strncpy(logbuf, msg, BUFSIZE - 1);
+    }
+}
+#endif
+
+static int
+logger_setup(void **state)
+{
+    (void) state; /* unused */
+#if ENABLE_LOGGER_CHECKING
+    ly_set_log_clb(logger, 1);
+#endif
+    return 0;
+}
+
+void
+logbuf_clean(void)
+{
+    logbuf[0] = '\0';
+}
+
+#if ENABLE_LOGGER_CHECKING
+#   define logbuf_assert(str) assert_string_equal(logbuf, str)
+#else
+#   define logbuf_assert(str)
+#endif
+
+static void
+test_module(void **state)
+{
+    (void) state; /* unused */
+
+    const char *str;
+    struct ly_ctx *ctx;
+    struct lys_module mod = {0};
+
+    str = "module test {namespace urn:test; prefix t;"
+          "feature f1;}";
+    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, 0, &ctx));
+
+    assert_int_equal(LY_EINVAL, lys_compile(NULL, 0, NULL));
+    logbuf_assert("Invalid argument sc (lys_compile()).");
+    assert_int_equal(LY_EINVAL, lys_compile(NULL, 0, &mod.compiled));
+    logbuf_assert("Invalid argument sp (lys_compile()).");
+    assert_int_equal(LY_SUCCESS, yang_parse(ctx, str, &mod.parsed));
+    assert_int_equal(LY_SUCCESS, lys_compile(mod.parsed, 0, &mod.compiled));
+    assert_non_null(mod.compiled);
+    assert_ptr_equal(mod.parsed->name, mod.compiled->name);
+    assert_ptr_equal(mod.parsed->ns, mod.compiled->ns);
+
+    lysc_module_free(mod.compiled);
+
+    assert_int_equal(LY_SUCCESS, lys_compile(mod.parsed, LYSC_OPT_FREE_SP, &mod.compiled));
+    assert_non_null(mod.compiled);
+    assert_string_equal("test", mod.compiled->name);
+    assert_string_equal("urn:test", mod.compiled->ns);
+
+    lysc_module_free(mod.compiled);
+    ly_ctx_destroy(ctx, NULL);
+}
+
+
+int main(void)
+{
+    const struct CMUnitTest tests[] = {
+        cmocka_unit_test_setup(test_module, logger_setup),
+    };
+
+    return cmocka_run_group_tests(tests, NULL, NULL);
+}
