test: move all module tests to the test/ directory
This commit is contained in:
27
test/serial/toml-encode.c
Normal file
27
test/serial/toml-encode.c
Normal file
@@ -0,0 +1,27 @@
|
||||
#include <blue/serial.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
b_stream *src = b_stdin;
|
||||
b_stream *dest = b_stdout;
|
||||
|
||||
#if 0
|
||||
b_serial_ctx *ctx;
|
||||
b_serial_ctx_create(&ctx);
|
||||
|
||||
b_object *data;
|
||||
b_status status = b_serial_ctx_deserialise(
|
||||
ctx, B_SERIAL_FORMAT_JSON, src, &data, 0);
|
||||
if (!B_OK(status)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
b_to_string(B_OBJECT(data), dest);
|
||||
b_stream_write_char(b_stdout, '\n');
|
||||
|
||||
b_release(data);
|
||||
b_serial_ctx_destroy(ctx);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user