projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tests: add environment field can be added after stream creation
[babeltrace.git]
/
tests
/
lib
/
test_ctf_writer.c
diff --git
a/tests/lib/test_ctf_writer.c
b/tests/lib/test_ctf_writer.c
index dfc918398b17d542a8b1c25c331c3a6f31303b27..756d168055246b276221d9b25b52f0b20d764678 100644
(file)
--- a/
tests/lib/test_ctf_writer.c
+++ b/
tests/lib/test_ctf_writer.c
@@
-566,7
+566,7
@@
void append_simple_event(struct bt_ctf_stream_class *stream_class,
bt_ctf_event_set_payload(simple_event, "enum_field_unsigned",
enum_field_unsigned);
ret_char = bt_ctf_field_enumeration_get_mapping_name(enum_field_unsigned);
bt_ctf_event_set_payload(simple_event, "enum_field_unsigned",
enum_field_unsigned);
ret_char = bt_ctf_field_enumeration_get_mapping_name(enum_field_unsigned);
- ok(!strcmp(ret_char, mapping_name_test),
+ ok(
ret_char &&
!strcmp(ret_char, mapping_name_test),
"bt_ctf_field_enumeration_get_mapping_name returns the correct mapping name with an unsigned container");
ok(bt_ctf_clock_set_time(clock, current_time) == 0, "Set clock time");
"bt_ctf_field_enumeration_get_mapping_name returns the correct mapping name with an unsigned container");
ok(bt_ctf_clock_set_time(clock, current_time) == 0, "Set clock time");
@@
-2387,6
+2387,9
@@
int main(int argc, char **argv)
ok(!bt_ctf_stream_set_packet_header(stream1, packet_header),
"Successfully set a stream's packet header");
ok(!bt_ctf_stream_set_packet_header(stream1, packet_header),
"Successfully set a stream's packet header");
+ ok(bt_ctf_writer_add_environment_field(writer, "new_field", "test") == 0,
+ "Add environment field to writer after stream creation");
+
test_instanciate_event_before_stream(writer);
append_simple_event(stream_class, stream1, clock);
test_instanciate_event_before_stream(writer);
append_simple_event(stream_class, stream1, clock);
This page took
0.024932 seconds
and
4
git commands to generate.