Commit 3f4b8084 authored by Wim Taymans's avatar Wim Taymans
Browse files

Added more testcases

Original commit message from CVS:
Added more testcases
parent cccf1891
......@@ -45,6 +45,7 @@ struct _GstBsTest
GstByteStream *bs;
gchar *accesspattern;
guint num_patterns;
gchar **patterns;
guint sizemin;
guint sizemax;
......@@ -235,12 +236,11 @@ gst_bstest_loop (GstElement * element)
bstest = GST_BSTEST (element);
/* THIS IS THE BUFFER BASED ONE */
do {
guint size = 0;
guint i = 0;
while (bstest->patterns[i]) {
while (i < bstest->num_patterns) {
buf = NULL;
if (bstest->patterns[i][0] == 'r') {
......@@ -271,7 +271,6 @@ gst_bstest_loop (GstElement * element)
i++;
}
} while (!GST_ELEMENT_IS_COTHREAD_STOPPING (element));
}
......@@ -300,10 +299,14 @@ gst_bstest_set_property (GObject * object, guint prop_id, const GValue * value,
if (g_value_get_string (value) == NULL) {
gst_element_set_state (GST_ELEMENT (object), GST_STATE_NULL);
bstest->accesspattern = NULL;
/* otherwise set the new filename */
bstest->num_patterns = 0;
} else {
guint i = 0;
bstest->accesspattern = g_strdup (g_value_get_string (value));
bstest->patterns = g_strsplit (bstest->accesspattern, ":", 0);
while (bstest->patterns[i++]);
bstest->num_patterns = i-1;
}
break;
case ARG_COUNT:
......
......@@ -43,3 +43,51 @@
2 2 pr:rr 1
2 3 p:rr 1
2 3 pr:rr 1
1 2 pb:r 1
1 2 pbr:r 1
1 3 pb:r 1
1 3 pbr:r 1
2 2 pb:r 1
2 2 pbr:r 1
2 3 pb:r 1
2 3 pbr:r 1
1 2 pb:rr 1
1 2 pbr:rr 1
1 3 pb:rr 1
1 3 pbr:rr 1
2 2 pb:rr 1
2 2 pbr:rr 1
2 3 pb:rr 1
2 3 pbr:rr 1
1 2 p:fr:rr 0
1 2 pr:fr:rr 0
1 3 p:fr:rr 0
1 3 pr:fr:rr 0
2 2 p:fr:rr 0
2 2 pr:fr:rr 0
2 3 p:fr:rr 0
2 3 pr:fr:rr 0
1 2 fr:rr 0
1 2 fr:rr 0
1 3 fr:rr 0
1 3 fr:rr 0
2 2 fr:rr 0
2 2 fr:rr 0
2 3 fr:rr 0
2 3 fr:rr 0
1 2 fr:fr:rr 0
1 2 fr:fr:rr 0
1 3 fr:fr:rr 0
1 3 fr:fr:rr 0
2 2 fr:fr:rr 0
2 2 fr:fr:rr 0
2 3 fr:fr:rr 0
2 3 fr:fr:rr 0
1 2 pbr:pbr:rr 1
1 2 pbr:pbr:rr 1
1 3 pbr:pbr:rr 1
1 3 pbr:pbr:rr 1
2 2 pbr:pbr:rr 1
2 2 pbr:pbr:rr 1
2 3 pbr:pbr:rr 1
2 3 pbr:pbr:rr 1
......@@ -45,6 +45,7 @@ struct _GstBsTest
GstByteStream *bs;
gchar *accesspattern;
guint num_patterns;
gchar **patterns;
guint sizemin;
guint sizemax;
......@@ -235,12 +236,11 @@ gst_bstest_loop (GstElement * element)
bstest = GST_BSTEST (element);
/* THIS IS THE BUFFER BASED ONE */
do {
guint size = 0;
guint i = 0;
while (bstest->patterns[i]) {
while (i < bstest->num_patterns) {
buf = NULL;
if (bstest->patterns[i][0] == 'r') {
......@@ -271,7 +271,6 @@ gst_bstest_loop (GstElement * element)
i++;
}
} while (!GST_ELEMENT_IS_COTHREAD_STOPPING (element));
}
......@@ -300,10 +299,14 @@ gst_bstest_set_property (GObject * object, guint prop_id, const GValue * value,
if (g_value_get_string (value) == NULL) {
gst_element_set_state (GST_ELEMENT (object), GST_STATE_NULL);
bstest->accesspattern = NULL;
/* otherwise set the new filename */
bstest->num_patterns = 0;
} else {
guint i = 0;
bstest->accesspattern = g_strdup (g_value_get_string (value));
bstest->patterns = g_strsplit (bstest->accesspattern, ":", 0);
while (bstest->patterns[i++]);
bstest->num_patterns = i-1;
}
break;
case ARG_COUNT:
......
......@@ -43,3 +43,51 @@
2 2 pr:rr 1
2 3 p:rr 1
2 3 pr:rr 1
1 2 pb:r 1
1 2 pbr:r 1
1 3 pb:r 1
1 3 pbr:r 1
2 2 pb:r 1
2 2 pbr:r 1
2 3 pb:r 1
2 3 pbr:r 1
1 2 pb:rr 1
1 2 pbr:rr 1
1 3 pb:rr 1
1 3 pbr:rr 1
2 2 pb:rr 1
2 2 pbr:rr 1
2 3 pb:rr 1
2 3 pbr:rr 1
1 2 p:fr:rr 0
1 2 pr:fr:rr 0
1 3 p:fr:rr 0
1 3 pr:fr:rr 0
2 2 p:fr:rr 0
2 2 pr:fr:rr 0
2 3 p:fr:rr 0
2 3 pr:fr:rr 0
1 2 fr:rr 0
1 2 fr:rr 0
1 3 fr:rr 0
1 3 fr:rr 0
2 2 fr:rr 0
2 2 fr:rr 0
2 3 fr:rr 0
2 3 fr:rr 0
1 2 fr:fr:rr 0
1 2 fr:fr:rr 0
1 3 fr:fr:rr 0
1 3 fr:fr:rr 0
2 2 fr:fr:rr 0
2 2 fr:fr:rr 0
2 3 fr:fr:rr 0
2 3 fr:fr:rr 0
1 2 pbr:pbr:rr 1
1 2 pbr:pbr:rr 1
1 3 pbr:pbr:rr 1
1 3 pbr:pbr:rr 1
2 2 pbr:pbr:rr 1
2 2 pbr:pbr:rr 1
2 3 pbr:pbr:rr 1
2 3 pbr:pbr:rr 1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment