projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: introduce bt_message_iterator_class
[babeltrace.git]
/
tests
/
lib
/
test_trace_ir_ref.c
diff --git
a/tests/lib/test_trace_ir_ref.c
b/tests/lib/test_trace_ir_ref.c
index 33591800bc381a3085b49f5a38f568b8d773bff3..8811cf90ab6cfb0b21e320ff1d4f3b41de26ae06 100644
(file)
--- a/
tests/lib/test_trace_ir_ref.c
+++ b/
tests/lib/test_trace_ir_ref.c
@@
-409,32
+409,37
@@
static void test_example_scenario(bt_self_component_source *self_comp)
}
static
}
static
-bt_component_class_init_method_status src_init(
+bt_component_class_init
ialize
_method_status src_init(
bt_self_component_source *self_comp,
bt_self_component_source *self_comp,
+ bt_self_component_source_configuration *config,
const bt_value *params, void *init_method_data)
{
test_example_scenario(self_comp);
const bt_value *params, void *init_method_data)
{
test_example_scenario(self_comp);
- return BT_COMPONENT_CLASS_INIT_METHOD_STATUS_OK;
+ return BT_COMPONENT_CLASS_INIT
IALIZE
_METHOD_STATUS_OK;
}
static
}
static
-bt_
component_class_message_iterator
_next_method_status src_iter_next(
+bt_
message_iterator_class
_next_method_status src_iter_next(
bt_self_message_iterator *self_iterator,
bt_message_array_const msgs, uint64_t capacity,
uint64_t *count)
{
bt_self_message_iterator *self_iterator,
bt_message_array_const msgs, uint64_t capacity,
uint64_t *count)
{
- return BT_
COMPONENT_CLASS_MESSAGE_ITERATOR
_NEXT_METHOD_STATUS_ERROR;
+ return BT_
MESSAGE_ITERATOR_CLASS
_NEXT_METHOD_STATUS_ERROR;
}
static void test_example_scenario_in_graph(void)
{
}
static void test_example_scenario_in_graph(void)
{
+ bt_message_iterator_class *msg_iter_cls;
bt_component_class_source *comp_cls;
bt_graph *graph;
int ret;
bt_component_class_source *comp_cls;
bt_graph *graph;
int ret;
- comp_cls = bt_component_class_source_create("src", src_iter_next);
+ msg_iter_cls = bt_message_iterator_class_create(src_iter_next);
+ BT_ASSERT(msg_iter_cls);
+
+ comp_cls = bt_component_class_source_create("src", msg_iter_cls);
BT_ASSERT(comp_cls);
BT_ASSERT(comp_cls);
- ret = bt_component_class_source_set_init_method(comp_cls, src_init);
+ ret = bt_component_class_source_set_init
ialize
_method(comp_cls, src_init);
BT_ASSERT(ret == 0);
graph = bt_graph_create(0);
ret = bt_graph_add_source_component(graph, comp_cls, "src-comp",
BT_ASSERT(ret == 0);
graph = bt_graph_create(0);
ret = bt_graph_add_source_component(graph, comp_cls, "src-comp",
@@
-442,6
+447,7
@@
static void test_example_scenario_in_graph(void)
BT_ASSERT(ret == 0);
bt_graph_put_ref(graph);
bt_component_class_source_put_ref(comp_cls);
BT_ASSERT(ret == 0);
bt_graph_put_ref(graph);
bt_component_class_source_put_ref(comp_cls);
+ bt_message_iterator_class_put_ref(msg_iter_cls);
}
static void create_writer_user_full(struct writer_user *user)
}
static void create_writer_user_full(struct writer_user *user)
This page took
0.023622 seconds
and
4
git commands to generate.