From: <tho...@fr...> - 2005-12-01 12:36:23
|
CVS Root: /cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Thu Dec 01 2005 04:36:22 PST Log message: fix test Modified files: . : ChangeLog tests/check/gst : gstplugin.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.2081&r2=1.2082 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/tests/check/gst/gstplugin.c.diff?r1=1.9&r2=1.10 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.2081 retrieving revision 1.2082 diff -u -d -r1.2081 -r1.2082 --- ChangeLog 1 Dec 2005 12:29:33 -0000 1.2081 +++ ChangeLog 1 Dec 2005 12:36:10 -0000 1.2082 @@ -1,5 +1,10 @@ 2005-12-01 Thomas Vander Stichele <thomas (at) apestaart (dot) org> + * tests/check/gst/gstplugin.c: + fix test + +2005-12-01 Thomas Vander Stichele <thomas (at) apestaart (dot) org> * common/gst-xmlinspect.py: * common/gtk-doc-plugins.mak: * configure.ac: Index: gstplugin.c RCS file: /cvs/gstreamer/gstreamer/tests/check/gst/gstplugin.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- gstplugin.c 16 Oct 2005 09:44:04 -0000 1.9 +++ gstplugin.c 1 Dec 2005 12:36:10 -0000 1.10 @@ -85,13 +85,13 @@ GST_END_TEST; -GST_START_TEST (test_load_gstelements) +GST_START_TEST (test_load_coreelements) { GstPlugin *unloaded_plugin; GstPlugin *loaded_plugin; - unloaded_plugin = gst_default_registry_find_plugin ("gstelements"); - fail_if (unloaded_plugin == NULL, "Failed to find gstelements plugin"); + unloaded_plugin = gst_default_registry_find_plugin ("coreelements"); + fail_if (unloaded_plugin == NULL, "Failed to find coreelements plugin"); fail_if (GST_OBJECT_REFCOUNT_VALUE (unloaded_plugin) != 2, "Refcount of unloaded plugin in registry initially should be 2"); GST_DEBUG ("refcount %d", GST_OBJECT_REFCOUNT_VALUE (unloaded_plugin)); @@ -119,7 +119,7 @@ GList *list; GstPlugin *plugin; - plugin = gst_default_registry_find_plugin ("gstelements"); + plugin = gst_default_registry_find_plugin ("coreelements"); fail_if (GST_OBJECT_REFCOUNT_VALUE (plugin) != 2, "Refcount of plugin in registry should be 2"); @@ -143,8 +143,8 @@ plugin = gst_registry_find_plugin (gst_registry_get_default (), - "gstelements"); - fail_if (plugin == NULL, "Failed to find gstelements plugin"); + "coreelements"); + fail_if (plugin == NULL, "Failed to find coreelements plugin"); ASSERT_OBJECT_REFCOUNT (plugin, "plugin", 2); fail_unless_equals_string (plugin->desc.version, VERSION); @@ -166,8 +166,8 @@ feature = gst_registry_find_feature (gst_registry_get_default (), "identity", GST_TYPE_ELEMENT_FACTORY); fail_if (feature == NULL, "Failed to find identity element factory"); - fail_if (strcmp (feature->plugin_name, "gstelements"), - "Expected identity to be from gstelements plugin"); + fail_if (strcmp (feature->plugin_name, "coreelements"), + "Expected identity to be from coreelements plugin"); fail_if (GST_OBJECT_REFCOUNT_VALUE (feature) != 2, "Refcount of feature should be 2"); @@ -228,7 +228,7 @@ "audio/x-au", GST_TYPE_TYPE_FIND_FACTORY); fail_if (feature == NULL, "Failed to find audio/x-aw typefind factory"); fail_if (feature->plugin != plugin, fail_if (GST_OBJECT_REFCOUNT_VALUE (plugin) != 3, "Refcount of plugin in registry+feature should be 3"); @@ -302,7 +302,7 @@ suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_register_static); tcase_add_test (tc_chain, test_registry); - tcase_add_test (tc_chain, test_load_gstelements); + tcase_add_test (tc_chain, test_load_coreelements); tcase_add_test (tc_chain, test_registry_get_plugin_list); tcase_add_test (tc_chain, test_find_plugin); tcase_add_test (tc_chain, test_find_feature); |
From: <tho...@fr...> - 2005-12-12 11:40:42
|
CVS Root: /cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Mon Dec 12 2005 03:40:23 PST Log message: * tests/check/gst/struct_i386.h: ifdef out the XML structs Modified files: . : ChangeLog tests/check/gst : struct_i386.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.2119&r2=1.2120 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/tests/check/gst/struct_i386.h.diff?r1=1.1&r2=1.2 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.2119 retrieving revision 1.2120 diff -u -d -r1.2119 -r1.2120 --- ChangeLog 12 Dec 2005 10:59:11 -0000 1.2119 +++ ChangeLog 12 Dec 2005 11:40:10 -0000 1.2120 @@ -1,5 +1,10 @@ 2005-12-12 Thomas Vander Stichele <thomas at apestaart dot org> + * tests/check/gst/struct_i386.h: + ifdef out the XML structs + +2005-12-12 Thomas Vander Stichele <thomas at apestaart dot org> * gst/gstvalue.c: (gst_value_transform_double_fraction): floor is not needed, F is always positive; this obviates the need for adding -lm when building without libxml Index: struct_i386.h RCS file: /cvs/gstreamer/gstreamer/tests/check/gst/struct_i386.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- struct_i386.h 7 Dec 2005 17:36:44 -0000 1.1 +++ struct_i386.h 12 Dec 2005 11:40:11 -0000 1.2 @@ -67,7 +67,9 @@ {"GstTypeFindFactoryClass", sizeof(GstTypeFindFactoryClass), 152}, {"GstURIHandlerInterface", sizeof(GstURIHandlerInterface), 44}, {"GstValueTable", sizeof(GstValueTable), 32}, +#ifndef GST_DISABLE_LOADSAVE {"GstXML", sizeof(GstXML), 64}, {"GstXMLClass", sizeof(GstXMLClass), 144}, +#endif {NULL, 0, 0} }; |
From: <tho...@ke...> - 2006-04-29 00:34:07
|
CVS Root: /cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Sat Apr 29 2006 00:33:56 UTC Log message: 2006-04-29 Thomas Vander Stichele <thomas at apestaart dot org> * tests/check/gst/gstghostpad.c: (GST_START_TEST): add more asserts on refcounts do more cleanup at end of tests fix test leaks showing in FC5 Modified files: . : ChangeLog tests/check/gst : gstghostpad.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.2461&r2=1.2462 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/tests/check/gst/gstghostpad.c.diff?r1=1.18&r2=1.19 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.2461 retrieving revision 1.2462 diff -u -d -r1.2461 -r1.2462 --- ChangeLog 28 Apr 2006 22:56:28 -0000 1.2461 +++ ChangeLog 29 Apr 2006 00:33:44 -0000 1.2462 @@ -1,3 +1,10 @@ +2006-04-29 Thomas Vander Stichele <thomas at apestaart dot org> + + * tests/check/gst/gstghostpad.c: (GST_START_TEST): + add more asserts on refcounts + do more cleanup at end of tests + fix test leaks showing in FC5 2006-04-29 Stefan Kost <en...@us...> * plugins/elements/gsttypefindelement.c: @@ -8,8 +15,8 @@ 2006-04-28 Stefan Kost <en...@us...> * libs/gst/base/gstcollectpads.c: (gst_collect_pads_event): - fix changelog entry about last collectpads change, - add notes about proper fix + fix changelog entry about last collectpads change, + add notes about proper fix @@ -17,7 +24,7 @@ * gst/gstregistry.c: (gst_registry_scan_path_level), (gst_registry_scan_path): * gst/gstregistry.h: - only write out registry if it has changed, fixes #338339 + only write out registry if it has changed, fixes #338339 @@ -35,29 +42,29 @@ * plugins/elements/gsttee.c: (gst_type_find_element_handle_event): - make GstElementDetails const + make GstElementDetails const * libs/gst/base/gstbasesink.c: (gst_base_sink_event): * libs/gst/base/gstcollectpads.c: (gst_collect_pads_base_init), (gst_collect_pads_is_collected), (gst_collect_pads_event): - more detailed debug and formatting cleanup, - forward newsegments to src-pad (so that e.g. adder not eats them) + more detailed debug and formatting cleanup, + forward newsegments to src-pad (so that e.g. adder not eats them) * gst/gstutils.c: (gst_element_link_pads): - cleanup double code + cleanup double code * libs/gst/controller/gstcontroller.c: (gst_controller_sync_values): - some little tuning + some little tuning * tests/check/libs/controller.c: (GST_START_TEST), (gst_controller_suite): - a new test for live value handling + a new test for live value handling 2006-04-28 Wim Taymans <wi...@fl...> Index: gstghostpad.c RCS file: /cvs/gstreamer/gstreamer/tests/check/gst/gstghostpad.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- gstghostpad.c 5 Apr 2006 15:12:39 -0000 1.18 +++ gstghostpad.c 29 Apr 2006 00:33:44 -0000 1.19 @@ -33,10 +33,17 @@ b2 = gst_element_factory_make ("bin", NULL); src = gst_element_factory_make ("fakesrc", NULL); sink = gst_element_factory_make ("fakesink", NULL); + ASSERT_OBJECT_REFCOUNT (b1, "pipeline", 1); + ASSERT_OBJECT_REFCOUNT (b2, "bin", 1); fail_unless (gst_bin_add (GST_BIN (b2), sink)); fail_unless (gst_bin_add (GST_BIN (b1), src)); fail_unless (gst_bin_add (GST_BIN (b1), b2)); + /* adding the bin creates a clock provide message with a ref to pipeline */ + ASSERT_OBJECT_REFCOUNT (b1, "pipeline", 2); sinkpad = gst_element_get_pad (sink, "sink"); gst_element_add_pad (b2, gst_ghost_pad_new ("sink", sinkpad)); @@ -51,8 +58,9 @@ gst_object_unref (srcpad); gst_object_unref (sinkpad); - /* now remove the bin with the ghostpad, b2 is disposed - * now. */ + /* now remove the bin with the ghostpad, b2 is disposed now. */ gst_bin_remove (GST_BIN (b1), b2); srcpad = gst_element_get_pad (src, "src"); @@ -60,6 +68,10 @@ fail_if (gst_pad_is_linked (srcpad)); + /* flush the message, dropping the b1 refcount to 1 */ + gst_element_set_state (b1, GST_STATE_READY); + gst_element_set_state (b1, GST_STATE_NULL); gst_object_unref (b1); } @@ -77,21 +89,31 @@ + ASSERT_OBJECT_REFCOUNT (src, "src", 1); + ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 2); /* since we got one */ /* get the ghostpad */ sinkpad = gst_element_get_pad (b2, "sink"); + ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 2); /* since we got one */ + GST_DEBUG ("linking srcpad and sinkpad"); ret = gst_pad_link (srcpad, sinkpad); + GST_DEBUG ("linked srcpad and sinkpad"); fail_unless (ret == GST_PAD_LINK_OK); + /* the linking causes a proxypad to be created for srcpad, + * to which sinkpad gets linked. This proxypad has a ref to srcpad */ + ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 3); + ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 2); @@ -101,6 +123,27 @@ /* pad is still linked to ghostpad */ fail_if (!gst_pad_is_linked (srcpad)); + gst_object_unref (srcpad); + ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 1); + /* cleanup */ + /* now unlink the pads */ + gst_pad_unlink (srcpad, sinkpad); + ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 1); /* proxy has dropped ref */ + /* remove b2 from b1 */ + gst_bin_remove (GST_BIN (b1), b2); + gst_object_unref (b1); GST_END_TEST; @@ -177,6 +220,11 @@ /* and linking should work now */ @@ -301,12 +349,15 @@ GstPad *sinkghost; pipeline = GST_BIN (gst_pipeline_new ("pipe")); + ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 1); srcbin = GST_BIN (gst_bin_new ("srcbin")); gst_bin_add (pipeline, GST_ELEMENT (srcbin)); + ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 2); /* provide-clock msg */ sinkbin = GST_BIN (gst_bin_new ("sinkbin")); gst_bin_add (pipeline, GST_ELEMENT (sinkbin)); + ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 3); /* provide-clock msg */ src = gst_element_factory_make ("fakesrc", "src"); gst_bin_add (srcbin, src); @@ -326,6 +377,11 @@ (srcghost))) != NULL); fail_unless (GST_PAD_PEER (gst_ghost_pad_get_target (GST_GHOST_PAD (sinkghost))) != NULL); + gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_READY); + gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL); |
From: <tho...@ke...> - 2006-05-22 13:34:26
|
CVS Root: /cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Mon May 22 2006 13:34:15 UTC Log message: * tests/check/gst/gststructure.c: (GST_START_TEST), (gst_structure_suite): add a test for a complete structure Modified files: . : ChangeLog tests/check/gst : gststructure.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.2536&r2=1.2537 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/tests/check/gst/gststructure.c.diff?r1=1.9&r2=1.10 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.2536 retrieving revision 1.2537 diff -u -d -r1.2536 -r1.2537 --- ChangeLog 19 May 2006 15:35:40 -0000 1.2536 +++ ChangeLog 22 May 2006 13:34:02 -0000 1.2537 @@ -1,3 +1,9 @@ +2006-05-22 Thomas Vander Stichele <thomas at apestaart dot org> + + * tests/check/gst/gststructure.c: (GST_START_TEST), + (gst_structure_suite): + add a test for a complete structure 2006-05-19 Tim-Philipp Müller <tim at centricular dot net> * docs/faq/developing.xml: Index: gststructure.c RCS file: /cvs/gstreamer/gstreamer/tests/check/gst/gststructure.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- gststructure.c 22 Nov 2005 13:14:51 -0000 1.9 +++ gststructure.c 22 May 2006 13:34:03 -0000 1.10 @@ -110,17 +110,20 @@ GST_END_TEST; -Suite * -gst_value_suite (void) +GST_START_TEST (test_complete_structure) { - Suite *s = suite_create ("GstStructure"); - TCase *tc_chain = tcase_create ("general"); + GstStructure *structure; + const gchar *s; - suite_add_tcase (s, tc_chain); - tcase_add_test (tc_chain, test_from_string_int); - return s; + s = "GstEventSeek, rate=(double)1, format=(GstFormat)GST_FORMAT_TIME, flags=(GstSeekFlags)GST_SEEK_FLAGS_NONE, cur_type=(GstSeekType)GST_SEEK_TYPE_SET, cur=(gint64)1000000000, stop_type=(GstSeekType)GST_SEEK_TYPE_NONE, stop=(gint64)0"; + structure = gst_structure_from_string (s, NULL); + fail_if (structure == NULL, "Could not get structure from string %s", s); + /* FIXME: TODO: add checks for correct serialization of members ? */ + gst_structure_free (structure); } +GST_END_TEST; GST_START_TEST (test_structure_new) GstStructure *s; @@ -149,6 +152,7 @@ suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_from_string_int); tcase_add_test (tc_chain, test_from_string); + tcase_add_test (tc_chain, test_complete_structure); tcase_add_test (tc_chain, test_structure_new); return s; |
From: <tho...@ke...> - 2006-07-02 22:17:44
|
CVS Root: /cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Sun Jul 02 2006 22:17:44 UTC Log message: * tests/check/gst/gstbin.c: (GST_START_TEST), (gst_bin_suite): add a test for adding self Modified files: . : ChangeLog tests/check/gst : gstbin.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.2637&r2=1.2638 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/tests/check/gst/gstbin.c.diff?r1=1.48&r2=1.49 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.2637 retrieving revision 1.2638 diff -u -d -r1.2637 -r1.2638 --- ChangeLog 2 Jul 2006 22:05:47 -0000 1.2637 +++ ChangeLog 2 Jul 2006 22:17:31 -0000 1.2638 @@ -1,5 +1,10 @@ 2006-07-03 Thomas Vander Stichele <thomas at apestaart dot org> + * tests/check/gst/gstbin.c: (GST_START_TEST), (gst_bin_suite): + add a test for adding self + +2006-07-03 Thomas Vander Stichele <thomas at apestaart dot org> * libs/gst/check/gstcheck.h: add some assert_ as alias for fail_unless_* * tests/check/gst/gst.c: (GST_START_TEST), (gst_suite): Index: gstbin.c RCS file: /cvs/gstreamer/gstreamer/tests/check/gst/gstbin.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- gstbin.c 1 Jul 2006 20:56:55 -0000 1.48 +++ gstbin.c 2 Jul 2006 22:17:31 -0000 1.49 @@ -471,6 +471,20 @@ GST_END_TEST; +/* adding ourself should fail */ +GST_START_TEST (test_add_self) +{ + GstElement *bin; + bin = gst_bin_new (NULL); + fail_unless (bin != NULL, "Could not create bin"); + ASSERT_WARNING (gst_bin_add (GST_BIN (bin), bin)); +} +GST_END_TEST; /* g_print ("%10s: %4d => %4d\n", GST_OBJECT_NAME (msg->src), old, new); */ #define ASSERT_STATE_CHANGE_MSG(bus,element,old_state,new_state,num) \ @@ -804,6 +818,7 @@ tcase_add_test (tc_chain, test_message_state_changed_children); tcase_add_test (tc_chain, test_watch_for_state_change); tcase_add_test (tc_chain, test_add_linked); + tcase_add_test (tc_chain, test_add_self); return s; } |