From e8fc5adf1356619cec6d2f9a46dad62c6d9a6c72 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Tue, 14 Jul 2015 19:41:34 -0400 Subject: [PATCH] test_ctf_writer: add type alignment tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- tests/lib/test_ctf_writer.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/lib/test_ctf_writer.c b/tests/lib/test_ctf_writer.c index d191d483..6080d324 100644 --- a/tests/lib/test_ctf_writer.c +++ b/tests/lib/test_ctf_writer.c @@ -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, -- 2.34.1