test: update tests
This commit is contained in:
@@ -8,8 +8,7 @@
|
||||
|
||||
int main(void)
|
||||
{
|
||||
b_serial_ctx *ctx;
|
||||
b_serial_ctx_create(&ctx);
|
||||
b_serial_ctx *ctx = b_toml_serial_ctx_create();
|
||||
|
||||
b_dict *dict = b_dict_create();
|
||||
|
||||
@@ -29,10 +28,10 @@ int main(void)
|
||||
b_object_to_string(dict, b_stdout);
|
||||
b_stream_write_char(b_stdout, '\n');
|
||||
|
||||
b_serial_ctx_serialise(ctx, B_SERIAL_FORMAT_JSON, dict, b_stdout, 0);
|
||||
b_serial_ctx_serialise(ctx, dict, b_stdout, 0);
|
||||
|
||||
b_dict_unref(dict);
|
||||
b_serial_ctx_destroy(ctx);
|
||||
b_serial_ctx_unref(ctx);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -203,12 +203,10 @@ int main(void)
|
||||
b_stream *src = b_stdin;
|
||||
b_stream *dest = b_stdout;
|
||||
|
||||
b_serial_ctx *ctx;
|
||||
b_serial_ctx_create(&ctx);
|
||||
b_serial_ctx *ctx = b_toml_serial_ctx_create();
|
||||
|
||||
b_object *data;
|
||||
b_status status = b_serial_ctx_deserialise(
|
||||
ctx, B_SERIAL_FORMAT_TOML, src, &data, 0);
|
||||
b_status status = b_serial_ctx_deserialise(ctx, src, &data, 0);
|
||||
if (!B_OK(status)) {
|
||||
return 1;
|
||||
}
|
||||
@@ -217,7 +215,7 @@ int main(void)
|
||||
|
||||
b_stream_write_char(b_stdout, '\n');
|
||||
|
||||
b_serial_ctx_destroy(ctx);
|
||||
b_serial_ctx_unref(ctx);
|
||||
b_object_unref(data);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user