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