mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-13 12:51:16 +00:00
GESSimpleTimelineLayer: add test for _index() method
This commit is contained in:
parent
82e4d95a28
commit
42f4253ee2
1 changed files with 11 additions and 1 deletions
|
@ -66,7 +66,8 @@ GST_START_TEST (test_gsl_add)
|
|||
GESTimelineLayer *layer;
|
||||
GESTrack *track;
|
||||
GESCustomTimelineSource *source;
|
||||
const GESTimelineObject *source2;
|
||||
GESTimelineObject *source2;
|
||||
gint result;
|
||||
|
||||
ges_init ();
|
||||
/* This is the simplest scenario ever */
|
||||
|
@ -100,6 +101,15 @@ GST_START_TEST (test_gsl_add)
|
|||
source2 = ges_simple_timeline_layer_nth ((GESSimpleTimelineLayer *) layer, 0);
|
||||
fail_unless ((GESTimelineObject *) source == source2);
|
||||
|
||||
/* test position */
|
||||
|
||||
result = ges_simple_timeline_layer_index ((GESSimpleTimelineLayer *) layer,
|
||||
source2);
|
||||
fail_unless_equals_int (result, 0);
|
||||
result = ges_simple_timeline_layer_index ((GESSimpleTimelineLayer *) layer,
|
||||
(GESTimelineObject *) NULL);
|
||||
fail_unless_equals_int (result, -1);
|
||||
|
||||
fail_unless (ges_timeline_layer_remove_object (layer,
|
||||
GES_TIMELINE_OBJECT (source)));
|
||||
fail_unless (ges_timeline_remove_track (timeline, track));
|
||||
|
|
Loading…
Reference in a new issue