Move to kernel style SPDX license identifiers
[babeltrace.git] / tests / lib / plugin.c
index d5a21808fbbfdda25c4176525f7600c562c25484..7e3c3e74183d27615e4ae7495305a47cac992736 100644 (file)
@@ -1,18 +1,7 @@
 /*
- * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
+ * SPDX-License-Identifier: GPL-2.0-only
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; under version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Copyright (C) 2017 Philippe Proulx <pproulx@efficios.com>
  */
 
 #include <babeltrace2/babeltrace.h>
@@ -188,16 +177,15 @@ static void test_sfs(const char *plugin_dir)
        ok(ret == 0 && results, "bt_query_executor_query() succeeds");
        BT_ASSERT(bt_value_is_array(results) && bt_value_array_get_length(results) == 2);
        object = bt_value_array_borrow_element_by_index_const(results, 0);
-       BT_ASSERT(object && bt_value_is_string(object));
+       BT_ASSERT(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_const(results, 1);
-       ok(bt_value_compare(res_params, params),
+       ok(bt_value_is_equal(res_params, params),
                "bt_component_class_query() receives the expected parameters");
 
        bt_component_class_sink_get_ref(sink_comp_class);
-       diag("> putting the plugin set object here");
        BT_PLUGIN_SET_PUT_REF_AND_RESET(plugin_set);
        graph = bt_graph_create(0);
        BT_ASSERT(graph);
@@ -205,7 +193,6 @@ static void test_sfs(const char *plugin_dir)
                "the-sink", NULL, BT_LOGGING_LEVEL_NONE, &sink_component);
        ok(graph_ret == BT_GRAPH_ADD_COMPONENT_STATUS_OK && sink_component,
                "bt_graph_add_sink_component() still works after the plugin object is destroyed");
-       BT_COMPONENT_SINK_PUT_REF_AND_RESET(sink_component);
        bt_graph_put_ref(graph);
 
        free(sfs_path);
This page took 0.023279 seconds and 4 git commands to generate.