test: update tests
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#include "blue/serial/toml.h"
|
||||
|
||||
#include <blue/io/file.h>
|
||||
#include <blue/io/path.h>
|
||||
#include <blue/serial.h>
|
||||
@@ -19,12 +21,10 @@ int main(int argc, const char **argv)
|
||||
return -1;
|
||||
}
|
||||
|
||||
b_serial_ctx *ctx;
|
||||
b_serial_ctx_create(&ctx);
|
||||
b_serial_ctx *ctx = b_toml_serial_ctx_create();
|
||||
|
||||
b_object *data = NULL;
|
||||
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)) {
|
||||
fprintf(stderr, "cannot read data\n");
|
||||
return -1;
|
||||
@@ -39,7 +39,7 @@ int main(int argc, const char **argv)
|
||||
|
||||
b_object_unref(data);
|
||||
b_object_unref(src);
|
||||
b_serial_ctx_destroy(ctx);
|
||||
b_serial_ctx_unref(ctx);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user