Tests: Add a bt_ctf_trace_get/set_byte_order() test
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 9 Mar 2015 19:05:35 +0000 (15:05 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 16 Mar 2015 19:02:17 +0000 (15:02 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/lib/test_ctf_writer.c

index 3a56a558d44102ec94e6f90198ecfe3b20e5c73b..ff7f47ee1e0f83684becf163465e2d9b8c3f5f24 100644 (file)
@@ -1680,6 +1680,10 @@ int main(int argc, char **argv)
        trace = bt_ctf_writer_get_trace(writer);
        ok(trace,
                "bt_ctf_writer_get_trace returns a bt_ctf_trace object");
+       ok(bt_ctf_trace_set_byte_order(trace, BT_CTF_BYTE_ORDER_BIG_ENDIAN) == 0,
+               "Set a trace's byte order to big endian");
+       ok(bt_ctf_trace_get_byte_order(trace) == BT_CTF_BYTE_ORDER_BIG_ENDIAN,
+               "bt_ctf_trace_get_byte_order returns a correct endianness");
 
        /* Add environment context to the trace */
        ret = gethostname(hostname, sizeof(hostname));
This page took 0.026818 seconds and 4 git commands to generate.