printers CHANGE return number of printed bytes instead of LY_ERR value
The returned information is extended by information about the number of
printed bytes. LY_ERR is still returned as a negative value in case of
failure.
diff --git a/tests/src/test_printer_yang.c b/tests/src/test_printer_yang.c
index 922b170..a50fc45 100644
--- a/tests/src/test_printer_yang.c
+++ b/tests/src/test_printer_yang.c
@@ -130,7 +130,7 @@
assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, 0, &ctx));
assert_non_null(mod = lys_parse_mem(ctx, orig, LYS_IN_YANG));
- assert_int_equal(LY_SUCCESS, lys_print_mem(&printed, mod, LYS_OUT_YANG, 0, 0));
+ assert_int_equal(strlen(orig), lys_print_mem(&printed, mod, LYS_OUT_YANG, 0, 0));
assert_string_equal(printed, orig);
free(printed);
@@ -160,7 +160,7 @@
" }\n"
"}\n";
assert_non_null(mod = lys_parse_mem(ctx, orig, LYS_IN_YANG));
- assert_int_equal(LY_SUCCESS, lys_print_mem(&printed, mod, LYS_OUT_YANG, 0, 0));
+ assert_int_equal(strlen(orig), lys_print_mem(&printed, mod, LYS_OUT_YANG, 0, 0));
assert_string_equal(printed, orig);
free(printed);
@@ -182,7 +182,7 @@
" }\n"
"}\n";
assert_non_null(mod = lys_parse_mem(ctx, orig, LYS_IN_YANG));
- assert_int_equal(LY_SUCCESS, lys_print_mem(&printed, mod, LYS_OUT_YANG, 0, 0));
+ assert_int_equal(strlen(orig), lys_print_mem(&printed, mod, LYS_OUT_YANG, 0, 0));
assert_string_equal(printed, orig);
free(printed);