summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2011-02-10 18:51:41 +0100
committerEdward Hervey <bilboed@bilboed.com>2011-02-10 18:52:18 +0100
commit1cdf7d533215f831c6cca6ec3102797ef38be8bc (patch)
tree728b301cf5ef8c3e5c5c18dff098dbf9f2a667f7
parent2eaa525c9ef9664ecff9bad46125e4dbeccf1919 (diff)
tests: Add doc and refine seek check
-rw-r--r--tests/check/gnl/gnloperation.c9
-rw-r--r--tests/check/gnl/seek.c7
-rw-r--r--tests/check/gnl/simple.c8
3 files changed, 24 insertions, 0 deletions
diff --git a/tests/check/gnl/gnloperation.c b/tests/check/gnl/gnloperation.c
index 74a2dd7..509f5b4 100644
--- a/tests/check/gnl/gnloperation.c
+++ b/tests/check/gnl/gnloperation.c
@@ -503,6 +503,15 @@ GST_START_TEST (test_complex_operations)
comp =
gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ /* TOPOLOGY
+ *
+ * 0 1 2 3 4 5 6 | Priority
+ * ----------------------------------------------------------------------------
+ * [ -oper- ] | 1
+ * [ -source2- -] | 2
+ * [ -source1- -] | 3
+ * */
+
/*
source1
Start : 0s
diff --git a/tests/check/gnl/seek.c b/tests/check/gnl/seek.c
index cbb0206..1801f25 100644
--- a/tests/check/gnl/seek.c
+++ b/tests/check/gnl/seek.c
@@ -90,6 +90,10 @@ fill_pipeline_and_check (GstElement * comp, GList * segments, GList * seeks)
carry_on = FALSE;
break;
}
+
+ /* We should have received the segment by then and there should be none left */
+ fail_if (collect->expected_segments != NULL);
+
while (seeks) {
SeekInfo *sinfo = (SeekInfo *) seeks->data;
@@ -106,13 +110,16 @@ fill_pipeline_and_check (GstElement * comp, GList * segments, GList * seeks)
GST_TIME_FORMAT " %" GST_TIME_FORMAT ")",
GST_TIME_ARGS (sinfo->position), GST_TIME_ARGS (sinfo->start),
GST_TIME_ARGS (sinfo->stop));
+
fail_unless_equals_int (gst_element_seek_simple (pipeline,
GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, sinfo->position),
!sinfo->expect_failure);
+
if (!sinfo->expect_failure) {
g_free (sinfo);
break;
}
+
GST_DEBUG ("Seek failed as expected");
if (seeks == NULL)
carry_on = FALSE;
diff --git a/tests/check/gnl/simple.c b/tests/check/gnl/simple.c
index c584863..963a924 100644
--- a/tests/check/gnl/simple.c
+++ b/tests/check/gnl/simple.c
@@ -473,6 +473,14 @@ test_one_under_another_full (gboolean async)
gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
fail_if (comp == NULL);
+ /* TOPOLOGY
+ *
+ * 0 1 2 3 4 5 | Priority
+ * ----------------------------------------------------------------------------
+ * [- source1 -] | 1
+ * [- source2 -] | 2
+ * */
+
/*
Source 1
Start : 0s