tests: add libbabeltrace2 pre/postcondition testing infrastructure
[babeltrace.git] / tests / lib / test_graph_topo.c
index d3d45818d224531517935b4318aa328549c6e9da..cd3284be152d1dbdfded071aa68004fbc70156c6 100644 (file)
@@ -1,20 +1,7 @@
 /*
- * test_graph_topo.c
+ * SPDX-License-Identifier: GPL-2.0-only
  *
- * Copyright 2017 - Philippe Proulx <pproulx@efficios.com>
- *
- * 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>
@@ -505,8 +492,6 @@ void test_src_adds_port_in_port_connected(void)
        ok(src_port_connected_pos < graph_port_added_src_pos,
                "event order is good");
 
-       bt_component_source_put_ref(src);
-       bt_component_sink_put_ref(sink);
        bt_graph_put_ref(graph);
 }
 
@@ -573,9 +558,7 @@ void test_simple(void)
        event.data.sink_comp_input_port_connected.other_port = gsrc_def_port;
        ok(has_event(&event), "got the expected sink's port connected event");
 
-       bt_component_sink_put_ref(sink);
        bt_graph_put_ref(graph);
-       bt_component_source_put_ref(src);
 }
 
 static
@@ -639,9 +622,6 @@ void test_src_port_connected_error(void)
        ok(has_event(&event), "got the expected source's port connected event");
 
        bt_graph_put_ref(graph);
-       bt_component_sink_put_ref(sink);
-       bt_component_source_put_ref(src);
-       bt_connection_put_ref(conn);
 }
 
 static
@@ -711,10 +691,7 @@ void test_sink_port_connected_error(void)
        event.data.sink_comp_input_port_connected.other_port = gsrc_def_port;
        ok(has_event(&event), "got the expected sink's port connected event");
 
-       bt_connection_put_ref(conn);
        bt_graph_put_ref(graph);
-       bt_component_sink_put_ref(sink);
-       bt_component_source_put_ref(src);
 }
 
 static
This page took 0.028736 seconds and 4 git commands to generate.