test BUGFIX segfault prevention in utests.h
diff --git a/tests/utests/utests.h b/tests/utests/utests.h
index 092f904..4f72f9f 100644
--- a/tests/utests/utests.h
+++ b/tests/utests/utests.h
@@ -162,8 +162,10 @@
{ \
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_int_equal(LY_SUCCESS, lyd_print_mem(&test_1, NODE_1, LYD_XML, LYD_PRINT_WITHSIBLINGS | LYD_PRINT_SHRINK)); \
+ assert_int_equal(LY_SUCCESS, lyd_print_mem(&test_2, NODE_2, LYD_XML, LYD_PRINT_WITHSIBLINGS | LYD_PRINT_SHRINK)); \
+ assert_non_null(test_1); \
+ assert_non_null(test_2); \
assert_string_equal(test_1, test_2); \
free(test_1); \
free(test_2); \