X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=tests%2Flib%2Ftest_plugin.c;h=5e57232b24d483ca807f0302b49d2fd20643c714;hb=da91b29ad2964b85601e25843f1dca92f6c97406;hp=1bcc4db0a14aa9372d30a04eb1fc964fb4fa9d41;hpb=65300d60e4b4f167e5fc8f584677757ce09a3844;p=babeltrace.git diff --git a/tests/lib/test_plugin.c b/tests/lib/test_plugin.c index 1bcc4db0..5e57232b 100644 --- a/tests/lib/test_plugin.c +++ b/tests/lib/test_plugin.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -161,7 +162,7 @@ static void test_sfs(const char *plugin_dir) char *sfs_path = get_test_plugin_path(plugin_dir, "sfs"); unsigned int major, minor, patch; const char *extra; - struct bt_value *params; + struct bt_private_value *params; struct bt_value *results; struct bt_value *object; struct bt_value *res_params; @@ -216,19 +217,20 @@ static void test_sfs(const char *plugin_dir) ok(!bt_plugin_get_component_class_by_name_and_type(plugin, "filter", BT_COMPONENT_CLASS_TYPE_SOURCE), "bt_plugin_get_component_class_by_name_and_type() does not find a component class given the wrong type"); - params = bt_value_integer_create_init(23); + params = bt_private_value_integer_create_init(23); BT_ASSERT(params); ret = bt_query_executor_query(NULL, filter_comp_class, "object", - params, &results); + 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", - params, &results); + 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, - params, &results); + 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", params, &results); + "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); @@ -238,7 +240,7 @@ static void test_sfs(const char *plugin_dir) 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 == params, + ok(res_params == bt_value_borrow_from_private(params), "bt_component_class_query() receives the expected parameters"); diag("> putting the plugin object here");