+ params = bt_private_value_integer_create_init(23);
+ BT_ASSERT(params);
+ ret = bt_query_executor_query(NULL, filter_comp_class, "object",
+ bt_value_borrow_from_private(params), &results);
+ ok (ret, "bt_query_executor_query() handles NULL (query executor)");
+ ret = bt_query_executor_query(query_exec, NULL, "object",
+ bt_value_borrow_from_private(params), &results);
+ ok (ret, "bt_query_executor_query() handles NULL (component class)");
+ ret = bt_query_executor_query(query_exec, filter_comp_class, NULL,
+ bt_value_borrow_from_private(params), &results);
+ ok (ret, "bt_query_executor_query() handles NULL (object)");
+ ret = bt_query_executor_query(query_exec, filter_comp_class,
+ "get-something", bt_value_borrow_from_private(params),
+ &results);
+ ok(ret == 0 && results, "bt_query_executor_query() succeeds");
+ BT_ASSERT(bt_value_is_array(results) && bt_value_array_get_size(results) == 2);
+ object = bt_value_array_borrow_element_by_index(results, 0);
+ BT_ASSERT(object && bt_value_is_string(object));
+ object_str = bt_value_string_get(object);
+ ok(strcmp(object_str, "get-something") == 0,
+ "bt_component_class_query() receives the expected object name");
+ res_params = bt_value_array_borrow_element_by_index(results, 1);
+ ok(res_params == bt_value_borrow_from_private(params),
+ "bt_component_class_query() receives the expected parameters");