From: Stefan Sauer Date: Sat, 31 Dec 2011 08:56:53 +0000 (+0100) Subject: controller: fix tests X-Git-Tag: RELEASE-0.11.2~250 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dce3dcee3562f62f589e359710fcb78bab5e6f03;p=platform%2Fupstream%2Fgstreamer.git controller: fix tests Set a defined value to check for no-change. --- diff --git a/tests/check/libs/controller.c b/tests/check/libs/controller.c index c5c96c1..3c5297c 100644 --- a/tests/check/libs/controller.c +++ b/tests/check/libs/controller.c @@ -1431,11 +1431,15 @@ GST_START_TEST (controller_trigger_exact) /* now pull in values for some timestamps */ fail_unless (gst_control_source_get_value (cs, 0 * GST_SECOND, &raw_val)); + gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND); fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50); - fail_unless (gst_control_source_get_value (cs, 1 * GST_SECOND, &raw_val)); + + GST_TEST_OBJ (elem)->val_int = 0; + fail_if (gst_control_source_get_value (cs, 1 * GST_SECOND, &raw_val)); gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND); fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0); + fail_unless (gst_control_source_get_value (cs, 2 * GST_SECOND, &raw_val)); gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND); fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100); @@ -1482,8 +1486,11 @@ GST_START_TEST (controller_trigger_tolerance) fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50); gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND + 5); fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50); + + GST_TEST_OBJ (elem)->val_int = 0; gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND); fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0); + gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND - 5); fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100); gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND);