test_ctf_writer: add type alignment tests
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 14 Jul 2015 23:41:34 +0000 (19:41 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 16 Jul 2015 22:13:38 +0000 (18:13 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/lib/test_ctf_writer.c

index d191d483fae2595e618e48159fee200033628b94..6080d324c5f7dc58b99055c3bcbda106d77f28e2 100644 (file)
@@ -790,6 +790,14 @@ void append_complex_event(struct bt_ctf_stream_class *stream_class,
        struct bt_ctf_field *packet_context, *packet_context_field;
        struct bt_object *obj;
 
+       ok(bt_ctf_field_type_set_alignment(int_16_type, 0),
+               "bt_ctf_field_type_set_alignment handles 0-alignment correctly");
+       ok(bt_ctf_field_type_set_alignment(int_16_type, 3),
+               "bt_ctf_field_type_set_alignment handles wrong alignment correctly (3)");
+       ok(bt_ctf_field_type_set_alignment(int_16_type, 24),
+               "bt_ctf_field_type_set_alignment handles wrong alignment correctly (24)");
+       ok(!bt_ctf_field_type_set_alignment(int_16_type, 4),
+               "bt_ctf_field_type_set_alignment handles correct alignment correctly (4)");
        bt_ctf_field_type_set_alignment(int_16_type, 32);
        bt_ctf_field_type_integer_set_signed(int_16_type, 1);
        bt_ctf_field_type_integer_set_base(uint_35_type,
This page took 0.025551 seconds and 4 git commands to generate.