mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
tests: Move common code to test-utils
This commit is contained in:
parent
b731a42145
commit
35cae2c80c
9 changed files with 23 additions and 121 deletions
|
@ -17,6 +17,7 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "test-utils.h"
|
||||||
#include <ges/ges.h>
|
#include <ges/ges.h>
|
||||||
#include <gst/check/gstcheck.h>
|
#include <gst/check/gstcheck.h>
|
||||||
|
|
||||||
|
@ -34,21 +35,6 @@ GST_START_TEST (test_test_source_basic)
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
#define gnl_object_check(gnlobj, start, duration, mstart, mduration, priority, active) { \
|
|
||||||
guint64 pstart, pdur, pmstart, pmdur, pprio, pact; \
|
|
||||||
g_object_get (gnlobj, "start", &pstart, "duration", &pdur, \
|
|
||||||
"media-start", &pmstart, "media-duration", &pmdur, \
|
|
||||||
"priority", &pprio, "active", &pact, \
|
|
||||||
NULL); \
|
|
||||||
assert_equals_uint64 (pstart, start); \
|
|
||||||
assert_equals_uint64 (pdur, duration); \
|
|
||||||
assert_equals_uint64 (pmstart, mstart); \
|
|
||||||
assert_equals_uint64 (pmdur, mduration); \
|
|
||||||
assert_equals_int (pprio, priority); \
|
|
||||||
assert_equals_int (pact, active); \
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
GST_START_TEST (test_test_source_properties)
|
GST_START_TEST (test_test_source_properties)
|
||||||
{
|
{
|
||||||
GESTrack *track;
|
GESTrack *track;
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "test-utils.h"
|
||||||
|
|
||||||
#include <ges/ges.h>
|
#include <ges/ges.h>
|
||||||
#include <gst/check/gstcheck.h>
|
#include <gst/check/gstcheck.h>
|
||||||
|
|
||||||
|
@ -72,21 +74,6 @@ GST_START_TEST (test_filesource_basic)
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
#define gnl_object_check(gnlobj, start, duration, mstart, mduration, priority, active) { \
|
|
||||||
guint64 pstart, pdur, pmstart, pmdur, pprio, pact; \
|
|
||||||
g_object_get (gnlobj, "start", &pstart, "duration", &pdur, \
|
|
||||||
"media-start", &pmstart, "media-duration", &pmdur, \
|
|
||||||
"priority", &pprio, "active", &pact, \
|
|
||||||
NULL); \
|
|
||||||
assert_equals_uint64 (pstart, start); \
|
|
||||||
assert_equals_uint64 (pdur, duration); \
|
|
||||||
assert_equals_uint64 (pmstart, mstart); \
|
|
||||||
assert_equals_uint64 (pmdur, mduration); \
|
|
||||||
assert_equals_int (pprio, priority); \
|
|
||||||
assert_equals_int (pact, active); \
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
GST_START_TEST (test_filesource_properties)
|
GST_START_TEST (test_filesource_properties)
|
||||||
{
|
{
|
||||||
GESTrack *track;
|
GESTrack *track;
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "test-utils.h"
|
||||||
#include <ges/ges.h>
|
#include <ges/ges.h>
|
||||||
#include <gst/check/gstcheck.h>
|
#include <gst/check/gstcheck.h>
|
||||||
|
|
||||||
|
@ -41,23 +42,6 @@ my_fill_track_func (GESTimelineObject * object,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define gnl_object_check(gnlobj, start, duration, mstart, mduration, priority, active) { \
|
|
||||||
guint64 pstart, pdur, pmstart, pmdur; \
|
|
||||||
guint32 pprio; \
|
|
||||||
gboolean pact; \
|
|
||||||
g_object_get (gnlobj, "start", &pstart, "duration", &pdur, \
|
|
||||||
"media-start", &pmstart, "media-duration", &pmdur, \
|
|
||||||
"priority", &pprio, "active", &pact, \
|
|
||||||
NULL); \
|
|
||||||
assert_equals_uint64 (pstart, start); \
|
|
||||||
assert_equals_uint64 (pdur, duration); \
|
|
||||||
assert_equals_uint64 (pmstart, mstart); \
|
|
||||||
assert_equals_uint64 (pmdur, mduration); \
|
|
||||||
assert_equals_int (pprio, priority); \
|
|
||||||
assert_equals_int (pact, active); \
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
GST_START_TEST (test_layer_properties)
|
GST_START_TEST (test_layer_properties)
|
||||||
{
|
{
|
||||||
GESTimeline *timeline;
|
GESTimeline *timeline;
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "test-utils.h"
|
||||||
#include <ges/ges.h>
|
#include <ges/ges.h>
|
||||||
#include <gst/check/gstcheck.h>
|
#include <gst/check/gstcheck.h>
|
||||||
|
|
||||||
|
@ -34,20 +35,6 @@ GST_START_TEST (test_overlay_basic)
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
#define gnl_object_check(gnlobj, start, duration, mstart, mduration, priority, active) { \
|
|
||||||
guint64 pstart, pdur, pmstart, pmdur, pprio; \
|
|
||||||
g_object_get (gnlobj, "start", &pstart, "duration", &pdur, \
|
|
||||||
"media-start", &pmstart, "media-duration", &pmdur, \
|
|
||||||
"priority", &pprio, \
|
|
||||||
NULL); \
|
|
||||||
assert_equals_uint64 (pstart, start); \
|
|
||||||
assert_equals_uint64 (pdur, duration); \
|
|
||||||
assert_equals_uint64 (pmstart, mstart); \
|
|
||||||
assert_equals_uint64 (pmdur, mduration); \
|
|
||||||
assert_equals_int (pprio, priority); \
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
GST_START_TEST (test_overlay_properties)
|
GST_START_TEST (test_overlay_properties)
|
||||||
{
|
{
|
||||||
GESTrack *track;
|
GESTrack *track;
|
||||||
|
|
|
@ -28,6 +28,20 @@ gchar * ges_test_get_audio_only_uri (void);
|
||||||
gchar * ges_test_get_audio_video_uri (void);
|
gchar * ges_test_get_audio_video_uri (void);
|
||||||
gchar * ges_test_file_uri (const gchar *filename);
|
gchar * ges_test_file_uri (const gchar *filename);
|
||||||
|
|
||||||
|
#define gnl_object_check(gnlobj, start, duration, mstart, mduration, priority, active) { \
|
||||||
|
guint64 pstart, pdur, pmstart, pmdur, pprio, pact; \
|
||||||
|
g_object_get (gnlobj, "start", &pstart, "duration", &pdur, \
|
||||||
|
"media-start", &pmstart, "media-duration", &pmdur, \
|
||||||
|
"priority", &pprio, "active", &pact, \
|
||||||
|
NULL); \
|
||||||
|
assert_equals_uint64 (pstart, start); \
|
||||||
|
assert_equals_uint64 (pdur, duration); \
|
||||||
|
assert_equals_uint64 (pmstart, mstart); \
|
||||||
|
assert_equals_uint64 (pmdur, mduration); \
|
||||||
|
assert_equals_int (pprio, priority); \
|
||||||
|
assert_equals_int (pact, active); \
|
||||||
|
}
|
||||||
|
|
||||||
#define gnl_object_check(gnlobj, start, duration, mstart, mduration, priority, active) { \
|
#define gnl_object_check(gnlobj, start, duration, mstart, mduration, priority, active) { \
|
||||||
guint64 pstart, pdur, pmstart, pmdur, pprio, pact; \
|
guint64 pstart, pdur, pmstart, pmdur, pprio, pact; \
|
||||||
g_object_get (gnlobj, "start", &pstart, "duration", &pdur, \
|
g_object_get (gnlobj, "start", &pstart, "duration", &pdur, \
|
||||||
|
|
|
@ -17,22 +17,10 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "test-utils.h"
|
||||||
#include <ges/ges.h>
|
#include <ges/ges.h>
|
||||||
#include <gst/check/gstcheck.h>
|
#include <gst/check/gstcheck.h>
|
||||||
|
|
||||||
#define gnl_object_check(gnlobj, start, duration, mstart, mduration, priority, active) { \
|
|
||||||
guint64 pstart, pdur, pmstart, pmdur, pprio; \
|
|
||||||
g_object_get (gnlobj, "start", &pstart, "duration", &pdur, \
|
|
||||||
"media-start", &pmstart, "media-duration", &pmdur, \
|
|
||||||
"priority", &pprio, \
|
|
||||||
NULL); \
|
|
||||||
assert_equals_uint64 (pstart, start); \
|
|
||||||
assert_equals_uint64 (pdur, duration); \
|
|
||||||
assert_equals_uint64 (pmstart, mstart); \
|
|
||||||
assert_equals_uint64 (pmdur, mduration); \
|
|
||||||
assert_equals_int (pprio, priority); \
|
|
||||||
}
|
|
||||||
|
|
||||||
GST_START_TEST (test_text_properties_in_layer)
|
GST_START_TEST (test_text_properties_in_layer)
|
||||||
{
|
{
|
||||||
GESTimeline *timeline;
|
GESTimeline *timeline;
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "test-utils.h"
|
||||||
#include <ges/ges.h>
|
#include <ges/ges.h>
|
||||||
#include <gst/check/gstcheck.h>
|
#include <gst/check/gstcheck.h>
|
||||||
|
|
||||||
|
@ -38,23 +39,6 @@ my_fill_track_func (GESTimelineObject * object,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define gnl_object_check(gnlobj, start, duration, mstart, mduration, priority, active) { \
|
|
||||||
guint64 pstart, pdur, pmstart, pmdur; \
|
|
||||||
guint32 pprio; \
|
|
||||||
gboolean pact; \
|
|
||||||
g_object_get (gnlobj, "start", &pstart, "duration", &pdur, \
|
|
||||||
"media-start", &pmstart, "media-duration", &pmdur, \
|
|
||||||
"priority", &pprio, "active", &pact, \
|
|
||||||
NULL); \
|
|
||||||
assert_equals_uint64 (pstart, start); \
|
|
||||||
assert_equals_uint64 (pdur, duration); \
|
|
||||||
assert_equals_uint64 (pmstart, mstart); \
|
|
||||||
assert_equals_uint64 (pmdur, mduration); \
|
|
||||||
assert_equals_int (pprio, priority); \
|
|
||||||
assert_equals_int (pact, active); \
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
GST_START_TEST (test_object_properties)
|
GST_START_TEST (test_object_properties)
|
||||||
{
|
{
|
||||||
GESTrack *track;
|
GESTrack *track;
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "test-utils.h"
|
||||||
#include <ges/ges.h>
|
#include <ges/ges.h>
|
||||||
#include <gst/check/gstcheck.h>
|
#include <gst/check/gstcheck.h>
|
||||||
|
|
||||||
|
@ -34,21 +35,6 @@ GST_START_TEST (test_title_source_basic)
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
#define gnl_object_check(gnlobj, start, duration, mstart, mduration, priority, active) { \
|
|
||||||
guint64 pstart, pdur, pmstart, pmdur, pprio, pact; \
|
|
||||||
g_object_get (gnlobj, "start", &pstart, "duration", &pdur, \
|
|
||||||
"media-start", &pmstart, "media-duration", &pmdur, \
|
|
||||||
"priority", &pprio, "active", &pact, \
|
|
||||||
NULL); \
|
|
||||||
assert_equals_uint64 (pstart, start); \
|
|
||||||
assert_equals_uint64 (pdur, duration); \
|
|
||||||
assert_equals_uint64 (pmstart, mstart); \
|
|
||||||
assert_equals_uint64 (pmdur, mduration); \
|
|
||||||
assert_equals_int (pprio, priority); \
|
|
||||||
assert_equals_int (pact, active); \
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
GST_START_TEST (test_title_source_properties)
|
GST_START_TEST (test_title_source_properties)
|
||||||
{
|
{
|
||||||
GESTrack *track;
|
GESTrack *track;
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "test-utils.h"
|
||||||
#include <ges/ges.h>
|
#include <ges/ges.h>
|
||||||
#include <gst/check/gstcheck.h>
|
#include <gst/check/gstcheck.h>
|
||||||
|
|
||||||
|
@ -65,21 +66,6 @@ GST_START_TEST (test_transition_basic)
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
#define gnl_object_check(gnlobj, start, duration, mstart, mduration, priority, active) { \
|
|
||||||
guint64 pstart, pdur, pmstart, pmdur, pprio, pact; \
|
|
||||||
g_object_get (gnlobj, "start", &pstart, "duration", &pdur, \
|
|
||||||
"media-start", &pmstart, "media-duration", &pmdur, \
|
|
||||||
"priority", &pprio, "active", &pact, \
|
|
||||||
NULL); \
|
|
||||||
assert_equals_uint64 (pstart, start); \
|
|
||||||
assert_equals_uint64 (pdur, duration); \
|
|
||||||
assert_equals_uint64 (pmstart, mstart); \
|
|
||||||
assert_equals_uint64 (pmdur, mduration); \
|
|
||||||
assert_equals_int (pprio, priority); \
|
|
||||||
assert_equals_int (pact, active); \
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
GST_START_TEST (test_transition_properties)
|
GST_START_TEST (test_transition_properties)
|
||||||
{
|
{
|
||||||
GESTrack *track;
|
GESTrack *track;
|
||||||
|
|
Loading…
Reference in a new issue